{-# 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.Types (
ABCIApplication(..), BlockID(), BlockParams(), ConsensusParams(),
Event(), Evidence(), EvidenceParams(), Header(), LastCommitInfo(),
PartSetHeader(), PubKey(), Request(), Request'Value(..),
_Request'Echo, _Request'Flush, _Request'Info, _Request'SetOption,
_Request'InitChain, _Request'Query, _Request'BeginBlock,
_Request'CheckTx, _Request'DeliverTx, _Request'EndBlock,
_Request'Commit, RequestBeginBlock(), RequestCheckTx(),
RequestCommit(), RequestDeliverTx(), RequestEcho(),
RequestEndBlock(), RequestFlush(), RequestInfo(),
RequestInitChain(), RequestQuery(), RequestSetOption(), Response(),
Response'Value(..), _Response'Exception, _Response'Echo,
_Response'Flush, _Response'Info, _Response'SetOption,
_Response'InitChain, _Response'Query, _Response'BeginBlock,
_Response'CheckTx, _Response'DeliverTx, _Response'EndBlock,
_Response'Commit, ResponseBeginBlock(), ResponseCheckTx(),
ResponseCommit(), ResponseDeliverTx(), ResponseEcho(),
ResponseEndBlock(), ResponseException(), ResponseFlush(),
ResponseInfo(), ResponseInitChain(), ResponseQuery(),
ResponseSetOption(), Validator(), ValidatorParams(),
ValidatorUpdate(), Version(), VoteInfo()
) 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.Gogo.Protobuf.Gogoproto.Gogo
import qualified Proto.Google.Protobuf.Timestamp
import qualified Proto.Tendermint.Tendermint.Crypto.Merkle.Merkle
import qualified Proto.Tendermint.Tendermint.Libs.Common.Types
data BlockID
= BlockID'_constructor {BlockID -> ByteString
_BlockID'hash :: !Data.ByteString.ByteString,
:: !(Prelude.Maybe PartSetHeader),
BlockID -> FieldSet
_BlockID'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (BlockID -> BlockID -> Bool
(BlockID -> BlockID -> Bool)
-> (BlockID -> BlockID -> Bool) -> Eq BlockID
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlockID -> BlockID -> Bool
$c/= :: BlockID -> BlockID -> Bool
== :: BlockID -> BlockID -> Bool
$c== :: BlockID -> BlockID -> Bool
Prelude.Eq, Eq BlockID
Eq BlockID =>
(BlockID -> BlockID -> Ordering)
-> (BlockID -> BlockID -> Bool)
-> (BlockID -> BlockID -> Bool)
-> (BlockID -> BlockID -> Bool)
-> (BlockID -> BlockID -> Bool)
-> (BlockID -> BlockID -> BlockID)
-> (BlockID -> BlockID -> BlockID)
-> Ord BlockID
BlockID -> BlockID -> Bool
BlockID -> BlockID -> Ordering
BlockID -> BlockID -> BlockID
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 :: BlockID -> BlockID -> BlockID
$cmin :: BlockID -> BlockID -> BlockID
max :: BlockID -> BlockID -> BlockID
$cmax :: BlockID -> BlockID -> BlockID
>= :: BlockID -> BlockID -> Bool
$c>= :: BlockID -> BlockID -> Bool
> :: BlockID -> BlockID -> Bool
$c> :: BlockID -> BlockID -> Bool
<= :: BlockID -> BlockID -> Bool
$c<= :: BlockID -> BlockID -> Bool
< :: BlockID -> BlockID -> Bool
$c< :: BlockID -> BlockID -> Bool
compare :: BlockID -> BlockID -> Ordering
$ccompare :: BlockID -> BlockID -> Ordering
$cp1Ord :: Eq BlockID
Prelude.Ord)
instance Prelude.Show BlockID where
showsPrec :: Int -> BlockID -> ShowS
showsPrec _ __x :: BlockID
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(BlockID -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort BlockID
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField BlockID "hash" Data.ByteString.ByteString where
fieldOf :: Proxy# "hash"
-> (ByteString -> f ByteString) -> BlockID -> f BlockID
fieldOf _
= ((ByteString -> f ByteString) -> BlockID -> f BlockID)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> BlockID
-> f BlockID
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((BlockID -> ByteString)
-> (BlockID -> ByteString -> BlockID)
-> Lens BlockID BlockID ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
BlockID -> ByteString
_BlockID'hash (\ x__ :: BlockID
x__ y__ :: ByteString
y__ -> BlockID
x__ {_BlockID'hash :: ByteString
_BlockID'hash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField BlockID "partsHeader" PartSetHeader where
fieldOf :: Proxy# "partsHeader"
-> (PartSetHeader -> f PartSetHeader) -> BlockID -> f BlockID
fieldOf _
= ((Maybe PartSetHeader -> f (Maybe PartSetHeader))
-> BlockID -> f BlockID)
-> ((PartSetHeader -> f PartSetHeader)
-> Maybe PartSetHeader -> f (Maybe PartSetHeader))
-> (PartSetHeader -> f PartSetHeader)
-> BlockID
-> f BlockID
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((BlockID -> Maybe PartSetHeader)
-> (BlockID -> Maybe PartSetHeader -> BlockID)
-> Lens BlockID BlockID (Maybe PartSetHeader) (Maybe PartSetHeader)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
BlockID -> Maybe PartSetHeader
_BlockID'partsHeader
(\ x__ :: BlockID
x__ y__ :: Maybe PartSetHeader
y__ -> BlockID
x__ {_BlockID'partsHeader :: Maybe PartSetHeader
_BlockID'partsHeader = Maybe PartSetHeader
y__}))
(PartSetHeader -> Lens' (Maybe PartSetHeader) PartSetHeader
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens PartSetHeader
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField BlockID "maybe'partsHeader" (Prelude.Maybe PartSetHeader) where
fieldOf :: Proxy# "maybe'partsHeader"
-> (Maybe PartSetHeader -> f (Maybe PartSetHeader))
-> BlockID
-> f BlockID
fieldOf _
= ((Maybe PartSetHeader -> f (Maybe PartSetHeader))
-> BlockID -> f BlockID)
-> ((Maybe PartSetHeader -> f (Maybe PartSetHeader))
-> Maybe PartSetHeader -> f (Maybe PartSetHeader))
-> (Maybe PartSetHeader -> f (Maybe PartSetHeader))
-> BlockID
-> f BlockID
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((BlockID -> Maybe PartSetHeader)
-> (BlockID -> Maybe PartSetHeader -> BlockID)
-> Lens BlockID BlockID (Maybe PartSetHeader) (Maybe PartSetHeader)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
BlockID -> Maybe PartSetHeader
_BlockID'partsHeader
(\ x__ :: BlockID
x__ y__ :: Maybe PartSetHeader
y__ -> BlockID
x__ {_BlockID'partsHeader :: Maybe PartSetHeader
_BlockID'partsHeader = Maybe PartSetHeader
y__}))
(Maybe PartSetHeader -> f (Maybe PartSetHeader))
-> Maybe PartSetHeader -> f (Maybe PartSetHeader)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message BlockID where
messageName :: Proxy BlockID -> Text
messageName _ = String -> Text
Data.Text.pack "types.BlockID"
fieldsByTag :: Map Tag (FieldDescriptor BlockID)
fieldsByTag
= let
hash__field_descriptor :: FieldDescriptor BlockID
hash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor BlockID ByteString
-> FieldDescriptor BlockID
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens BlockID BlockID ByteString ByteString
-> FieldAccessor BlockID ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "hash" 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 @"hash")) ::
Data.ProtoLens.FieldDescriptor BlockID
partsHeader__field_descriptor :: FieldDescriptor BlockID
partsHeader__field_descriptor
= String
-> FieldTypeDescriptor PartSetHeader
-> FieldAccessor BlockID PartSetHeader
-> FieldDescriptor BlockID
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"parts_header"
(MessageOrGroup -> FieldTypeDescriptor PartSetHeader
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor PartSetHeader)
(Lens BlockID BlockID (Maybe PartSetHeader) (Maybe PartSetHeader)
-> FieldAccessor BlockID PartSetHeader
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'partsHeader" 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'partsHeader")) ::
Data.ProtoLens.FieldDescriptor BlockID
in
[(Tag, FieldDescriptor BlockID)]
-> Map Tag (FieldDescriptor BlockID)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor BlockID
hash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor BlockID
partsHeader__field_descriptor)]
unknownFields :: LensLike' f BlockID FieldSet
unknownFields
= (BlockID -> FieldSet)
-> (BlockID -> FieldSet -> BlockID) -> Lens' BlockID FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
BlockID -> FieldSet
_BlockID'_unknownFields
(\ x__ :: BlockID
x__ y__ :: FieldSet
y__ -> BlockID
x__ {_BlockID'_unknownFields :: FieldSet
_BlockID'_unknownFields = FieldSet
y__})
defMessage :: BlockID
defMessage
= $WBlockID'_constructor :: ByteString -> Maybe PartSetHeader -> FieldSet -> BlockID
BlockID'_constructor
{_BlockID'hash :: ByteString
_BlockID'hash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_BlockID'partsHeader :: Maybe PartSetHeader
_BlockID'partsHeader = Maybe PartSetHeader
forall a. Maybe a
Prelude.Nothing,
_BlockID'_unknownFields :: FieldSet
_BlockID'_unknownFields = []}
parseMessage :: Parser BlockID
parseMessage
= let
loop :: BlockID -> Data.ProtoLens.Encoding.Bytes.Parser BlockID
loop :: BlockID -> Parser BlockID
loop x :: BlockID
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]))))
BlockID -> Parser BlockID
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter BlockID BlockID FieldSet FieldSet
-> (FieldSet -> FieldSet) -> BlockID -> BlockID
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 BlockID BlockID FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) BlockID
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"hash"
BlockID -> Parser BlockID
loop (Setter BlockID BlockID ByteString ByteString
-> ByteString -> BlockID -> BlockID
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "hash" 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 @"hash") ByteString
y BlockID
x)
18
-> do PartSetHeader
y <- Parser PartSetHeader -> String -> Parser PartSetHeader
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser PartSetHeader -> Parser PartSetHeader
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 PartSetHeader
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"parts_header"
BlockID -> Parser BlockID
loop
(Setter BlockID BlockID PartSetHeader PartSetHeader
-> PartSetHeader -> BlockID -> BlockID
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "partsHeader" 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 @"partsHeader") PartSetHeader
y BlockID
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
BlockID -> Parser BlockID
loop
(Setter BlockID BlockID FieldSet FieldSet
-> (FieldSet -> FieldSet) -> BlockID -> BlockID
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 BlockID BlockID FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) BlockID
x)
in
Parser BlockID -> String -> Parser BlockID
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do BlockID -> Parser BlockID
loop BlockID
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "BlockID"
buildMessage :: BlockID -> Builder
buildMessage
= \ _x :: BlockID
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: ByteString
_v = FoldLike ByteString BlockID BlockID ByteString ByteString
-> BlockID -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "hash" 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 @"hash") BlockID
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe PartSetHeader)
BlockID
BlockID
(Maybe PartSetHeader)
(Maybe PartSetHeader)
-> BlockID -> Maybe PartSetHeader
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'partsHeader" 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'partsHeader") BlockID
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: PartSetHeader
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (PartSetHeader -> ByteString) -> PartSetHeader -> 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))
PartSetHeader -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
PartSetHeader
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet BlockID BlockID FieldSet FieldSet
-> BlockID -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet BlockID BlockID FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields BlockID
_x)))
instance Control.DeepSeq.NFData BlockID where
rnf :: BlockID -> ()
rnf
= \ x__ :: BlockID
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(BlockID -> FieldSet
_BlockID'_unknownFields BlockID
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(BlockID -> ByteString
_BlockID'hash BlockID
x__)
(Maybe PartSetHeader -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (BlockID -> Maybe PartSetHeader
_BlockID'partsHeader BlockID
x__) ()))
data BlockParams
= BlockParams'_constructor {BlockParams -> Int64
_BlockParams'maxBytes :: !Data.Int.Int64,
BlockParams -> Int64
_BlockParams'maxGas :: !Data.Int.Int64,
BlockParams -> FieldSet
_BlockParams'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (BlockParams -> BlockParams -> Bool
(BlockParams -> BlockParams -> Bool)
-> (BlockParams -> BlockParams -> Bool) -> Eq BlockParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlockParams -> BlockParams -> Bool
$c/= :: BlockParams -> BlockParams -> Bool
== :: BlockParams -> BlockParams -> Bool
$c== :: BlockParams -> BlockParams -> Bool
Prelude.Eq, Eq BlockParams
Eq BlockParams =>
(BlockParams -> BlockParams -> Ordering)
-> (BlockParams -> BlockParams -> Bool)
-> (BlockParams -> BlockParams -> Bool)
-> (BlockParams -> BlockParams -> Bool)
-> (BlockParams -> BlockParams -> Bool)
-> (BlockParams -> BlockParams -> BlockParams)
-> (BlockParams -> BlockParams -> BlockParams)
-> Ord BlockParams
BlockParams -> BlockParams -> Bool
BlockParams -> BlockParams -> Ordering
BlockParams -> BlockParams -> BlockParams
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 :: BlockParams -> BlockParams -> BlockParams
$cmin :: BlockParams -> BlockParams -> BlockParams
max :: BlockParams -> BlockParams -> BlockParams
$cmax :: BlockParams -> BlockParams -> BlockParams
>= :: BlockParams -> BlockParams -> Bool
$c>= :: BlockParams -> BlockParams -> Bool
> :: BlockParams -> BlockParams -> Bool
$c> :: BlockParams -> BlockParams -> Bool
<= :: BlockParams -> BlockParams -> Bool
$c<= :: BlockParams -> BlockParams -> Bool
< :: BlockParams -> BlockParams -> Bool
$c< :: BlockParams -> BlockParams -> Bool
compare :: BlockParams -> BlockParams -> Ordering
$ccompare :: BlockParams -> BlockParams -> Ordering
$cp1Ord :: Eq BlockParams
Prelude.Ord)
instance Prelude.Show BlockParams where
showsPrec :: Int -> BlockParams -> ShowS
showsPrec _ __x :: BlockParams
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(BlockParams -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort BlockParams
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField BlockParams "maxBytes" Data.Int.Int64 where
fieldOf :: Proxy# "maxBytes"
-> (Int64 -> f Int64) -> BlockParams -> f BlockParams
fieldOf _
= ((Int64 -> f Int64) -> BlockParams -> f BlockParams)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> BlockParams
-> f BlockParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((BlockParams -> Int64)
-> (BlockParams -> Int64 -> BlockParams)
-> Lens BlockParams BlockParams Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
BlockParams -> Int64
_BlockParams'maxBytes
(\ x__ :: BlockParams
x__ y__ :: Int64
y__ -> BlockParams
x__ {_BlockParams'maxBytes :: Int64
_BlockParams'maxBytes = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField BlockParams "maxGas" Data.Int.Int64 where
fieldOf :: Proxy# "maxGas"
-> (Int64 -> f Int64) -> BlockParams -> f BlockParams
fieldOf _
= ((Int64 -> f Int64) -> BlockParams -> f BlockParams)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> BlockParams
-> f BlockParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((BlockParams -> Int64)
-> (BlockParams -> Int64 -> BlockParams)
-> Lens BlockParams BlockParams Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
BlockParams -> Int64
_BlockParams'maxGas (\ x__ :: BlockParams
x__ y__ :: Int64
y__ -> BlockParams
x__ {_BlockParams'maxGas :: Int64
_BlockParams'maxGas = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message BlockParams where
messageName :: Proxy BlockParams -> Text
messageName _ = String -> Text
Data.Text.pack "types.BlockParams"
fieldsByTag :: Map Tag (FieldDescriptor BlockParams)
fieldsByTag
= let
maxBytes__field_descriptor :: FieldDescriptor BlockParams
maxBytes__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor BlockParams Int64
-> FieldDescriptor BlockParams
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"max_bytes"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens BlockParams BlockParams Int64 Int64
-> FieldAccessor BlockParams Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "maxBytes" 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 @"maxBytes")) ::
Data.ProtoLens.FieldDescriptor BlockParams
maxGas__field_descriptor :: FieldDescriptor BlockParams
maxGas__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor BlockParams Int64
-> FieldDescriptor BlockParams
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"max_gas"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens BlockParams BlockParams Int64 Int64
-> FieldAccessor BlockParams Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "maxGas" 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 @"maxGas")) ::
Data.ProtoLens.FieldDescriptor BlockParams
in
[(Tag, FieldDescriptor BlockParams)]
-> Map Tag (FieldDescriptor BlockParams)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor BlockParams
maxBytes__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor BlockParams
maxGas__field_descriptor)]
unknownFields :: LensLike' f BlockParams FieldSet
unknownFields
= (BlockParams -> FieldSet)
-> (BlockParams -> FieldSet -> BlockParams)
-> Lens' BlockParams FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
BlockParams -> FieldSet
_BlockParams'_unknownFields
(\ x__ :: BlockParams
x__ y__ :: FieldSet
y__ -> BlockParams
x__ {_BlockParams'_unknownFields :: FieldSet
_BlockParams'_unknownFields = FieldSet
y__})
defMessage :: BlockParams
defMessage
= $WBlockParams'_constructor :: Int64 -> Int64 -> FieldSet -> BlockParams
BlockParams'_constructor
{_BlockParams'maxBytes :: Int64
_BlockParams'maxBytes = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_BlockParams'maxGas :: Int64
_BlockParams'maxGas = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_BlockParams'_unknownFields :: FieldSet
_BlockParams'_unknownFields = []}
parseMessage :: Parser BlockParams
parseMessage
= let
loop ::
BlockParams -> Data.ProtoLens.Encoding.Bytes.Parser BlockParams
loop :: BlockParams -> Parser BlockParams
loop x :: BlockParams
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]))))
BlockParams -> Parser BlockParams
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter BlockParams BlockParams FieldSet FieldSet
-> (FieldSet -> FieldSet) -> BlockParams -> BlockParams
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 BlockParams BlockParams FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) BlockParams
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"max_bytes"
BlockParams -> Parser BlockParams
loop
(Setter BlockParams BlockParams Int64 Int64
-> Int64 -> BlockParams -> BlockParams
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "maxBytes" 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 @"maxBytes") Int64
y BlockParams
x)
16
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"max_gas"
BlockParams -> Parser BlockParams
loop (Setter BlockParams BlockParams Int64 Int64
-> Int64 -> BlockParams -> BlockParams
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "maxGas" 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 @"maxGas") Int64
y BlockParams
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
BlockParams -> Parser BlockParams
loop
(Setter BlockParams BlockParams FieldSet FieldSet
-> (FieldSet -> FieldSet) -> BlockParams -> BlockParams
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 BlockParams BlockParams FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) BlockParams
x)
in
Parser BlockParams -> String -> Parser BlockParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do BlockParams -> Parser BlockParams
loop BlockParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "BlockParams"
buildMessage :: BlockParams -> Builder
buildMessage
= \ _x :: BlockParams
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 BlockParams BlockParams Int64 Int64
-> BlockParams -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maxBytes" 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 @"maxBytes") BlockParams
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 BlockParams BlockParams Int64 Int64
-> BlockParams -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maxGas" 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 @"maxGas") BlockParams
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet BlockParams BlockParams FieldSet FieldSet
-> BlockParams -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet BlockParams BlockParams FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields BlockParams
_x)))
instance Control.DeepSeq.NFData BlockParams where
rnf :: BlockParams -> ()
rnf
= \ x__ :: BlockParams
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(BlockParams -> FieldSet
_BlockParams'_unknownFields BlockParams
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(BlockParams -> Int64
_BlockParams'maxBytes BlockParams
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (BlockParams -> Int64
_BlockParams'maxGas BlockParams
x__) ()))
data ConsensusParams
= ConsensusParams'_constructor {ConsensusParams -> Maybe BlockParams
_ConsensusParams'block :: !(Prelude.Maybe BlockParams),
ConsensusParams -> Maybe EvidenceParams
_ConsensusParams'evidence :: !(Prelude.Maybe EvidenceParams),
ConsensusParams -> Maybe ValidatorParams
_ConsensusParams'validator :: !(Prelude.Maybe ValidatorParams),
ConsensusParams -> FieldSet
_ConsensusParams'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ConsensusParams -> ConsensusParams -> Bool
(ConsensusParams -> ConsensusParams -> Bool)
-> (ConsensusParams -> ConsensusParams -> Bool)
-> Eq ConsensusParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConsensusParams -> ConsensusParams -> Bool
$c/= :: ConsensusParams -> ConsensusParams -> Bool
== :: ConsensusParams -> ConsensusParams -> Bool
$c== :: ConsensusParams -> ConsensusParams -> Bool
Prelude.Eq, Eq ConsensusParams
Eq ConsensusParams =>
(ConsensusParams -> ConsensusParams -> Ordering)
-> (ConsensusParams -> ConsensusParams -> Bool)
-> (ConsensusParams -> ConsensusParams -> Bool)
-> (ConsensusParams -> ConsensusParams -> Bool)
-> (ConsensusParams -> ConsensusParams -> Bool)
-> (ConsensusParams -> ConsensusParams -> ConsensusParams)
-> (ConsensusParams -> ConsensusParams -> ConsensusParams)
-> Ord ConsensusParams
ConsensusParams -> ConsensusParams -> Bool
ConsensusParams -> ConsensusParams -> Ordering
ConsensusParams -> ConsensusParams -> ConsensusParams
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 :: ConsensusParams -> ConsensusParams -> ConsensusParams
$cmin :: ConsensusParams -> ConsensusParams -> ConsensusParams
max :: ConsensusParams -> ConsensusParams -> ConsensusParams
$cmax :: ConsensusParams -> ConsensusParams -> ConsensusParams
>= :: ConsensusParams -> ConsensusParams -> Bool
$c>= :: ConsensusParams -> ConsensusParams -> Bool
> :: ConsensusParams -> ConsensusParams -> Bool
$c> :: ConsensusParams -> ConsensusParams -> Bool
<= :: ConsensusParams -> ConsensusParams -> Bool
$c<= :: ConsensusParams -> ConsensusParams -> Bool
< :: ConsensusParams -> ConsensusParams -> Bool
$c< :: ConsensusParams -> ConsensusParams -> Bool
compare :: ConsensusParams -> ConsensusParams -> Ordering
$ccompare :: ConsensusParams -> ConsensusParams -> Ordering
$cp1Ord :: Eq ConsensusParams
Prelude.Ord)
instance Prelude.Show ConsensusParams where
showsPrec :: Int -> ConsensusParams -> ShowS
showsPrec _ __x :: ConsensusParams
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ConsensusParams -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ConsensusParams
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ConsensusParams "block" BlockParams where
fieldOf :: Proxy# "block"
-> (BlockParams -> f BlockParams)
-> ConsensusParams
-> f ConsensusParams
fieldOf _
= ((Maybe BlockParams -> f (Maybe BlockParams))
-> ConsensusParams -> f ConsensusParams)
-> ((BlockParams -> f BlockParams)
-> Maybe BlockParams -> f (Maybe BlockParams))
-> (BlockParams -> f BlockParams)
-> ConsensusParams
-> f ConsensusParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ConsensusParams -> Maybe BlockParams)
-> (ConsensusParams -> Maybe BlockParams -> ConsensusParams)
-> Lens
ConsensusParams
ConsensusParams
(Maybe BlockParams)
(Maybe BlockParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ConsensusParams -> Maybe BlockParams
_ConsensusParams'block
(\ x__ :: ConsensusParams
x__ y__ :: Maybe BlockParams
y__ -> ConsensusParams
x__ {_ConsensusParams'block :: Maybe BlockParams
_ConsensusParams'block = Maybe BlockParams
y__}))
(BlockParams -> Lens' (Maybe BlockParams) BlockParams
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens BlockParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ConsensusParams "maybe'block" (Prelude.Maybe BlockParams) where
fieldOf :: Proxy# "maybe'block"
-> (Maybe BlockParams -> f (Maybe BlockParams))
-> ConsensusParams
-> f ConsensusParams
fieldOf _
= ((Maybe BlockParams -> f (Maybe BlockParams))
-> ConsensusParams -> f ConsensusParams)
-> ((Maybe BlockParams -> f (Maybe BlockParams))
-> Maybe BlockParams -> f (Maybe BlockParams))
-> (Maybe BlockParams -> f (Maybe BlockParams))
-> ConsensusParams
-> f ConsensusParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ConsensusParams -> Maybe BlockParams)
-> (ConsensusParams -> Maybe BlockParams -> ConsensusParams)
-> Lens
ConsensusParams
ConsensusParams
(Maybe BlockParams)
(Maybe BlockParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ConsensusParams -> Maybe BlockParams
_ConsensusParams'block
(\ x__ :: ConsensusParams
x__ y__ :: Maybe BlockParams
y__ -> ConsensusParams
x__ {_ConsensusParams'block :: Maybe BlockParams
_ConsensusParams'block = Maybe BlockParams
y__}))
(Maybe BlockParams -> f (Maybe BlockParams))
-> Maybe BlockParams -> f (Maybe BlockParams)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ConsensusParams "evidence" EvidenceParams where
fieldOf :: Proxy# "evidence"
-> (EvidenceParams -> f EvidenceParams)
-> ConsensusParams
-> f ConsensusParams
fieldOf _
= ((Maybe EvidenceParams -> f (Maybe EvidenceParams))
-> ConsensusParams -> f ConsensusParams)
-> ((EvidenceParams -> f EvidenceParams)
-> Maybe EvidenceParams -> f (Maybe EvidenceParams))
-> (EvidenceParams -> f EvidenceParams)
-> ConsensusParams
-> f ConsensusParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ConsensusParams -> Maybe EvidenceParams)
-> (ConsensusParams -> Maybe EvidenceParams -> ConsensusParams)
-> Lens
ConsensusParams
ConsensusParams
(Maybe EvidenceParams)
(Maybe EvidenceParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ConsensusParams -> Maybe EvidenceParams
_ConsensusParams'evidence
(\ x__ :: ConsensusParams
x__ y__ :: Maybe EvidenceParams
y__ -> ConsensusParams
x__ {_ConsensusParams'evidence :: Maybe EvidenceParams
_ConsensusParams'evidence = Maybe EvidenceParams
y__}))
(EvidenceParams -> Lens' (Maybe EvidenceParams) EvidenceParams
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens EvidenceParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ConsensusParams "maybe'evidence" (Prelude.Maybe EvidenceParams) where
fieldOf :: Proxy# "maybe'evidence"
-> (Maybe EvidenceParams -> f (Maybe EvidenceParams))
-> ConsensusParams
-> f ConsensusParams
fieldOf _
= ((Maybe EvidenceParams -> f (Maybe EvidenceParams))
-> ConsensusParams -> f ConsensusParams)
-> ((Maybe EvidenceParams -> f (Maybe EvidenceParams))
-> Maybe EvidenceParams -> f (Maybe EvidenceParams))
-> (Maybe EvidenceParams -> f (Maybe EvidenceParams))
-> ConsensusParams
-> f ConsensusParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ConsensusParams -> Maybe EvidenceParams)
-> (ConsensusParams -> Maybe EvidenceParams -> ConsensusParams)
-> Lens
ConsensusParams
ConsensusParams
(Maybe EvidenceParams)
(Maybe EvidenceParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ConsensusParams -> Maybe EvidenceParams
_ConsensusParams'evidence
(\ x__ :: ConsensusParams
x__ y__ :: Maybe EvidenceParams
y__ -> ConsensusParams
x__ {_ConsensusParams'evidence :: Maybe EvidenceParams
_ConsensusParams'evidence = Maybe EvidenceParams
y__}))
(Maybe EvidenceParams -> f (Maybe EvidenceParams))
-> Maybe EvidenceParams -> f (Maybe EvidenceParams)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ConsensusParams "validator" ValidatorParams where
fieldOf :: Proxy# "validator"
-> (ValidatorParams -> f ValidatorParams)
-> ConsensusParams
-> f ConsensusParams
fieldOf _
= ((Maybe ValidatorParams -> f (Maybe ValidatorParams))
-> ConsensusParams -> f ConsensusParams)
-> ((ValidatorParams -> f ValidatorParams)
-> Maybe ValidatorParams -> f (Maybe ValidatorParams))
-> (ValidatorParams -> f ValidatorParams)
-> ConsensusParams
-> f ConsensusParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ConsensusParams -> Maybe ValidatorParams)
-> (ConsensusParams -> Maybe ValidatorParams -> ConsensusParams)
-> Lens
ConsensusParams
ConsensusParams
(Maybe ValidatorParams)
(Maybe ValidatorParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ConsensusParams -> Maybe ValidatorParams
_ConsensusParams'validator
(\ x__ :: ConsensusParams
x__ y__ :: Maybe ValidatorParams
y__ -> ConsensusParams
x__ {_ConsensusParams'validator :: Maybe ValidatorParams
_ConsensusParams'validator = Maybe ValidatorParams
y__}))
(ValidatorParams -> Lens' (Maybe ValidatorParams) ValidatorParams
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ValidatorParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ConsensusParams "maybe'validator" (Prelude.Maybe ValidatorParams) where
fieldOf :: Proxy# "maybe'validator"
-> (Maybe ValidatorParams -> f (Maybe ValidatorParams))
-> ConsensusParams
-> f ConsensusParams
fieldOf _
= ((Maybe ValidatorParams -> f (Maybe ValidatorParams))
-> ConsensusParams -> f ConsensusParams)
-> ((Maybe ValidatorParams -> f (Maybe ValidatorParams))
-> Maybe ValidatorParams -> f (Maybe ValidatorParams))
-> (Maybe ValidatorParams -> f (Maybe ValidatorParams))
-> ConsensusParams
-> f ConsensusParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ConsensusParams -> Maybe ValidatorParams)
-> (ConsensusParams -> Maybe ValidatorParams -> ConsensusParams)
-> Lens
ConsensusParams
ConsensusParams
(Maybe ValidatorParams)
(Maybe ValidatorParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ConsensusParams -> Maybe ValidatorParams
_ConsensusParams'validator
(\ x__ :: ConsensusParams
x__ y__ :: Maybe ValidatorParams
y__ -> ConsensusParams
x__ {_ConsensusParams'validator :: Maybe ValidatorParams
_ConsensusParams'validator = Maybe ValidatorParams
y__}))
(Maybe ValidatorParams -> f (Maybe ValidatorParams))
-> Maybe ValidatorParams -> f (Maybe ValidatorParams)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ConsensusParams where
messageName :: Proxy ConsensusParams -> Text
messageName _ = String -> Text
Data.Text.pack "types.ConsensusParams"
fieldsByTag :: Map Tag (FieldDescriptor ConsensusParams)
fieldsByTag
= let
block__field_descriptor :: FieldDescriptor ConsensusParams
block__field_descriptor
= String
-> FieldTypeDescriptor BlockParams
-> FieldAccessor ConsensusParams BlockParams
-> FieldDescriptor ConsensusParams
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"block"
(MessageOrGroup -> FieldTypeDescriptor BlockParams
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor BlockParams)
(Lens
ConsensusParams
ConsensusParams
(Maybe BlockParams)
(Maybe BlockParams)
-> FieldAccessor ConsensusParams BlockParams
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'block" 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'block")) ::
Data.ProtoLens.FieldDescriptor ConsensusParams
evidence__field_descriptor :: FieldDescriptor ConsensusParams
evidence__field_descriptor
= String
-> FieldTypeDescriptor EvidenceParams
-> FieldAccessor ConsensusParams EvidenceParams
-> FieldDescriptor ConsensusParams
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"evidence"
(MessageOrGroup -> FieldTypeDescriptor EvidenceParams
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor EvidenceParams)
(Lens
ConsensusParams
ConsensusParams
(Maybe EvidenceParams)
(Maybe EvidenceParams)
-> FieldAccessor ConsensusParams EvidenceParams
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'evidence" 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'evidence")) ::
Data.ProtoLens.FieldDescriptor ConsensusParams
validator__field_descriptor :: FieldDescriptor ConsensusParams
validator__field_descriptor
= String
-> FieldTypeDescriptor ValidatorParams
-> FieldAccessor ConsensusParams ValidatorParams
-> FieldDescriptor ConsensusParams
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"validator"
(MessageOrGroup -> FieldTypeDescriptor ValidatorParams
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ValidatorParams)
(Lens
ConsensusParams
ConsensusParams
(Maybe ValidatorParams)
(Maybe ValidatorParams)
-> FieldAccessor ConsensusParams ValidatorParams
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'validator" 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'validator")) ::
Data.ProtoLens.FieldDescriptor ConsensusParams
in
[(Tag, FieldDescriptor ConsensusParams)]
-> Map Tag (FieldDescriptor ConsensusParams)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ConsensusParams
block__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ConsensusParams
evidence__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor ConsensusParams
validator__field_descriptor)]
unknownFields :: LensLike' f ConsensusParams FieldSet
unknownFields
= (ConsensusParams -> FieldSet)
-> (ConsensusParams -> FieldSet -> ConsensusParams)
-> Lens' ConsensusParams FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ConsensusParams -> FieldSet
_ConsensusParams'_unknownFields
(\ x__ :: ConsensusParams
x__ y__ :: FieldSet
y__ -> ConsensusParams
x__ {_ConsensusParams'_unknownFields :: FieldSet
_ConsensusParams'_unknownFields = FieldSet
y__})
defMessage :: ConsensusParams
defMessage
= $WConsensusParams'_constructor :: Maybe BlockParams
-> Maybe EvidenceParams
-> Maybe ValidatorParams
-> FieldSet
-> ConsensusParams
ConsensusParams'_constructor
{_ConsensusParams'block :: Maybe BlockParams
_ConsensusParams'block = Maybe BlockParams
forall a. Maybe a
Prelude.Nothing,
_ConsensusParams'evidence :: Maybe EvidenceParams
_ConsensusParams'evidence = Maybe EvidenceParams
forall a. Maybe a
Prelude.Nothing,
_ConsensusParams'validator :: Maybe ValidatorParams
_ConsensusParams'validator = Maybe ValidatorParams
forall a. Maybe a
Prelude.Nothing,
_ConsensusParams'_unknownFields :: FieldSet
_ConsensusParams'_unknownFields = []}
parseMessage :: Parser ConsensusParams
parseMessage
= let
loop ::
ConsensusParams
-> Data.ProtoLens.Encoding.Bytes.Parser ConsensusParams
loop :: ConsensusParams -> Parser ConsensusParams
loop x :: ConsensusParams
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]))))
ConsensusParams -> Parser ConsensusParams
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ConsensusParams ConsensusParams FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ConsensusParams -> ConsensusParams
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 ConsensusParams ConsensusParams FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ConsensusParams
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do BlockParams
y <- Parser BlockParams -> String -> Parser BlockParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser BlockParams -> Parser BlockParams
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 BlockParams
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"block"
ConsensusParams -> Parser ConsensusParams
loop (Setter ConsensusParams ConsensusParams BlockParams BlockParams
-> BlockParams -> ConsensusParams -> ConsensusParams
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "block" 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 @"block") BlockParams
y ConsensusParams
x)
18
-> do EvidenceParams
y <- Parser EvidenceParams -> String -> Parser EvidenceParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser EvidenceParams -> Parser EvidenceParams
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 EvidenceParams
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"evidence"
ConsensusParams -> Parser ConsensusParams
loop
(Setter
ConsensusParams ConsensusParams EvidenceParams EvidenceParams
-> EvidenceParams -> ConsensusParams -> ConsensusParams
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "evidence" 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 @"evidence") EvidenceParams
y ConsensusParams
x)
26
-> do ValidatorParams
y <- Parser ValidatorParams -> String -> Parser ValidatorParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ValidatorParams -> Parser ValidatorParams
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 ValidatorParams
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"validator"
ConsensusParams -> Parser ConsensusParams
loop
(Setter
ConsensusParams ConsensusParams ValidatorParams ValidatorParams
-> ValidatorParams -> ConsensusParams -> ConsensusParams
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "validator" 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 @"validator") ValidatorParams
y ConsensusParams
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ConsensusParams -> Parser ConsensusParams
loop
(Setter ConsensusParams ConsensusParams FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ConsensusParams -> ConsensusParams
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 ConsensusParams ConsensusParams FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ConsensusParams
x)
in
Parser ConsensusParams -> String -> Parser ConsensusParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ConsensusParams -> Parser ConsensusParams
loop ConsensusParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ConsensusParams"
buildMessage :: ConsensusParams -> Builder
buildMessage
= \ _x :: ConsensusParams
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe BlockParams)
ConsensusParams
ConsensusParams
(Maybe BlockParams)
(Maybe BlockParams)
-> ConsensusParams -> Maybe BlockParams
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'block" 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'block") ConsensusParams
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: BlockParams
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (BlockParams -> ByteString) -> BlockParams -> 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))
BlockParams -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
BlockParams
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe EvidenceParams)
ConsensusParams
ConsensusParams
(Maybe EvidenceParams)
(Maybe EvidenceParams)
-> ConsensusParams -> Maybe EvidenceParams
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'evidence" 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'evidence") ConsensusParams
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: EvidenceParams
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (EvidenceParams -> ByteString) -> EvidenceParams -> 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))
EvidenceParams -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
EvidenceParams
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe ValidatorParams)
ConsensusParams
ConsensusParams
(Maybe ValidatorParams)
(Maybe ValidatorParams)
-> ConsensusParams -> Maybe ValidatorParams
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'validator" 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'validator") ConsensusParams
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: ValidatorParams
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
((ByteString -> Builder)
-> (ValidatorParams -> ByteString) -> ValidatorParams -> 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))
ValidatorParams -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ValidatorParams
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet ConsensusParams ConsensusParams FieldSet FieldSet
-> ConsensusParams -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ConsensusParams ConsensusParams FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ConsensusParams
_x))))
instance Control.DeepSeq.NFData ConsensusParams where
rnf :: ConsensusParams -> ()
rnf
= \ x__ :: ConsensusParams
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ConsensusParams -> FieldSet
_ConsensusParams'_unknownFields ConsensusParams
x__)
(Maybe BlockParams -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ConsensusParams -> Maybe BlockParams
_ConsensusParams'block ConsensusParams
x__)
(Maybe EvidenceParams -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ConsensusParams -> Maybe EvidenceParams
_ConsensusParams'evidence ConsensusParams
x__)
(Maybe ValidatorParams -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ConsensusParams -> Maybe ValidatorParams
_ConsensusParams'validator ConsensusParams
x__) ())))
data Event
= Event'_constructor {Event -> Text
_Event'type' :: !Data.Text.Text,
Event -> Vector KVPair
_Event'attributes :: !(Data.Vector.Vector Proto.Tendermint.Tendermint.Libs.Common.Types.KVPair),
Event -> FieldSet
_Event'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (Event -> Event -> Bool
(Event -> Event -> Bool) -> (Event -> Event -> Bool) -> Eq Event
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Event -> Event -> Bool
$c/= :: Event -> Event -> Bool
== :: Event -> Event -> Bool
$c== :: Event -> Event -> Bool
Prelude.Eq, Eq Event
Eq Event =>
(Event -> Event -> Ordering)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Bool)
-> (Event -> Event -> Event)
-> (Event -> Event -> Event)
-> Ord Event
Event -> Event -> Bool
Event -> Event -> Ordering
Event -> Event -> Event
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 :: Event -> Event -> Event
$cmin :: Event -> Event -> Event
max :: Event -> Event -> Event
$cmax :: Event -> Event -> Event
>= :: Event -> Event -> Bool
$c>= :: Event -> Event -> Bool
> :: Event -> Event -> Bool
$c> :: Event -> Event -> Bool
<= :: Event -> Event -> Bool
$c<= :: Event -> Event -> Bool
< :: Event -> Event -> Bool
$c< :: Event -> Event -> Bool
compare :: Event -> Event -> Ordering
$ccompare :: Event -> Event -> Ordering
$cp1Ord :: Eq Event
Prelude.Ord)
instance Prelude.Show Event where
showsPrec :: Int -> Event -> ShowS
showsPrec _ __x :: Event
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(Event -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Event
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField Event "type'" Data.Text.Text where
fieldOf :: Proxy# "type'" -> (Text -> f Text) -> Event -> f Event
fieldOf _
= ((Text -> f Text) -> Event -> f Event)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> Event
-> f Event
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Event -> Text)
-> (Event -> Text -> Event) -> Lens Event Event Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Event -> Text
_Event'type' (\ x__ :: Event
x__ y__ :: Text
y__ -> Event
x__ {_Event'type' :: Text
_Event'type' = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Event "attributes" [Proto.Tendermint.Tendermint.Libs.Common.Types.KVPair] where
fieldOf :: Proxy# "attributes" -> ([KVPair] -> f [KVPair]) -> Event -> f Event
fieldOf _
= ((Vector KVPair -> f (Vector KVPair)) -> Event -> f Event)
-> (([KVPair] -> f [KVPair]) -> Vector KVPair -> f (Vector KVPair))
-> ([KVPair] -> f [KVPair])
-> Event
-> f Event
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Event -> Vector KVPair)
-> (Event -> Vector KVPair -> Event)
-> Lens Event Event (Vector KVPair) (Vector KVPair)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Event -> Vector KVPair
_Event'attributes (\ x__ :: Event
x__ y__ :: Vector KVPair
y__ -> Event
x__ {_Event'attributes :: Vector KVPair
_Event'attributes = Vector KVPair
y__}))
((Vector KVPair -> [KVPair])
-> (Vector KVPair -> [KVPair] -> Vector KVPair)
-> Lens (Vector KVPair) (Vector KVPair) [KVPair] [KVPair]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector KVPair -> [KVPair]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [KVPair]
y__ -> [KVPair] -> Vector KVPair
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [KVPair]
y__))
instance Data.ProtoLens.Field.HasField Event "vec'attributes" (Data.Vector.Vector Proto.Tendermint.Tendermint.Libs.Common.Types.KVPair) where
fieldOf :: Proxy# "vec'attributes"
-> (Vector KVPair -> f (Vector KVPair)) -> Event -> f Event
fieldOf _
= ((Vector KVPair -> f (Vector KVPair)) -> Event -> f Event)
-> ((Vector KVPair -> f (Vector KVPair))
-> Vector KVPair -> f (Vector KVPair))
-> (Vector KVPair -> f (Vector KVPair))
-> Event
-> f Event
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Event -> Vector KVPair)
-> (Event -> Vector KVPair -> Event)
-> Lens Event Event (Vector KVPair) (Vector KVPair)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Event -> Vector KVPair
_Event'attributes (\ x__ :: Event
x__ y__ :: Vector KVPair
y__ -> Event
x__ {_Event'attributes :: Vector KVPair
_Event'attributes = Vector KVPair
y__}))
(Vector KVPair -> f (Vector KVPair))
-> Vector KVPair -> f (Vector KVPair)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Event where
messageName :: Proxy Event -> Text
messageName _ = String -> Text
Data.Text.pack "types.Event"
fieldsByTag :: Map Tag (FieldDescriptor Event)
fieldsByTag
= let
type'__field_descriptor :: FieldDescriptor Event
type'__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor Event Text
-> FieldDescriptor Event
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"type"
(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 Event Event Text Text -> FieldAccessor Event 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 "type'" 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 @"type'")) ::
Data.ProtoLens.FieldDescriptor Event
attributes__field_descriptor :: FieldDescriptor Event
attributes__field_descriptor
= String
-> FieldTypeDescriptor KVPair
-> FieldAccessor Event KVPair
-> FieldDescriptor Event
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"attributes"
(MessageOrGroup -> FieldTypeDescriptor KVPair
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tendermint.Tendermint.Libs.Common.Types.KVPair)
(Packing -> Lens' Event [KVPair] -> FieldAccessor Event KVPair
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked
(forall s a (f :: * -> *).
(HasField s "attributes" 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 @"attributes")) ::
Data.ProtoLens.FieldDescriptor Event
in
[(Tag, FieldDescriptor Event)] -> Map Tag (FieldDescriptor Event)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Event
type'__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor Event
attributes__field_descriptor)]
unknownFields :: LensLike' f Event FieldSet
unknownFields
= (Event -> FieldSet)
-> (Event -> FieldSet -> Event) -> Lens' Event FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Event -> FieldSet
_Event'_unknownFields
(\ x__ :: Event
x__ y__ :: FieldSet
y__ -> Event
x__ {_Event'_unknownFields :: FieldSet
_Event'_unknownFields = FieldSet
y__})
defMessage :: Event
defMessage
= $WEvent'_constructor :: Text -> Vector KVPair -> FieldSet -> Event
Event'_constructor
{_Event'type' :: Text
_Event'type' = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Event'attributes :: Vector KVPair
_Event'attributes = Vector KVPair
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_Event'_unknownFields :: FieldSet
_Event'_unknownFields = []}
parseMessage :: Parser Event
parseMessage
= let
loop ::
Event
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.Tendermint.Tendermint.Libs.Common.Types.KVPair
-> Data.ProtoLens.Encoding.Bytes.Parser Event
loop :: Event -> Growing Vector RealWorld KVPair -> Parser Event
loop x :: Event
x mutable'attributes :: Growing Vector RealWorld KVPair
mutable'attributes
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector KVPair
frozen'attributes <- IO (Vector KVPair) -> Parser (Vector KVPair)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) KVPair -> IO (Vector KVPair)
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 KVPair
Growing Vector (PrimState IO) KVPair
mutable'attributes)
(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]))))
Event -> Parser Event
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter Event Event FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Event -> Event
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 Event Event FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter Event Event (Vector KVPair) (Vector KVPair)
-> Vector KVPair -> Event -> Event
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'attributes" 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'attributes")
Vector KVPair
frozen'attributes
Event
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))
"type"
Event -> Growing Vector RealWorld KVPair -> Parser Event
loop
(Setter Event Event Text Text -> Text -> Event -> Event
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "type'" 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 @"type'") Text
y Event
x)
Growing Vector RealWorld KVPair
mutable'attributes
18
-> do !KVPair
y <- Parser KVPair -> String -> Parser KVPair
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser KVPair -> Parser KVPair
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 KVPair
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"attributes"
Growing Vector RealWorld KVPair
v <- IO (Growing Vector RealWorld KVPair)
-> Parser (Growing Vector RealWorld KVPair)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) KVPair
-> KVPair -> IO (Growing Vector (PrimState IO) KVPair)
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 KVPair
Growing Vector (PrimState IO) KVPair
mutable'attributes KVPair
y)
Event -> Growing Vector RealWorld KVPair -> Parser Event
loop Event
x Growing Vector RealWorld KVPair
v
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
Event -> Growing Vector RealWorld KVPair -> Parser Event
loop
(Setter Event Event FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Event -> Event
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 Event Event FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Event
x)
Growing Vector RealWorld KVPair
mutable'attributes
in
Parser Event -> String -> Parser Event
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld KVPair
mutable'attributes <- IO (Growing Vector RealWorld KVPair)
-> Parser (Growing Vector RealWorld KVPair)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld KVPair)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
Event -> Growing Vector RealWorld KVPair -> Parser Event
loop Event
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld KVPair
mutable'attributes)
"Event"
buildMessage :: Event -> Builder
buildMessage
= \ _x :: Event
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text Event Event Text Text -> Event -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "type'" 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 @"type'") Event
_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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((KVPair -> Builder) -> Vector KVPair -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: KVPair
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (KVPair -> ByteString) -> KVPair -> 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))
KVPair -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
KVPair
_v))
(FoldLike
(Vector KVPair) Event Event (Vector KVPair) (Vector KVPair)
-> Event -> Vector KVPair
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "vec'attributes" 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'attributes") Event
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet Event Event FieldSet FieldSet
-> Event -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Event Event FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Event
_x)))
instance Control.DeepSeq.NFData Event where
rnf :: Event -> ()
rnf
= \ x__ :: Event
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Event -> FieldSet
_Event'_unknownFields Event
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Event -> Text
_Event'type' Event
x__)
(Vector KVPair -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Event -> Vector KVPair
_Event'attributes Event
x__) ()))
data Evidence
= Evidence'_constructor {Evidence -> Text
_Evidence'type' :: !Data.Text.Text,
Evidence -> Maybe Validator
_Evidence'validator :: !(Prelude.Maybe Validator),
Evidence -> Int64
_Evidence'height :: !Data.Int.Int64,
Evidence -> Maybe Timestamp
_Evidence'time :: !(Prelude.Maybe Proto.Google.Protobuf.Timestamp.Timestamp),
Evidence -> Int64
_Evidence'totalVotingPower :: !Data.Int.Int64,
Evidence -> FieldSet
_Evidence'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (Evidence -> Evidence -> Bool
(Evidence -> Evidence -> Bool)
-> (Evidence -> Evidence -> Bool) -> Eq Evidence
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Evidence -> Evidence -> Bool
$c/= :: Evidence -> Evidence -> Bool
== :: Evidence -> Evidence -> Bool
$c== :: Evidence -> Evidence -> Bool
Prelude.Eq, Eq Evidence
Eq Evidence =>
(Evidence -> Evidence -> Ordering)
-> (Evidence -> Evidence -> Bool)
-> (Evidence -> Evidence -> Bool)
-> (Evidence -> Evidence -> Bool)
-> (Evidence -> Evidence -> Bool)
-> (Evidence -> Evidence -> Evidence)
-> (Evidence -> Evidence -> Evidence)
-> Ord Evidence
Evidence -> Evidence -> Bool
Evidence -> Evidence -> Ordering
Evidence -> Evidence -> Evidence
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 :: Evidence -> Evidence -> Evidence
$cmin :: Evidence -> Evidence -> Evidence
max :: Evidence -> Evidence -> Evidence
$cmax :: Evidence -> Evidence -> Evidence
>= :: Evidence -> Evidence -> Bool
$c>= :: Evidence -> Evidence -> Bool
> :: Evidence -> Evidence -> Bool
$c> :: Evidence -> Evidence -> Bool
<= :: Evidence -> Evidence -> Bool
$c<= :: Evidence -> Evidence -> Bool
< :: Evidence -> Evidence -> Bool
$c< :: Evidence -> Evidence -> Bool
compare :: Evidence -> Evidence -> Ordering
$ccompare :: Evidence -> Evidence -> Ordering
$cp1Ord :: Eq Evidence
Prelude.Ord)
instance Prelude.Show Evidence where
showsPrec :: Int -> Evidence -> ShowS
showsPrec _ __x :: Evidence
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(Evidence -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Evidence
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField Evidence "type'" Data.Text.Text where
fieldOf :: Proxy# "type'" -> (Text -> f Text) -> Evidence -> f Evidence
fieldOf _
= ((Text -> f Text) -> Evidence -> f Evidence)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> Evidence
-> f Evidence
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Evidence -> Text)
-> (Evidence -> Text -> Evidence)
-> Lens Evidence Evidence Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Evidence -> Text
_Evidence'type' (\ x__ :: Evidence
x__ y__ :: Text
y__ -> Evidence
x__ {_Evidence'type' :: Text
_Evidence'type' = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Evidence "validator" Validator where
fieldOf :: Proxy# "validator"
-> (Validator -> f Validator) -> Evidence -> f Evidence
fieldOf _
= ((Maybe Validator -> f (Maybe Validator))
-> Evidence -> f Evidence)
-> ((Validator -> f Validator)
-> Maybe Validator -> f (Maybe Validator))
-> (Validator -> f Validator)
-> Evidence
-> f Evidence
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Evidence -> Maybe Validator)
-> (Evidence -> Maybe Validator -> Evidence)
-> Lens Evidence Evidence (Maybe Validator) (Maybe Validator)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Evidence -> Maybe Validator
_Evidence'validator (\ x__ :: Evidence
x__ y__ :: Maybe Validator
y__ -> Evidence
x__ {_Evidence'validator :: Maybe Validator
_Evidence'validator = Maybe Validator
y__}))
(Validator -> Lens' (Maybe Validator) Validator
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Validator
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Evidence "maybe'validator" (Prelude.Maybe Validator) where
fieldOf :: Proxy# "maybe'validator"
-> (Maybe Validator -> f (Maybe Validator))
-> Evidence
-> f Evidence
fieldOf _
= ((Maybe Validator -> f (Maybe Validator))
-> Evidence -> f Evidence)
-> ((Maybe Validator -> f (Maybe Validator))
-> Maybe Validator -> f (Maybe Validator))
-> (Maybe Validator -> f (Maybe Validator))
-> Evidence
-> f Evidence
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Evidence -> Maybe Validator)
-> (Evidence -> Maybe Validator -> Evidence)
-> Lens Evidence Evidence (Maybe Validator) (Maybe Validator)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Evidence -> Maybe Validator
_Evidence'validator (\ x__ :: Evidence
x__ y__ :: Maybe Validator
y__ -> Evidence
x__ {_Evidence'validator :: Maybe Validator
_Evidence'validator = Maybe Validator
y__}))
(Maybe Validator -> f (Maybe Validator))
-> Maybe Validator -> f (Maybe Validator)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Evidence "height" Data.Int.Int64 where
fieldOf :: Proxy# "height" -> (Int64 -> f Int64) -> Evidence -> f Evidence
fieldOf _
= ((Int64 -> f Int64) -> Evidence -> f Evidence)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> Evidence
-> f Evidence
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Evidence -> Int64)
-> (Evidence -> Int64 -> Evidence)
-> Lens Evidence Evidence Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Evidence -> Int64
_Evidence'height (\ x__ :: Evidence
x__ y__ :: Int64
y__ -> Evidence
x__ {_Evidence'height :: Int64
_Evidence'height = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Evidence "time" Proto.Google.Protobuf.Timestamp.Timestamp where
fieldOf :: Proxy# "time"
-> (Timestamp -> f Timestamp) -> Evidence -> f Evidence
fieldOf _
= ((Maybe Timestamp -> f (Maybe Timestamp))
-> Evidence -> f Evidence)
-> ((Timestamp -> f Timestamp)
-> Maybe Timestamp -> f (Maybe Timestamp))
-> (Timestamp -> f Timestamp)
-> Evidence
-> f Evidence
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Evidence -> Maybe Timestamp)
-> (Evidence -> Maybe Timestamp -> Evidence)
-> Lens Evidence Evidence (Maybe Timestamp) (Maybe Timestamp)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Evidence -> Maybe Timestamp
_Evidence'time (\ x__ :: Evidence
x__ y__ :: Maybe Timestamp
y__ -> Evidence
x__ {_Evidence'time :: Maybe Timestamp
_Evidence'time = Maybe Timestamp
y__}))
(Timestamp -> Lens' (Maybe Timestamp) Timestamp
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Timestamp
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Evidence "maybe'time" (Prelude.Maybe Proto.Google.Protobuf.Timestamp.Timestamp) where
fieldOf :: Proxy# "maybe'time"
-> (Maybe Timestamp -> f (Maybe Timestamp))
-> Evidence
-> f Evidence
fieldOf _
= ((Maybe Timestamp -> f (Maybe Timestamp))
-> Evidence -> f Evidence)
-> ((Maybe Timestamp -> f (Maybe Timestamp))
-> Maybe Timestamp -> f (Maybe Timestamp))
-> (Maybe Timestamp -> f (Maybe Timestamp))
-> Evidence
-> f Evidence
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Evidence -> Maybe Timestamp)
-> (Evidence -> Maybe Timestamp -> Evidence)
-> Lens Evidence Evidence (Maybe Timestamp) (Maybe Timestamp)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Evidence -> Maybe Timestamp
_Evidence'time (\ x__ :: Evidence
x__ y__ :: Maybe Timestamp
y__ -> Evidence
x__ {_Evidence'time :: Maybe Timestamp
_Evidence'time = Maybe Timestamp
y__}))
(Maybe Timestamp -> f (Maybe Timestamp))
-> Maybe Timestamp -> f (Maybe Timestamp)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Evidence "totalVotingPower" Data.Int.Int64 where
fieldOf :: Proxy# "totalVotingPower"
-> (Int64 -> f Int64) -> Evidence -> f Evidence
fieldOf _
= ((Int64 -> f Int64) -> Evidence -> f Evidence)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> Evidence
-> f Evidence
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Evidence -> Int64)
-> (Evidence -> Int64 -> Evidence)
-> Lens Evidence Evidence Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Evidence -> Int64
_Evidence'totalVotingPower
(\ x__ :: Evidence
x__ y__ :: Int64
y__ -> Evidence
x__ {_Evidence'totalVotingPower :: Int64
_Evidence'totalVotingPower = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Evidence where
messageName :: Proxy Evidence -> Text
messageName _ = String -> Text
Data.Text.pack "types.Evidence"
fieldsByTag :: Map Tag (FieldDescriptor Evidence)
fieldsByTag
= let
type'__field_descriptor :: FieldDescriptor Evidence
type'__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor Evidence Text
-> FieldDescriptor Evidence
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"type"
(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 Evidence Evidence Text Text -> FieldAccessor Evidence 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 "type'" 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 @"type'")) ::
Data.ProtoLens.FieldDescriptor Evidence
validator__field_descriptor :: FieldDescriptor Evidence
validator__field_descriptor
= String
-> FieldTypeDescriptor Validator
-> FieldAccessor Evidence Validator
-> FieldDescriptor Evidence
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"validator"
(MessageOrGroup -> FieldTypeDescriptor Validator
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Validator)
(Lens Evidence Evidence (Maybe Validator) (Maybe Validator)
-> FieldAccessor Evidence Validator
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'validator" 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'validator")) ::
Data.ProtoLens.FieldDescriptor Evidence
height__field_descriptor :: FieldDescriptor Evidence
height__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor Evidence Int64
-> FieldDescriptor Evidence
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"height"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens Evidence Evidence Int64 Int64
-> FieldAccessor Evidence Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "height" 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 @"height")) ::
Data.ProtoLens.FieldDescriptor Evidence
time__field_descriptor :: FieldDescriptor Evidence
time__field_descriptor
= String
-> FieldTypeDescriptor Timestamp
-> FieldAccessor Evidence Timestamp
-> FieldDescriptor Evidence
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"time"
(MessageOrGroup -> FieldTypeDescriptor Timestamp
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Google.Protobuf.Timestamp.Timestamp)
(Lens Evidence Evidence (Maybe Timestamp) (Maybe Timestamp)
-> FieldAccessor Evidence Timestamp
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'time" 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'time")) ::
Data.ProtoLens.FieldDescriptor Evidence
totalVotingPower__field_descriptor :: FieldDescriptor Evidence
totalVotingPower__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor Evidence Int64
-> FieldDescriptor Evidence
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"total_voting_power"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens Evidence Evidence Int64 Int64
-> FieldAccessor Evidence Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "totalVotingPower" 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 @"totalVotingPower")) ::
Data.ProtoLens.FieldDescriptor Evidence
in
[(Tag, FieldDescriptor Evidence)]
-> Map Tag (FieldDescriptor Evidence)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Evidence
type'__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor Evidence
validator__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor Evidence
height__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor Evidence
time__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor Evidence
totalVotingPower__field_descriptor)]
unknownFields :: LensLike' f Evidence FieldSet
unknownFields
= (Evidence -> FieldSet)
-> (Evidence -> FieldSet -> Evidence) -> Lens' Evidence FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Evidence -> FieldSet
_Evidence'_unknownFields
(\ x__ :: Evidence
x__ y__ :: FieldSet
y__ -> Evidence
x__ {_Evidence'_unknownFields :: FieldSet
_Evidence'_unknownFields = FieldSet
y__})
defMessage :: Evidence
defMessage
= $WEvidence'_constructor :: Text
-> Maybe Validator
-> Int64
-> Maybe Timestamp
-> Int64
-> FieldSet
-> Evidence
Evidence'_constructor
{_Evidence'type' :: Text
_Evidence'type' = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Evidence'validator :: Maybe Validator
_Evidence'validator = Maybe Validator
forall a. Maybe a
Prelude.Nothing,
_Evidence'height :: Int64
_Evidence'height = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Evidence'time :: Maybe Timestamp
_Evidence'time = Maybe Timestamp
forall a. Maybe a
Prelude.Nothing,
_Evidence'totalVotingPower :: Int64
_Evidence'totalVotingPower = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Evidence'_unknownFields :: FieldSet
_Evidence'_unknownFields = []}
parseMessage :: Parser Evidence
parseMessage
= let
loop :: Evidence -> Data.ProtoLens.Encoding.Bytes.Parser Evidence
loop :: Evidence -> Parser Evidence
loop x :: Evidence
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]))))
Evidence -> Parser Evidence
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter Evidence Evidence FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Evidence -> Evidence
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 Evidence Evidence FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Evidence
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))
"type"
Evidence -> Parser Evidence
loop (Setter Evidence Evidence Text Text -> Text -> Evidence -> Evidence
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "type'" 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 @"type'") Text
y Evidence
x)
18
-> do Validator
y <- Parser Validator -> String -> Parser Validator
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Validator -> Parser Validator
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 Validator
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"validator"
Evidence -> Parser Evidence
loop
(Setter Evidence Evidence Validator Validator
-> Validator -> Evidence -> Evidence
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "validator" 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 @"validator") Validator
y Evidence
x)
24
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"height"
Evidence -> Parser Evidence
loop (Setter Evidence Evidence Int64 Int64
-> Int64 -> Evidence -> Evidence
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "height" 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 @"height") Int64
y Evidence
x)
34
-> do Timestamp
y <- Parser Timestamp -> String -> Parser Timestamp
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Timestamp -> Parser Timestamp
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 Timestamp
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"time"
Evidence -> Parser Evidence
loop (Setter Evidence Evidence Timestamp Timestamp
-> Timestamp -> Evidence -> Evidence
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "time" 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 @"time") Timestamp
y Evidence
x)
40
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"total_voting_power"
Evidence -> Parser Evidence
loop
(Setter Evidence Evidence Int64 Int64
-> Int64 -> Evidence -> Evidence
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "totalVotingPower" 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 @"totalVotingPower") Int64
y Evidence
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
Evidence -> Parser Evidence
loop
(Setter Evidence Evidence FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Evidence -> Evidence
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 Evidence Evidence FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Evidence
x)
in
Parser Evidence -> String -> Parser Evidence
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Evidence -> Parser Evidence
loop Evidence
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "Evidence"
buildMessage :: Evidence -> Builder
buildMessage
= \ _x :: Evidence
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text Evidence Evidence Text Text -> Evidence -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "type'" 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 @"type'") Evidence
_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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe Validator)
Evidence
Evidence
(Maybe Validator)
(Maybe Validator)
-> Evidence -> Maybe Validator
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'validator" 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'validator") Evidence
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: Validator
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (Validator -> ByteString) -> Validator -> 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))
Validator -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Validator
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 Evidence Evidence Int64 Int64 -> Evidence -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "height" 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 @"height") Evidence
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 24)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe Timestamp)
Evidence
Evidence
(Maybe Timestamp)
(Maybe Timestamp)
-> Evidence -> Maybe Timestamp
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'time" 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'time") Evidence
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: Timestamp
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 34)
((ByteString -> Builder)
-> (Timestamp -> ByteString) -> Timestamp -> 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))
Timestamp -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Timestamp
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v
= FoldLike Int64 Evidence Evidence Int64 Int64 -> Evidence -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "totalVotingPower" 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 @"totalVotingPower") Evidence
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 40)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Int64
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet Evidence Evidence FieldSet FieldSet
-> Evidence -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Evidence Evidence FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Evidence
_x))))))
instance Control.DeepSeq.NFData Evidence where
rnf :: Evidence -> ()
rnf
= \ x__ :: Evidence
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Evidence -> FieldSet
_Evidence'_unknownFields Evidence
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Evidence -> Text
_Evidence'type' Evidence
x__)
(Maybe Validator -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Evidence -> Maybe Validator
_Evidence'validator Evidence
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Evidence -> Int64
_Evidence'height Evidence
x__)
(Maybe Timestamp -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Evidence -> Maybe Timestamp
_Evidence'time Evidence
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Evidence -> Int64
_Evidence'totalVotingPower Evidence
x__) ())))))
data EvidenceParams
= EvidenceParams'_constructor {EvidenceParams -> Int64
_EvidenceParams'maxAge :: !Data.Int.Int64,
EvidenceParams -> FieldSet
_EvidenceParams'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (EvidenceParams -> EvidenceParams -> Bool
(EvidenceParams -> EvidenceParams -> Bool)
-> (EvidenceParams -> EvidenceParams -> Bool) -> Eq EvidenceParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EvidenceParams -> EvidenceParams -> Bool
$c/= :: EvidenceParams -> EvidenceParams -> Bool
== :: EvidenceParams -> EvidenceParams -> Bool
$c== :: EvidenceParams -> EvidenceParams -> Bool
Prelude.Eq, Eq EvidenceParams
Eq EvidenceParams =>
(EvidenceParams -> EvidenceParams -> Ordering)
-> (EvidenceParams -> EvidenceParams -> Bool)
-> (EvidenceParams -> EvidenceParams -> Bool)
-> (EvidenceParams -> EvidenceParams -> Bool)
-> (EvidenceParams -> EvidenceParams -> Bool)
-> (EvidenceParams -> EvidenceParams -> EvidenceParams)
-> (EvidenceParams -> EvidenceParams -> EvidenceParams)
-> Ord EvidenceParams
EvidenceParams -> EvidenceParams -> Bool
EvidenceParams -> EvidenceParams -> Ordering
EvidenceParams -> EvidenceParams -> EvidenceParams
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 :: EvidenceParams -> EvidenceParams -> EvidenceParams
$cmin :: EvidenceParams -> EvidenceParams -> EvidenceParams
max :: EvidenceParams -> EvidenceParams -> EvidenceParams
$cmax :: EvidenceParams -> EvidenceParams -> EvidenceParams
>= :: EvidenceParams -> EvidenceParams -> Bool
$c>= :: EvidenceParams -> EvidenceParams -> Bool
> :: EvidenceParams -> EvidenceParams -> Bool
$c> :: EvidenceParams -> EvidenceParams -> Bool
<= :: EvidenceParams -> EvidenceParams -> Bool
$c<= :: EvidenceParams -> EvidenceParams -> Bool
< :: EvidenceParams -> EvidenceParams -> Bool
$c< :: EvidenceParams -> EvidenceParams -> Bool
compare :: EvidenceParams -> EvidenceParams -> Ordering
$ccompare :: EvidenceParams -> EvidenceParams -> Ordering
$cp1Ord :: Eq EvidenceParams
Prelude.Ord)
instance Prelude.Show EvidenceParams where
showsPrec :: Int -> EvidenceParams -> ShowS
showsPrec _ __x :: EvidenceParams
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(EvidenceParams -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort EvidenceParams
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField EvidenceParams "maxAge" Data.Int.Int64 where
fieldOf :: Proxy# "maxAge"
-> (Int64 -> f Int64) -> EvidenceParams -> f EvidenceParams
fieldOf _
= ((Int64 -> f Int64) -> EvidenceParams -> f EvidenceParams)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> EvidenceParams
-> f EvidenceParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((EvidenceParams -> Int64)
-> (EvidenceParams -> Int64 -> EvidenceParams)
-> Lens EvidenceParams EvidenceParams Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
EvidenceParams -> Int64
_EvidenceParams'maxAge
(\ x__ :: EvidenceParams
x__ y__ :: Int64
y__ -> EvidenceParams
x__ {_EvidenceParams'maxAge :: Int64
_EvidenceParams'maxAge = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message EvidenceParams where
messageName :: Proxy EvidenceParams -> Text
messageName _ = String -> Text
Data.Text.pack "types.EvidenceParams"
fieldsByTag :: Map Tag (FieldDescriptor EvidenceParams)
fieldsByTag
= let
maxAge__field_descriptor :: FieldDescriptor EvidenceParams
maxAge__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor EvidenceParams Int64
-> FieldDescriptor EvidenceParams
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"max_age"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens EvidenceParams EvidenceParams Int64 Int64
-> FieldAccessor EvidenceParams Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "maxAge" 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 @"maxAge")) ::
Data.ProtoLens.FieldDescriptor EvidenceParams
in
[(Tag, FieldDescriptor EvidenceParams)]
-> Map Tag (FieldDescriptor EvidenceParams)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor EvidenceParams
maxAge__field_descriptor)]
unknownFields :: LensLike' f EvidenceParams FieldSet
unknownFields
= (EvidenceParams -> FieldSet)
-> (EvidenceParams -> FieldSet -> EvidenceParams)
-> Lens' EvidenceParams FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
EvidenceParams -> FieldSet
_EvidenceParams'_unknownFields
(\ x__ :: EvidenceParams
x__ y__ :: FieldSet
y__ -> EvidenceParams
x__ {_EvidenceParams'_unknownFields :: FieldSet
_EvidenceParams'_unknownFields = FieldSet
y__})
defMessage :: EvidenceParams
defMessage
= $WEvidenceParams'_constructor :: Int64 -> FieldSet -> EvidenceParams
EvidenceParams'_constructor
{_EvidenceParams'maxAge :: Int64
_EvidenceParams'maxAge = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_EvidenceParams'_unknownFields :: FieldSet
_EvidenceParams'_unknownFields = []}
parseMessage :: Parser EvidenceParams
parseMessage
= let
loop ::
EvidenceParams
-> Data.ProtoLens.Encoding.Bytes.Parser EvidenceParams
loop :: EvidenceParams -> Parser EvidenceParams
loop x :: EvidenceParams
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]))))
EvidenceParams -> Parser EvidenceParams
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter EvidenceParams EvidenceParams FieldSet FieldSet
-> (FieldSet -> FieldSet) -> EvidenceParams -> EvidenceParams
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 EvidenceParams EvidenceParams FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) EvidenceParams
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"max_age"
EvidenceParams -> Parser EvidenceParams
loop (Setter EvidenceParams EvidenceParams Int64 Int64
-> Int64 -> EvidenceParams -> EvidenceParams
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "maxAge" 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 @"maxAge") Int64
y EvidenceParams
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
EvidenceParams -> Parser EvidenceParams
loop
(Setter EvidenceParams EvidenceParams FieldSet FieldSet
-> (FieldSet -> FieldSet) -> EvidenceParams -> EvidenceParams
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 EvidenceParams EvidenceParams FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) EvidenceParams
x)
in
Parser EvidenceParams -> String -> Parser EvidenceParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do EvidenceParams -> Parser EvidenceParams
loop EvidenceParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "EvidenceParams"
buildMessage :: EvidenceParams -> Builder
buildMessage
= \ _x :: EvidenceParams
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 EvidenceParams EvidenceParams Int64 Int64
-> EvidenceParams -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maxAge" 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 @"maxAge") EvidenceParams
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet EvidenceParams EvidenceParams FieldSet FieldSet
-> EvidenceParams -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet EvidenceParams EvidenceParams FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields EvidenceParams
_x))
instance Control.DeepSeq.NFData EvidenceParams where
rnf :: EvidenceParams -> ()
rnf
= \ x__ :: EvidenceParams
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(EvidenceParams -> FieldSet
_EvidenceParams'_unknownFields EvidenceParams
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (EvidenceParams -> Int64
_EvidenceParams'maxAge EvidenceParams
x__) ())
data
= { :: !(Prelude.Maybe Version),
:: !Data.Text.Text,
:: !Data.Int.Int64,
:: !(Prelude.Maybe Proto.Google.Protobuf.Timestamp.Timestamp),
:: !Data.Int.Int64,
:: !Data.Int.Int64,
:: !(Prelude.Maybe BlockID),
:: !Data.ByteString.ByteString,
:: !Data.ByteString.ByteString,
:: !Data.ByteString.ByteString,
:: !Data.ByteString.ByteString,
:: !Data.ByteString.ByteString,
:: !Data.ByteString.ByteString,
:: !Data.ByteString.ByteString,
:: !Data.ByteString.ByteString,
:: !Data.ByteString.ByteString,
:: !Data.ProtoLens.FieldSet}
deriving (Header -> Header -> Bool
(Header -> Header -> Bool)
-> (Header -> Header -> Bool) -> Eq Header
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Header -> Header -> Bool
$c/= :: Header -> Header -> Bool
== :: Header -> Header -> Bool
$c== :: Header -> Header -> Bool
Prelude.Eq, Eq Header
Eq Header =>
(Header -> Header -> Ordering)
-> (Header -> Header -> Bool)
-> (Header -> Header -> Bool)
-> (Header -> Header -> Bool)
-> (Header -> Header -> Bool)
-> (Header -> Header -> Header)
-> (Header -> Header -> Header)
-> Ord Header
Header -> Header -> Bool
Header -> Header -> Ordering
Header -> Header -> Header
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 :: Header -> Header -> Header
$cmin :: Header -> Header -> Header
max :: Header -> Header -> Header
$cmax :: Header -> Header -> Header
>= :: Header -> Header -> Bool
$c>= :: Header -> Header -> Bool
> :: Header -> Header -> Bool
$c> :: Header -> Header -> Bool
<= :: Header -> Header -> Bool
$c<= :: Header -> Header -> Bool
< :: Header -> Header -> Bool
$c< :: Header -> Header -> Bool
compare :: Header -> Header -> Ordering
$ccompare :: Header -> Header -> Ordering
$cp1Ord :: Eq Header
Prelude.Ord)
instance Prelude.Show Header where
showsPrec :: Int -> Header -> ShowS
showsPrec _ __x :: Header
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(Header -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Header
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField Header "version" Version where
fieldOf :: Proxy# "version" -> (Version -> f Version) -> Header -> f Header
fieldOf _
= ((Maybe Version -> f (Maybe Version)) -> Header -> f Header)
-> ((Version -> f Version) -> Maybe Version -> f (Maybe Version))
-> (Version -> f Version)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> Maybe Version)
-> (Header -> Maybe Version -> Header)
-> Lens Header Header (Maybe Version) (Maybe Version)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> Maybe Version
_Header'version (\ x__ :: Header
x__ y__ :: Maybe Version
y__ -> Header
x__ {_Header'version :: Maybe Version
_Header'version = Maybe Version
y__}))
(Version -> Lens' (Maybe Version) Version
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Version
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Header "maybe'version" (Prelude.Maybe Version) where
fieldOf :: Proxy# "maybe'version"
-> (Maybe Version -> f (Maybe Version)) -> Header -> f Header
fieldOf _
= ((Maybe Version -> f (Maybe Version)) -> Header -> f Header)
-> ((Maybe Version -> f (Maybe Version))
-> Maybe Version -> f (Maybe Version))
-> (Maybe Version -> f (Maybe Version))
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> Maybe Version)
-> (Header -> Maybe Version -> Header)
-> Lens Header Header (Maybe Version) (Maybe Version)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> Maybe Version
_Header'version (\ x__ :: Header
x__ y__ :: Maybe Version
y__ -> Header
x__ {_Header'version :: Maybe Version
_Header'version = Maybe Version
y__}))
(Maybe Version -> f (Maybe Version))
-> Maybe Version -> f (Maybe Version)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "chainId" Data.Text.Text where
fieldOf :: Proxy# "chainId" -> (Text -> f Text) -> Header -> f Header
fieldOf _
= ((Text -> f Text) -> Header -> f Header)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> Text)
-> (Header -> Text -> Header) -> Lens Header Header Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> Text
_Header'chainId (\ x__ :: Header
x__ y__ :: Text
y__ -> Header
x__ {_Header'chainId :: Text
_Header'chainId = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "height" Data.Int.Int64 where
fieldOf :: Proxy# "height" -> (Int64 -> f Int64) -> Header -> f Header
fieldOf _
= ((Int64 -> f Int64) -> Header -> f Header)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> Int64)
-> (Header -> Int64 -> Header) -> Lens Header Header Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> Int64
_Header'height (\ x__ :: Header
x__ y__ :: Int64
y__ -> Header
x__ {_Header'height :: Int64
_Header'height = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "time" Proto.Google.Protobuf.Timestamp.Timestamp where
fieldOf :: Proxy# "time" -> (Timestamp -> f Timestamp) -> Header -> f Header
fieldOf _
= ((Maybe Timestamp -> f (Maybe Timestamp)) -> Header -> f Header)
-> ((Timestamp -> f Timestamp)
-> Maybe Timestamp -> f (Maybe Timestamp))
-> (Timestamp -> f Timestamp)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> Maybe Timestamp)
-> (Header -> Maybe Timestamp -> Header)
-> Lens Header Header (Maybe Timestamp) (Maybe Timestamp)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> Maybe Timestamp
_Header'time (\ x__ :: Header
x__ y__ :: Maybe Timestamp
y__ -> Header
x__ {_Header'time :: Maybe Timestamp
_Header'time = Maybe Timestamp
y__}))
(Timestamp -> Lens' (Maybe Timestamp) Timestamp
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Timestamp
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Header "maybe'time" (Prelude.Maybe Proto.Google.Protobuf.Timestamp.Timestamp) where
fieldOf :: Proxy# "maybe'time"
-> (Maybe Timestamp -> f (Maybe Timestamp)) -> Header -> f Header
fieldOf _
= ((Maybe Timestamp -> f (Maybe Timestamp)) -> Header -> f Header)
-> ((Maybe Timestamp -> f (Maybe Timestamp))
-> Maybe Timestamp -> f (Maybe Timestamp))
-> (Maybe Timestamp -> f (Maybe Timestamp))
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> Maybe Timestamp)
-> (Header -> Maybe Timestamp -> Header)
-> Lens Header Header (Maybe Timestamp) (Maybe Timestamp)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> Maybe Timestamp
_Header'time (\ x__ :: Header
x__ y__ :: Maybe Timestamp
y__ -> Header
x__ {_Header'time :: Maybe Timestamp
_Header'time = Maybe Timestamp
y__}))
(Maybe Timestamp -> f (Maybe Timestamp))
-> Maybe Timestamp -> f (Maybe Timestamp)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "numTxs" Data.Int.Int64 where
fieldOf :: Proxy# "numTxs" -> (Int64 -> f Int64) -> Header -> f Header
fieldOf _
= ((Int64 -> f Int64) -> Header -> f Header)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> Int64)
-> (Header -> Int64 -> Header) -> Lens Header Header Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> Int64
_Header'numTxs (\ x__ :: Header
x__ y__ :: Int64
y__ -> Header
x__ {_Header'numTxs :: Int64
_Header'numTxs = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "totalTxs" Data.Int.Int64 where
fieldOf :: Proxy# "totalTxs" -> (Int64 -> f Int64) -> Header -> f Header
fieldOf _
= ((Int64 -> f Int64) -> Header -> f Header)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> Int64)
-> (Header -> Int64 -> Header) -> Lens Header Header Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> Int64
_Header'totalTxs (\ x__ :: Header
x__ y__ :: Int64
y__ -> Header
x__ {_Header'totalTxs :: Int64
_Header'totalTxs = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "lastBlockId" BlockID where
fieldOf :: Proxy# "lastBlockId"
-> (BlockID -> f BlockID) -> Header -> f Header
fieldOf _
= ((Maybe BlockID -> f (Maybe BlockID)) -> Header -> f Header)
-> ((BlockID -> f BlockID) -> Maybe BlockID -> f (Maybe BlockID))
-> (BlockID -> f BlockID)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> Maybe BlockID)
-> (Header -> Maybe BlockID -> Header)
-> Lens Header Header (Maybe BlockID) (Maybe BlockID)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> Maybe BlockID
_Header'lastBlockId (\ x__ :: Header
x__ y__ :: Maybe BlockID
y__ -> Header
x__ {_Header'lastBlockId :: Maybe BlockID
_Header'lastBlockId = Maybe BlockID
y__}))
(BlockID -> Lens' (Maybe BlockID) BlockID
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens BlockID
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Header "maybe'lastBlockId" (Prelude.Maybe BlockID) where
fieldOf :: Proxy# "maybe'lastBlockId"
-> (Maybe BlockID -> f (Maybe BlockID)) -> Header -> f Header
fieldOf _
= ((Maybe BlockID -> f (Maybe BlockID)) -> Header -> f Header)
-> ((Maybe BlockID -> f (Maybe BlockID))
-> Maybe BlockID -> f (Maybe BlockID))
-> (Maybe BlockID -> f (Maybe BlockID))
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> Maybe BlockID)
-> (Header -> Maybe BlockID -> Header)
-> Lens Header Header (Maybe BlockID) (Maybe BlockID)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> Maybe BlockID
_Header'lastBlockId (\ x__ :: Header
x__ y__ :: Maybe BlockID
y__ -> Header
x__ {_Header'lastBlockId :: Maybe BlockID
_Header'lastBlockId = Maybe BlockID
y__}))
(Maybe BlockID -> f (Maybe BlockID))
-> Maybe BlockID -> f (Maybe BlockID)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "lastCommitHash" Data.ByteString.ByteString where
fieldOf :: Proxy# "lastCommitHash"
-> (ByteString -> f ByteString) -> Header -> f Header
fieldOf _
= ((ByteString -> f ByteString) -> Header -> f Header)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> ByteString)
-> (Header -> ByteString -> Header)
-> Lens Header Header ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> ByteString
_Header'lastCommitHash
(\ x__ :: Header
x__ y__ :: ByteString
y__ -> Header
x__ {_Header'lastCommitHash :: ByteString
_Header'lastCommitHash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "dataHash" Data.ByteString.ByteString where
fieldOf :: Proxy# "dataHash"
-> (ByteString -> f ByteString) -> Header -> f Header
fieldOf _
= ((ByteString -> f ByteString) -> Header -> f Header)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> ByteString)
-> (Header -> ByteString -> Header)
-> Lens Header Header ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> ByteString
_Header'dataHash (\ x__ :: Header
x__ y__ :: ByteString
y__ -> Header
x__ {_Header'dataHash :: ByteString
_Header'dataHash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "validatorsHash" Data.ByteString.ByteString where
fieldOf :: Proxy# "validatorsHash"
-> (ByteString -> f ByteString) -> Header -> f Header
fieldOf _
= ((ByteString -> f ByteString) -> Header -> f Header)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> ByteString)
-> (Header -> ByteString -> Header)
-> Lens Header Header ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> ByteString
_Header'validatorsHash
(\ x__ :: Header
x__ y__ :: ByteString
y__ -> Header
x__ {_Header'validatorsHash :: ByteString
_Header'validatorsHash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "nextValidatorsHash" Data.ByteString.ByteString where
fieldOf :: Proxy# "nextValidatorsHash"
-> (ByteString -> f ByteString) -> Header -> f Header
fieldOf _
= ((ByteString -> f ByteString) -> Header -> f Header)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> ByteString)
-> (Header -> ByteString -> Header)
-> Lens Header Header ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> ByteString
_Header'nextValidatorsHash
(\ x__ :: Header
x__ y__ :: ByteString
y__ -> Header
x__ {_Header'nextValidatorsHash :: ByteString
_Header'nextValidatorsHash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "consensusHash" Data.ByteString.ByteString where
fieldOf :: Proxy# "consensusHash"
-> (ByteString -> f ByteString) -> Header -> f Header
fieldOf _
= ((ByteString -> f ByteString) -> Header -> f Header)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> ByteString)
-> (Header -> ByteString -> Header)
-> Lens Header Header ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> ByteString
_Header'consensusHash
(\ x__ :: Header
x__ y__ :: ByteString
y__ -> Header
x__ {_Header'consensusHash :: ByteString
_Header'consensusHash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "appHash" Data.ByteString.ByteString where
fieldOf :: Proxy# "appHash"
-> (ByteString -> f ByteString) -> Header -> f Header
fieldOf _
= ((ByteString -> f ByteString) -> Header -> f Header)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> ByteString)
-> (Header -> ByteString -> Header)
-> Lens Header Header ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> ByteString
_Header'appHash (\ x__ :: Header
x__ y__ :: ByteString
y__ -> Header
x__ {_Header'appHash :: ByteString
_Header'appHash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "lastResultsHash" Data.ByteString.ByteString where
fieldOf :: Proxy# "lastResultsHash"
-> (ByteString -> f ByteString) -> Header -> f Header
fieldOf _
= ((ByteString -> f ByteString) -> Header -> f Header)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> ByteString)
-> (Header -> ByteString -> Header)
-> Lens Header Header ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> ByteString
_Header'lastResultsHash
(\ x__ :: Header
x__ y__ :: ByteString
y__ -> Header
x__ {_Header'lastResultsHash :: ByteString
_Header'lastResultsHash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "evidenceHash" Data.ByteString.ByteString where
fieldOf :: Proxy# "evidenceHash"
-> (ByteString -> f ByteString) -> Header -> f Header
fieldOf _
= ((ByteString -> f ByteString) -> Header -> f Header)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> ByteString)
-> (Header -> ByteString -> Header)
-> Lens Header Header ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> ByteString
_Header'evidenceHash
(\ x__ :: Header
x__ y__ :: ByteString
y__ -> Header
x__ {_Header'evidenceHash :: ByteString
_Header'evidenceHash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Header "proposerAddress" Data.ByteString.ByteString where
fieldOf :: Proxy# "proposerAddress"
-> (ByteString -> f ByteString) -> Header -> f Header
fieldOf _
= ((ByteString -> f ByteString) -> Header -> f Header)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> Header
-> f Header
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Header -> ByteString)
-> (Header -> ByteString -> Header)
-> Lens Header Header ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> ByteString
_Header'proposerAddress
(\ x__ :: Header
x__ y__ :: ByteString
y__ -> Header
x__ {_Header'proposerAddress :: ByteString
_Header'proposerAddress = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Header where
messageName :: Proxy Header -> Text
messageName _ = String -> Text
Data.Text.pack "types.Header"
fieldsByTag :: Map Tag (FieldDescriptor Header)
fieldsByTag
= let
version__field_descriptor :: FieldDescriptor Header
version__field_descriptor
= String
-> FieldTypeDescriptor Version
-> FieldAccessor Header Version
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"version"
(MessageOrGroup -> FieldTypeDescriptor Version
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Version)
(Lens Header Header (Maybe Version) (Maybe Version)
-> FieldAccessor Header Version
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'version" 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'version")) ::
Data.ProtoLens.FieldDescriptor Header
chainId__field_descriptor :: FieldDescriptor Header
chainId__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor Header Text
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"chain_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 Header Header Text Text -> FieldAccessor Header 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 "chainId" 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 @"chainId")) ::
Data.ProtoLens.FieldDescriptor Header
height__field_descriptor :: FieldDescriptor Header
height__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor Header Int64
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"height"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens Header Header Int64 Int64 -> FieldAccessor Header Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "height" 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 @"height")) ::
Data.ProtoLens.FieldDescriptor Header
time__field_descriptor :: FieldDescriptor Header
time__field_descriptor
= String
-> FieldTypeDescriptor Timestamp
-> FieldAccessor Header Timestamp
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"time"
(MessageOrGroup -> FieldTypeDescriptor Timestamp
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Google.Protobuf.Timestamp.Timestamp)
(Lens Header Header (Maybe Timestamp) (Maybe Timestamp)
-> FieldAccessor Header Timestamp
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'time" 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'time")) ::
Data.ProtoLens.FieldDescriptor Header
numTxs__field_descriptor :: FieldDescriptor Header
numTxs__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor Header Int64
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"num_txs"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens Header Header Int64 Int64 -> FieldAccessor Header Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "numTxs" 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 @"numTxs")) ::
Data.ProtoLens.FieldDescriptor Header
totalTxs__field_descriptor :: FieldDescriptor Header
totalTxs__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor Header Int64
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"total_txs"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens Header Header Int64 Int64 -> FieldAccessor Header Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "totalTxs" 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 @"totalTxs")) ::
Data.ProtoLens.FieldDescriptor Header
lastBlockId__field_descriptor :: FieldDescriptor Header
lastBlockId__field_descriptor
= String
-> FieldTypeDescriptor BlockID
-> FieldAccessor Header BlockID
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"last_block_id"
(MessageOrGroup -> FieldTypeDescriptor BlockID
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor BlockID)
(Lens Header Header (Maybe BlockID) (Maybe BlockID)
-> FieldAccessor Header BlockID
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'lastBlockId" 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'lastBlockId")) ::
Data.ProtoLens.FieldDescriptor Header
lastCommitHash__field_descriptor :: FieldDescriptor Header
lastCommitHash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor Header ByteString
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"last_commit_hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens Header Header ByteString ByteString
-> FieldAccessor Header ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "lastCommitHash" 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 @"lastCommitHash")) ::
Data.ProtoLens.FieldDescriptor Header
dataHash__field_descriptor :: FieldDescriptor Header
dataHash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor Header ByteString
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"data_hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens Header Header ByteString ByteString
-> FieldAccessor Header ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "dataHash" 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 @"dataHash")) ::
Data.ProtoLens.FieldDescriptor Header
validatorsHash__field_descriptor :: FieldDescriptor Header
validatorsHash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor Header ByteString
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"validators_hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens Header Header ByteString ByteString
-> FieldAccessor Header ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "validatorsHash" 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 @"validatorsHash")) ::
Data.ProtoLens.FieldDescriptor Header
nextValidatorsHash__field_descriptor :: FieldDescriptor Header
nextValidatorsHash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor Header ByteString
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"next_validators_hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens Header Header ByteString ByteString
-> FieldAccessor Header ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "nextValidatorsHash" 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 @"nextValidatorsHash")) ::
Data.ProtoLens.FieldDescriptor Header
consensusHash__field_descriptor :: FieldDescriptor Header
consensusHash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor Header ByteString
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"consensus_hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens Header Header ByteString ByteString
-> FieldAccessor Header ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "consensusHash" 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 @"consensusHash")) ::
Data.ProtoLens.FieldDescriptor Header
appHash__field_descriptor :: FieldDescriptor Header
appHash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor Header ByteString
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"app_hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens Header Header ByteString ByteString
-> FieldAccessor Header ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "appHash" 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 @"appHash")) ::
Data.ProtoLens.FieldDescriptor Header
lastResultsHash__field_descriptor :: FieldDescriptor Header
lastResultsHash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor Header ByteString
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"last_results_hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens Header Header ByteString ByteString
-> FieldAccessor Header ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "lastResultsHash" 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 @"lastResultsHash")) ::
Data.ProtoLens.FieldDescriptor Header
evidenceHash__field_descriptor :: FieldDescriptor Header
evidenceHash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor Header ByteString
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"evidence_hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens Header Header ByteString ByteString
-> FieldAccessor Header ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "evidenceHash" 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 @"evidenceHash")) ::
Data.ProtoLens.FieldDescriptor Header
proposerAddress__field_descriptor :: FieldDescriptor Header
proposerAddress__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor Header ByteString
-> FieldDescriptor Header
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"proposer_address"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens Header Header ByteString ByteString
-> FieldAccessor Header ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "proposerAddress" 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 @"proposerAddress")) ::
Data.ProtoLens.FieldDescriptor Header
in
[(Tag, FieldDescriptor Header)] -> Map Tag (FieldDescriptor Header)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Header
version__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor Header
chainId__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor Header
height__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor Header
time__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor Header
numTxs__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 6, FieldDescriptor Header
totalTxs__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 7, FieldDescriptor Header
lastBlockId__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 8, FieldDescriptor Header
lastCommitHash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 9, FieldDescriptor Header
dataHash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 10, FieldDescriptor Header
validatorsHash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 11, FieldDescriptor Header
nextValidatorsHash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 12, FieldDescriptor Header
consensusHash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 13, FieldDescriptor Header
appHash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 14, FieldDescriptor Header
lastResultsHash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 15, FieldDescriptor Header
evidenceHash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 16, FieldDescriptor Header
proposerAddress__field_descriptor)]
unknownFields :: LensLike' f Header FieldSet
unknownFields
= (Header -> FieldSet)
-> (Header -> FieldSet -> Header) -> Lens' Header FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Header -> FieldSet
_Header'_unknownFields
(\ x__ :: Header
x__ y__ :: FieldSet
y__ -> Header
x__ {_Header'_unknownFields :: FieldSet
_Header'_unknownFields = FieldSet
y__})
defMessage :: Header
defMessage
= $WHeader'_constructor :: Maybe Version
-> Text
-> Int64
-> Maybe Timestamp
-> Int64
-> Int64
-> Maybe BlockID
-> ByteString
-> ByteString
-> ByteString
-> ByteString
-> ByteString
-> ByteString
-> ByteString
-> ByteString
-> ByteString
-> FieldSet
-> Header
Header'_constructor
{_Header'version :: Maybe Version
_Header'version = Maybe Version
forall a. Maybe a
Prelude.Nothing,
_Header'chainId :: Text
_Header'chainId = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'height :: Int64
_Header'height = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'time :: Maybe Timestamp
_Header'time = Maybe Timestamp
forall a. Maybe a
Prelude.Nothing,
_Header'numTxs :: Int64
_Header'numTxs = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'totalTxs :: Int64
_Header'totalTxs = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'lastBlockId :: Maybe BlockID
_Header'lastBlockId = Maybe BlockID
forall a. Maybe a
Prelude.Nothing,
_Header'lastCommitHash :: ByteString
_Header'lastCommitHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'dataHash :: ByteString
_Header'dataHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'validatorsHash :: ByteString
_Header'validatorsHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'nextValidatorsHash :: ByteString
_Header'nextValidatorsHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'consensusHash :: ByteString
_Header'consensusHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'appHash :: ByteString
_Header'appHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'lastResultsHash :: ByteString
_Header'lastResultsHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'evidenceHash :: ByteString
_Header'evidenceHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'proposerAddress :: ByteString
_Header'proposerAddress = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Header'_unknownFields :: FieldSet
_Header'_unknownFields = []}
parseMessage :: Parser Header
parseMessage
= let
loop :: Header -> Data.ProtoLens.Encoding.Bytes.Parser Header
loop :: Header -> Parser Header
loop x :: Header
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]))))
Header -> Parser Header
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter Header Header FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Header -> Header
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 Header Header FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Header
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do Version
y <- Parser Version -> String -> Parser Version
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Version -> Parser Version
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 Version
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"version"
Header -> Parser Header
loop (Setter Header Header Version Version -> Version -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "version" 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 @"version") Version
y Header
x)
18
-> 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))
"chain_id"
Header -> Parser Header
loop (Setter Header Header Text Text -> Text -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "chainId" 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 @"chainId") Text
y Header
x)
24
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"height"
Header -> Parser Header
loop (Setter Header Header Int64 Int64 -> Int64 -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "height" 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 @"height") Int64
y Header
x)
34
-> do Timestamp
y <- Parser Timestamp -> String -> Parser Timestamp
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Timestamp -> Parser Timestamp
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 Timestamp
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"time"
Header -> Parser Header
loop (Setter Header Header Timestamp Timestamp
-> Timestamp -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "time" 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 @"time") Timestamp
y Header
x)
40
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"num_txs"
Header -> Parser Header
loop (Setter Header Header Int64 Int64 -> Int64 -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "numTxs" 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 @"numTxs") Int64
y Header
x)
48
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"total_txs"
Header -> Parser Header
loop
(Setter Header Header Int64 Int64 -> Int64 -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "totalTxs" 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 @"totalTxs") Int64
y Header
x)
58
-> do BlockID
y <- Parser BlockID -> String -> Parser BlockID
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser BlockID -> Parser BlockID
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 BlockID
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"last_block_id"
Header -> Parser Header
loop
(Setter Header Header BlockID BlockID -> BlockID -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "lastBlockId" 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 @"lastBlockId") BlockID
y Header
x)
66
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"last_commit_hash"
Header -> Parser Header
loop
(Setter Header Header ByteString ByteString
-> ByteString -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "lastCommitHash" 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 @"lastCommitHash") ByteString
y Header
x)
74
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"data_hash"
Header -> Parser Header
loop
(Setter Header Header ByteString ByteString
-> ByteString -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "dataHash" 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 @"dataHash") ByteString
y Header
x)
82
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"validators_hash"
Header -> Parser Header
loop
(Setter Header Header ByteString ByteString
-> ByteString -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "validatorsHash" 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 @"validatorsHash") ByteString
y Header
x)
90
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"next_validators_hash"
Header -> Parser Header
loop
(Setter Header Header ByteString ByteString
-> ByteString -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "nextValidatorsHash" 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 @"nextValidatorsHash") ByteString
y Header
x)
98
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"consensus_hash"
Header -> Parser Header
loop
(Setter Header Header ByteString ByteString
-> ByteString -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "consensusHash" 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 @"consensusHash") ByteString
y Header
x)
106
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"app_hash"
Header -> Parser Header
loop (Setter Header Header ByteString ByteString
-> ByteString -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "appHash" 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 @"appHash") ByteString
y Header
x)
114
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"last_results_hash"
Header -> Parser Header
loop
(Setter Header Header ByteString ByteString
-> ByteString -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "lastResultsHash" 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 @"lastResultsHash") ByteString
y Header
x)
122
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"evidence_hash"
Header -> Parser Header
loop
(Setter Header Header ByteString ByteString
-> ByteString -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "evidenceHash" 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 @"evidenceHash") ByteString
y Header
x)
130
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"proposer_address"
Header -> Parser Header
loop
(Setter Header Header ByteString ByteString
-> ByteString -> Header -> Header
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "proposerAddress" 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 @"proposerAddress") ByteString
y Header
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
Header -> Parser Header
loop
(Setter Header Header FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Header -> Header
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 Header Header FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Header
x)
in
Parser Header -> String -> Parser Header
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Header -> Parser Header
loop Header
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "Header"
buildMessage :: Header -> Builder
buildMessage
= \ _x :: Header
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe Version) Header Header (Maybe Version) (Maybe Version)
-> Header -> Maybe Version
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'version" 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'version") Header
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: Version
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (Version -> ByteString) -> Version -> 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))
Version -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Version
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text Header Header Text Text -> Header -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "chainId" 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 @"chainId") Header
_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 18)
((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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 Header Header Int64 Int64 -> Header -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "height" 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 @"height") Header
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 24)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe Timestamp) Header Header (Maybe Timestamp) (Maybe Timestamp)
-> Header -> Maybe Timestamp
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'time" 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'time") Header
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: Timestamp
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 34)
((ByteString -> Builder)
-> (Timestamp -> ByteString) -> Timestamp -> 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))
Timestamp -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Timestamp
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 Header Header Int64 Int64 -> Header -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "numTxs" 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 @"numTxs") Header
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 40)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 Header Header Int64 Int64 -> Header -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "totalTxs" 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 @"totalTxs") Header
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 48)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe BlockID) Header Header (Maybe BlockID) (Maybe BlockID)
-> Header -> Maybe BlockID
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'lastBlockId" 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'lastBlockId") Header
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: BlockID
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 58)
((ByteString -> Builder)
-> (BlockID -> ByteString) -> BlockID -> 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))
BlockID -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
BlockID
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike ByteString Header Header ByteString ByteString
-> Header -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "lastCommitHash" 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 @"lastCommitHash") Header
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 66)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike ByteString Header Header ByteString ByteString
-> Header -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "dataHash" 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 @"dataHash") Header
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 74)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike ByteString Header Header ByteString ByteString
-> Header -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "validatorsHash" 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 @"validatorsHash") Header
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 82)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike ByteString Header Header ByteString ByteString
-> Header -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "nextValidatorsHash" 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
@"nextValidatorsHash")
Header
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 90)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike ByteString Header Header ByteString ByteString
-> Header -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "consensusHash" 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 @"consensusHash")
Header
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 98)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike ByteString Header Header ByteString ByteString
-> Header -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "appHash" 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 @"appHash") Header
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==)
ByteString
_v ByteString
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
106)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike ByteString Header Header ByteString ByteString
-> Header -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "lastResultsHash" 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
@"lastResultsHash")
Header
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==)
ByteString
_v ByteString
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
114)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike ByteString Header Header ByteString ByteString
-> Header -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "evidenceHash" 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
@"evidenceHash")
Header
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==)
ByteString
_v ByteString
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
122)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike ByteString Header Header ByteString ByteString
-> Header -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "proposerAddress" 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
@"proposerAddress")
Header
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==)
ByteString
_v
ByteString
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
130)
((\ 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))
ByteString
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet Header Header FieldSet FieldSet
-> Header -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
FoldLike FieldSet Header Header FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields
Header
_x)))))))))))))))))
instance Control.DeepSeq.NFData Header where
rnf :: Header -> ()
rnf
= \ x__ :: Header
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> FieldSet
_Header'_unknownFields Header
x__)
(Maybe Version -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> Maybe Version
_Header'version Header
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> Text
_Header'chainId Header
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> Int64
_Header'height Header
x__)
(Maybe Timestamp -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> Maybe Timestamp
_Header'time Header
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> Int64
_Header'numTxs Header
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> Int64
_Header'totalTxs Header
x__)
(Maybe BlockID -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> Maybe BlockID
_Header'lastBlockId Header
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> ByteString
_Header'lastCommitHash Header
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> ByteString
_Header'dataHash Header
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> ByteString
_Header'validatorsHash Header
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> ByteString
_Header'nextValidatorsHash Header
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> ByteString
_Header'consensusHash Header
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> ByteString
_Header'appHash Header
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> ByteString
_Header'lastResultsHash Header
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> ByteString
_Header'evidenceHash Header
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Header -> ByteString
_Header'proposerAddress Header
x__)
()))))))))))))))))
data LastCommitInfo
= LastCommitInfo'_constructor {LastCommitInfo -> Int32
_LastCommitInfo'round :: !Data.Int.Int32,
LastCommitInfo -> Vector VoteInfo
_LastCommitInfo'votes :: !(Data.Vector.Vector VoteInfo),
LastCommitInfo -> FieldSet
_LastCommitInfo'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (LastCommitInfo -> LastCommitInfo -> Bool
(LastCommitInfo -> LastCommitInfo -> Bool)
-> (LastCommitInfo -> LastCommitInfo -> Bool) -> Eq LastCommitInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LastCommitInfo -> LastCommitInfo -> Bool
$c/= :: LastCommitInfo -> LastCommitInfo -> Bool
== :: LastCommitInfo -> LastCommitInfo -> Bool
$c== :: LastCommitInfo -> LastCommitInfo -> Bool
Prelude.Eq, Eq LastCommitInfo
Eq LastCommitInfo =>
(LastCommitInfo -> LastCommitInfo -> Ordering)
-> (LastCommitInfo -> LastCommitInfo -> Bool)
-> (LastCommitInfo -> LastCommitInfo -> Bool)
-> (LastCommitInfo -> LastCommitInfo -> Bool)
-> (LastCommitInfo -> LastCommitInfo -> Bool)
-> (LastCommitInfo -> LastCommitInfo -> LastCommitInfo)
-> (LastCommitInfo -> LastCommitInfo -> LastCommitInfo)
-> Ord LastCommitInfo
LastCommitInfo -> LastCommitInfo -> Bool
LastCommitInfo -> LastCommitInfo -> Ordering
LastCommitInfo -> LastCommitInfo -> LastCommitInfo
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 :: LastCommitInfo -> LastCommitInfo -> LastCommitInfo
$cmin :: LastCommitInfo -> LastCommitInfo -> LastCommitInfo
max :: LastCommitInfo -> LastCommitInfo -> LastCommitInfo
$cmax :: LastCommitInfo -> LastCommitInfo -> LastCommitInfo
>= :: LastCommitInfo -> LastCommitInfo -> Bool
$c>= :: LastCommitInfo -> LastCommitInfo -> Bool
> :: LastCommitInfo -> LastCommitInfo -> Bool
$c> :: LastCommitInfo -> LastCommitInfo -> Bool
<= :: LastCommitInfo -> LastCommitInfo -> Bool
$c<= :: LastCommitInfo -> LastCommitInfo -> Bool
< :: LastCommitInfo -> LastCommitInfo -> Bool
$c< :: LastCommitInfo -> LastCommitInfo -> Bool
compare :: LastCommitInfo -> LastCommitInfo -> Ordering
$ccompare :: LastCommitInfo -> LastCommitInfo -> Ordering
$cp1Ord :: Eq LastCommitInfo
Prelude.Ord)
instance Prelude.Show LastCommitInfo where
showsPrec :: Int -> LastCommitInfo -> ShowS
showsPrec _ __x :: LastCommitInfo
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(LastCommitInfo -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort LastCommitInfo
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField LastCommitInfo "round" Data.Int.Int32 where
fieldOf :: Proxy# "round"
-> (Int32 -> f Int32) -> LastCommitInfo -> f LastCommitInfo
fieldOf _
= ((Int32 -> f Int32) -> LastCommitInfo -> f LastCommitInfo)
-> ((Int32 -> f Int32) -> Int32 -> f Int32)
-> (Int32 -> f Int32)
-> LastCommitInfo
-> f LastCommitInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((LastCommitInfo -> Int32)
-> (LastCommitInfo -> Int32 -> LastCommitInfo)
-> Lens LastCommitInfo LastCommitInfo Int32 Int32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
LastCommitInfo -> Int32
_LastCommitInfo'round
(\ x__ :: LastCommitInfo
x__ y__ :: Int32
y__ -> LastCommitInfo
x__ {_LastCommitInfo'round :: Int32
_LastCommitInfo'round = Int32
y__}))
(Int32 -> f Int32) -> Int32 -> f Int32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField LastCommitInfo "votes" [VoteInfo] where
fieldOf :: Proxy# "votes"
-> ([VoteInfo] -> f [VoteInfo])
-> LastCommitInfo
-> f LastCommitInfo
fieldOf _
= ((Vector VoteInfo -> f (Vector VoteInfo))
-> LastCommitInfo -> f LastCommitInfo)
-> (([VoteInfo] -> f [VoteInfo])
-> Vector VoteInfo -> f (Vector VoteInfo))
-> ([VoteInfo] -> f [VoteInfo])
-> LastCommitInfo
-> f LastCommitInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((LastCommitInfo -> Vector VoteInfo)
-> (LastCommitInfo -> Vector VoteInfo -> LastCommitInfo)
-> Lens
LastCommitInfo LastCommitInfo (Vector VoteInfo) (Vector VoteInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
LastCommitInfo -> Vector VoteInfo
_LastCommitInfo'votes
(\ x__ :: LastCommitInfo
x__ y__ :: Vector VoteInfo
y__ -> LastCommitInfo
x__ {_LastCommitInfo'votes :: Vector VoteInfo
_LastCommitInfo'votes = Vector VoteInfo
y__}))
((Vector VoteInfo -> [VoteInfo])
-> (Vector VoteInfo -> [VoteInfo] -> Vector VoteInfo)
-> Lens (Vector VoteInfo) (Vector VoteInfo) [VoteInfo] [VoteInfo]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector VoteInfo -> [VoteInfo]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [VoteInfo]
y__ -> [VoteInfo] -> Vector VoteInfo
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [VoteInfo]
y__))
instance Data.ProtoLens.Field.HasField LastCommitInfo "vec'votes" (Data.Vector.Vector VoteInfo) where
fieldOf :: Proxy# "vec'votes"
-> (Vector VoteInfo -> f (Vector VoteInfo))
-> LastCommitInfo
-> f LastCommitInfo
fieldOf _
= ((Vector VoteInfo -> f (Vector VoteInfo))
-> LastCommitInfo -> f LastCommitInfo)
-> ((Vector VoteInfo -> f (Vector VoteInfo))
-> Vector VoteInfo -> f (Vector VoteInfo))
-> (Vector VoteInfo -> f (Vector VoteInfo))
-> LastCommitInfo
-> f LastCommitInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((LastCommitInfo -> Vector VoteInfo)
-> (LastCommitInfo -> Vector VoteInfo -> LastCommitInfo)
-> Lens
LastCommitInfo LastCommitInfo (Vector VoteInfo) (Vector VoteInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
LastCommitInfo -> Vector VoteInfo
_LastCommitInfo'votes
(\ x__ :: LastCommitInfo
x__ y__ :: Vector VoteInfo
y__ -> LastCommitInfo
x__ {_LastCommitInfo'votes :: Vector VoteInfo
_LastCommitInfo'votes = Vector VoteInfo
y__}))
(Vector VoteInfo -> f (Vector VoteInfo))
-> Vector VoteInfo -> f (Vector VoteInfo)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message LastCommitInfo where
messageName :: Proxy LastCommitInfo -> Text
messageName _ = String -> Text
Data.Text.pack "types.LastCommitInfo"
fieldsByTag :: Map Tag (FieldDescriptor LastCommitInfo)
fieldsByTag
= let
round__field_descriptor :: FieldDescriptor LastCommitInfo
round__field_descriptor
= String
-> FieldTypeDescriptor Int32
-> FieldAccessor LastCommitInfo Int32
-> FieldDescriptor LastCommitInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"round"
(ScalarField Int32 -> FieldTypeDescriptor Int32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int32
Data.ProtoLens.Int32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
(WireDefault Int32
-> Lens LastCommitInfo LastCommitInfo Int32 Int32
-> FieldAccessor LastCommitInfo Int32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "round" 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 @"round")) ::
Data.ProtoLens.FieldDescriptor LastCommitInfo
votes__field_descriptor :: FieldDescriptor LastCommitInfo
votes__field_descriptor
= String
-> FieldTypeDescriptor VoteInfo
-> FieldAccessor LastCommitInfo VoteInfo
-> FieldDescriptor LastCommitInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"votes"
(MessageOrGroup -> FieldTypeDescriptor VoteInfo
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor VoteInfo)
(Packing
-> Lens' LastCommitInfo [VoteInfo]
-> FieldAccessor LastCommitInfo VoteInfo
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "votes" 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 @"votes")) ::
Data.ProtoLens.FieldDescriptor LastCommitInfo
in
[(Tag, FieldDescriptor LastCommitInfo)]
-> Map Tag (FieldDescriptor LastCommitInfo)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor LastCommitInfo
round__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor LastCommitInfo
votes__field_descriptor)]
unknownFields :: LensLike' f LastCommitInfo FieldSet
unknownFields
= (LastCommitInfo -> FieldSet)
-> (LastCommitInfo -> FieldSet -> LastCommitInfo)
-> Lens' LastCommitInfo FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
LastCommitInfo -> FieldSet
_LastCommitInfo'_unknownFields
(\ x__ :: LastCommitInfo
x__ y__ :: FieldSet
y__ -> LastCommitInfo
x__ {_LastCommitInfo'_unknownFields :: FieldSet
_LastCommitInfo'_unknownFields = FieldSet
y__})
defMessage :: LastCommitInfo
defMessage
= $WLastCommitInfo'_constructor :: Int32 -> Vector VoteInfo -> FieldSet -> LastCommitInfo
LastCommitInfo'_constructor
{_LastCommitInfo'round :: Int32
_LastCommitInfo'round = Int32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_LastCommitInfo'votes :: Vector VoteInfo
_LastCommitInfo'votes = Vector VoteInfo
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_LastCommitInfo'_unknownFields :: FieldSet
_LastCommitInfo'_unknownFields = []}
parseMessage :: Parser LastCommitInfo
parseMessage
= let
loop ::
LastCommitInfo
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld VoteInfo
-> Data.ProtoLens.Encoding.Bytes.Parser LastCommitInfo
loop :: LastCommitInfo
-> Growing Vector RealWorld VoteInfo -> Parser LastCommitInfo
loop x :: LastCommitInfo
x mutable'votes :: Growing Vector RealWorld VoteInfo
mutable'votes
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector VoteInfo
frozen'votes <- IO (Vector VoteInfo) -> Parser (Vector VoteInfo)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) VoteInfo -> IO (Vector VoteInfo)
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 VoteInfo
Growing Vector (PrimState IO) VoteInfo
mutable'votes)
(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]))))
LastCommitInfo -> Parser LastCommitInfo
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter LastCommitInfo LastCommitInfo FieldSet FieldSet
-> (FieldSet -> FieldSet) -> LastCommitInfo -> LastCommitInfo
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 LastCommitInfo LastCommitInfo FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
LastCommitInfo LastCommitInfo (Vector VoteInfo) (Vector VoteInfo)
-> Vector VoteInfo -> LastCommitInfo -> LastCommitInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'votes" 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'votes") Vector VoteInfo
frozen'votes LastCommitInfo
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Int32
y <- Parser Int32 -> String -> Parser Int32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int32) -> Parser Word64 -> Parser Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"round"
LastCommitInfo
-> Growing Vector RealWorld VoteInfo -> Parser LastCommitInfo
loop
(Setter LastCommitInfo LastCommitInfo Int32 Int32
-> Int32 -> LastCommitInfo -> LastCommitInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "round" 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 @"round") Int32
y LastCommitInfo
x)
Growing Vector RealWorld VoteInfo
mutable'votes
18
-> do !VoteInfo
y <- Parser VoteInfo -> String -> Parser VoteInfo
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser VoteInfo -> Parser VoteInfo
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 VoteInfo
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"votes"
Growing Vector RealWorld VoteInfo
v <- IO (Growing Vector RealWorld VoteInfo)
-> Parser (Growing Vector RealWorld VoteInfo)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) VoteInfo
-> VoteInfo -> IO (Growing Vector (PrimState IO) VoteInfo)
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 VoteInfo
Growing Vector (PrimState IO) VoteInfo
mutable'votes VoteInfo
y)
LastCommitInfo
-> Growing Vector RealWorld VoteInfo -> Parser LastCommitInfo
loop LastCommitInfo
x Growing Vector RealWorld VoteInfo
v
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
LastCommitInfo
-> Growing Vector RealWorld VoteInfo -> Parser LastCommitInfo
loop
(Setter LastCommitInfo LastCommitInfo FieldSet FieldSet
-> (FieldSet -> FieldSet) -> LastCommitInfo -> LastCommitInfo
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 LastCommitInfo LastCommitInfo FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) LastCommitInfo
x)
Growing Vector RealWorld VoteInfo
mutable'votes
in
Parser LastCommitInfo -> String -> Parser LastCommitInfo
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld VoteInfo
mutable'votes <- IO (Growing Vector RealWorld VoteInfo)
-> Parser (Growing Vector RealWorld VoteInfo)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld VoteInfo)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
LastCommitInfo
-> Growing Vector RealWorld VoteInfo -> Parser LastCommitInfo
loop LastCommitInfo
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld VoteInfo
mutable'votes)
"LastCommitInfo"
buildMessage :: LastCommitInfo -> Builder
buildMessage
= \ _x :: LastCommitInfo
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int32
_v = FoldLike Int32 LastCommitInfo LastCommitInfo Int32 Int32
-> LastCommitInfo -> Int32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "round" 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 @"round") LastCommitInfo
_x
in
if Int32 -> Int32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int32
_v Int32
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) -> (Int32 -> Word64) -> Int32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int32
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((VoteInfo -> Builder) -> Vector VoteInfo -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: VoteInfo
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (VoteInfo -> ByteString) -> VoteInfo -> 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))
VoteInfo -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
VoteInfo
_v))
(FoldLike
(Vector VoteInfo)
LastCommitInfo
LastCommitInfo
(Vector VoteInfo)
(Vector VoteInfo)
-> LastCommitInfo -> Vector VoteInfo
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'votes" 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'votes") LastCommitInfo
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet LastCommitInfo LastCommitInfo FieldSet FieldSet
-> LastCommitInfo -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet LastCommitInfo LastCommitInfo FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields LastCommitInfo
_x)))
instance Control.DeepSeq.NFData LastCommitInfo where
rnf :: LastCommitInfo -> ()
rnf
= \ x__ :: LastCommitInfo
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(LastCommitInfo -> FieldSet
_LastCommitInfo'_unknownFields LastCommitInfo
x__)
(Int32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(LastCommitInfo -> Int32
_LastCommitInfo'round LastCommitInfo
x__)
(Vector VoteInfo -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (LastCommitInfo -> Vector VoteInfo
_LastCommitInfo'votes LastCommitInfo
x__) ()))
data
= { :: !Data.Int.Int32,
:: !Data.ByteString.ByteString,
:: !Data.ProtoLens.FieldSet}
deriving (PartSetHeader -> PartSetHeader -> Bool
(PartSetHeader -> PartSetHeader -> Bool)
-> (PartSetHeader -> PartSetHeader -> Bool) -> Eq PartSetHeader
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PartSetHeader -> PartSetHeader -> Bool
$c/= :: PartSetHeader -> PartSetHeader -> Bool
== :: PartSetHeader -> PartSetHeader -> Bool
$c== :: PartSetHeader -> PartSetHeader -> Bool
Prelude.Eq, Eq PartSetHeader
Eq PartSetHeader =>
(PartSetHeader -> PartSetHeader -> Ordering)
-> (PartSetHeader -> PartSetHeader -> Bool)
-> (PartSetHeader -> PartSetHeader -> Bool)
-> (PartSetHeader -> PartSetHeader -> Bool)
-> (PartSetHeader -> PartSetHeader -> Bool)
-> (PartSetHeader -> PartSetHeader -> PartSetHeader)
-> (PartSetHeader -> PartSetHeader -> PartSetHeader)
-> Ord PartSetHeader
PartSetHeader -> PartSetHeader -> Bool
PartSetHeader -> PartSetHeader -> Ordering
PartSetHeader -> PartSetHeader -> PartSetHeader
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 :: PartSetHeader -> PartSetHeader -> PartSetHeader
$cmin :: PartSetHeader -> PartSetHeader -> PartSetHeader
max :: PartSetHeader -> PartSetHeader -> PartSetHeader
$cmax :: PartSetHeader -> PartSetHeader -> PartSetHeader
>= :: PartSetHeader -> PartSetHeader -> Bool
$c>= :: PartSetHeader -> PartSetHeader -> Bool
> :: PartSetHeader -> PartSetHeader -> Bool
$c> :: PartSetHeader -> PartSetHeader -> Bool
<= :: PartSetHeader -> PartSetHeader -> Bool
$c<= :: PartSetHeader -> PartSetHeader -> Bool
< :: PartSetHeader -> PartSetHeader -> Bool
$c< :: PartSetHeader -> PartSetHeader -> Bool
compare :: PartSetHeader -> PartSetHeader -> Ordering
$ccompare :: PartSetHeader -> PartSetHeader -> Ordering
$cp1Ord :: Eq PartSetHeader
Prelude.Ord)
instance Prelude.Show PartSetHeader where
showsPrec :: Int -> PartSetHeader -> ShowS
showsPrec _ __x :: PartSetHeader
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(PartSetHeader -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort PartSetHeader
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField PartSetHeader "total" Data.Int.Int32 where
fieldOf :: Proxy# "total"
-> (Int32 -> f Int32) -> PartSetHeader -> f PartSetHeader
fieldOf _
= ((Int32 -> f Int32) -> PartSetHeader -> f PartSetHeader)
-> ((Int32 -> f Int32) -> Int32 -> f Int32)
-> (Int32 -> f Int32)
-> PartSetHeader
-> f PartSetHeader
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((PartSetHeader -> Int32)
-> (PartSetHeader -> Int32 -> PartSetHeader)
-> Lens PartSetHeader PartSetHeader Int32 Int32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
PartSetHeader -> Int32
_PartSetHeader'total
(\ x__ :: PartSetHeader
x__ y__ :: Int32
y__ -> PartSetHeader
x__ {_PartSetHeader'total :: Int32
_PartSetHeader'total = Int32
y__}))
(Int32 -> f Int32) -> Int32 -> f Int32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField PartSetHeader "hash" Data.ByteString.ByteString where
fieldOf :: Proxy# "hash"
-> (ByteString -> f ByteString) -> PartSetHeader -> f PartSetHeader
fieldOf _
= ((ByteString -> f ByteString) -> PartSetHeader -> f PartSetHeader)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> PartSetHeader
-> f PartSetHeader
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((PartSetHeader -> ByteString)
-> (PartSetHeader -> ByteString -> PartSetHeader)
-> Lens PartSetHeader PartSetHeader ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
PartSetHeader -> ByteString
_PartSetHeader'hash (\ x__ :: PartSetHeader
x__ y__ :: ByteString
y__ -> PartSetHeader
x__ {_PartSetHeader'hash :: ByteString
_PartSetHeader'hash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message PartSetHeader where
messageName :: Proxy PartSetHeader -> Text
messageName _ = String -> Text
Data.Text.pack "types.PartSetHeader"
fieldsByTag :: Map Tag (FieldDescriptor PartSetHeader)
fieldsByTag
= let
total__field_descriptor :: FieldDescriptor PartSetHeader
total__field_descriptor
= String
-> FieldTypeDescriptor Int32
-> FieldAccessor PartSetHeader Int32
-> FieldDescriptor PartSetHeader
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"total"
(ScalarField Int32 -> FieldTypeDescriptor Int32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int32
Data.ProtoLens.Int32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
(WireDefault Int32
-> Lens PartSetHeader PartSetHeader Int32 Int32
-> FieldAccessor PartSetHeader Int32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "total" 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 @"total")) ::
Data.ProtoLens.FieldDescriptor PartSetHeader
hash__field_descriptor :: FieldDescriptor PartSetHeader
hash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor PartSetHeader ByteString
-> FieldDescriptor PartSetHeader
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens PartSetHeader PartSetHeader ByteString ByteString
-> FieldAccessor PartSetHeader ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "hash" 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 @"hash")) ::
Data.ProtoLens.FieldDescriptor PartSetHeader
in
[(Tag, FieldDescriptor PartSetHeader)]
-> Map Tag (FieldDescriptor PartSetHeader)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor PartSetHeader
total__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor PartSetHeader
hash__field_descriptor)]
unknownFields :: LensLike' f PartSetHeader FieldSet
unknownFields
= (PartSetHeader -> FieldSet)
-> (PartSetHeader -> FieldSet -> PartSetHeader)
-> Lens' PartSetHeader FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
PartSetHeader -> FieldSet
_PartSetHeader'_unknownFields
(\ x__ :: PartSetHeader
x__ y__ :: FieldSet
y__ -> PartSetHeader
x__ {_PartSetHeader'_unknownFields :: FieldSet
_PartSetHeader'_unknownFields = FieldSet
y__})
defMessage :: PartSetHeader
defMessage
= $WPartSetHeader'_constructor :: Int32 -> ByteString -> FieldSet -> PartSetHeader
PartSetHeader'_constructor
{_PartSetHeader'total :: Int32
_PartSetHeader'total = Int32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_PartSetHeader'hash :: ByteString
_PartSetHeader'hash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_PartSetHeader'_unknownFields :: FieldSet
_PartSetHeader'_unknownFields = []}
parseMessage :: Parser PartSetHeader
parseMessage
= let
loop ::
PartSetHeader -> Data.ProtoLens.Encoding.Bytes.Parser PartSetHeader
loop :: PartSetHeader -> Parser PartSetHeader
loop x :: PartSetHeader
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]))))
PartSetHeader -> Parser PartSetHeader
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter PartSetHeader PartSetHeader FieldSet FieldSet
-> (FieldSet -> FieldSet) -> PartSetHeader -> PartSetHeader
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 PartSetHeader PartSetHeader FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) PartSetHeader
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Int32
y <- Parser Int32 -> String -> Parser Int32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int32) -> Parser Word64 -> Parser Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"total"
PartSetHeader -> Parser PartSetHeader
loop (Setter PartSetHeader PartSetHeader Int32 Int32
-> Int32 -> PartSetHeader -> PartSetHeader
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "total" 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 @"total") Int32
y PartSetHeader
x)
18
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"hash"
PartSetHeader -> Parser PartSetHeader
loop (Setter PartSetHeader PartSetHeader ByteString ByteString
-> ByteString -> PartSetHeader -> PartSetHeader
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "hash" 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 @"hash") ByteString
y PartSetHeader
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
PartSetHeader -> Parser PartSetHeader
loop
(Setter PartSetHeader PartSetHeader FieldSet FieldSet
-> (FieldSet -> FieldSet) -> PartSetHeader -> PartSetHeader
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 PartSetHeader PartSetHeader FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) PartSetHeader
x)
in
Parser PartSetHeader -> String -> Parser PartSetHeader
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do PartSetHeader -> Parser PartSetHeader
loop PartSetHeader
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "PartSetHeader"
buildMessage :: PartSetHeader -> Builder
buildMessage
= \ _x :: PartSetHeader
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int32
_v = FoldLike Int32 PartSetHeader PartSetHeader Int32 Int32
-> PartSetHeader -> Int32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "total" 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 @"total") PartSetHeader
_x
in
if Int32 -> Int32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int32
_v Int32
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) -> (Int32 -> Word64) -> Int32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int32
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: ByteString
_v = FoldLike
ByteString PartSetHeader PartSetHeader ByteString ByteString
-> PartSetHeader -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "hash" 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 @"hash") PartSetHeader
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 18)
((\ 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))
ByteString
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet PartSetHeader PartSetHeader FieldSet FieldSet
-> PartSetHeader -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet PartSetHeader PartSetHeader FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields PartSetHeader
_x)))
instance Control.DeepSeq.NFData PartSetHeader where
rnf :: PartSetHeader -> ()
rnf
= \ x__ :: PartSetHeader
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(PartSetHeader -> FieldSet
_PartSetHeader'_unknownFields PartSetHeader
x__)
(Int32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(PartSetHeader -> Int32
_PartSetHeader'total PartSetHeader
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (PartSetHeader -> ByteString
_PartSetHeader'hash PartSetHeader
x__) ()))
data PubKey
= PubKey'_constructor {PubKey -> Text
_PubKey'type' :: !Data.Text.Text,
PubKey -> ByteString
_PubKey'data' :: !Data.ByteString.ByteString,
PubKey -> FieldSet
_PubKey'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (PubKey -> PubKey -> Bool
(PubKey -> PubKey -> Bool)
-> (PubKey -> PubKey -> Bool) -> Eq PubKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PubKey -> PubKey -> Bool
$c/= :: PubKey -> PubKey -> Bool
== :: PubKey -> PubKey -> Bool
$c== :: PubKey -> PubKey -> Bool
Prelude.Eq, Eq PubKey
Eq PubKey =>
(PubKey -> PubKey -> Ordering)
-> (PubKey -> PubKey -> Bool)
-> (PubKey -> PubKey -> Bool)
-> (PubKey -> PubKey -> Bool)
-> (PubKey -> PubKey -> Bool)
-> (PubKey -> PubKey -> PubKey)
-> (PubKey -> PubKey -> PubKey)
-> Ord PubKey
PubKey -> PubKey -> Bool
PubKey -> PubKey -> Ordering
PubKey -> PubKey -> PubKey
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 :: PubKey -> PubKey -> PubKey
$cmin :: PubKey -> PubKey -> PubKey
max :: PubKey -> PubKey -> PubKey
$cmax :: PubKey -> PubKey -> PubKey
>= :: PubKey -> PubKey -> Bool
$c>= :: PubKey -> PubKey -> Bool
> :: PubKey -> PubKey -> Bool
$c> :: PubKey -> PubKey -> Bool
<= :: PubKey -> PubKey -> Bool
$c<= :: PubKey -> PubKey -> Bool
< :: PubKey -> PubKey -> Bool
$c< :: PubKey -> PubKey -> Bool
compare :: PubKey -> PubKey -> Ordering
$ccompare :: PubKey -> PubKey -> Ordering
$cp1Ord :: Eq PubKey
Prelude.Ord)
instance Prelude.Show PubKey where
showsPrec :: Int -> PubKey -> ShowS
showsPrec _ __x :: PubKey
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(PubKey -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort PubKey
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField PubKey "type'" Data.Text.Text where
fieldOf :: Proxy# "type'" -> (Text -> f Text) -> PubKey -> f PubKey
fieldOf _
= ((Text -> f Text) -> PubKey -> f PubKey)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> PubKey
-> f PubKey
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((PubKey -> Text)
-> (PubKey -> Text -> PubKey) -> Lens PubKey PubKey Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
PubKey -> Text
_PubKey'type' (\ x__ :: PubKey
x__ y__ :: Text
y__ -> PubKey
x__ {_PubKey'type' :: Text
_PubKey'type' = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField PubKey "data'" Data.ByteString.ByteString where
fieldOf :: Proxy# "data'"
-> (ByteString -> f ByteString) -> PubKey -> f PubKey
fieldOf _
= ((ByteString -> f ByteString) -> PubKey -> f PubKey)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> PubKey
-> f PubKey
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((PubKey -> ByteString)
-> (PubKey -> ByteString -> PubKey)
-> Lens PubKey PubKey ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
PubKey -> ByteString
_PubKey'data' (\ x__ :: PubKey
x__ y__ :: ByteString
y__ -> PubKey
x__ {_PubKey'data' :: ByteString
_PubKey'data' = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message PubKey where
messageName :: Proxy PubKey -> Text
messageName _ = String -> Text
Data.Text.pack "types.PubKey"
fieldsByTag :: Map Tag (FieldDescriptor PubKey)
fieldsByTag
= let
type'__field_descriptor :: FieldDescriptor PubKey
type'__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor PubKey Text
-> FieldDescriptor PubKey
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"type"
(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 PubKey PubKey Text Text -> FieldAccessor PubKey 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 "type'" 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 @"type'")) ::
Data.ProtoLens.FieldDescriptor PubKey
data'__field_descriptor :: FieldDescriptor PubKey
data'__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor PubKey ByteString
-> FieldDescriptor PubKey
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"data"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens PubKey PubKey ByteString ByteString
-> FieldAccessor PubKey ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'")) ::
Data.ProtoLens.FieldDescriptor PubKey
in
[(Tag, FieldDescriptor PubKey)] -> Map Tag (FieldDescriptor PubKey)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor PubKey
type'__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor PubKey
data'__field_descriptor)]
unknownFields :: LensLike' f PubKey FieldSet
unknownFields
= (PubKey -> FieldSet)
-> (PubKey -> FieldSet -> PubKey) -> Lens' PubKey FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
PubKey -> FieldSet
_PubKey'_unknownFields
(\ x__ :: PubKey
x__ y__ :: FieldSet
y__ -> PubKey
x__ {_PubKey'_unknownFields :: FieldSet
_PubKey'_unknownFields = FieldSet
y__})
defMessage :: PubKey
defMessage
= $WPubKey'_constructor :: Text -> ByteString -> FieldSet -> PubKey
PubKey'_constructor
{_PubKey'type' :: Text
_PubKey'type' = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_PubKey'data' :: ByteString
_PubKey'data' = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_PubKey'_unknownFields :: FieldSet
_PubKey'_unknownFields = []}
parseMessage :: Parser PubKey
parseMessage
= let
loop :: PubKey -> Data.ProtoLens.Encoding.Bytes.Parser PubKey
loop :: PubKey -> Parser PubKey
loop x :: PubKey
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]))))
PubKey -> Parser PubKey
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter PubKey PubKey FieldSet FieldSet
-> (FieldSet -> FieldSet) -> PubKey -> PubKey
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 PubKey PubKey FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) PubKey
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))
"type"
PubKey -> Parser PubKey
loop (Setter PubKey PubKey Text Text -> Text -> PubKey -> PubKey
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "type'" 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 @"type'") Text
y PubKey
x)
18
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"data"
PubKey -> Parser PubKey
loop (Setter PubKey PubKey ByteString ByteString
-> ByteString -> PubKey -> PubKey
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") ByteString
y PubKey
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
PubKey -> Parser PubKey
loop
(Setter PubKey PubKey FieldSet FieldSet
-> (FieldSet -> FieldSet) -> PubKey -> PubKey
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 PubKey PubKey FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) PubKey
x)
in
Parser PubKey -> String -> Parser PubKey
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do PubKey -> Parser PubKey
loop PubKey
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "PubKey"
buildMessage :: PubKey -> Builder
buildMessage
= \ _x :: PubKey
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text PubKey PubKey Text Text -> PubKey -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "type'" 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 @"type'") PubKey
_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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v = FoldLike ByteString PubKey PubKey ByteString ByteString
-> PubKey -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") PubKey
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 18)
((\ 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))
ByteString
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet PubKey PubKey FieldSet FieldSet
-> PubKey -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet PubKey PubKey FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields PubKey
_x)))
instance Control.DeepSeq.NFData PubKey where
rnf :: PubKey -> ()
rnf
= \ x__ :: PubKey
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(PubKey -> FieldSet
_PubKey'_unknownFields PubKey
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(PubKey -> Text
_PubKey'type' PubKey
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (PubKey -> ByteString
_PubKey'data' PubKey
x__) ()))
data Request
= Request'_constructor {Request -> Maybe Request'Value
_Request'value :: !(Prelude.Maybe Request'Value),
Request -> FieldSet
_Request'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (Request -> Request -> Bool
(Request -> Request -> Bool)
-> (Request -> Request -> Bool) -> Eq Request
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Request -> Request -> Bool
$c/= :: Request -> Request -> Bool
== :: Request -> Request -> Bool
$c== :: Request -> Request -> Bool
Prelude.Eq, Eq Request
Eq Request =>
(Request -> Request -> Ordering)
-> (Request -> Request -> Bool)
-> (Request -> Request -> Bool)
-> (Request -> Request -> Bool)
-> (Request -> Request -> Bool)
-> (Request -> Request -> Request)
-> (Request -> Request -> Request)
-> Ord Request
Request -> Request -> Bool
Request -> Request -> Ordering
Request -> Request -> Request
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 :: Request -> Request -> Request
$cmin :: Request -> Request -> Request
max :: Request -> Request -> Request
$cmax :: Request -> Request -> Request
>= :: Request -> Request -> Bool
$c>= :: Request -> Request -> Bool
> :: Request -> Request -> Bool
$c> :: Request -> Request -> Bool
<= :: Request -> Request -> Bool
$c<= :: Request -> Request -> Bool
< :: Request -> Request -> Bool
$c< :: Request -> Request -> Bool
compare :: Request -> Request -> Ordering
$ccompare :: Request -> Request -> Ordering
$cp1Ord :: Eq Request
Prelude.Ord)
instance Prelude.Show Request where
showsPrec :: Int -> Request -> ShowS
showsPrec _ __x :: Request
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(Request -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Request
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
data Request'Value
= Request'Echo !RequestEcho |
Request'Flush !RequestFlush |
Request'Info !RequestInfo |
Request'SetOption !RequestSetOption |
Request'InitChain !RequestInitChain |
Request'Query !RequestQuery |
Request'BeginBlock !RequestBeginBlock |
Request'CheckTx !RequestCheckTx |
Request'DeliverTx !RequestDeliverTx |
Request'EndBlock !RequestEndBlock |
Request'Commit !RequestCommit
deriving (Int -> Request'Value -> ShowS
[Request'Value] -> ShowS
Request'Value -> String
(Int -> Request'Value -> ShowS)
-> (Request'Value -> String)
-> ([Request'Value] -> ShowS)
-> Show Request'Value
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Request'Value] -> ShowS
$cshowList :: [Request'Value] -> ShowS
show :: Request'Value -> String
$cshow :: Request'Value -> String
showsPrec :: Int -> Request'Value -> ShowS
$cshowsPrec :: Int -> Request'Value -> ShowS
Prelude.Show, Request'Value -> Request'Value -> Bool
(Request'Value -> Request'Value -> Bool)
-> (Request'Value -> Request'Value -> Bool) -> Eq Request'Value
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Request'Value -> Request'Value -> Bool
$c/= :: Request'Value -> Request'Value -> Bool
== :: Request'Value -> Request'Value -> Bool
$c== :: Request'Value -> Request'Value -> Bool
Prelude.Eq, Eq Request'Value
Eq Request'Value =>
(Request'Value -> Request'Value -> Ordering)
-> (Request'Value -> Request'Value -> Bool)
-> (Request'Value -> Request'Value -> Bool)
-> (Request'Value -> Request'Value -> Bool)
-> (Request'Value -> Request'Value -> Bool)
-> (Request'Value -> Request'Value -> Request'Value)
-> (Request'Value -> Request'Value -> Request'Value)
-> Ord Request'Value
Request'Value -> Request'Value -> Bool
Request'Value -> Request'Value -> Ordering
Request'Value -> Request'Value -> Request'Value
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 :: Request'Value -> Request'Value -> Request'Value
$cmin :: Request'Value -> Request'Value -> Request'Value
max :: Request'Value -> Request'Value -> Request'Value
$cmax :: Request'Value -> Request'Value -> Request'Value
>= :: Request'Value -> Request'Value -> Bool
$c>= :: Request'Value -> Request'Value -> Bool
> :: Request'Value -> Request'Value -> Bool
$c> :: Request'Value -> Request'Value -> Bool
<= :: Request'Value -> Request'Value -> Bool
$c<= :: Request'Value -> Request'Value -> Bool
< :: Request'Value -> Request'Value -> Bool
$c< :: Request'Value -> Request'Value -> Bool
compare :: Request'Value -> Request'Value -> Ordering
$ccompare :: Request'Value -> Request'Value -> Ordering
$cp1Ord :: Eq Request'Value
Prelude.Ord)
instance Data.ProtoLens.Field.HasField Request "maybe'value" (Prelude.Maybe Request'Value) where
fieldOf :: Proxy# "maybe'value"
-> (Maybe Request'Value -> f (Maybe Request'Value))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe Request'Value -> f (Maybe Request'Value))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe Request'Value -> f (Maybe Request'Value))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(Maybe Request'Value -> f (Maybe Request'Value))
-> Maybe Request'Value -> f (Maybe Request'Value)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Request "maybe'echo" (Prelude.Maybe RequestEcho) where
fieldOf :: Proxy# "maybe'echo"
-> (Maybe RequestEcho -> f (Maybe RequestEcho))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe RequestEcho -> f (Maybe RequestEcho))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe RequestEcho -> f (Maybe RequestEcho))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
((Maybe Request'Value -> Maybe RequestEcho)
-> (Maybe Request'Value
-> Maybe RequestEcho -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestEcho)
(Maybe RequestEcho)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'Echo x__val :: RequestEcho
x__val)) -> RequestEcho -> Maybe RequestEcho
forall a. a -> Maybe a
Prelude.Just RequestEcho
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestEcho
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestEcho
y__ -> (RequestEcho -> Request'Value)
-> Maybe RequestEcho -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestEcho -> Request'Value
Request'Echo Maybe RequestEcho
y__))
instance Data.ProtoLens.Field.HasField Request "echo" RequestEcho where
fieldOf :: Proxy# "echo"
-> (RequestEcho -> f RequestEcho) -> Request -> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((RequestEcho -> f RequestEcho)
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (RequestEcho -> f RequestEcho)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(((Maybe RequestEcho -> f (Maybe RequestEcho))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> ((RequestEcho -> f RequestEcho)
-> Maybe RequestEcho -> f (Maybe RequestEcho))
-> (RequestEcho -> f RequestEcho)
-> Maybe Request'Value
-> f (Maybe Request'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Request'Value -> Maybe RequestEcho)
-> (Maybe Request'Value
-> Maybe RequestEcho -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestEcho)
(Maybe RequestEcho)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'Echo x__val :: RequestEcho
x__val)) -> RequestEcho -> Maybe RequestEcho
forall a. a -> Maybe a
Prelude.Just RequestEcho
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestEcho
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestEcho
y__ -> (RequestEcho -> Request'Value)
-> Maybe RequestEcho -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestEcho -> Request'Value
Request'Echo Maybe RequestEcho
y__))
(RequestEcho -> Lens' (Maybe RequestEcho) RequestEcho
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RequestEcho
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Request "maybe'flush" (Prelude.Maybe RequestFlush) where
fieldOf :: Proxy# "maybe'flush"
-> (Maybe RequestFlush -> f (Maybe RequestFlush))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe RequestFlush -> f (Maybe RequestFlush))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe RequestFlush -> f (Maybe RequestFlush))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
((Maybe Request'Value -> Maybe RequestFlush)
-> (Maybe Request'Value
-> Maybe RequestFlush -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestFlush)
(Maybe RequestFlush)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'Flush x__val :: RequestFlush
x__val)) -> RequestFlush -> Maybe RequestFlush
forall a. a -> Maybe a
Prelude.Just RequestFlush
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestFlush
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestFlush
y__ -> (RequestFlush -> Request'Value)
-> Maybe RequestFlush -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestFlush -> Request'Value
Request'Flush Maybe RequestFlush
y__))
instance Data.ProtoLens.Field.HasField Request "flush" RequestFlush where
fieldOf :: Proxy# "flush"
-> (RequestFlush -> f RequestFlush) -> Request -> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((RequestFlush -> f RequestFlush)
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (RequestFlush -> f RequestFlush)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(((Maybe RequestFlush -> f (Maybe RequestFlush))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> ((RequestFlush -> f RequestFlush)
-> Maybe RequestFlush -> f (Maybe RequestFlush))
-> (RequestFlush -> f RequestFlush)
-> Maybe Request'Value
-> f (Maybe Request'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Request'Value -> Maybe RequestFlush)
-> (Maybe Request'Value
-> Maybe RequestFlush -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestFlush)
(Maybe RequestFlush)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'Flush x__val :: RequestFlush
x__val)) -> RequestFlush -> Maybe RequestFlush
forall a. a -> Maybe a
Prelude.Just RequestFlush
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestFlush
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestFlush
y__ -> (RequestFlush -> Request'Value)
-> Maybe RequestFlush -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestFlush -> Request'Value
Request'Flush Maybe RequestFlush
y__))
(RequestFlush -> Lens' (Maybe RequestFlush) RequestFlush
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RequestFlush
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Request "maybe'info" (Prelude.Maybe RequestInfo) where
fieldOf :: Proxy# "maybe'info"
-> (Maybe RequestInfo -> f (Maybe RequestInfo))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe RequestInfo -> f (Maybe RequestInfo))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe RequestInfo -> f (Maybe RequestInfo))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
((Maybe Request'Value -> Maybe RequestInfo)
-> (Maybe Request'Value
-> Maybe RequestInfo -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestInfo)
(Maybe RequestInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'Info x__val :: RequestInfo
x__val)) -> RequestInfo -> Maybe RequestInfo
forall a. a -> Maybe a
Prelude.Just RequestInfo
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestInfo
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestInfo
y__ -> (RequestInfo -> Request'Value)
-> Maybe RequestInfo -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestInfo -> Request'Value
Request'Info Maybe RequestInfo
y__))
instance Data.ProtoLens.Field.HasField Request "info" RequestInfo where
fieldOf :: Proxy# "info"
-> (RequestInfo -> f RequestInfo) -> Request -> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((RequestInfo -> f RequestInfo)
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (RequestInfo -> f RequestInfo)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(((Maybe RequestInfo -> f (Maybe RequestInfo))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> ((RequestInfo -> f RequestInfo)
-> Maybe RequestInfo -> f (Maybe RequestInfo))
-> (RequestInfo -> f RequestInfo)
-> Maybe Request'Value
-> f (Maybe Request'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Request'Value -> Maybe RequestInfo)
-> (Maybe Request'Value
-> Maybe RequestInfo -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestInfo)
(Maybe RequestInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'Info x__val :: RequestInfo
x__val)) -> RequestInfo -> Maybe RequestInfo
forall a. a -> Maybe a
Prelude.Just RequestInfo
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestInfo
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestInfo
y__ -> (RequestInfo -> Request'Value)
-> Maybe RequestInfo -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestInfo -> Request'Value
Request'Info Maybe RequestInfo
y__))
(RequestInfo -> Lens' (Maybe RequestInfo) RequestInfo
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RequestInfo
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Request "maybe'setOption" (Prelude.Maybe RequestSetOption) where
fieldOf :: Proxy# "maybe'setOption"
-> (Maybe RequestSetOption -> f (Maybe RequestSetOption))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe RequestSetOption -> f (Maybe RequestSetOption))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe RequestSetOption -> f (Maybe RequestSetOption))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
((Maybe Request'Value -> Maybe RequestSetOption)
-> (Maybe Request'Value
-> Maybe RequestSetOption -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestSetOption)
(Maybe RequestSetOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'SetOption x__val :: RequestSetOption
x__val)) -> RequestSetOption -> Maybe RequestSetOption
forall a. a -> Maybe a
Prelude.Just RequestSetOption
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestSetOption
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestSetOption
y__ -> (RequestSetOption -> Request'Value)
-> Maybe RequestSetOption -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestSetOption -> Request'Value
Request'SetOption Maybe RequestSetOption
y__))
instance Data.ProtoLens.Field.HasField Request "setOption" RequestSetOption where
fieldOf :: Proxy# "setOption"
-> (RequestSetOption -> f RequestSetOption) -> Request -> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((RequestSetOption -> f RequestSetOption)
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (RequestSetOption -> f RequestSetOption)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(((Maybe RequestSetOption -> f (Maybe RequestSetOption))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> ((RequestSetOption -> f RequestSetOption)
-> Maybe RequestSetOption -> f (Maybe RequestSetOption))
-> (RequestSetOption -> f RequestSetOption)
-> Maybe Request'Value
-> f (Maybe Request'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Request'Value -> Maybe RequestSetOption)
-> (Maybe Request'Value
-> Maybe RequestSetOption -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestSetOption)
(Maybe RequestSetOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'SetOption x__val :: RequestSetOption
x__val)) -> RequestSetOption -> Maybe RequestSetOption
forall a. a -> Maybe a
Prelude.Just RequestSetOption
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestSetOption
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestSetOption
y__ -> (RequestSetOption -> Request'Value)
-> Maybe RequestSetOption -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestSetOption -> Request'Value
Request'SetOption Maybe RequestSetOption
y__))
(RequestSetOption -> Lens' (Maybe RequestSetOption) RequestSetOption
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RequestSetOption
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Request "maybe'initChain" (Prelude.Maybe RequestInitChain) where
fieldOf :: Proxy# "maybe'initChain"
-> (Maybe RequestInitChain -> f (Maybe RequestInitChain))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe RequestInitChain -> f (Maybe RequestInitChain))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe RequestInitChain -> f (Maybe RequestInitChain))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
((Maybe Request'Value -> Maybe RequestInitChain)
-> (Maybe Request'Value
-> Maybe RequestInitChain -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestInitChain)
(Maybe RequestInitChain)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'InitChain x__val :: RequestInitChain
x__val)) -> RequestInitChain -> Maybe RequestInitChain
forall a. a -> Maybe a
Prelude.Just RequestInitChain
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestInitChain
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestInitChain
y__ -> (RequestInitChain -> Request'Value)
-> Maybe RequestInitChain -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestInitChain -> Request'Value
Request'InitChain Maybe RequestInitChain
y__))
instance Data.ProtoLens.Field.HasField Request "initChain" RequestInitChain where
fieldOf :: Proxy# "initChain"
-> (RequestInitChain -> f RequestInitChain) -> Request -> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((RequestInitChain -> f RequestInitChain)
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (RequestInitChain -> f RequestInitChain)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(((Maybe RequestInitChain -> f (Maybe RequestInitChain))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> ((RequestInitChain -> f RequestInitChain)
-> Maybe RequestInitChain -> f (Maybe RequestInitChain))
-> (RequestInitChain -> f RequestInitChain)
-> Maybe Request'Value
-> f (Maybe Request'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Request'Value -> Maybe RequestInitChain)
-> (Maybe Request'Value
-> Maybe RequestInitChain -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestInitChain)
(Maybe RequestInitChain)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'InitChain x__val :: RequestInitChain
x__val)) -> RequestInitChain -> Maybe RequestInitChain
forall a. a -> Maybe a
Prelude.Just RequestInitChain
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestInitChain
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestInitChain
y__ -> (RequestInitChain -> Request'Value)
-> Maybe RequestInitChain -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestInitChain -> Request'Value
Request'InitChain Maybe RequestInitChain
y__))
(RequestInitChain -> Lens' (Maybe RequestInitChain) RequestInitChain
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RequestInitChain
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Request "maybe'query" (Prelude.Maybe RequestQuery) where
fieldOf :: Proxy# "maybe'query"
-> (Maybe RequestQuery -> f (Maybe RequestQuery))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe RequestQuery -> f (Maybe RequestQuery))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe RequestQuery -> f (Maybe RequestQuery))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
((Maybe Request'Value -> Maybe RequestQuery)
-> (Maybe Request'Value
-> Maybe RequestQuery -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestQuery)
(Maybe RequestQuery)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'Query x__val :: RequestQuery
x__val)) -> RequestQuery -> Maybe RequestQuery
forall a. a -> Maybe a
Prelude.Just RequestQuery
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestQuery
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestQuery
y__ -> (RequestQuery -> Request'Value)
-> Maybe RequestQuery -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestQuery -> Request'Value
Request'Query Maybe RequestQuery
y__))
instance Data.ProtoLens.Field.HasField Request "query" RequestQuery where
fieldOf :: Proxy# "query"
-> (RequestQuery -> f RequestQuery) -> Request -> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((RequestQuery -> f RequestQuery)
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (RequestQuery -> f RequestQuery)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(((Maybe RequestQuery -> f (Maybe RequestQuery))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> ((RequestQuery -> f RequestQuery)
-> Maybe RequestQuery -> f (Maybe RequestQuery))
-> (RequestQuery -> f RequestQuery)
-> Maybe Request'Value
-> f (Maybe Request'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Request'Value -> Maybe RequestQuery)
-> (Maybe Request'Value
-> Maybe RequestQuery -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestQuery)
(Maybe RequestQuery)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'Query x__val :: RequestQuery
x__val)) -> RequestQuery -> Maybe RequestQuery
forall a. a -> Maybe a
Prelude.Just RequestQuery
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestQuery
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestQuery
y__ -> (RequestQuery -> Request'Value)
-> Maybe RequestQuery -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestQuery -> Request'Value
Request'Query Maybe RequestQuery
y__))
(RequestQuery -> Lens' (Maybe RequestQuery) RequestQuery
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RequestQuery
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Request "maybe'beginBlock" (Prelude.Maybe RequestBeginBlock) where
fieldOf :: Proxy# "maybe'beginBlock"
-> (Maybe RequestBeginBlock -> f (Maybe RequestBeginBlock))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe RequestBeginBlock -> f (Maybe RequestBeginBlock))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe RequestBeginBlock -> f (Maybe RequestBeginBlock))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
((Maybe Request'Value -> Maybe RequestBeginBlock)
-> (Maybe Request'Value
-> Maybe RequestBeginBlock -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestBeginBlock)
(Maybe RequestBeginBlock)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'BeginBlock x__val :: RequestBeginBlock
x__val)) -> RequestBeginBlock -> Maybe RequestBeginBlock
forall a. a -> Maybe a
Prelude.Just RequestBeginBlock
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestBeginBlock
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestBeginBlock
y__ -> (RequestBeginBlock -> Request'Value)
-> Maybe RequestBeginBlock -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestBeginBlock -> Request'Value
Request'BeginBlock Maybe RequestBeginBlock
y__))
instance Data.ProtoLens.Field.HasField Request "beginBlock" RequestBeginBlock where
fieldOf :: Proxy# "beginBlock"
-> (RequestBeginBlock -> f RequestBeginBlock)
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((RequestBeginBlock -> f RequestBeginBlock)
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (RequestBeginBlock -> f RequestBeginBlock)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(((Maybe RequestBeginBlock -> f (Maybe RequestBeginBlock))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> ((RequestBeginBlock -> f RequestBeginBlock)
-> Maybe RequestBeginBlock -> f (Maybe RequestBeginBlock))
-> (RequestBeginBlock -> f RequestBeginBlock)
-> Maybe Request'Value
-> f (Maybe Request'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Request'Value -> Maybe RequestBeginBlock)
-> (Maybe Request'Value
-> Maybe RequestBeginBlock -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestBeginBlock)
(Maybe RequestBeginBlock)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'BeginBlock x__val :: RequestBeginBlock
x__val)) -> RequestBeginBlock -> Maybe RequestBeginBlock
forall a. a -> Maybe a
Prelude.Just RequestBeginBlock
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestBeginBlock
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestBeginBlock
y__ -> (RequestBeginBlock -> Request'Value)
-> Maybe RequestBeginBlock -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestBeginBlock -> Request'Value
Request'BeginBlock Maybe RequestBeginBlock
y__))
(RequestBeginBlock
-> Lens' (Maybe RequestBeginBlock) RequestBeginBlock
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RequestBeginBlock
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Request "maybe'checkTx" (Prelude.Maybe RequestCheckTx) where
fieldOf :: Proxy# "maybe'checkTx"
-> (Maybe RequestCheckTx -> f (Maybe RequestCheckTx))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe RequestCheckTx -> f (Maybe RequestCheckTx))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe RequestCheckTx -> f (Maybe RequestCheckTx))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
((Maybe Request'Value -> Maybe RequestCheckTx)
-> (Maybe Request'Value
-> Maybe RequestCheckTx -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestCheckTx)
(Maybe RequestCheckTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'CheckTx x__val :: RequestCheckTx
x__val)) -> RequestCheckTx -> Maybe RequestCheckTx
forall a. a -> Maybe a
Prelude.Just RequestCheckTx
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestCheckTx
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestCheckTx
y__ -> (RequestCheckTx -> Request'Value)
-> Maybe RequestCheckTx -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestCheckTx -> Request'Value
Request'CheckTx Maybe RequestCheckTx
y__))
instance Data.ProtoLens.Field.HasField Request "checkTx" RequestCheckTx where
fieldOf :: Proxy# "checkTx"
-> (RequestCheckTx -> f RequestCheckTx) -> Request -> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((RequestCheckTx -> f RequestCheckTx)
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (RequestCheckTx -> f RequestCheckTx)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(((Maybe RequestCheckTx -> f (Maybe RequestCheckTx))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> ((RequestCheckTx -> f RequestCheckTx)
-> Maybe RequestCheckTx -> f (Maybe RequestCheckTx))
-> (RequestCheckTx -> f RequestCheckTx)
-> Maybe Request'Value
-> f (Maybe Request'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Request'Value -> Maybe RequestCheckTx)
-> (Maybe Request'Value
-> Maybe RequestCheckTx -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestCheckTx)
(Maybe RequestCheckTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'CheckTx x__val :: RequestCheckTx
x__val)) -> RequestCheckTx -> Maybe RequestCheckTx
forall a. a -> Maybe a
Prelude.Just RequestCheckTx
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestCheckTx
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestCheckTx
y__ -> (RequestCheckTx -> Request'Value)
-> Maybe RequestCheckTx -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestCheckTx -> Request'Value
Request'CheckTx Maybe RequestCheckTx
y__))
(RequestCheckTx -> Lens' (Maybe RequestCheckTx) RequestCheckTx
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RequestCheckTx
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Request "maybe'deliverTx" (Prelude.Maybe RequestDeliverTx) where
fieldOf :: Proxy# "maybe'deliverTx"
-> (Maybe RequestDeliverTx -> f (Maybe RequestDeliverTx))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe RequestDeliverTx -> f (Maybe RequestDeliverTx))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe RequestDeliverTx -> f (Maybe RequestDeliverTx))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
((Maybe Request'Value -> Maybe RequestDeliverTx)
-> (Maybe Request'Value
-> Maybe RequestDeliverTx -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestDeliverTx)
(Maybe RequestDeliverTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'DeliverTx x__val :: RequestDeliverTx
x__val)) -> RequestDeliverTx -> Maybe RequestDeliverTx
forall a. a -> Maybe a
Prelude.Just RequestDeliverTx
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestDeliverTx
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestDeliverTx
y__ -> (RequestDeliverTx -> Request'Value)
-> Maybe RequestDeliverTx -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestDeliverTx -> Request'Value
Request'DeliverTx Maybe RequestDeliverTx
y__))
instance Data.ProtoLens.Field.HasField Request "deliverTx" RequestDeliverTx where
fieldOf :: Proxy# "deliverTx"
-> (RequestDeliverTx -> f RequestDeliverTx) -> Request -> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((RequestDeliverTx -> f RequestDeliverTx)
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (RequestDeliverTx -> f RequestDeliverTx)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(((Maybe RequestDeliverTx -> f (Maybe RequestDeliverTx))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> ((RequestDeliverTx -> f RequestDeliverTx)
-> Maybe RequestDeliverTx -> f (Maybe RequestDeliverTx))
-> (RequestDeliverTx -> f RequestDeliverTx)
-> Maybe Request'Value
-> f (Maybe Request'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Request'Value -> Maybe RequestDeliverTx)
-> (Maybe Request'Value
-> Maybe RequestDeliverTx -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestDeliverTx)
(Maybe RequestDeliverTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'DeliverTx x__val :: RequestDeliverTx
x__val)) -> RequestDeliverTx -> Maybe RequestDeliverTx
forall a. a -> Maybe a
Prelude.Just RequestDeliverTx
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestDeliverTx
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestDeliverTx
y__ -> (RequestDeliverTx -> Request'Value)
-> Maybe RequestDeliverTx -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestDeliverTx -> Request'Value
Request'DeliverTx Maybe RequestDeliverTx
y__))
(RequestDeliverTx -> Lens' (Maybe RequestDeliverTx) RequestDeliverTx
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RequestDeliverTx
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Request "maybe'endBlock" (Prelude.Maybe RequestEndBlock) where
fieldOf :: Proxy# "maybe'endBlock"
-> (Maybe RequestEndBlock -> f (Maybe RequestEndBlock))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe RequestEndBlock -> f (Maybe RequestEndBlock))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe RequestEndBlock -> f (Maybe RequestEndBlock))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
((Maybe Request'Value -> Maybe RequestEndBlock)
-> (Maybe Request'Value
-> Maybe RequestEndBlock -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestEndBlock)
(Maybe RequestEndBlock)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'EndBlock x__val :: RequestEndBlock
x__val)) -> RequestEndBlock -> Maybe RequestEndBlock
forall a. a -> Maybe a
Prelude.Just RequestEndBlock
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestEndBlock
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestEndBlock
y__ -> (RequestEndBlock -> Request'Value)
-> Maybe RequestEndBlock -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestEndBlock -> Request'Value
Request'EndBlock Maybe RequestEndBlock
y__))
instance Data.ProtoLens.Field.HasField Request "endBlock" RequestEndBlock where
fieldOf :: Proxy# "endBlock"
-> (RequestEndBlock -> f RequestEndBlock) -> Request -> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((RequestEndBlock -> f RequestEndBlock)
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (RequestEndBlock -> f RequestEndBlock)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(((Maybe RequestEndBlock -> f (Maybe RequestEndBlock))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> ((RequestEndBlock -> f RequestEndBlock)
-> Maybe RequestEndBlock -> f (Maybe RequestEndBlock))
-> (RequestEndBlock -> f RequestEndBlock)
-> Maybe Request'Value
-> f (Maybe Request'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Request'Value -> Maybe RequestEndBlock)
-> (Maybe Request'Value
-> Maybe RequestEndBlock -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestEndBlock)
(Maybe RequestEndBlock)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'EndBlock x__val :: RequestEndBlock
x__val)) -> RequestEndBlock -> Maybe RequestEndBlock
forall a. a -> Maybe a
Prelude.Just RequestEndBlock
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestEndBlock
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestEndBlock
y__ -> (RequestEndBlock -> Request'Value)
-> Maybe RequestEndBlock -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestEndBlock -> Request'Value
Request'EndBlock Maybe RequestEndBlock
y__))
(RequestEndBlock -> Lens' (Maybe RequestEndBlock) RequestEndBlock
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RequestEndBlock
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Request "maybe'commit" (Prelude.Maybe RequestCommit) where
fieldOf :: Proxy# "maybe'commit"
-> (Maybe RequestCommit -> f (Maybe RequestCommit))
-> Request
-> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((Maybe RequestCommit -> f (Maybe RequestCommit))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (Maybe RequestCommit -> f (Maybe RequestCommit))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
((Maybe Request'Value -> Maybe RequestCommit)
-> (Maybe Request'Value
-> Maybe RequestCommit -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestCommit)
(Maybe RequestCommit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'Commit x__val :: RequestCommit
x__val)) -> RequestCommit -> Maybe RequestCommit
forall a. a -> Maybe a
Prelude.Just RequestCommit
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestCommit
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestCommit
y__ -> (RequestCommit -> Request'Value)
-> Maybe RequestCommit -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestCommit -> Request'Value
Request'Commit Maybe RequestCommit
y__))
instance Data.ProtoLens.Field.HasField Request "commit" RequestCommit where
fieldOf :: Proxy# "commit"
-> (RequestCommit -> f RequestCommit) -> Request -> f Request
fieldOf _
= ((Maybe Request'Value -> f (Maybe Request'Value))
-> Request -> f Request)
-> ((RequestCommit -> f RequestCommit)
-> Maybe Request'Value -> f (Maybe Request'Value))
-> (RequestCommit -> f RequestCommit)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Request -> Maybe Request'Value)
-> (Request -> Maybe Request'Value -> Request)
-> Lens Request Request (Maybe Request'Value) (Maybe Request'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> Maybe Request'Value
_Request'value (\ x__ :: Request
x__ y__ :: Maybe Request'Value
y__ -> Request
x__ {_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
y__}))
(((Maybe RequestCommit -> f (Maybe RequestCommit))
-> Maybe Request'Value -> f (Maybe Request'Value))
-> ((RequestCommit -> f RequestCommit)
-> Maybe RequestCommit -> f (Maybe RequestCommit))
-> (RequestCommit -> f RequestCommit)
-> Maybe Request'Value
-> f (Maybe Request'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Request'Value -> Maybe RequestCommit)
-> (Maybe Request'Value
-> Maybe RequestCommit -> Maybe Request'Value)
-> Lens
(Maybe Request'Value)
(Maybe Request'Value)
(Maybe RequestCommit)
(Maybe RequestCommit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Request'Value
x__
-> case Maybe Request'Value
x__ of
(Prelude.Just (Request'Commit x__val :: RequestCommit
x__val)) -> RequestCommit -> Maybe RequestCommit
forall a. a -> Maybe a
Prelude.Just RequestCommit
x__val
_otherwise :: Maybe Request'Value
_otherwise -> Maybe RequestCommit
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe RequestCommit
y__ -> (RequestCommit -> Request'Value)
-> Maybe RequestCommit -> Maybe Request'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap RequestCommit -> Request'Value
Request'Commit Maybe RequestCommit
y__))
(RequestCommit -> Lens' (Maybe RequestCommit) RequestCommit
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RequestCommit
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message Request where
messageName :: Proxy Request -> Text
messageName _ = String -> Text
Data.Text.pack "types.Request"
fieldsByTag :: Map Tag (FieldDescriptor Request)
fieldsByTag
= let
echo__field_descriptor :: FieldDescriptor Request
echo__field_descriptor
= String
-> FieldTypeDescriptor RequestEcho
-> FieldAccessor Request RequestEcho
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"echo"
(MessageOrGroup -> FieldTypeDescriptor RequestEcho
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor RequestEcho)
(Lens' Request (Maybe RequestEcho)
-> FieldAccessor Request RequestEcho
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'echo" 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'echo")) ::
Data.ProtoLens.FieldDescriptor Request
flush__field_descriptor :: FieldDescriptor Request
flush__field_descriptor
= String
-> FieldTypeDescriptor RequestFlush
-> FieldAccessor Request RequestFlush
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"flush"
(MessageOrGroup -> FieldTypeDescriptor RequestFlush
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor RequestFlush)
(Lens' Request (Maybe RequestFlush)
-> FieldAccessor Request RequestFlush
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'flush" 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'flush")) ::
Data.ProtoLens.FieldDescriptor Request
info__field_descriptor :: FieldDescriptor Request
info__field_descriptor
= String
-> FieldTypeDescriptor RequestInfo
-> FieldAccessor Request RequestInfo
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"info"
(MessageOrGroup -> FieldTypeDescriptor RequestInfo
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor RequestInfo)
(Lens' Request (Maybe RequestInfo)
-> FieldAccessor Request RequestInfo
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'info" 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'info")) ::
Data.ProtoLens.FieldDescriptor Request
setOption__field_descriptor :: FieldDescriptor Request
setOption__field_descriptor
= String
-> FieldTypeDescriptor RequestSetOption
-> FieldAccessor Request RequestSetOption
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"set_option"
(MessageOrGroup -> FieldTypeDescriptor RequestSetOption
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor RequestSetOption)
(Lens' Request (Maybe RequestSetOption)
-> FieldAccessor Request RequestSetOption
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'setOption" 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'setOption")) ::
Data.ProtoLens.FieldDescriptor Request
initChain__field_descriptor :: FieldDescriptor Request
initChain__field_descriptor
= String
-> FieldTypeDescriptor RequestInitChain
-> FieldAccessor Request RequestInitChain
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"init_chain"
(MessageOrGroup -> FieldTypeDescriptor RequestInitChain
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor RequestInitChain)
(Lens' Request (Maybe RequestInitChain)
-> FieldAccessor Request RequestInitChain
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'initChain" 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'initChain")) ::
Data.ProtoLens.FieldDescriptor Request
query__field_descriptor :: FieldDescriptor Request
query__field_descriptor
= String
-> FieldTypeDescriptor RequestQuery
-> FieldAccessor Request RequestQuery
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"query"
(MessageOrGroup -> FieldTypeDescriptor RequestQuery
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor RequestQuery)
(Lens' Request (Maybe RequestQuery)
-> FieldAccessor Request RequestQuery
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'query" 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'query")) ::
Data.ProtoLens.FieldDescriptor Request
beginBlock__field_descriptor :: FieldDescriptor Request
beginBlock__field_descriptor
= String
-> FieldTypeDescriptor RequestBeginBlock
-> FieldAccessor Request RequestBeginBlock
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"begin_block"
(MessageOrGroup -> FieldTypeDescriptor RequestBeginBlock
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor RequestBeginBlock)
(Lens' Request (Maybe RequestBeginBlock)
-> FieldAccessor Request RequestBeginBlock
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'beginBlock" 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'beginBlock")) ::
Data.ProtoLens.FieldDescriptor Request
checkTx__field_descriptor :: FieldDescriptor Request
checkTx__field_descriptor
= String
-> FieldTypeDescriptor RequestCheckTx
-> FieldAccessor Request RequestCheckTx
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"check_tx"
(MessageOrGroup -> FieldTypeDescriptor RequestCheckTx
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor RequestCheckTx)
(Lens' Request (Maybe RequestCheckTx)
-> FieldAccessor Request RequestCheckTx
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'checkTx" 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'checkTx")) ::
Data.ProtoLens.FieldDescriptor Request
deliverTx__field_descriptor :: FieldDescriptor Request
deliverTx__field_descriptor
= String
-> FieldTypeDescriptor RequestDeliverTx
-> FieldAccessor Request RequestDeliverTx
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"deliver_tx"
(MessageOrGroup -> FieldTypeDescriptor RequestDeliverTx
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor RequestDeliverTx)
(Lens' Request (Maybe RequestDeliverTx)
-> FieldAccessor Request RequestDeliverTx
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'deliverTx" 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'deliverTx")) ::
Data.ProtoLens.FieldDescriptor Request
endBlock__field_descriptor :: FieldDescriptor Request
endBlock__field_descriptor
= String
-> FieldTypeDescriptor RequestEndBlock
-> FieldAccessor Request RequestEndBlock
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"end_block"
(MessageOrGroup -> FieldTypeDescriptor RequestEndBlock
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor RequestEndBlock)
(Lens' Request (Maybe RequestEndBlock)
-> FieldAccessor Request RequestEndBlock
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'endBlock" 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'endBlock")) ::
Data.ProtoLens.FieldDescriptor Request
commit__field_descriptor :: FieldDescriptor Request
commit__field_descriptor
= String
-> FieldTypeDescriptor RequestCommit
-> FieldAccessor Request RequestCommit
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"commit"
(MessageOrGroup -> FieldTypeDescriptor RequestCommit
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor RequestCommit)
(Lens' Request (Maybe RequestCommit)
-> FieldAccessor Request RequestCommit
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'commit" 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'commit")) ::
Data.ProtoLens.FieldDescriptor Request
in
[(Tag, FieldDescriptor Request)]
-> Map Tag (FieldDescriptor Request)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor Request
echo__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor Request
flush__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor Request
info__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor Request
setOption__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 6, FieldDescriptor Request
initChain__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 7, FieldDescriptor Request
query__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 8, FieldDescriptor Request
beginBlock__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 9, FieldDescriptor Request
checkTx__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 19, FieldDescriptor Request
deliverTx__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 11, FieldDescriptor Request
endBlock__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 12, FieldDescriptor Request
commit__field_descriptor)]
unknownFields :: LensLike' f Request FieldSet
unknownFields
= (Request -> FieldSet)
-> (Request -> FieldSet -> Request) -> Lens' Request FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Request -> FieldSet
_Request'_unknownFields
(\ x__ :: Request
x__ y__ :: FieldSet
y__ -> Request
x__ {_Request'_unknownFields :: FieldSet
_Request'_unknownFields = FieldSet
y__})
defMessage :: Request
defMessage
= $WRequest'_constructor :: Maybe Request'Value -> FieldSet -> Request
Request'_constructor
{_Request'value :: Maybe Request'Value
_Request'value = Maybe Request'Value
forall a. Maybe a
Prelude.Nothing, _Request'_unknownFields :: FieldSet
_Request'_unknownFields = []}
parseMessage :: Parser Request
parseMessage
= let
loop :: Request -> Data.ProtoLens.Encoding.Bytes.Parser Request
loop :: Request -> Parser Request
loop x :: Request
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]))))
Request -> Parser Request
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter Request Request FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Request -> Request
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 Request Request FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Request
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
18
-> do RequestEcho
y <- Parser RequestEcho -> String -> Parser RequestEcho
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser RequestEcho -> Parser RequestEcho
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 RequestEcho
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"echo"
Request -> Parser Request
loop (Setter Request Request RequestEcho RequestEcho
-> RequestEcho -> Request -> Request
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "echo" 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 @"echo") RequestEcho
y Request
x)
26
-> do RequestFlush
y <- Parser RequestFlush -> String -> Parser RequestFlush
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser RequestFlush -> Parser RequestFlush
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 RequestFlush
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"flush"
Request -> Parser Request
loop (Setter Request Request RequestFlush RequestFlush
-> RequestFlush -> Request -> Request
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "flush" 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 @"flush") RequestFlush
y Request
x)
34
-> do RequestInfo
y <- Parser RequestInfo -> String -> Parser RequestInfo
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser RequestInfo -> Parser RequestInfo
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 RequestInfo
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"info"
Request -> Parser Request
loop (Setter Request Request RequestInfo RequestInfo
-> RequestInfo -> Request -> Request
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "info" 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 @"info") RequestInfo
y Request
x)
42
-> do RequestSetOption
y <- Parser RequestSetOption -> String -> Parser RequestSetOption
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser RequestSetOption -> Parser RequestSetOption
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 RequestSetOption
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"set_option"
Request -> Parser Request
loop
(Setter Request Request RequestSetOption RequestSetOption
-> RequestSetOption -> Request -> Request
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "setOption" 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 @"setOption") RequestSetOption
y Request
x)
50
-> do RequestInitChain
y <- Parser RequestInitChain -> String -> Parser RequestInitChain
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser RequestInitChain -> Parser RequestInitChain
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 RequestInitChain
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"init_chain"
Request -> Parser Request
loop
(Setter Request Request RequestInitChain RequestInitChain
-> RequestInitChain -> Request -> Request
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "initChain" 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 @"initChain") RequestInitChain
y Request
x)
58
-> do RequestQuery
y <- Parser RequestQuery -> String -> Parser RequestQuery
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser RequestQuery -> Parser RequestQuery
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 RequestQuery
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"query"
Request -> Parser Request
loop (Setter Request Request RequestQuery RequestQuery
-> RequestQuery -> Request -> Request
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "query" 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 @"query") RequestQuery
y Request
x)
66
-> do RequestBeginBlock
y <- Parser RequestBeginBlock -> String -> Parser RequestBeginBlock
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser RequestBeginBlock -> Parser RequestBeginBlock
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 RequestBeginBlock
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"begin_block"
Request -> Parser Request
loop
(Setter Request Request RequestBeginBlock RequestBeginBlock
-> RequestBeginBlock -> Request -> Request
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "beginBlock" 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 @"beginBlock") RequestBeginBlock
y Request
x)
74
-> do RequestCheckTx
y <- Parser RequestCheckTx -> String -> Parser RequestCheckTx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser RequestCheckTx -> Parser RequestCheckTx
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 RequestCheckTx
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"check_tx"
Request -> Parser Request
loop (Setter Request Request RequestCheckTx RequestCheckTx
-> RequestCheckTx -> Request -> Request
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "checkTx" 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 @"checkTx") RequestCheckTx
y Request
x)
154
-> do RequestDeliverTx
y <- Parser RequestDeliverTx -> String -> Parser RequestDeliverTx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser RequestDeliverTx -> Parser RequestDeliverTx
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 RequestDeliverTx
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"deliver_tx"
Request -> Parser Request
loop
(Setter Request Request RequestDeliverTx RequestDeliverTx
-> RequestDeliverTx -> Request -> Request
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "deliverTx" 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 @"deliverTx") RequestDeliverTx
y Request
x)
90
-> do RequestEndBlock
y <- Parser RequestEndBlock -> String -> Parser RequestEndBlock
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser RequestEndBlock -> Parser RequestEndBlock
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 RequestEndBlock
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"end_block"
Request -> Parser Request
loop
(Setter Request Request RequestEndBlock RequestEndBlock
-> RequestEndBlock -> Request -> Request
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "endBlock" 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 @"endBlock") RequestEndBlock
y Request
x)
98
-> do RequestCommit
y <- Parser RequestCommit -> String -> Parser RequestCommit
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser RequestCommit -> Parser RequestCommit
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 RequestCommit
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"commit"
Request -> Parser Request
loop (Setter Request Request RequestCommit RequestCommit
-> RequestCommit -> Request -> Request
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "commit" 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 @"commit") RequestCommit
y Request
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
Request -> Parser Request
loop
(Setter Request Request FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Request -> Request
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 Request Request FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Request
x)
in
Parser Request -> String -> Parser Request
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Request -> Parser Request
loop Request
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "Request"
buildMessage :: Request -> Builder
buildMessage
= \ _x :: Request
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe Request'Value)
Request
Request
(Maybe Request'Value)
(Maybe Request'Value)
-> Request -> Maybe Request'Value
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'value" 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'value") Request
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just (Request'Echo v :: RequestEcho
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (RequestEcho -> ByteString) -> RequestEcho -> 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))
RequestEcho -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
RequestEcho
v)
(Prelude.Just (Request'Flush v :: RequestFlush
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
((ByteString -> Builder)
-> (RequestFlush -> ByteString) -> RequestFlush -> 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))
RequestFlush -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
RequestFlush
v)
(Prelude.Just (Request'Info v :: RequestInfo
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 34)
((ByteString -> Builder)
-> (RequestInfo -> ByteString) -> RequestInfo -> 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))
RequestInfo -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
RequestInfo
v)
(Prelude.Just (Request'SetOption v :: RequestSetOption
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 42)
((ByteString -> Builder)
-> (RequestSetOption -> ByteString) -> RequestSetOption -> 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))
RequestSetOption -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
RequestSetOption
v)
(Prelude.Just (Request'InitChain v :: RequestInitChain
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 50)
((ByteString -> Builder)
-> (RequestInitChain -> ByteString) -> RequestInitChain -> 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))
RequestInitChain -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
RequestInitChain
v)
(Prelude.Just (Request'Query v :: RequestQuery
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 58)
((ByteString -> Builder)
-> (RequestQuery -> ByteString) -> RequestQuery -> 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))
RequestQuery -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
RequestQuery
v)
(Prelude.Just (Request'BeginBlock v :: RequestBeginBlock
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 66)
((ByteString -> Builder)
-> (RequestBeginBlock -> ByteString)
-> RequestBeginBlock
-> 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))
RequestBeginBlock -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
RequestBeginBlock
v)
(Prelude.Just (Request'CheckTx v :: RequestCheckTx
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 74)
((ByteString -> Builder)
-> (RequestCheckTx -> ByteString) -> RequestCheckTx -> 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))
RequestCheckTx -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
RequestCheckTx
v)
(Prelude.Just (Request'DeliverTx v :: RequestDeliverTx
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 154)
((ByteString -> Builder)
-> (RequestDeliverTx -> ByteString) -> RequestDeliverTx -> 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))
RequestDeliverTx -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
RequestDeliverTx
v)
(Prelude.Just (Request'EndBlock v :: RequestEndBlock
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 90)
((ByteString -> Builder)
-> (RequestEndBlock -> ByteString) -> RequestEndBlock -> 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))
RequestEndBlock -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
RequestEndBlock
v)
(Prelude.Just (Request'Commit v :: RequestCommit
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 98)
((ByteString -> Builder)
-> (RequestCommit -> ByteString) -> RequestCommit -> 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))
RequestCommit -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
RequestCommit
v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet Request Request FieldSet FieldSet
-> Request -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Request Request FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Request
_x))
instance Control.DeepSeq.NFData Request where
rnf :: Request -> ()
rnf
= \ x__ :: Request
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Request -> FieldSet
_Request'_unknownFields Request
x__)
(Maybe Request'Value -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Request -> Maybe Request'Value
_Request'value Request
x__) ())
instance Control.DeepSeq.NFData Request'Value where
rnf :: Request'Value -> ()
rnf (Request'Echo x__ :: RequestEcho
x__) = RequestEcho -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf RequestEcho
x__
rnf (Request'Flush x__ :: RequestFlush
x__) = RequestFlush -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf RequestFlush
x__
rnf (Request'Info x__ :: RequestInfo
x__) = RequestInfo -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf RequestInfo
x__
rnf (Request'SetOption x__ :: RequestSetOption
x__) = RequestSetOption -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf RequestSetOption
x__
rnf (Request'InitChain x__ :: RequestInitChain
x__) = RequestInitChain -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf RequestInitChain
x__
rnf (Request'Query x__ :: RequestQuery
x__) = RequestQuery -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf RequestQuery
x__
rnf (Request'BeginBlock x__ :: RequestBeginBlock
x__) = RequestBeginBlock -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf RequestBeginBlock
x__
rnf (Request'CheckTx x__ :: RequestCheckTx
x__) = RequestCheckTx -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf RequestCheckTx
x__
rnf (Request'DeliverTx x__ :: RequestDeliverTx
x__) = RequestDeliverTx -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf RequestDeliverTx
x__
rnf (Request'EndBlock x__ :: RequestEndBlock
x__) = RequestEndBlock -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf RequestEndBlock
x__
rnf (Request'Commit x__ :: RequestCommit
x__) = RequestCommit -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf RequestCommit
x__
_Request'Echo ::
Data.ProtoLens.Prism.Prism' Request'Value RequestEcho
_Request'Echo :: p RequestEcho (f RequestEcho) -> p Request'Value (f Request'Value)
_Request'Echo
= (RequestEcho -> Request'Value)
-> (Request'Value -> Maybe RequestEcho)
-> Prism Request'Value Request'Value RequestEcho RequestEcho
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
RequestEcho -> Request'Value
Request'Echo
(\ p__ :: Request'Value
p__
-> case Request'Value
p__ of
(Request'Echo p__val :: RequestEcho
p__val) -> RequestEcho -> Maybe RequestEcho
forall a. a -> Maybe a
Prelude.Just RequestEcho
p__val
_otherwise :: Request'Value
_otherwise -> Maybe RequestEcho
forall a. Maybe a
Prelude.Nothing)
_Request'Flush ::
Data.ProtoLens.Prism.Prism' Request'Value RequestFlush
_Request'Flush :: p RequestFlush (f RequestFlush)
-> p Request'Value (f Request'Value)
_Request'Flush
= (RequestFlush -> Request'Value)
-> (Request'Value -> Maybe RequestFlush)
-> Prism Request'Value Request'Value RequestFlush RequestFlush
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
RequestFlush -> Request'Value
Request'Flush
(\ p__ :: Request'Value
p__
-> case Request'Value
p__ of
(Request'Flush p__val :: RequestFlush
p__val) -> RequestFlush -> Maybe RequestFlush
forall a. a -> Maybe a
Prelude.Just RequestFlush
p__val
_otherwise :: Request'Value
_otherwise -> Maybe RequestFlush
forall a. Maybe a
Prelude.Nothing)
_Request'Info ::
Data.ProtoLens.Prism.Prism' Request'Value RequestInfo
_Request'Info :: p RequestInfo (f RequestInfo) -> p Request'Value (f Request'Value)
_Request'Info
= (RequestInfo -> Request'Value)
-> (Request'Value -> Maybe RequestInfo)
-> Prism Request'Value Request'Value RequestInfo RequestInfo
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
RequestInfo -> Request'Value
Request'Info
(\ p__ :: Request'Value
p__
-> case Request'Value
p__ of
(Request'Info p__val :: RequestInfo
p__val) -> RequestInfo -> Maybe RequestInfo
forall a. a -> Maybe a
Prelude.Just RequestInfo
p__val
_otherwise :: Request'Value
_otherwise -> Maybe RequestInfo
forall a. Maybe a
Prelude.Nothing)
_Request'SetOption ::
Data.ProtoLens.Prism.Prism' Request'Value RequestSetOption
_Request'SetOption :: p RequestSetOption (f RequestSetOption)
-> p Request'Value (f Request'Value)
_Request'SetOption
= (RequestSetOption -> Request'Value)
-> (Request'Value -> Maybe RequestSetOption)
-> Prism
Request'Value Request'Value RequestSetOption RequestSetOption
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
RequestSetOption -> Request'Value
Request'SetOption
(\ p__ :: Request'Value
p__
-> case Request'Value
p__ of
(Request'SetOption p__val :: RequestSetOption
p__val) -> RequestSetOption -> Maybe RequestSetOption
forall a. a -> Maybe a
Prelude.Just RequestSetOption
p__val
_otherwise :: Request'Value
_otherwise -> Maybe RequestSetOption
forall a. Maybe a
Prelude.Nothing)
_Request'InitChain ::
Data.ProtoLens.Prism.Prism' Request'Value RequestInitChain
_Request'InitChain :: p RequestInitChain (f RequestInitChain)
-> p Request'Value (f Request'Value)
_Request'InitChain
= (RequestInitChain -> Request'Value)
-> (Request'Value -> Maybe RequestInitChain)
-> Prism
Request'Value Request'Value RequestInitChain RequestInitChain
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
RequestInitChain -> Request'Value
Request'InitChain
(\ p__ :: Request'Value
p__
-> case Request'Value
p__ of
(Request'InitChain p__val :: RequestInitChain
p__val) -> RequestInitChain -> Maybe RequestInitChain
forall a. a -> Maybe a
Prelude.Just RequestInitChain
p__val
_otherwise :: Request'Value
_otherwise -> Maybe RequestInitChain
forall a. Maybe a
Prelude.Nothing)
_Request'Query ::
Data.ProtoLens.Prism.Prism' Request'Value RequestQuery
_Request'Query :: p RequestQuery (f RequestQuery)
-> p Request'Value (f Request'Value)
_Request'Query
= (RequestQuery -> Request'Value)
-> (Request'Value -> Maybe RequestQuery)
-> Prism Request'Value Request'Value RequestQuery RequestQuery
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
RequestQuery -> Request'Value
Request'Query
(\ p__ :: Request'Value
p__
-> case Request'Value
p__ of
(Request'Query p__val :: RequestQuery
p__val) -> RequestQuery -> Maybe RequestQuery
forall a. a -> Maybe a
Prelude.Just RequestQuery
p__val
_otherwise :: Request'Value
_otherwise -> Maybe RequestQuery
forall a. Maybe a
Prelude.Nothing)
_Request'BeginBlock ::
Data.ProtoLens.Prism.Prism' Request'Value RequestBeginBlock
_Request'BeginBlock :: p RequestBeginBlock (f RequestBeginBlock)
-> p Request'Value (f Request'Value)
_Request'BeginBlock
= (RequestBeginBlock -> Request'Value)
-> (Request'Value -> Maybe RequestBeginBlock)
-> Prism
Request'Value Request'Value RequestBeginBlock RequestBeginBlock
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
RequestBeginBlock -> Request'Value
Request'BeginBlock
(\ p__ :: Request'Value
p__
-> case Request'Value
p__ of
(Request'BeginBlock p__val :: RequestBeginBlock
p__val) -> RequestBeginBlock -> Maybe RequestBeginBlock
forall a. a -> Maybe a
Prelude.Just RequestBeginBlock
p__val
_otherwise :: Request'Value
_otherwise -> Maybe RequestBeginBlock
forall a. Maybe a
Prelude.Nothing)
_Request'CheckTx ::
Data.ProtoLens.Prism.Prism' Request'Value RequestCheckTx
_Request'CheckTx :: p RequestCheckTx (f RequestCheckTx)
-> p Request'Value (f Request'Value)
_Request'CheckTx
= (RequestCheckTx -> Request'Value)
-> (Request'Value -> Maybe RequestCheckTx)
-> Prism Request'Value Request'Value RequestCheckTx RequestCheckTx
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
RequestCheckTx -> Request'Value
Request'CheckTx
(\ p__ :: Request'Value
p__
-> case Request'Value
p__ of
(Request'CheckTx p__val :: RequestCheckTx
p__val) -> RequestCheckTx -> Maybe RequestCheckTx
forall a. a -> Maybe a
Prelude.Just RequestCheckTx
p__val
_otherwise :: Request'Value
_otherwise -> Maybe RequestCheckTx
forall a. Maybe a
Prelude.Nothing)
_Request'DeliverTx ::
Data.ProtoLens.Prism.Prism' Request'Value RequestDeliverTx
_Request'DeliverTx :: p RequestDeliverTx (f RequestDeliverTx)
-> p Request'Value (f Request'Value)
_Request'DeliverTx
= (RequestDeliverTx -> Request'Value)
-> (Request'Value -> Maybe RequestDeliverTx)
-> Prism
Request'Value Request'Value RequestDeliverTx RequestDeliverTx
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
RequestDeliverTx -> Request'Value
Request'DeliverTx
(\ p__ :: Request'Value
p__
-> case Request'Value
p__ of
(Request'DeliverTx p__val :: RequestDeliverTx
p__val) -> RequestDeliverTx -> Maybe RequestDeliverTx
forall a. a -> Maybe a
Prelude.Just RequestDeliverTx
p__val
_otherwise :: Request'Value
_otherwise -> Maybe RequestDeliverTx
forall a. Maybe a
Prelude.Nothing)
_Request'EndBlock ::
Data.ProtoLens.Prism.Prism' Request'Value RequestEndBlock
_Request'EndBlock :: p RequestEndBlock (f RequestEndBlock)
-> p Request'Value (f Request'Value)
_Request'EndBlock
= (RequestEndBlock -> Request'Value)
-> (Request'Value -> Maybe RequestEndBlock)
-> Prism
Request'Value Request'Value RequestEndBlock RequestEndBlock
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
RequestEndBlock -> Request'Value
Request'EndBlock
(\ p__ :: Request'Value
p__
-> case Request'Value
p__ of
(Request'EndBlock p__val :: RequestEndBlock
p__val) -> RequestEndBlock -> Maybe RequestEndBlock
forall a. a -> Maybe a
Prelude.Just RequestEndBlock
p__val
_otherwise :: Request'Value
_otherwise -> Maybe RequestEndBlock
forall a. Maybe a
Prelude.Nothing)
_Request'Commit ::
Data.ProtoLens.Prism.Prism' Request'Value RequestCommit
_Request'Commit :: p RequestCommit (f RequestCommit)
-> p Request'Value (f Request'Value)
_Request'Commit
= (RequestCommit -> Request'Value)
-> (Request'Value -> Maybe RequestCommit)
-> Prism Request'Value Request'Value RequestCommit RequestCommit
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
RequestCommit -> Request'Value
Request'Commit
(\ p__ :: Request'Value
p__
-> case Request'Value
p__ of
(Request'Commit p__val :: RequestCommit
p__val) -> RequestCommit -> Maybe RequestCommit
forall a. a -> Maybe a
Prelude.Just RequestCommit
p__val
_otherwise :: Request'Value
_otherwise -> Maybe RequestCommit
forall a. Maybe a
Prelude.Nothing)
data RequestBeginBlock
= RequestBeginBlock'_constructor {RequestBeginBlock -> ByteString
_RequestBeginBlock'hash :: !Data.ByteString.ByteString,
:: !(Prelude.Maybe Header),
RequestBeginBlock -> Maybe LastCommitInfo
_RequestBeginBlock'lastCommitInfo :: !(Prelude.Maybe LastCommitInfo),
RequestBeginBlock -> Vector Evidence
_RequestBeginBlock'byzantineValidators :: !(Data.Vector.Vector Evidence),
RequestBeginBlock -> FieldSet
_RequestBeginBlock'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (RequestBeginBlock -> RequestBeginBlock -> Bool
(RequestBeginBlock -> RequestBeginBlock -> Bool)
-> (RequestBeginBlock -> RequestBeginBlock -> Bool)
-> Eq RequestBeginBlock
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestBeginBlock -> RequestBeginBlock -> Bool
$c/= :: RequestBeginBlock -> RequestBeginBlock -> Bool
== :: RequestBeginBlock -> RequestBeginBlock -> Bool
$c== :: RequestBeginBlock -> RequestBeginBlock -> Bool
Prelude.Eq, Eq RequestBeginBlock
Eq RequestBeginBlock =>
(RequestBeginBlock -> RequestBeginBlock -> Ordering)
-> (RequestBeginBlock -> RequestBeginBlock -> Bool)
-> (RequestBeginBlock -> RequestBeginBlock -> Bool)
-> (RequestBeginBlock -> RequestBeginBlock -> Bool)
-> (RequestBeginBlock -> RequestBeginBlock -> Bool)
-> (RequestBeginBlock -> RequestBeginBlock -> RequestBeginBlock)
-> (RequestBeginBlock -> RequestBeginBlock -> RequestBeginBlock)
-> Ord RequestBeginBlock
RequestBeginBlock -> RequestBeginBlock -> Bool
RequestBeginBlock -> RequestBeginBlock -> Ordering
RequestBeginBlock -> RequestBeginBlock -> RequestBeginBlock
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 :: RequestBeginBlock -> RequestBeginBlock -> RequestBeginBlock
$cmin :: RequestBeginBlock -> RequestBeginBlock -> RequestBeginBlock
max :: RequestBeginBlock -> RequestBeginBlock -> RequestBeginBlock
$cmax :: RequestBeginBlock -> RequestBeginBlock -> RequestBeginBlock
>= :: RequestBeginBlock -> RequestBeginBlock -> Bool
$c>= :: RequestBeginBlock -> RequestBeginBlock -> Bool
> :: RequestBeginBlock -> RequestBeginBlock -> Bool
$c> :: RequestBeginBlock -> RequestBeginBlock -> Bool
<= :: RequestBeginBlock -> RequestBeginBlock -> Bool
$c<= :: RequestBeginBlock -> RequestBeginBlock -> Bool
< :: RequestBeginBlock -> RequestBeginBlock -> Bool
$c< :: RequestBeginBlock -> RequestBeginBlock -> Bool
compare :: RequestBeginBlock -> RequestBeginBlock -> Ordering
$ccompare :: RequestBeginBlock -> RequestBeginBlock -> Ordering
$cp1Ord :: Eq RequestBeginBlock
Prelude.Ord)
instance Prelude.Show RequestBeginBlock where
showsPrec :: Int -> RequestBeginBlock -> ShowS
showsPrec _ __x :: RequestBeginBlock
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(RequestBeginBlock -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RequestBeginBlock
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RequestBeginBlock "hash" Data.ByteString.ByteString where
fieldOf :: Proxy# "hash"
-> (ByteString -> f ByteString)
-> RequestBeginBlock
-> f RequestBeginBlock
fieldOf _
= ((ByteString -> f ByteString)
-> RequestBeginBlock -> f RequestBeginBlock)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> RequestBeginBlock
-> f RequestBeginBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestBeginBlock -> ByteString)
-> (RequestBeginBlock -> ByteString -> RequestBeginBlock)
-> Lens RequestBeginBlock RequestBeginBlock ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestBeginBlock -> ByteString
_RequestBeginBlock'hash
(\ x__ :: RequestBeginBlock
x__ y__ :: ByteString
y__ -> RequestBeginBlock
x__ {_RequestBeginBlock'hash :: ByteString
_RequestBeginBlock'hash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestBeginBlock "header" Header where
fieldOf :: Proxy# "header"
-> (Header -> f Header) -> RequestBeginBlock -> f RequestBeginBlock
fieldOf _
= ((Maybe Header -> f (Maybe Header))
-> RequestBeginBlock -> f RequestBeginBlock)
-> ((Header -> f Header) -> Maybe Header -> f (Maybe Header))
-> (Header -> f Header)
-> RequestBeginBlock
-> f RequestBeginBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestBeginBlock -> Maybe Header)
-> (RequestBeginBlock -> Maybe Header -> RequestBeginBlock)
-> Lens
RequestBeginBlock RequestBeginBlock (Maybe Header) (Maybe Header)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestBeginBlock -> Maybe Header
_RequestBeginBlock'header
(\ x__ :: RequestBeginBlock
x__ y__ :: Maybe Header
y__ -> RequestBeginBlock
x__ {_RequestBeginBlock'header :: Maybe Header
_RequestBeginBlock'header = Maybe Header
y__}))
(Header -> Lens' (Maybe Header) Header
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Header
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField RequestBeginBlock "maybe'header" (Prelude.Maybe Header) where
fieldOf :: Proxy# "maybe'header"
-> (Maybe Header -> f (Maybe Header))
-> RequestBeginBlock
-> f RequestBeginBlock
fieldOf _
= ((Maybe Header -> f (Maybe Header))
-> RequestBeginBlock -> f RequestBeginBlock)
-> ((Maybe Header -> f (Maybe Header))
-> Maybe Header -> f (Maybe Header))
-> (Maybe Header -> f (Maybe Header))
-> RequestBeginBlock
-> f RequestBeginBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestBeginBlock -> Maybe Header)
-> (RequestBeginBlock -> Maybe Header -> RequestBeginBlock)
-> Lens
RequestBeginBlock RequestBeginBlock (Maybe Header) (Maybe Header)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestBeginBlock -> Maybe Header
_RequestBeginBlock'header
(\ x__ :: RequestBeginBlock
x__ y__ :: Maybe Header
y__ -> RequestBeginBlock
x__ {_RequestBeginBlock'header :: Maybe Header
_RequestBeginBlock'header = Maybe Header
y__}))
(Maybe Header -> f (Maybe Header))
-> Maybe Header -> f (Maybe Header)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestBeginBlock "lastCommitInfo" LastCommitInfo where
fieldOf :: Proxy# "lastCommitInfo"
-> (LastCommitInfo -> f LastCommitInfo)
-> RequestBeginBlock
-> f RequestBeginBlock
fieldOf _
= ((Maybe LastCommitInfo -> f (Maybe LastCommitInfo))
-> RequestBeginBlock -> f RequestBeginBlock)
-> ((LastCommitInfo -> f LastCommitInfo)
-> Maybe LastCommitInfo -> f (Maybe LastCommitInfo))
-> (LastCommitInfo -> f LastCommitInfo)
-> RequestBeginBlock
-> f RequestBeginBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestBeginBlock -> Maybe LastCommitInfo)
-> (RequestBeginBlock -> Maybe LastCommitInfo -> RequestBeginBlock)
-> Lens
RequestBeginBlock
RequestBeginBlock
(Maybe LastCommitInfo)
(Maybe LastCommitInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestBeginBlock -> Maybe LastCommitInfo
_RequestBeginBlock'lastCommitInfo
(\ x__ :: RequestBeginBlock
x__ y__ :: Maybe LastCommitInfo
y__ -> RequestBeginBlock
x__ {_RequestBeginBlock'lastCommitInfo :: Maybe LastCommitInfo
_RequestBeginBlock'lastCommitInfo = Maybe LastCommitInfo
y__}))
(LastCommitInfo -> Lens' (Maybe LastCommitInfo) LastCommitInfo
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens LastCommitInfo
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField RequestBeginBlock "maybe'lastCommitInfo" (Prelude.Maybe LastCommitInfo) where
fieldOf :: Proxy# "maybe'lastCommitInfo"
-> (Maybe LastCommitInfo -> f (Maybe LastCommitInfo))
-> RequestBeginBlock
-> f RequestBeginBlock
fieldOf _
= ((Maybe LastCommitInfo -> f (Maybe LastCommitInfo))
-> RequestBeginBlock -> f RequestBeginBlock)
-> ((Maybe LastCommitInfo -> f (Maybe LastCommitInfo))
-> Maybe LastCommitInfo -> f (Maybe LastCommitInfo))
-> (Maybe LastCommitInfo -> f (Maybe LastCommitInfo))
-> RequestBeginBlock
-> f RequestBeginBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestBeginBlock -> Maybe LastCommitInfo)
-> (RequestBeginBlock -> Maybe LastCommitInfo -> RequestBeginBlock)
-> Lens
RequestBeginBlock
RequestBeginBlock
(Maybe LastCommitInfo)
(Maybe LastCommitInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestBeginBlock -> Maybe LastCommitInfo
_RequestBeginBlock'lastCommitInfo
(\ x__ :: RequestBeginBlock
x__ y__ :: Maybe LastCommitInfo
y__ -> RequestBeginBlock
x__ {_RequestBeginBlock'lastCommitInfo :: Maybe LastCommitInfo
_RequestBeginBlock'lastCommitInfo = Maybe LastCommitInfo
y__}))
(Maybe LastCommitInfo -> f (Maybe LastCommitInfo))
-> Maybe LastCommitInfo -> f (Maybe LastCommitInfo)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestBeginBlock "byzantineValidators" [Evidence] where
fieldOf :: Proxy# "byzantineValidators"
-> ([Evidence] -> f [Evidence])
-> RequestBeginBlock
-> f RequestBeginBlock
fieldOf _
= ((Vector Evidence -> f (Vector Evidence))
-> RequestBeginBlock -> f RequestBeginBlock)
-> (([Evidence] -> f [Evidence])
-> Vector Evidence -> f (Vector Evidence))
-> ([Evidence] -> f [Evidence])
-> RequestBeginBlock
-> f RequestBeginBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestBeginBlock -> Vector Evidence)
-> (RequestBeginBlock -> Vector Evidence -> RequestBeginBlock)
-> Lens
RequestBeginBlock
RequestBeginBlock
(Vector Evidence)
(Vector Evidence)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestBeginBlock -> Vector Evidence
_RequestBeginBlock'byzantineValidators
(\ x__ :: RequestBeginBlock
x__ y__ :: Vector Evidence
y__ -> RequestBeginBlock
x__ {_RequestBeginBlock'byzantineValidators :: Vector Evidence
_RequestBeginBlock'byzantineValidators = Vector Evidence
y__}))
((Vector Evidence -> [Evidence])
-> (Vector Evidence -> [Evidence] -> Vector Evidence)
-> Lens (Vector Evidence) (Vector Evidence) [Evidence] [Evidence]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector Evidence -> [Evidence]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [Evidence]
y__ -> [Evidence] -> Vector Evidence
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Evidence]
y__))
instance Data.ProtoLens.Field.HasField RequestBeginBlock "vec'byzantineValidators" (Data.Vector.Vector Evidence) where
fieldOf :: Proxy# "vec'byzantineValidators"
-> (Vector Evidence -> f (Vector Evidence))
-> RequestBeginBlock
-> f RequestBeginBlock
fieldOf _
= ((Vector Evidence -> f (Vector Evidence))
-> RequestBeginBlock -> f RequestBeginBlock)
-> ((Vector Evidence -> f (Vector Evidence))
-> Vector Evidence -> f (Vector Evidence))
-> (Vector Evidence -> f (Vector Evidence))
-> RequestBeginBlock
-> f RequestBeginBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestBeginBlock -> Vector Evidence)
-> (RequestBeginBlock -> Vector Evidence -> RequestBeginBlock)
-> Lens
RequestBeginBlock
RequestBeginBlock
(Vector Evidence)
(Vector Evidence)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestBeginBlock -> Vector Evidence
_RequestBeginBlock'byzantineValidators
(\ x__ :: RequestBeginBlock
x__ y__ :: Vector Evidence
y__ -> RequestBeginBlock
x__ {_RequestBeginBlock'byzantineValidators :: Vector Evidence
_RequestBeginBlock'byzantineValidators = Vector Evidence
y__}))
(Vector Evidence -> f (Vector Evidence))
-> Vector Evidence -> f (Vector Evidence)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RequestBeginBlock where
messageName :: Proxy RequestBeginBlock -> Text
messageName _ = String -> Text
Data.Text.pack "types.RequestBeginBlock"
fieldsByTag :: Map Tag (FieldDescriptor RequestBeginBlock)
fieldsByTag
= let
hash__field_descriptor :: FieldDescriptor RequestBeginBlock
hash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor RequestBeginBlock ByteString
-> FieldDescriptor RequestBeginBlock
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens RequestBeginBlock RequestBeginBlock ByteString ByteString
-> FieldAccessor RequestBeginBlock ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "hash" 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 @"hash")) ::
Data.ProtoLens.FieldDescriptor RequestBeginBlock
header__field_descriptor :: FieldDescriptor RequestBeginBlock
header__field_descriptor
= String
-> FieldTypeDescriptor Header
-> FieldAccessor RequestBeginBlock Header
-> FieldDescriptor RequestBeginBlock
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"header"
(MessageOrGroup -> FieldTypeDescriptor Header
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Header)
(Lens
RequestBeginBlock RequestBeginBlock (Maybe Header) (Maybe Header)
-> FieldAccessor RequestBeginBlock Header
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'header" 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'header")) ::
Data.ProtoLens.FieldDescriptor RequestBeginBlock
lastCommitInfo__field_descriptor :: FieldDescriptor RequestBeginBlock
lastCommitInfo__field_descriptor
= String
-> FieldTypeDescriptor LastCommitInfo
-> FieldAccessor RequestBeginBlock LastCommitInfo
-> FieldDescriptor RequestBeginBlock
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"last_commit_info"
(MessageOrGroup -> FieldTypeDescriptor LastCommitInfo
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor LastCommitInfo)
(Lens
RequestBeginBlock
RequestBeginBlock
(Maybe LastCommitInfo)
(Maybe LastCommitInfo)
-> FieldAccessor RequestBeginBlock LastCommitInfo
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'lastCommitInfo" 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'lastCommitInfo")) ::
Data.ProtoLens.FieldDescriptor RequestBeginBlock
byzantineValidators__field_descriptor :: FieldDescriptor RequestBeginBlock
byzantineValidators__field_descriptor
= String
-> FieldTypeDescriptor Evidence
-> FieldAccessor RequestBeginBlock Evidence
-> FieldDescriptor RequestBeginBlock
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"byzantine_validators"
(MessageOrGroup -> FieldTypeDescriptor Evidence
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Evidence)
(Packing
-> Lens' RequestBeginBlock [Evidence]
-> FieldAccessor RequestBeginBlock Evidence
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked
(forall s a (f :: * -> *).
(HasField s "byzantineValidators" 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 @"byzantineValidators")) ::
Data.ProtoLens.FieldDescriptor RequestBeginBlock
in
[(Tag, FieldDescriptor RequestBeginBlock)]
-> Map Tag (FieldDescriptor RequestBeginBlock)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RequestBeginBlock
hash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor RequestBeginBlock
header__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor RequestBeginBlock
lastCommitInfo__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor RequestBeginBlock
byzantineValidators__field_descriptor)]
unknownFields :: LensLike' f RequestBeginBlock FieldSet
unknownFields
= (RequestBeginBlock -> FieldSet)
-> (RequestBeginBlock -> FieldSet -> RequestBeginBlock)
-> Lens' RequestBeginBlock FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestBeginBlock -> FieldSet
_RequestBeginBlock'_unknownFields
(\ x__ :: RequestBeginBlock
x__ y__ :: FieldSet
y__ -> RequestBeginBlock
x__ {_RequestBeginBlock'_unknownFields :: FieldSet
_RequestBeginBlock'_unknownFields = FieldSet
y__})
defMessage :: RequestBeginBlock
defMessage
= $WRequestBeginBlock'_constructor :: ByteString
-> Maybe Header
-> Maybe LastCommitInfo
-> Vector Evidence
-> FieldSet
-> RequestBeginBlock
RequestBeginBlock'_constructor
{_RequestBeginBlock'hash :: ByteString
_RequestBeginBlock'hash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestBeginBlock'header :: Maybe Header
_RequestBeginBlock'header = Maybe Header
forall a. Maybe a
Prelude.Nothing,
_RequestBeginBlock'lastCommitInfo :: Maybe LastCommitInfo
_RequestBeginBlock'lastCommitInfo = Maybe LastCommitInfo
forall a. Maybe a
Prelude.Nothing,
_RequestBeginBlock'byzantineValidators :: Vector Evidence
_RequestBeginBlock'byzantineValidators = Vector Evidence
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_RequestBeginBlock'_unknownFields :: FieldSet
_RequestBeginBlock'_unknownFields = []}
parseMessage :: Parser RequestBeginBlock
parseMessage
= let
loop ::
RequestBeginBlock
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Evidence
-> Data.ProtoLens.Encoding.Bytes.Parser RequestBeginBlock
loop :: RequestBeginBlock
-> Growing Vector RealWorld Evidence -> Parser RequestBeginBlock
loop x :: RequestBeginBlock
x mutable'byzantineValidators :: Growing Vector RealWorld Evidence
mutable'byzantineValidators
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector Evidence
frozen'byzantineValidators <- IO (Vector Evidence) -> Parser (Vector Evidence)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Evidence -> IO (Vector Evidence)
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 Evidence
Growing Vector (PrimState IO) Evidence
mutable'byzantineValidators)
(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]))))
RequestBeginBlock -> Parser RequestBeginBlock
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter RequestBeginBlock RequestBeginBlock FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestBeginBlock -> RequestBeginBlock
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 RequestBeginBlock RequestBeginBlock FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
RequestBeginBlock
RequestBeginBlock
(Vector Evidence)
(Vector Evidence)
-> Vector Evidence -> RequestBeginBlock -> RequestBeginBlock
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'byzantineValidators" 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'byzantineValidators")
Vector Evidence
frozen'byzantineValidators
RequestBeginBlock
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"hash"
RequestBeginBlock
-> Growing Vector RealWorld Evidence -> Parser RequestBeginBlock
loop
(Setter RequestBeginBlock RequestBeginBlock ByteString ByteString
-> ByteString -> RequestBeginBlock -> RequestBeginBlock
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "hash" 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 @"hash") ByteString
y RequestBeginBlock
x)
Growing Vector RealWorld Evidence
mutable'byzantineValidators
18
-> do Header
y <- Parser Header -> String -> Parser Header
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Header -> Parser Header
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 Header
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"header"
RequestBeginBlock
-> Growing Vector RealWorld Evidence -> Parser RequestBeginBlock
loop
(Setter RequestBeginBlock RequestBeginBlock Header Header
-> Header -> RequestBeginBlock -> RequestBeginBlock
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "header" 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 @"header") Header
y RequestBeginBlock
x)
Growing Vector RealWorld Evidence
mutable'byzantineValidators
26
-> do LastCommitInfo
y <- Parser LastCommitInfo -> String -> Parser LastCommitInfo
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser LastCommitInfo -> Parser LastCommitInfo
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 LastCommitInfo
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"last_commit_info"
RequestBeginBlock
-> Growing Vector RealWorld Evidence -> Parser RequestBeginBlock
loop
(Setter
RequestBeginBlock RequestBeginBlock LastCommitInfo LastCommitInfo
-> LastCommitInfo -> RequestBeginBlock -> RequestBeginBlock
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "lastCommitInfo" 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 @"lastCommitInfo") LastCommitInfo
y RequestBeginBlock
x)
Growing Vector RealWorld Evidence
mutable'byzantineValidators
34
-> do !Evidence
y <- Parser Evidence -> String -> Parser Evidence
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Evidence -> Parser Evidence
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 Evidence
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"byzantine_validators"
Growing Vector RealWorld Evidence
v <- IO (Growing Vector RealWorld Evidence)
-> Parser (Growing Vector RealWorld Evidence)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Evidence
-> Evidence -> IO (Growing Vector (PrimState IO) Evidence)
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 Evidence
Growing Vector (PrimState IO) Evidence
mutable'byzantineValidators Evidence
y)
RequestBeginBlock
-> Growing Vector RealWorld Evidence -> Parser RequestBeginBlock
loop RequestBeginBlock
x Growing Vector RealWorld Evidence
v
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
RequestBeginBlock
-> Growing Vector RealWorld Evidence -> Parser RequestBeginBlock
loop
(Setter RequestBeginBlock RequestBeginBlock FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestBeginBlock -> RequestBeginBlock
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 RequestBeginBlock RequestBeginBlock FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RequestBeginBlock
x)
Growing Vector RealWorld Evidence
mutable'byzantineValidators
in
Parser RequestBeginBlock -> String -> Parser RequestBeginBlock
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld Evidence
mutable'byzantineValidators <- IO (Growing Vector RealWorld Evidence)
-> Parser (Growing Vector RealWorld Evidence)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld Evidence)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
RequestBeginBlock
-> Growing Vector RealWorld Evidence -> Parser RequestBeginBlock
loop RequestBeginBlock
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld Evidence
mutable'byzantineValidators)
"RequestBeginBlock"
buildMessage :: RequestBeginBlock -> Builder
buildMessage
= \ _x :: RequestBeginBlock
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: ByteString
_v = FoldLike
ByteString
RequestBeginBlock
RequestBeginBlock
ByteString
ByteString
-> RequestBeginBlock -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "hash" 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 @"hash") RequestBeginBlock
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe Header)
RequestBeginBlock
RequestBeginBlock
(Maybe Header)
(Maybe Header)
-> RequestBeginBlock -> Maybe Header
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'header" 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'header") RequestBeginBlock
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: Header
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (Header -> ByteString) -> Header -> 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))
Header -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Header
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe LastCommitInfo)
RequestBeginBlock
RequestBeginBlock
(Maybe LastCommitInfo)
(Maybe LastCommitInfo)
-> RequestBeginBlock -> Maybe LastCommitInfo
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'lastCommitInfo" 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'lastCommitInfo") RequestBeginBlock
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: LastCommitInfo
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
((ByteString -> Builder)
-> (LastCommitInfo -> ByteString) -> LastCommitInfo -> 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))
LastCommitInfo -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
LastCommitInfo
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((Evidence -> Builder) -> Vector Evidence -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: Evidence
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 34)
((ByteString -> Builder)
-> (Evidence -> ByteString) -> Evidence -> 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))
Evidence -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Evidence
_v))
(FoldLike
(Vector Evidence)
RequestBeginBlock
RequestBeginBlock
(Vector Evidence)
(Vector Evidence)
-> RequestBeginBlock -> Vector Evidence
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "vec'byzantineValidators" 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'byzantineValidators") RequestBeginBlock
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet RequestBeginBlock RequestBeginBlock FieldSet FieldSet
-> RequestBeginBlock -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet RequestBeginBlock RequestBeginBlock FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RequestBeginBlock
_x)))))
instance Control.DeepSeq.NFData RequestBeginBlock where
rnf :: RequestBeginBlock -> ()
rnf
= \ x__ :: RequestBeginBlock
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestBeginBlock -> FieldSet
_RequestBeginBlock'_unknownFields RequestBeginBlock
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestBeginBlock -> ByteString
_RequestBeginBlock'hash RequestBeginBlock
x__)
(Maybe Header -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestBeginBlock -> Maybe Header
_RequestBeginBlock'header RequestBeginBlock
x__)
(Maybe LastCommitInfo -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestBeginBlock -> Maybe LastCommitInfo
_RequestBeginBlock'lastCommitInfo RequestBeginBlock
x__)
(Vector Evidence -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestBeginBlock -> Vector Evidence
_RequestBeginBlock'byzantineValidators RequestBeginBlock
x__) ()))))
data RequestCheckTx
= RequestCheckTx'_constructor {RequestCheckTx -> ByteString
_RequestCheckTx'tx :: !Data.ByteString.ByteString,
RequestCheckTx -> FieldSet
_RequestCheckTx'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (RequestCheckTx -> RequestCheckTx -> Bool
(RequestCheckTx -> RequestCheckTx -> Bool)
-> (RequestCheckTx -> RequestCheckTx -> Bool) -> Eq RequestCheckTx
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestCheckTx -> RequestCheckTx -> Bool
$c/= :: RequestCheckTx -> RequestCheckTx -> Bool
== :: RequestCheckTx -> RequestCheckTx -> Bool
$c== :: RequestCheckTx -> RequestCheckTx -> Bool
Prelude.Eq, Eq RequestCheckTx
Eq RequestCheckTx =>
(RequestCheckTx -> RequestCheckTx -> Ordering)
-> (RequestCheckTx -> RequestCheckTx -> Bool)
-> (RequestCheckTx -> RequestCheckTx -> Bool)
-> (RequestCheckTx -> RequestCheckTx -> Bool)
-> (RequestCheckTx -> RequestCheckTx -> Bool)
-> (RequestCheckTx -> RequestCheckTx -> RequestCheckTx)
-> (RequestCheckTx -> RequestCheckTx -> RequestCheckTx)
-> Ord RequestCheckTx
RequestCheckTx -> RequestCheckTx -> Bool
RequestCheckTx -> RequestCheckTx -> Ordering
RequestCheckTx -> RequestCheckTx -> RequestCheckTx
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 :: RequestCheckTx -> RequestCheckTx -> RequestCheckTx
$cmin :: RequestCheckTx -> RequestCheckTx -> RequestCheckTx
max :: RequestCheckTx -> RequestCheckTx -> RequestCheckTx
$cmax :: RequestCheckTx -> RequestCheckTx -> RequestCheckTx
>= :: RequestCheckTx -> RequestCheckTx -> Bool
$c>= :: RequestCheckTx -> RequestCheckTx -> Bool
> :: RequestCheckTx -> RequestCheckTx -> Bool
$c> :: RequestCheckTx -> RequestCheckTx -> Bool
<= :: RequestCheckTx -> RequestCheckTx -> Bool
$c<= :: RequestCheckTx -> RequestCheckTx -> Bool
< :: RequestCheckTx -> RequestCheckTx -> Bool
$c< :: RequestCheckTx -> RequestCheckTx -> Bool
compare :: RequestCheckTx -> RequestCheckTx -> Ordering
$ccompare :: RequestCheckTx -> RequestCheckTx -> Ordering
$cp1Ord :: Eq RequestCheckTx
Prelude.Ord)
instance Prelude.Show RequestCheckTx where
showsPrec :: Int -> RequestCheckTx -> ShowS
showsPrec _ __x :: RequestCheckTx
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(RequestCheckTx -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RequestCheckTx
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RequestCheckTx "tx" Data.ByteString.ByteString where
fieldOf :: Proxy# "tx"
-> (ByteString -> f ByteString)
-> RequestCheckTx
-> f RequestCheckTx
fieldOf _
= ((ByteString -> f ByteString)
-> RequestCheckTx -> f RequestCheckTx)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> RequestCheckTx
-> f RequestCheckTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestCheckTx -> ByteString)
-> (RequestCheckTx -> ByteString -> RequestCheckTx)
-> Lens RequestCheckTx RequestCheckTx ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestCheckTx -> ByteString
_RequestCheckTx'tx (\ x__ :: RequestCheckTx
x__ y__ :: ByteString
y__ -> RequestCheckTx
x__ {_RequestCheckTx'tx :: ByteString
_RequestCheckTx'tx = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RequestCheckTx where
messageName :: Proxy RequestCheckTx -> Text
messageName _ = String -> Text
Data.Text.pack "types.RequestCheckTx"
fieldsByTag :: Map Tag (FieldDescriptor RequestCheckTx)
fieldsByTag
= let
tx__field_descriptor :: FieldDescriptor RequestCheckTx
tx__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor RequestCheckTx ByteString
-> FieldDescriptor RequestCheckTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"tx"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens RequestCheckTx RequestCheckTx ByteString ByteString
-> FieldAccessor RequestCheckTx ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "tx" 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 @"tx")) ::
Data.ProtoLens.FieldDescriptor RequestCheckTx
in [(Tag, FieldDescriptor RequestCheckTx)]
-> Map Tag (FieldDescriptor RequestCheckTx)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RequestCheckTx
tx__field_descriptor)]
unknownFields :: LensLike' f RequestCheckTx FieldSet
unknownFields
= (RequestCheckTx -> FieldSet)
-> (RequestCheckTx -> FieldSet -> RequestCheckTx)
-> Lens' RequestCheckTx FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestCheckTx -> FieldSet
_RequestCheckTx'_unknownFields
(\ x__ :: RequestCheckTx
x__ y__ :: FieldSet
y__ -> RequestCheckTx
x__ {_RequestCheckTx'_unknownFields :: FieldSet
_RequestCheckTx'_unknownFields = FieldSet
y__})
defMessage :: RequestCheckTx
defMessage
= $WRequestCheckTx'_constructor :: ByteString -> FieldSet -> RequestCheckTx
RequestCheckTx'_constructor
{_RequestCheckTx'tx :: ByteString
_RequestCheckTx'tx = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestCheckTx'_unknownFields :: FieldSet
_RequestCheckTx'_unknownFields = []}
parseMessage :: Parser RequestCheckTx
parseMessage
= let
loop ::
RequestCheckTx
-> Data.ProtoLens.Encoding.Bytes.Parser RequestCheckTx
loop :: RequestCheckTx -> Parser RequestCheckTx
loop x :: RequestCheckTx
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]))))
RequestCheckTx -> Parser RequestCheckTx
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter RequestCheckTx RequestCheckTx FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestCheckTx -> RequestCheckTx
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 RequestCheckTx RequestCheckTx FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) RequestCheckTx
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"tx"
RequestCheckTx -> Parser RequestCheckTx
loop (Setter RequestCheckTx RequestCheckTx ByteString ByteString
-> ByteString -> RequestCheckTx -> RequestCheckTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "tx" 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 @"tx") ByteString
y RequestCheckTx
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
RequestCheckTx -> Parser RequestCheckTx
loop
(Setter RequestCheckTx RequestCheckTx FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestCheckTx -> RequestCheckTx
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 RequestCheckTx RequestCheckTx FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RequestCheckTx
x)
in
Parser RequestCheckTx -> String -> Parser RequestCheckTx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do RequestCheckTx -> Parser RequestCheckTx
loop RequestCheckTx
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RequestCheckTx"
buildMessage :: RequestCheckTx -> Builder
buildMessage
= \ _x :: RequestCheckTx
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: ByteString
_v = FoldLike
ByteString RequestCheckTx RequestCheckTx ByteString ByteString
-> RequestCheckTx -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "tx" 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 @"tx") RequestCheckTx
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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)
((\ 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))
ByteString
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet RequestCheckTx RequestCheckTx FieldSet FieldSet
-> RequestCheckTx -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet RequestCheckTx RequestCheckTx FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RequestCheckTx
_x))
instance Control.DeepSeq.NFData RequestCheckTx where
rnf :: RequestCheckTx -> ()
rnf
= \ x__ :: RequestCheckTx
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestCheckTx -> FieldSet
_RequestCheckTx'_unknownFields RequestCheckTx
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RequestCheckTx -> ByteString
_RequestCheckTx'tx RequestCheckTx
x__) ())
data RequestCommit
= RequestCommit'_constructor {RequestCommit -> FieldSet
_RequestCommit'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (RequestCommit -> RequestCommit -> Bool
(RequestCommit -> RequestCommit -> Bool)
-> (RequestCommit -> RequestCommit -> Bool) -> Eq RequestCommit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestCommit -> RequestCommit -> Bool
$c/= :: RequestCommit -> RequestCommit -> Bool
== :: RequestCommit -> RequestCommit -> Bool
$c== :: RequestCommit -> RequestCommit -> Bool
Prelude.Eq, Eq RequestCommit
Eq RequestCommit =>
(RequestCommit -> RequestCommit -> Ordering)
-> (RequestCommit -> RequestCommit -> Bool)
-> (RequestCommit -> RequestCommit -> Bool)
-> (RequestCommit -> RequestCommit -> Bool)
-> (RequestCommit -> RequestCommit -> Bool)
-> (RequestCommit -> RequestCommit -> RequestCommit)
-> (RequestCommit -> RequestCommit -> RequestCommit)
-> Ord RequestCommit
RequestCommit -> RequestCommit -> Bool
RequestCommit -> RequestCommit -> Ordering
RequestCommit -> RequestCommit -> RequestCommit
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 :: RequestCommit -> RequestCommit -> RequestCommit
$cmin :: RequestCommit -> RequestCommit -> RequestCommit
max :: RequestCommit -> RequestCommit -> RequestCommit
$cmax :: RequestCommit -> RequestCommit -> RequestCommit
>= :: RequestCommit -> RequestCommit -> Bool
$c>= :: RequestCommit -> RequestCommit -> Bool
> :: RequestCommit -> RequestCommit -> Bool
$c> :: RequestCommit -> RequestCommit -> Bool
<= :: RequestCommit -> RequestCommit -> Bool
$c<= :: RequestCommit -> RequestCommit -> Bool
< :: RequestCommit -> RequestCommit -> Bool
$c< :: RequestCommit -> RequestCommit -> Bool
compare :: RequestCommit -> RequestCommit -> Ordering
$ccompare :: RequestCommit -> RequestCommit -> Ordering
$cp1Ord :: Eq RequestCommit
Prelude.Ord)
instance Prelude.Show RequestCommit where
showsPrec :: Int -> RequestCommit -> ShowS
showsPrec _ __x :: RequestCommit
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(RequestCommit -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RequestCommit
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Message RequestCommit where
messageName :: Proxy RequestCommit -> Text
messageName _ = String -> Text
Data.Text.pack "types.RequestCommit"
fieldsByTag :: Map Tag (FieldDescriptor RequestCommit)
fieldsByTag = let in [(Tag, FieldDescriptor RequestCommit)]
-> Map Tag (FieldDescriptor RequestCommit)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList []
unknownFields :: LensLike' f RequestCommit FieldSet
unknownFields
= (RequestCommit -> FieldSet)
-> (RequestCommit -> FieldSet -> RequestCommit)
-> Lens' RequestCommit FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestCommit -> FieldSet
_RequestCommit'_unknownFields
(\ x__ :: RequestCommit
x__ y__ :: FieldSet
y__ -> RequestCommit
x__ {_RequestCommit'_unknownFields :: FieldSet
_RequestCommit'_unknownFields = FieldSet
y__})
defMessage :: RequestCommit
defMessage
= $WRequestCommit'_constructor :: FieldSet -> RequestCommit
RequestCommit'_constructor {_RequestCommit'_unknownFields :: FieldSet
_RequestCommit'_unknownFields = []}
parseMessage :: Parser RequestCommit
parseMessage
= let
loop ::
RequestCommit -> Data.ProtoLens.Encoding.Bytes.Parser RequestCommit
loop :: RequestCommit -> Parser RequestCommit
loop x :: RequestCommit
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]))))
RequestCommit -> Parser RequestCommit
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter RequestCommit RequestCommit FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestCommit -> RequestCommit
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 RequestCommit RequestCommit FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) RequestCommit
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of {
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
RequestCommit -> Parser RequestCommit
loop
(Setter RequestCommit RequestCommit FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestCommit -> RequestCommit
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 RequestCommit RequestCommit FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RequestCommit
x) }
in
Parser RequestCommit -> String -> Parser RequestCommit
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do RequestCommit -> Parser RequestCommit
loop RequestCommit
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RequestCommit"
buildMessage :: RequestCommit -> Builder
buildMessage
= \ _x :: RequestCommit
_x
-> FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet RequestCommit RequestCommit FieldSet FieldSet
-> RequestCommit -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet RequestCommit RequestCommit FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RequestCommit
_x)
instance Control.DeepSeq.NFData RequestCommit where
rnf :: RequestCommit -> ()
rnf
= \ x__ :: RequestCommit
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RequestCommit -> FieldSet
_RequestCommit'_unknownFields RequestCommit
x__) ()
data RequestDeliverTx
= RequestDeliverTx'_constructor {RequestDeliverTx -> ByteString
_RequestDeliverTx'tx :: !Data.ByteString.ByteString,
RequestDeliverTx -> FieldSet
_RequestDeliverTx'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (RequestDeliverTx -> RequestDeliverTx -> Bool
(RequestDeliverTx -> RequestDeliverTx -> Bool)
-> (RequestDeliverTx -> RequestDeliverTx -> Bool)
-> Eq RequestDeliverTx
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestDeliverTx -> RequestDeliverTx -> Bool
$c/= :: RequestDeliverTx -> RequestDeliverTx -> Bool
== :: RequestDeliverTx -> RequestDeliverTx -> Bool
$c== :: RequestDeliverTx -> RequestDeliverTx -> Bool
Prelude.Eq, Eq RequestDeliverTx
Eq RequestDeliverTx =>
(RequestDeliverTx -> RequestDeliverTx -> Ordering)
-> (RequestDeliverTx -> RequestDeliverTx -> Bool)
-> (RequestDeliverTx -> RequestDeliverTx -> Bool)
-> (RequestDeliverTx -> RequestDeliverTx -> Bool)
-> (RequestDeliverTx -> RequestDeliverTx -> Bool)
-> (RequestDeliverTx -> RequestDeliverTx -> RequestDeliverTx)
-> (RequestDeliverTx -> RequestDeliverTx -> RequestDeliverTx)
-> Ord RequestDeliverTx
RequestDeliverTx -> RequestDeliverTx -> Bool
RequestDeliverTx -> RequestDeliverTx -> Ordering
RequestDeliverTx -> RequestDeliverTx -> RequestDeliverTx
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 :: RequestDeliverTx -> RequestDeliverTx -> RequestDeliverTx
$cmin :: RequestDeliverTx -> RequestDeliverTx -> RequestDeliverTx
max :: RequestDeliverTx -> RequestDeliverTx -> RequestDeliverTx
$cmax :: RequestDeliverTx -> RequestDeliverTx -> RequestDeliverTx
>= :: RequestDeliverTx -> RequestDeliverTx -> Bool
$c>= :: RequestDeliverTx -> RequestDeliverTx -> Bool
> :: RequestDeliverTx -> RequestDeliverTx -> Bool
$c> :: RequestDeliverTx -> RequestDeliverTx -> Bool
<= :: RequestDeliverTx -> RequestDeliverTx -> Bool
$c<= :: RequestDeliverTx -> RequestDeliverTx -> Bool
< :: RequestDeliverTx -> RequestDeliverTx -> Bool
$c< :: RequestDeliverTx -> RequestDeliverTx -> Bool
compare :: RequestDeliverTx -> RequestDeliverTx -> Ordering
$ccompare :: RequestDeliverTx -> RequestDeliverTx -> Ordering
$cp1Ord :: Eq RequestDeliverTx
Prelude.Ord)
instance Prelude.Show RequestDeliverTx where
showsPrec :: Int -> RequestDeliverTx -> ShowS
showsPrec _ __x :: RequestDeliverTx
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(RequestDeliverTx -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RequestDeliverTx
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RequestDeliverTx "tx" Data.ByteString.ByteString where
fieldOf :: Proxy# "tx"
-> (ByteString -> f ByteString)
-> RequestDeliverTx
-> f RequestDeliverTx
fieldOf _
= ((ByteString -> f ByteString)
-> RequestDeliverTx -> f RequestDeliverTx)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> RequestDeliverTx
-> f RequestDeliverTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestDeliverTx -> ByteString)
-> (RequestDeliverTx -> ByteString -> RequestDeliverTx)
-> Lens RequestDeliverTx RequestDeliverTx ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestDeliverTx -> ByteString
_RequestDeliverTx'tx
(\ x__ :: RequestDeliverTx
x__ y__ :: ByteString
y__ -> RequestDeliverTx
x__ {_RequestDeliverTx'tx :: ByteString
_RequestDeliverTx'tx = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RequestDeliverTx where
messageName :: Proxy RequestDeliverTx -> Text
messageName _ = String -> Text
Data.Text.pack "types.RequestDeliverTx"
fieldsByTag :: Map Tag (FieldDescriptor RequestDeliverTx)
fieldsByTag
= let
tx__field_descriptor :: FieldDescriptor RequestDeliverTx
tx__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor RequestDeliverTx ByteString
-> FieldDescriptor RequestDeliverTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"tx"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens RequestDeliverTx RequestDeliverTx ByteString ByteString
-> FieldAccessor RequestDeliverTx ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "tx" 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 @"tx")) ::
Data.ProtoLens.FieldDescriptor RequestDeliverTx
in [(Tag, FieldDescriptor RequestDeliverTx)]
-> Map Tag (FieldDescriptor RequestDeliverTx)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RequestDeliverTx
tx__field_descriptor)]
unknownFields :: LensLike' f RequestDeliverTx FieldSet
unknownFields
= (RequestDeliverTx -> FieldSet)
-> (RequestDeliverTx -> FieldSet -> RequestDeliverTx)
-> Lens' RequestDeliverTx FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestDeliverTx -> FieldSet
_RequestDeliverTx'_unknownFields
(\ x__ :: RequestDeliverTx
x__ y__ :: FieldSet
y__ -> RequestDeliverTx
x__ {_RequestDeliverTx'_unknownFields :: FieldSet
_RequestDeliverTx'_unknownFields = FieldSet
y__})
defMessage :: RequestDeliverTx
defMessage
= $WRequestDeliverTx'_constructor :: ByteString -> FieldSet -> RequestDeliverTx
RequestDeliverTx'_constructor
{_RequestDeliverTx'tx :: ByteString
_RequestDeliverTx'tx = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestDeliverTx'_unknownFields :: FieldSet
_RequestDeliverTx'_unknownFields = []}
parseMessage :: Parser RequestDeliverTx
parseMessage
= let
loop ::
RequestDeliverTx
-> Data.ProtoLens.Encoding.Bytes.Parser RequestDeliverTx
loop :: RequestDeliverTx -> Parser RequestDeliverTx
loop x :: RequestDeliverTx
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]))))
RequestDeliverTx -> Parser RequestDeliverTx
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter RequestDeliverTx RequestDeliverTx FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestDeliverTx -> RequestDeliverTx
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 RequestDeliverTx RequestDeliverTx FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) RequestDeliverTx
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"tx"
RequestDeliverTx -> Parser RequestDeliverTx
loop (Setter RequestDeliverTx RequestDeliverTx ByteString ByteString
-> ByteString -> RequestDeliverTx -> RequestDeliverTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "tx" 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 @"tx") ByteString
y RequestDeliverTx
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
RequestDeliverTx -> Parser RequestDeliverTx
loop
(Setter RequestDeliverTx RequestDeliverTx FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestDeliverTx -> RequestDeliverTx
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 RequestDeliverTx RequestDeliverTx FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RequestDeliverTx
x)
in
Parser RequestDeliverTx -> String -> Parser RequestDeliverTx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do RequestDeliverTx -> Parser RequestDeliverTx
loop RequestDeliverTx
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RequestDeliverTx"
buildMessage :: RequestDeliverTx -> Builder
buildMessage
= \ _x :: RequestDeliverTx
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: ByteString
_v = FoldLike
ByteString RequestDeliverTx RequestDeliverTx ByteString ByteString
-> RequestDeliverTx -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "tx" 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 @"tx") RequestDeliverTx
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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)
((\ 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))
ByteString
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet RequestDeliverTx RequestDeliverTx FieldSet FieldSet
-> RequestDeliverTx -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet RequestDeliverTx RequestDeliverTx FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RequestDeliverTx
_x))
instance Control.DeepSeq.NFData RequestDeliverTx where
rnf :: RequestDeliverTx -> ()
rnf
= \ x__ :: RequestDeliverTx
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestDeliverTx -> FieldSet
_RequestDeliverTx'_unknownFields RequestDeliverTx
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RequestDeliverTx -> ByteString
_RequestDeliverTx'tx RequestDeliverTx
x__) ())
data RequestEcho
= RequestEcho'_constructor {RequestEcho -> Text
_RequestEcho'message :: !Data.Text.Text,
RequestEcho -> FieldSet
_RequestEcho'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (RequestEcho -> RequestEcho -> Bool
(RequestEcho -> RequestEcho -> Bool)
-> (RequestEcho -> RequestEcho -> Bool) -> Eq RequestEcho
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestEcho -> RequestEcho -> Bool
$c/= :: RequestEcho -> RequestEcho -> Bool
== :: RequestEcho -> RequestEcho -> Bool
$c== :: RequestEcho -> RequestEcho -> Bool
Prelude.Eq, Eq RequestEcho
Eq RequestEcho =>
(RequestEcho -> RequestEcho -> Ordering)
-> (RequestEcho -> RequestEcho -> Bool)
-> (RequestEcho -> RequestEcho -> Bool)
-> (RequestEcho -> RequestEcho -> Bool)
-> (RequestEcho -> RequestEcho -> Bool)
-> (RequestEcho -> RequestEcho -> RequestEcho)
-> (RequestEcho -> RequestEcho -> RequestEcho)
-> Ord RequestEcho
RequestEcho -> RequestEcho -> Bool
RequestEcho -> RequestEcho -> Ordering
RequestEcho -> RequestEcho -> RequestEcho
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 :: RequestEcho -> RequestEcho -> RequestEcho
$cmin :: RequestEcho -> RequestEcho -> RequestEcho
max :: RequestEcho -> RequestEcho -> RequestEcho
$cmax :: RequestEcho -> RequestEcho -> RequestEcho
>= :: RequestEcho -> RequestEcho -> Bool
$c>= :: RequestEcho -> RequestEcho -> Bool
> :: RequestEcho -> RequestEcho -> Bool
$c> :: RequestEcho -> RequestEcho -> Bool
<= :: RequestEcho -> RequestEcho -> Bool
$c<= :: RequestEcho -> RequestEcho -> Bool
< :: RequestEcho -> RequestEcho -> Bool
$c< :: RequestEcho -> RequestEcho -> Bool
compare :: RequestEcho -> RequestEcho -> Ordering
$ccompare :: RequestEcho -> RequestEcho -> Ordering
$cp1Ord :: Eq RequestEcho
Prelude.Ord)
instance Prelude.Show RequestEcho where
showsPrec :: Int -> RequestEcho -> ShowS
showsPrec _ __x :: RequestEcho
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(RequestEcho -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RequestEcho
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RequestEcho "message" Data.Text.Text where
fieldOf :: Proxy# "message"
-> (Text -> f Text) -> RequestEcho -> f RequestEcho
fieldOf _
= ((Text -> f Text) -> RequestEcho -> f RequestEcho)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> RequestEcho
-> f RequestEcho
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestEcho -> Text)
-> (RequestEcho -> Text -> RequestEcho)
-> Lens RequestEcho RequestEcho Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestEcho -> Text
_RequestEcho'message
(\ x__ :: RequestEcho
x__ y__ :: Text
y__ -> RequestEcho
x__ {_RequestEcho'message :: Text
_RequestEcho'message = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RequestEcho where
messageName :: Proxy RequestEcho -> Text
messageName _ = String -> Text
Data.Text.pack "types.RequestEcho"
fieldsByTag :: Map Tag (FieldDescriptor RequestEcho)
fieldsByTag
= let
message__field_descriptor :: FieldDescriptor RequestEcho
message__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor RequestEcho Text
-> FieldDescriptor RequestEcho
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"message"
(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 RequestEcho RequestEcho Text Text
-> FieldAccessor RequestEcho 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 "message" 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 @"message")) ::
Data.ProtoLens.FieldDescriptor RequestEcho
in
[(Tag, FieldDescriptor RequestEcho)]
-> Map Tag (FieldDescriptor RequestEcho)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RequestEcho
message__field_descriptor)]
unknownFields :: LensLike' f RequestEcho FieldSet
unknownFields
= (RequestEcho -> FieldSet)
-> (RequestEcho -> FieldSet -> RequestEcho)
-> Lens' RequestEcho FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestEcho -> FieldSet
_RequestEcho'_unknownFields
(\ x__ :: RequestEcho
x__ y__ :: FieldSet
y__ -> RequestEcho
x__ {_RequestEcho'_unknownFields :: FieldSet
_RequestEcho'_unknownFields = FieldSet
y__})
defMessage :: RequestEcho
defMessage
= $WRequestEcho'_constructor :: Text -> FieldSet -> RequestEcho
RequestEcho'_constructor
{_RequestEcho'message :: Text
_RequestEcho'message = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestEcho'_unknownFields :: FieldSet
_RequestEcho'_unknownFields = []}
parseMessage :: Parser RequestEcho
parseMessage
= let
loop ::
RequestEcho -> Data.ProtoLens.Encoding.Bytes.Parser RequestEcho
loop :: RequestEcho -> Parser RequestEcho
loop x :: RequestEcho
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]))))
RequestEcho -> Parser RequestEcho
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter RequestEcho RequestEcho FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestEcho -> RequestEcho
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 RequestEcho RequestEcho FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) RequestEcho
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))
"message"
RequestEcho -> Parser RequestEcho
loop (Setter RequestEcho RequestEcho Text Text
-> Text -> RequestEcho -> RequestEcho
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "message" 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 @"message") Text
y RequestEcho
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
RequestEcho -> Parser RequestEcho
loop
(Setter RequestEcho RequestEcho FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestEcho -> RequestEcho
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 RequestEcho RequestEcho FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RequestEcho
x)
in
Parser RequestEcho -> String -> Parser RequestEcho
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do RequestEcho -> Parser RequestEcho
loop RequestEcho
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RequestEcho"
buildMessage :: RequestEcho -> Builder
buildMessage
= \ _x :: RequestEcho
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text RequestEcho RequestEcho Text Text
-> RequestEcho -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "message" 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 @"message") RequestEcho
_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 RequestEcho RequestEcho FieldSet FieldSet
-> RequestEcho -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet RequestEcho RequestEcho FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RequestEcho
_x))
instance Control.DeepSeq.NFData RequestEcho where
rnf :: RequestEcho -> ()
rnf
= \ x__ :: RequestEcho
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestEcho -> FieldSet
_RequestEcho'_unknownFields RequestEcho
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RequestEcho -> Text
_RequestEcho'message RequestEcho
x__) ())
data RequestEndBlock
= RequestEndBlock'_constructor {RequestEndBlock -> Int64
_RequestEndBlock'height :: !Data.Int.Int64,
RequestEndBlock -> FieldSet
_RequestEndBlock'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (RequestEndBlock -> RequestEndBlock -> Bool
(RequestEndBlock -> RequestEndBlock -> Bool)
-> (RequestEndBlock -> RequestEndBlock -> Bool)
-> Eq RequestEndBlock
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestEndBlock -> RequestEndBlock -> Bool
$c/= :: RequestEndBlock -> RequestEndBlock -> Bool
== :: RequestEndBlock -> RequestEndBlock -> Bool
$c== :: RequestEndBlock -> RequestEndBlock -> Bool
Prelude.Eq, Eq RequestEndBlock
Eq RequestEndBlock =>
(RequestEndBlock -> RequestEndBlock -> Ordering)
-> (RequestEndBlock -> RequestEndBlock -> Bool)
-> (RequestEndBlock -> RequestEndBlock -> Bool)
-> (RequestEndBlock -> RequestEndBlock -> Bool)
-> (RequestEndBlock -> RequestEndBlock -> Bool)
-> (RequestEndBlock -> RequestEndBlock -> RequestEndBlock)
-> (RequestEndBlock -> RequestEndBlock -> RequestEndBlock)
-> Ord RequestEndBlock
RequestEndBlock -> RequestEndBlock -> Bool
RequestEndBlock -> RequestEndBlock -> Ordering
RequestEndBlock -> RequestEndBlock -> RequestEndBlock
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 :: RequestEndBlock -> RequestEndBlock -> RequestEndBlock
$cmin :: RequestEndBlock -> RequestEndBlock -> RequestEndBlock
max :: RequestEndBlock -> RequestEndBlock -> RequestEndBlock
$cmax :: RequestEndBlock -> RequestEndBlock -> RequestEndBlock
>= :: RequestEndBlock -> RequestEndBlock -> Bool
$c>= :: RequestEndBlock -> RequestEndBlock -> Bool
> :: RequestEndBlock -> RequestEndBlock -> Bool
$c> :: RequestEndBlock -> RequestEndBlock -> Bool
<= :: RequestEndBlock -> RequestEndBlock -> Bool
$c<= :: RequestEndBlock -> RequestEndBlock -> Bool
< :: RequestEndBlock -> RequestEndBlock -> Bool
$c< :: RequestEndBlock -> RequestEndBlock -> Bool
compare :: RequestEndBlock -> RequestEndBlock -> Ordering
$ccompare :: RequestEndBlock -> RequestEndBlock -> Ordering
$cp1Ord :: Eq RequestEndBlock
Prelude.Ord)
instance Prelude.Show RequestEndBlock where
showsPrec :: Int -> RequestEndBlock -> ShowS
showsPrec _ __x :: RequestEndBlock
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(RequestEndBlock -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RequestEndBlock
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RequestEndBlock "height" Data.Int.Int64 where
fieldOf :: Proxy# "height"
-> (Int64 -> f Int64) -> RequestEndBlock -> f RequestEndBlock
fieldOf _
= ((Int64 -> f Int64) -> RequestEndBlock -> f RequestEndBlock)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> RequestEndBlock
-> f RequestEndBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestEndBlock -> Int64)
-> (RequestEndBlock -> Int64 -> RequestEndBlock)
-> Lens RequestEndBlock RequestEndBlock Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestEndBlock -> Int64
_RequestEndBlock'height
(\ x__ :: RequestEndBlock
x__ y__ :: Int64
y__ -> RequestEndBlock
x__ {_RequestEndBlock'height :: Int64
_RequestEndBlock'height = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RequestEndBlock where
messageName :: Proxy RequestEndBlock -> Text
messageName _ = String -> Text
Data.Text.pack "types.RequestEndBlock"
fieldsByTag :: Map Tag (FieldDescriptor RequestEndBlock)
fieldsByTag
= let
height__field_descriptor :: FieldDescriptor RequestEndBlock
height__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor RequestEndBlock Int64
-> FieldDescriptor RequestEndBlock
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"height"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens RequestEndBlock RequestEndBlock Int64 Int64
-> FieldAccessor RequestEndBlock Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "height" 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 @"height")) ::
Data.ProtoLens.FieldDescriptor RequestEndBlock
in
[(Tag, FieldDescriptor RequestEndBlock)]
-> Map Tag (FieldDescriptor RequestEndBlock)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RequestEndBlock
height__field_descriptor)]
unknownFields :: LensLike' f RequestEndBlock FieldSet
unknownFields
= (RequestEndBlock -> FieldSet)
-> (RequestEndBlock -> FieldSet -> RequestEndBlock)
-> Lens' RequestEndBlock FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestEndBlock -> FieldSet
_RequestEndBlock'_unknownFields
(\ x__ :: RequestEndBlock
x__ y__ :: FieldSet
y__ -> RequestEndBlock
x__ {_RequestEndBlock'_unknownFields :: FieldSet
_RequestEndBlock'_unknownFields = FieldSet
y__})
defMessage :: RequestEndBlock
defMessage
= $WRequestEndBlock'_constructor :: Int64 -> FieldSet -> RequestEndBlock
RequestEndBlock'_constructor
{_RequestEndBlock'height :: Int64
_RequestEndBlock'height = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestEndBlock'_unknownFields :: FieldSet
_RequestEndBlock'_unknownFields = []}
parseMessage :: Parser RequestEndBlock
parseMessage
= let
loop ::
RequestEndBlock
-> Data.ProtoLens.Encoding.Bytes.Parser RequestEndBlock
loop :: RequestEndBlock -> Parser RequestEndBlock
loop x :: RequestEndBlock
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]))))
RequestEndBlock -> Parser RequestEndBlock
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter RequestEndBlock RequestEndBlock FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestEndBlock -> RequestEndBlock
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 RequestEndBlock RequestEndBlock FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) RequestEndBlock
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"height"
RequestEndBlock -> Parser RequestEndBlock
loop (Setter RequestEndBlock RequestEndBlock Int64 Int64
-> Int64 -> RequestEndBlock -> RequestEndBlock
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "height" 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 @"height") Int64
y RequestEndBlock
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
RequestEndBlock -> Parser RequestEndBlock
loop
(Setter RequestEndBlock RequestEndBlock FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestEndBlock -> RequestEndBlock
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 RequestEndBlock RequestEndBlock FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RequestEndBlock
x)
in
Parser RequestEndBlock -> String -> Parser RequestEndBlock
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do RequestEndBlock -> Parser RequestEndBlock
loop RequestEndBlock
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RequestEndBlock"
buildMessage :: RequestEndBlock -> Builder
buildMessage
= \ _x :: RequestEndBlock
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 RequestEndBlock RequestEndBlock Int64 Int64
-> RequestEndBlock -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "height" 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 @"height") RequestEndBlock
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet RequestEndBlock RequestEndBlock FieldSet FieldSet
-> RequestEndBlock -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet RequestEndBlock RequestEndBlock FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RequestEndBlock
_x))
instance Control.DeepSeq.NFData RequestEndBlock where
rnf :: RequestEndBlock -> ()
rnf
= \ x__ :: RequestEndBlock
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestEndBlock -> FieldSet
_RequestEndBlock'_unknownFields RequestEndBlock
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RequestEndBlock -> Int64
_RequestEndBlock'height RequestEndBlock
x__) ())
data RequestFlush
= RequestFlush'_constructor {RequestFlush -> FieldSet
_RequestFlush'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (RequestFlush -> RequestFlush -> Bool
(RequestFlush -> RequestFlush -> Bool)
-> (RequestFlush -> RequestFlush -> Bool) -> Eq RequestFlush
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestFlush -> RequestFlush -> Bool
$c/= :: RequestFlush -> RequestFlush -> Bool
== :: RequestFlush -> RequestFlush -> Bool
$c== :: RequestFlush -> RequestFlush -> Bool
Prelude.Eq, Eq RequestFlush
Eq RequestFlush =>
(RequestFlush -> RequestFlush -> Ordering)
-> (RequestFlush -> RequestFlush -> Bool)
-> (RequestFlush -> RequestFlush -> Bool)
-> (RequestFlush -> RequestFlush -> Bool)
-> (RequestFlush -> RequestFlush -> Bool)
-> (RequestFlush -> RequestFlush -> RequestFlush)
-> (RequestFlush -> RequestFlush -> RequestFlush)
-> Ord RequestFlush
RequestFlush -> RequestFlush -> Bool
RequestFlush -> RequestFlush -> Ordering
RequestFlush -> RequestFlush -> RequestFlush
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 :: RequestFlush -> RequestFlush -> RequestFlush
$cmin :: RequestFlush -> RequestFlush -> RequestFlush
max :: RequestFlush -> RequestFlush -> RequestFlush
$cmax :: RequestFlush -> RequestFlush -> RequestFlush
>= :: RequestFlush -> RequestFlush -> Bool
$c>= :: RequestFlush -> RequestFlush -> Bool
> :: RequestFlush -> RequestFlush -> Bool
$c> :: RequestFlush -> RequestFlush -> Bool
<= :: RequestFlush -> RequestFlush -> Bool
$c<= :: RequestFlush -> RequestFlush -> Bool
< :: RequestFlush -> RequestFlush -> Bool
$c< :: RequestFlush -> RequestFlush -> Bool
compare :: RequestFlush -> RequestFlush -> Ordering
$ccompare :: RequestFlush -> RequestFlush -> Ordering
$cp1Ord :: Eq RequestFlush
Prelude.Ord)
instance Prelude.Show RequestFlush where
showsPrec :: Int -> RequestFlush -> ShowS
showsPrec _ __x :: RequestFlush
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(RequestFlush -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RequestFlush
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Message RequestFlush where
messageName :: Proxy RequestFlush -> Text
messageName _ = String -> Text
Data.Text.pack "types.RequestFlush"
fieldsByTag :: Map Tag (FieldDescriptor RequestFlush)
fieldsByTag = let in [(Tag, FieldDescriptor RequestFlush)]
-> Map Tag (FieldDescriptor RequestFlush)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList []
unknownFields :: LensLike' f RequestFlush FieldSet
unknownFields
= (RequestFlush -> FieldSet)
-> (RequestFlush -> FieldSet -> RequestFlush)
-> Lens' RequestFlush FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestFlush -> FieldSet
_RequestFlush'_unknownFields
(\ x__ :: RequestFlush
x__ y__ :: FieldSet
y__ -> RequestFlush
x__ {_RequestFlush'_unknownFields :: FieldSet
_RequestFlush'_unknownFields = FieldSet
y__})
defMessage :: RequestFlush
defMessage
= $WRequestFlush'_constructor :: FieldSet -> RequestFlush
RequestFlush'_constructor {_RequestFlush'_unknownFields :: FieldSet
_RequestFlush'_unknownFields = []}
parseMessage :: Parser RequestFlush
parseMessage
= let
loop ::
RequestFlush -> Data.ProtoLens.Encoding.Bytes.Parser RequestFlush
loop :: RequestFlush -> Parser RequestFlush
loop x :: RequestFlush
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]))))
RequestFlush -> Parser RequestFlush
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter RequestFlush RequestFlush FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestFlush -> RequestFlush
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 RequestFlush RequestFlush FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) RequestFlush
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of {
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
RequestFlush -> Parser RequestFlush
loop
(Setter RequestFlush RequestFlush FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestFlush -> RequestFlush
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 RequestFlush RequestFlush FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RequestFlush
x) }
in
Parser RequestFlush -> String -> Parser RequestFlush
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do RequestFlush -> Parser RequestFlush
loop RequestFlush
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RequestFlush"
buildMessage :: RequestFlush -> Builder
buildMessage
= \ _x :: RequestFlush
_x
-> FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet RequestFlush RequestFlush FieldSet FieldSet
-> RequestFlush -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet RequestFlush RequestFlush FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RequestFlush
_x)
instance Control.DeepSeq.NFData RequestFlush where
rnf :: RequestFlush -> ()
rnf
= \ x__ :: RequestFlush
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RequestFlush -> FieldSet
_RequestFlush'_unknownFields RequestFlush
x__) ()
data RequestInfo
= RequestInfo'_constructor {RequestInfo -> Text
_RequestInfo'version :: !Data.Text.Text,
RequestInfo -> Word64
_RequestInfo'blockVersion :: !Data.Word.Word64,
RequestInfo -> Word64
_RequestInfo'p2pVersion :: !Data.Word.Word64,
RequestInfo -> FieldSet
_RequestInfo'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (RequestInfo -> RequestInfo -> Bool
(RequestInfo -> RequestInfo -> Bool)
-> (RequestInfo -> RequestInfo -> Bool) -> Eq RequestInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestInfo -> RequestInfo -> Bool
$c/= :: RequestInfo -> RequestInfo -> Bool
== :: RequestInfo -> RequestInfo -> Bool
$c== :: RequestInfo -> RequestInfo -> Bool
Prelude.Eq, Eq RequestInfo
Eq RequestInfo =>
(RequestInfo -> RequestInfo -> Ordering)
-> (RequestInfo -> RequestInfo -> Bool)
-> (RequestInfo -> RequestInfo -> Bool)
-> (RequestInfo -> RequestInfo -> Bool)
-> (RequestInfo -> RequestInfo -> Bool)
-> (RequestInfo -> RequestInfo -> RequestInfo)
-> (RequestInfo -> RequestInfo -> RequestInfo)
-> Ord RequestInfo
RequestInfo -> RequestInfo -> Bool
RequestInfo -> RequestInfo -> Ordering
RequestInfo -> RequestInfo -> RequestInfo
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 :: RequestInfo -> RequestInfo -> RequestInfo
$cmin :: RequestInfo -> RequestInfo -> RequestInfo
max :: RequestInfo -> RequestInfo -> RequestInfo
$cmax :: RequestInfo -> RequestInfo -> RequestInfo
>= :: RequestInfo -> RequestInfo -> Bool
$c>= :: RequestInfo -> RequestInfo -> Bool
> :: RequestInfo -> RequestInfo -> Bool
$c> :: RequestInfo -> RequestInfo -> Bool
<= :: RequestInfo -> RequestInfo -> Bool
$c<= :: RequestInfo -> RequestInfo -> Bool
< :: RequestInfo -> RequestInfo -> Bool
$c< :: RequestInfo -> RequestInfo -> Bool
compare :: RequestInfo -> RequestInfo -> Ordering
$ccompare :: RequestInfo -> RequestInfo -> Ordering
$cp1Ord :: Eq RequestInfo
Prelude.Ord)
instance Prelude.Show RequestInfo where
showsPrec :: Int -> RequestInfo -> ShowS
showsPrec _ __x :: RequestInfo
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(RequestInfo -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RequestInfo
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RequestInfo "version" Data.Text.Text where
fieldOf :: Proxy# "version"
-> (Text -> f Text) -> RequestInfo -> f RequestInfo
fieldOf _
= ((Text -> f Text) -> RequestInfo -> f RequestInfo)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> RequestInfo
-> f RequestInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestInfo -> Text)
-> (RequestInfo -> Text -> RequestInfo)
-> Lens RequestInfo RequestInfo Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInfo -> Text
_RequestInfo'version
(\ x__ :: RequestInfo
x__ y__ :: Text
y__ -> RequestInfo
x__ {_RequestInfo'version :: Text
_RequestInfo'version = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestInfo "blockVersion" Data.Word.Word64 where
fieldOf :: Proxy# "blockVersion"
-> (Word64 -> f Word64) -> RequestInfo -> f RequestInfo
fieldOf _
= ((Word64 -> f Word64) -> RequestInfo -> f RequestInfo)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> RequestInfo
-> f RequestInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestInfo -> Word64)
-> (RequestInfo -> Word64 -> RequestInfo)
-> Lens RequestInfo RequestInfo Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInfo -> Word64
_RequestInfo'blockVersion
(\ x__ :: RequestInfo
x__ y__ :: Word64
y__ -> RequestInfo
x__ {_RequestInfo'blockVersion :: Word64
_RequestInfo'blockVersion = Word64
y__}))
(Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestInfo "p2pVersion" Data.Word.Word64 where
fieldOf :: Proxy# "p2pVersion"
-> (Word64 -> f Word64) -> RequestInfo -> f RequestInfo
fieldOf _
= ((Word64 -> f Word64) -> RequestInfo -> f RequestInfo)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> RequestInfo
-> f RequestInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestInfo -> Word64)
-> (RequestInfo -> Word64 -> RequestInfo)
-> Lens RequestInfo RequestInfo Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInfo -> Word64
_RequestInfo'p2pVersion
(\ x__ :: RequestInfo
x__ y__ :: Word64
y__ -> RequestInfo
x__ {_RequestInfo'p2pVersion :: Word64
_RequestInfo'p2pVersion = Word64
y__}))
(Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RequestInfo where
messageName :: Proxy RequestInfo -> Text
messageName _ = String -> Text
Data.Text.pack "types.RequestInfo"
fieldsByTag :: Map Tag (FieldDescriptor RequestInfo)
fieldsByTag
= let
version__field_descriptor :: FieldDescriptor RequestInfo
version__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor RequestInfo Text
-> FieldDescriptor RequestInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"version"
(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 RequestInfo RequestInfo Text Text
-> FieldAccessor RequestInfo 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 "version" 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 @"version")) ::
Data.ProtoLens.FieldDescriptor RequestInfo
blockVersion__field_descriptor :: FieldDescriptor RequestInfo
blockVersion__field_descriptor
= String
-> FieldTypeDescriptor Word64
-> FieldAccessor RequestInfo Word64
-> FieldDescriptor RequestInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"block_version"
(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 RequestInfo RequestInfo Word64 Word64
-> FieldAccessor RequestInfo 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 "blockVersion" 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 @"blockVersion")) ::
Data.ProtoLens.FieldDescriptor RequestInfo
p2pVersion__field_descriptor :: FieldDescriptor RequestInfo
p2pVersion__field_descriptor
= String
-> FieldTypeDescriptor Word64
-> FieldAccessor RequestInfo Word64
-> FieldDescriptor RequestInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"p2p_version"
(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 RequestInfo RequestInfo Word64 Word64
-> FieldAccessor RequestInfo 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 "p2pVersion" 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 @"p2pVersion")) ::
Data.ProtoLens.FieldDescriptor RequestInfo
in
[(Tag, FieldDescriptor RequestInfo)]
-> Map Tag (FieldDescriptor RequestInfo)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RequestInfo
version__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor RequestInfo
blockVersion__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor RequestInfo
p2pVersion__field_descriptor)]
unknownFields :: LensLike' f RequestInfo FieldSet
unknownFields
= (RequestInfo -> FieldSet)
-> (RequestInfo -> FieldSet -> RequestInfo)
-> Lens' RequestInfo FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInfo -> FieldSet
_RequestInfo'_unknownFields
(\ x__ :: RequestInfo
x__ y__ :: FieldSet
y__ -> RequestInfo
x__ {_RequestInfo'_unknownFields :: FieldSet
_RequestInfo'_unknownFields = FieldSet
y__})
defMessage :: RequestInfo
defMessage
= $WRequestInfo'_constructor :: Text -> Word64 -> Word64 -> FieldSet -> RequestInfo
RequestInfo'_constructor
{_RequestInfo'version :: Text
_RequestInfo'version = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestInfo'blockVersion :: Word64
_RequestInfo'blockVersion = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestInfo'p2pVersion :: Word64
_RequestInfo'p2pVersion = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestInfo'_unknownFields :: FieldSet
_RequestInfo'_unknownFields = []}
parseMessage :: Parser RequestInfo
parseMessage
= let
loop ::
RequestInfo -> Data.ProtoLens.Encoding.Bytes.Parser RequestInfo
loop :: RequestInfo -> Parser RequestInfo
loop x :: RequestInfo
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]))))
RequestInfo -> Parser RequestInfo
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter RequestInfo RequestInfo FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestInfo -> RequestInfo
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 RequestInfo RequestInfo FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) RequestInfo
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))
"version"
RequestInfo -> Parser RequestInfo
loop (Setter RequestInfo RequestInfo Text Text
-> Text -> RequestInfo -> RequestInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "version" 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 @"version") Text
y RequestInfo
x)
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 "block_version"
RequestInfo -> Parser RequestInfo
loop
(Setter RequestInfo RequestInfo Word64 Word64
-> Word64 -> RequestInfo -> RequestInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "blockVersion" 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 @"blockVersion") Word64
y RequestInfo
x)
24
-> 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 "p2p_version"
RequestInfo -> Parser RequestInfo
loop
(Setter RequestInfo RequestInfo Word64 Word64
-> Word64 -> RequestInfo -> RequestInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "p2pVersion" 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 @"p2pVersion") Word64
y RequestInfo
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
RequestInfo -> Parser RequestInfo
loop
(Setter RequestInfo RequestInfo FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestInfo -> RequestInfo
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 RequestInfo RequestInfo FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RequestInfo
x)
in
Parser RequestInfo -> String -> Parser RequestInfo
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do RequestInfo -> Parser RequestInfo
loop RequestInfo
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RequestInfo"
buildMessage :: RequestInfo -> Builder
buildMessage
= \ _x :: RequestInfo
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text RequestInfo RequestInfo Text Text
-> RequestInfo -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" 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 @"version") RequestInfo
_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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Word64
_v
= FoldLike Word64 RequestInfo RequestInfo Word64 Word64
-> RequestInfo -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "blockVersion" 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 @"blockVersion") RequestInfo
_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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Word64
_v
= FoldLike Word64 RequestInfo RequestInfo Word64 Word64
-> RequestInfo -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "p2pVersion" 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 @"p2pVersion") RequestInfo
_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 24)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet RequestInfo RequestInfo FieldSet FieldSet
-> RequestInfo -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet RequestInfo RequestInfo FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RequestInfo
_x))))
instance Control.DeepSeq.NFData RequestInfo where
rnf :: RequestInfo -> ()
rnf
= \ x__ :: RequestInfo
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestInfo -> FieldSet
_RequestInfo'_unknownFields RequestInfo
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestInfo -> Text
_RequestInfo'version RequestInfo
x__)
(Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestInfo -> Word64
_RequestInfo'blockVersion RequestInfo
x__)
(Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RequestInfo -> Word64
_RequestInfo'p2pVersion RequestInfo
x__) ())))
data RequestInitChain
= RequestInitChain'_constructor {RequestInitChain -> Maybe Timestamp
_RequestInitChain'time :: !(Prelude.Maybe Proto.Google.Protobuf.Timestamp.Timestamp),
RequestInitChain -> Text
_RequestInitChain'chainId :: !Data.Text.Text,
RequestInitChain -> Maybe ConsensusParams
_RequestInitChain'consensusParams :: !(Prelude.Maybe ConsensusParams),
RequestInitChain -> Vector ValidatorUpdate
_RequestInitChain'validators :: !(Data.Vector.Vector ValidatorUpdate),
RequestInitChain -> ByteString
_RequestInitChain'appStateBytes :: !Data.ByteString.ByteString,
RequestInitChain -> FieldSet
_RequestInitChain'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (RequestInitChain -> RequestInitChain -> Bool
(RequestInitChain -> RequestInitChain -> Bool)
-> (RequestInitChain -> RequestInitChain -> Bool)
-> Eq RequestInitChain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestInitChain -> RequestInitChain -> Bool
$c/= :: RequestInitChain -> RequestInitChain -> Bool
== :: RequestInitChain -> RequestInitChain -> Bool
$c== :: RequestInitChain -> RequestInitChain -> Bool
Prelude.Eq, Eq RequestInitChain
Eq RequestInitChain =>
(RequestInitChain -> RequestInitChain -> Ordering)
-> (RequestInitChain -> RequestInitChain -> Bool)
-> (RequestInitChain -> RequestInitChain -> Bool)
-> (RequestInitChain -> RequestInitChain -> Bool)
-> (RequestInitChain -> RequestInitChain -> Bool)
-> (RequestInitChain -> RequestInitChain -> RequestInitChain)
-> (RequestInitChain -> RequestInitChain -> RequestInitChain)
-> Ord RequestInitChain
RequestInitChain -> RequestInitChain -> Bool
RequestInitChain -> RequestInitChain -> Ordering
RequestInitChain -> RequestInitChain -> RequestInitChain
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 :: RequestInitChain -> RequestInitChain -> RequestInitChain
$cmin :: RequestInitChain -> RequestInitChain -> RequestInitChain
max :: RequestInitChain -> RequestInitChain -> RequestInitChain
$cmax :: RequestInitChain -> RequestInitChain -> RequestInitChain
>= :: RequestInitChain -> RequestInitChain -> Bool
$c>= :: RequestInitChain -> RequestInitChain -> Bool
> :: RequestInitChain -> RequestInitChain -> Bool
$c> :: RequestInitChain -> RequestInitChain -> Bool
<= :: RequestInitChain -> RequestInitChain -> Bool
$c<= :: RequestInitChain -> RequestInitChain -> Bool
< :: RequestInitChain -> RequestInitChain -> Bool
$c< :: RequestInitChain -> RequestInitChain -> Bool
compare :: RequestInitChain -> RequestInitChain -> Ordering
$ccompare :: RequestInitChain -> RequestInitChain -> Ordering
$cp1Ord :: Eq RequestInitChain
Prelude.Ord)
instance Prelude.Show RequestInitChain where
showsPrec :: Int -> RequestInitChain -> ShowS
showsPrec _ __x :: RequestInitChain
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(RequestInitChain -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RequestInitChain
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RequestInitChain "time" Proto.Google.Protobuf.Timestamp.Timestamp where
fieldOf :: Proxy# "time"
-> (Timestamp -> f Timestamp)
-> RequestInitChain
-> f RequestInitChain
fieldOf _
= ((Maybe Timestamp -> f (Maybe Timestamp))
-> RequestInitChain -> f RequestInitChain)
-> ((Timestamp -> f Timestamp)
-> Maybe Timestamp -> f (Maybe Timestamp))
-> (Timestamp -> f Timestamp)
-> RequestInitChain
-> f RequestInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestInitChain -> Maybe Timestamp)
-> (RequestInitChain -> Maybe Timestamp -> RequestInitChain)
-> Lens
RequestInitChain
RequestInitChain
(Maybe Timestamp)
(Maybe Timestamp)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInitChain -> Maybe Timestamp
_RequestInitChain'time
(\ x__ :: RequestInitChain
x__ y__ :: Maybe Timestamp
y__ -> RequestInitChain
x__ {_RequestInitChain'time :: Maybe Timestamp
_RequestInitChain'time = Maybe Timestamp
y__}))
(Timestamp -> Lens' (Maybe Timestamp) Timestamp
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Timestamp
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField RequestInitChain "maybe'time" (Prelude.Maybe Proto.Google.Protobuf.Timestamp.Timestamp) where
fieldOf :: Proxy# "maybe'time"
-> (Maybe Timestamp -> f (Maybe Timestamp))
-> RequestInitChain
-> f RequestInitChain
fieldOf _
= ((Maybe Timestamp -> f (Maybe Timestamp))
-> RequestInitChain -> f RequestInitChain)
-> ((Maybe Timestamp -> f (Maybe Timestamp))
-> Maybe Timestamp -> f (Maybe Timestamp))
-> (Maybe Timestamp -> f (Maybe Timestamp))
-> RequestInitChain
-> f RequestInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestInitChain -> Maybe Timestamp)
-> (RequestInitChain -> Maybe Timestamp -> RequestInitChain)
-> Lens
RequestInitChain
RequestInitChain
(Maybe Timestamp)
(Maybe Timestamp)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInitChain -> Maybe Timestamp
_RequestInitChain'time
(\ x__ :: RequestInitChain
x__ y__ :: Maybe Timestamp
y__ -> RequestInitChain
x__ {_RequestInitChain'time :: Maybe Timestamp
_RequestInitChain'time = Maybe Timestamp
y__}))
(Maybe Timestamp -> f (Maybe Timestamp))
-> Maybe Timestamp -> f (Maybe Timestamp)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestInitChain "chainId" Data.Text.Text where
fieldOf :: Proxy# "chainId"
-> (Text -> f Text) -> RequestInitChain -> f RequestInitChain
fieldOf _
= ((Text -> f Text) -> RequestInitChain -> f RequestInitChain)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> RequestInitChain
-> f RequestInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestInitChain -> Text)
-> (RequestInitChain -> Text -> RequestInitChain)
-> Lens RequestInitChain RequestInitChain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInitChain -> Text
_RequestInitChain'chainId
(\ x__ :: RequestInitChain
x__ y__ :: Text
y__ -> RequestInitChain
x__ {_RequestInitChain'chainId :: Text
_RequestInitChain'chainId = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestInitChain "consensusParams" ConsensusParams where
fieldOf :: Proxy# "consensusParams"
-> (ConsensusParams -> f ConsensusParams)
-> RequestInitChain
-> f RequestInitChain
fieldOf _
= ((Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> RequestInitChain -> f RequestInitChain)
-> ((ConsensusParams -> f ConsensusParams)
-> Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> (ConsensusParams -> f ConsensusParams)
-> RequestInitChain
-> f RequestInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestInitChain -> Maybe ConsensusParams)
-> (RequestInitChain -> Maybe ConsensusParams -> RequestInitChain)
-> Lens
RequestInitChain
RequestInitChain
(Maybe ConsensusParams)
(Maybe ConsensusParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInitChain -> Maybe ConsensusParams
_RequestInitChain'consensusParams
(\ x__ :: RequestInitChain
x__ y__ :: Maybe ConsensusParams
y__ -> RequestInitChain
x__ {_RequestInitChain'consensusParams :: Maybe ConsensusParams
_RequestInitChain'consensusParams = Maybe ConsensusParams
y__}))
(ConsensusParams -> Lens' (Maybe ConsensusParams) ConsensusParams
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ConsensusParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField RequestInitChain "maybe'consensusParams" (Prelude.Maybe ConsensusParams) where
fieldOf :: Proxy# "maybe'consensusParams"
-> (Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> RequestInitChain
-> f RequestInitChain
fieldOf _
= ((Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> RequestInitChain -> f RequestInitChain)
-> ((Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> (Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> RequestInitChain
-> f RequestInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestInitChain -> Maybe ConsensusParams)
-> (RequestInitChain -> Maybe ConsensusParams -> RequestInitChain)
-> Lens
RequestInitChain
RequestInitChain
(Maybe ConsensusParams)
(Maybe ConsensusParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInitChain -> Maybe ConsensusParams
_RequestInitChain'consensusParams
(\ x__ :: RequestInitChain
x__ y__ :: Maybe ConsensusParams
y__ -> RequestInitChain
x__ {_RequestInitChain'consensusParams :: Maybe ConsensusParams
_RequestInitChain'consensusParams = Maybe ConsensusParams
y__}))
(Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> Maybe ConsensusParams -> f (Maybe ConsensusParams)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestInitChain "validators" [ValidatorUpdate] where
fieldOf :: Proxy# "validators"
-> ([ValidatorUpdate] -> f [ValidatorUpdate])
-> RequestInitChain
-> f RequestInitChain
fieldOf _
= ((Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> RequestInitChain -> f RequestInitChain)
-> (([ValidatorUpdate] -> f [ValidatorUpdate])
-> Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> ([ValidatorUpdate] -> f [ValidatorUpdate])
-> RequestInitChain
-> f RequestInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestInitChain -> Vector ValidatorUpdate)
-> (RequestInitChain -> Vector ValidatorUpdate -> RequestInitChain)
-> Lens
RequestInitChain
RequestInitChain
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInitChain -> Vector ValidatorUpdate
_RequestInitChain'validators
(\ x__ :: RequestInitChain
x__ y__ :: Vector ValidatorUpdate
y__ -> RequestInitChain
x__ {_RequestInitChain'validators :: Vector ValidatorUpdate
_RequestInitChain'validators = Vector ValidatorUpdate
y__}))
((Vector ValidatorUpdate -> [ValidatorUpdate])
-> (Vector ValidatorUpdate
-> [ValidatorUpdate] -> Vector ValidatorUpdate)
-> Lens
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
[ValidatorUpdate]
[ValidatorUpdate]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector ValidatorUpdate -> [ValidatorUpdate]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [ValidatorUpdate]
y__ -> [ValidatorUpdate] -> Vector ValidatorUpdate
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [ValidatorUpdate]
y__))
instance Data.ProtoLens.Field.HasField RequestInitChain "vec'validators" (Data.Vector.Vector ValidatorUpdate) where
fieldOf :: Proxy# "vec'validators"
-> (Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> RequestInitChain
-> f RequestInitChain
fieldOf _
= ((Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> RequestInitChain -> f RequestInitChain)
-> ((Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> (Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> RequestInitChain
-> f RequestInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestInitChain -> Vector ValidatorUpdate)
-> (RequestInitChain -> Vector ValidatorUpdate -> RequestInitChain)
-> Lens
RequestInitChain
RequestInitChain
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInitChain -> Vector ValidatorUpdate
_RequestInitChain'validators
(\ x__ :: RequestInitChain
x__ y__ :: Vector ValidatorUpdate
y__ -> RequestInitChain
x__ {_RequestInitChain'validators :: Vector ValidatorUpdate
_RequestInitChain'validators = Vector ValidatorUpdate
y__}))
(Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> Vector ValidatorUpdate -> f (Vector ValidatorUpdate)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestInitChain "appStateBytes" Data.ByteString.ByteString where
fieldOf :: Proxy# "appStateBytes"
-> (ByteString -> f ByteString)
-> RequestInitChain
-> f RequestInitChain
fieldOf _
= ((ByteString -> f ByteString)
-> RequestInitChain -> f RequestInitChain)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> RequestInitChain
-> f RequestInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestInitChain -> ByteString)
-> (RequestInitChain -> ByteString -> RequestInitChain)
-> Lens RequestInitChain RequestInitChain ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInitChain -> ByteString
_RequestInitChain'appStateBytes
(\ x__ :: RequestInitChain
x__ y__ :: ByteString
y__ -> RequestInitChain
x__ {_RequestInitChain'appStateBytes :: ByteString
_RequestInitChain'appStateBytes = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RequestInitChain where
messageName :: Proxy RequestInitChain -> Text
messageName _ = String -> Text
Data.Text.pack "types.RequestInitChain"
fieldsByTag :: Map Tag (FieldDescriptor RequestInitChain)
fieldsByTag
= let
time__field_descriptor :: FieldDescriptor RequestInitChain
time__field_descriptor
= String
-> FieldTypeDescriptor Timestamp
-> FieldAccessor RequestInitChain Timestamp
-> FieldDescriptor RequestInitChain
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"time"
(MessageOrGroup -> FieldTypeDescriptor Timestamp
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Google.Protobuf.Timestamp.Timestamp)
(Lens
RequestInitChain
RequestInitChain
(Maybe Timestamp)
(Maybe Timestamp)
-> FieldAccessor RequestInitChain Timestamp
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'time" 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'time")) ::
Data.ProtoLens.FieldDescriptor RequestInitChain
chainId__field_descriptor :: FieldDescriptor RequestInitChain
chainId__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor RequestInitChain Text
-> FieldDescriptor RequestInitChain
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"chain_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 RequestInitChain RequestInitChain Text Text
-> FieldAccessor RequestInitChain 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 "chainId" 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 @"chainId")) ::
Data.ProtoLens.FieldDescriptor RequestInitChain
consensusParams__field_descriptor :: FieldDescriptor RequestInitChain
consensusParams__field_descriptor
= String
-> FieldTypeDescriptor ConsensusParams
-> FieldAccessor RequestInitChain ConsensusParams
-> FieldDescriptor RequestInitChain
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"consensus_params"
(MessageOrGroup -> FieldTypeDescriptor ConsensusParams
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ConsensusParams)
(Lens
RequestInitChain
RequestInitChain
(Maybe ConsensusParams)
(Maybe ConsensusParams)
-> FieldAccessor RequestInitChain ConsensusParams
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'consensusParams" 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'consensusParams")) ::
Data.ProtoLens.FieldDescriptor RequestInitChain
validators__field_descriptor :: FieldDescriptor RequestInitChain
validators__field_descriptor
= String
-> FieldTypeDescriptor ValidatorUpdate
-> FieldAccessor RequestInitChain ValidatorUpdate
-> FieldDescriptor RequestInitChain
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"validators"
(MessageOrGroup -> FieldTypeDescriptor ValidatorUpdate
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ValidatorUpdate)
(Packing
-> Lens' RequestInitChain [ValidatorUpdate]
-> FieldAccessor RequestInitChain ValidatorUpdate
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked
(forall s a (f :: * -> *).
(HasField s "validators" 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 @"validators")) ::
Data.ProtoLens.FieldDescriptor RequestInitChain
appStateBytes__field_descriptor :: FieldDescriptor RequestInitChain
appStateBytes__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor RequestInitChain ByteString
-> FieldDescriptor RequestInitChain
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"app_state_bytes"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens RequestInitChain RequestInitChain ByteString ByteString
-> FieldAccessor RequestInitChain ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "appStateBytes" 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 @"appStateBytes")) ::
Data.ProtoLens.FieldDescriptor RequestInitChain
in
[(Tag, FieldDescriptor RequestInitChain)]
-> Map Tag (FieldDescriptor RequestInitChain)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RequestInitChain
time__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor RequestInitChain
chainId__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor RequestInitChain
consensusParams__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor RequestInitChain
validators__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor RequestInitChain
appStateBytes__field_descriptor)]
unknownFields :: LensLike' f RequestInitChain FieldSet
unknownFields
= (RequestInitChain -> FieldSet)
-> (RequestInitChain -> FieldSet -> RequestInitChain)
-> Lens' RequestInitChain FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestInitChain -> FieldSet
_RequestInitChain'_unknownFields
(\ x__ :: RequestInitChain
x__ y__ :: FieldSet
y__ -> RequestInitChain
x__ {_RequestInitChain'_unknownFields :: FieldSet
_RequestInitChain'_unknownFields = FieldSet
y__})
defMessage :: RequestInitChain
defMessage
= $WRequestInitChain'_constructor :: Maybe Timestamp
-> Text
-> Maybe ConsensusParams
-> Vector ValidatorUpdate
-> ByteString
-> FieldSet
-> RequestInitChain
RequestInitChain'_constructor
{_RequestInitChain'time :: Maybe Timestamp
_RequestInitChain'time = Maybe Timestamp
forall a. Maybe a
Prelude.Nothing,
_RequestInitChain'chainId :: Text
_RequestInitChain'chainId = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestInitChain'consensusParams :: Maybe ConsensusParams
_RequestInitChain'consensusParams = Maybe ConsensusParams
forall a. Maybe a
Prelude.Nothing,
_RequestInitChain'validators :: Vector ValidatorUpdate
_RequestInitChain'validators = Vector ValidatorUpdate
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_RequestInitChain'appStateBytes :: ByteString
_RequestInitChain'appStateBytes = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestInitChain'_unknownFields :: FieldSet
_RequestInitChain'_unknownFields = []}
parseMessage :: Parser RequestInitChain
parseMessage
= let
loop ::
RequestInitChain
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ValidatorUpdate
-> Data.ProtoLens.Encoding.Bytes.Parser RequestInitChain
loop :: RequestInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser RequestInitChain
loop x :: RequestInitChain
x mutable'validators :: Growing Vector RealWorld ValidatorUpdate
mutable'validators
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector ValidatorUpdate
frozen'validators <- IO (Vector ValidatorUpdate) -> Parser (Vector ValidatorUpdate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) ValidatorUpdate
-> IO (Vector ValidatorUpdate)
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 ValidatorUpdate
Growing Vector (PrimState IO) ValidatorUpdate
mutable'validators)
(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]))))
RequestInitChain -> Parser RequestInitChain
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter RequestInitChain RequestInitChain FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestInitChain -> RequestInitChain
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 RequestInitChain RequestInitChain FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
RequestInitChain
RequestInitChain
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
-> Vector ValidatorUpdate -> RequestInitChain -> RequestInitChain
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'validators" 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'validators")
Vector ValidatorUpdate
frozen'validators
RequestInitChain
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do Timestamp
y <- Parser Timestamp -> String -> Parser Timestamp
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Timestamp -> Parser Timestamp
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 Timestamp
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"time"
RequestInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser RequestInitChain
loop
(Setter RequestInitChain RequestInitChain Timestamp Timestamp
-> Timestamp -> RequestInitChain -> RequestInitChain
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "time" 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 @"time") Timestamp
y RequestInitChain
x)
Growing Vector RealWorld ValidatorUpdate
mutable'validators
18
-> 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))
"chain_id"
RequestInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser RequestInitChain
loop
(Setter RequestInitChain RequestInitChain Text Text
-> Text -> RequestInitChain -> RequestInitChain
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "chainId" 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 @"chainId") Text
y RequestInitChain
x)
Growing Vector RealWorld ValidatorUpdate
mutable'validators
26
-> do ConsensusParams
y <- Parser ConsensusParams -> String -> Parser ConsensusParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ConsensusParams -> Parser ConsensusParams
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 ConsensusParams
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"consensus_params"
RequestInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser RequestInitChain
loop
(Setter
RequestInitChain RequestInitChain ConsensusParams ConsensusParams
-> ConsensusParams -> RequestInitChain -> RequestInitChain
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "consensusParams" 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 @"consensusParams") ConsensusParams
y RequestInitChain
x)
Growing Vector RealWorld ValidatorUpdate
mutable'validators
34
-> do !ValidatorUpdate
y <- Parser ValidatorUpdate -> String -> Parser ValidatorUpdate
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ValidatorUpdate -> Parser ValidatorUpdate
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 ValidatorUpdate
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"validators"
Growing Vector RealWorld ValidatorUpdate
v <- IO (Growing Vector RealWorld ValidatorUpdate)
-> Parser (Growing Vector RealWorld ValidatorUpdate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) ValidatorUpdate
-> ValidatorUpdate
-> IO (Growing Vector (PrimState IO) ValidatorUpdate)
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 ValidatorUpdate
Growing Vector (PrimState IO) ValidatorUpdate
mutable'validators ValidatorUpdate
y)
RequestInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser RequestInitChain
loop RequestInitChain
x Growing Vector RealWorld ValidatorUpdate
v
42
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"app_state_bytes"
RequestInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser RequestInitChain
loop
(Setter RequestInitChain RequestInitChain ByteString ByteString
-> ByteString -> RequestInitChain -> RequestInitChain
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "appStateBytes" 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 @"appStateBytes") ByteString
y RequestInitChain
x)
Growing Vector RealWorld ValidatorUpdate
mutable'validators
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
RequestInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser RequestInitChain
loop
(Setter RequestInitChain RequestInitChain FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestInitChain -> RequestInitChain
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 RequestInitChain RequestInitChain FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RequestInitChain
x)
Growing Vector RealWorld ValidatorUpdate
mutable'validators
in
Parser RequestInitChain -> String -> Parser RequestInitChain
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld ValidatorUpdate
mutable'validators <- IO (Growing Vector RealWorld ValidatorUpdate)
-> Parser (Growing Vector RealWorld ValidatorUpdate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld ValidatorUpdate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
RequestInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser RequestInitChain
loop RequestInitChain
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld ValidatorUpdate
mutable'validators)
"RequestInitChain"
buildMessage :: RequestInitChain -> Builder
buildMessage
= \ _x :: RequestInitChain
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe Timestamp)
RequestInitChain
RequestInitChain
(Maybe Timestamp)
(Maybe Timestamp)
-> RequestInitChain -> Maybe Timestamp
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'time" 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'time") RequestInitChain
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: Timestamp
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (Timestamp -> ByteString) -> Timestamp -> 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))
Timestamp -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Timestamp
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text RequestInitChain RequestInitChain Text Text
-> RequestInitChain -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "chainId" 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 @"chainId") RequestInitChain
_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 18)
((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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe ConsensusParams)
RequestInitChain
RequestInitChain
(Maybe ConsensusParams)
(Maybe ConsensusParams)
-> RequestInitChain -> Maybe ConsensusParams
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'consensusParams" 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'consensusParams") RequestInitChain
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: ConsensusParams
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
((ByteString -> Builder)
-> (ConsensusParams -> ByteString) -> ConsensusParams -> 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))
ConsensusParams -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ConsensusParams
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((ValidatorUpdate -> Builder) -> Vector ValidatorUpdate -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: ValidatorUpdate
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 34)
((ByteString -> Builder)
-> (ValidatorUpdate -> ByteString) -> ValidatorUpdate -> 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))
ValidatorUpdate -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ValidatorUpdate
_v))
(FoldLike
(Vector ValidatorUpdate)
RequestInitChain
RequestInitChain
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
-> RequestInitChain -> Vector ValidatorUpdate
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "vec'validators" 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'validators") RequestInitChain
_x))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike
ByteString RequestInitChain RequestInitChain ByteString ByteString
-> RequestInitChain -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "appStateBytes" 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 @"appStateBytes") RequestInitChain
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 42)
((\ 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))
ByteString
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet RequestInitChain RequestInitChain FieldSet FieldSet
-> RequestInitChain -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet RequestInitChain RequestInitChain FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RequestInitChain
_x))))))
instance Control.DeepSeq.NFData RequestInitChain where
rnf :: RequestInitChain -> ()
rnf
= \ x__ :: RequestInitChain
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestInitChain -> FieldSet
_RequestInitChain'_unknownFields RequestInitChain
x__)
(Maybe Timestamp -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestInitChain -> Maybe Timestamp
_RequestInitChain'time RequestInitChain
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestInitChain -> Text
_RequestInitChain'chainId RequestInitChain
x__)
(Maybe ConsensusParams -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestInitChain -> Maybe ConsensusParams
_RequestInitChain'consensusParams RequestInitChain
x__)
(Vector ValidatorUpdate -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestInitChain -> Vector ValidatorUpdate
_RequestInitChain'validators RequestInitChain
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestInitChain -> ByteString
_RequestInitChain'appStateBytes RequestInitChain
x__) ())))))
data RequestQuery
= RequestQuery'_constructor {RequestQuery -> ByteString
_RequestQuery'data' :: !Data.ByteString.ByteString,
RequestQuery -> Text
_RequestQuery'path :: !Data.Text.Text,
RequestQuery -> Int64
_RequestQuery'height :: !Data.Int.Int64,
RequestQuery -> Bool
_RequestQuery'prove :: !Prelude.Bool,
RequestQuery -> FieldSet
_RequestQuery'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (RequestQuery -> RequestQuery -> Bool
(RequestQuery -> RequestQuery -> Bool)
-> (RequestQuery -> RequestQuery -> Bool) -> Eq RequestQuery
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestQuery -> RequestQuery -> Bool
$c/= :: RequestQuery -> RequestQuery -> Bool
== :: RequestQuery -> RequestQuery -> Bool
$c== :: RequestQuery -> RequestQuery -> Bool
Prelude.Eq, Eq RequestQuery
Eq RequestQuery =>
(RequestQuery -> RequestQuery -> Ordering)
-> (RequestQuery -> RequestQuery -> Bool)
-> (RequestQuery -> RequestQuery -> Bool)
-> (RequestQuery -> RequestQuery -> Bool)
-> (RequestQuery -> RequestQuery -> Bool)
-> (RequestQuery -> RequestQuery -> RequestQuery)
-> (RequestQuery -> RequestQuery -> RequestQuery)
-> Ord RequestQuery
RequestQuery -> RequestQuery -> Bool
RequestQuery -> RequestQuery -> Ordering
RequestQuery -> RequestQuery -> RequestQuery
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 :: RequestQuery -> RequestQuery -> RequestQuery
$cmin :: RequestQuery -> RequestQuery -> RequestQuery
max :: RequestQuery -> RequestQuery -> RequestQuery
$cmax :: RequestQuery -> RequestQuery -> RequestQuery
>= :: RequestQuery -> RequestQuery -> Bool
$c>= :: RequestQuery -> RequestQuery -> Bool
> :: RequestQuery -> RequestQuery -> Bool
$c> :: RequestQuery -> RequestQuery -> Bool
<= :: RequestQuery -> RequestQuery -> Bool
$c<= :: RequestQuery -> RequestQuery -> Bool
< :: RequestQuery -> RequestQuery -> Bool
$c< :: RequestQuery -> RequestQuery -> Bool
compare :: RequestQuery -> RequestQuery -> Ordering
$ccompare :: RequestQuery -> RequestQuery -> Ordering
$cp1Ord :: Eq RequestQuery
Prelude.Ord)
instance Prelude.Show RequestQuery where
showsPrec :: Int -> RequestQuery -> ShowS
showsPrec _ __x :: RequestQuery
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(RequestQuery -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RequestQuery
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RequestQuery "data'" Data.ByteString.ByteString where
fieldOf :: Proxy# "data'"
-> (ByteString -> f ByteString) -> RequestQuery -> f RequestQuery
fieldOf _
= ((ByteString -> f ByteString) -> RequestQuery -> f RequestQuery)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> RequestQuery
-> f RequestQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestQuery -> ByteString)
-> (RequestQuery -> ByteString -> RequestQuery)
-> Lens RequestQuery RequestQuery ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestQuery -> ByteString
_RequestQuery'data' (\ x__ :: RequestQuery
x__ y__ :: ByteString
y__ -> RequestQuery
x__ {_RequestQuery'data' :: ByteString
_RequestQuery'data' = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestQuery "path" Data.Text.Text where
fieldOf :: Proxy# "path" -> (Text -> f Text) -> RequestQuery -> f RequestQuery
fieldOf _
= ((Text -> f Text) -> RequestQuery -> f RequestQuery)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> RequestQuery
-> f RequestQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestQuery -> Text)
-> (RequestQuery -> Text -> RequestQuery)
-> Lens RequestQuery RequestQuery Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestQuery -> Text
_RequestQuery'path (\ x__ :: RequestQuery
x__ y__ :: Text
y__ -> RequestQuery
x__ {_RequestQuery'path :: Text
_RequestQuery'path = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestQuery "height" Data.Int.Int64 where
fieldOf :: Proxy# "height"
-> (Int64 -> f Int64) -> RequestQuery -> f RequestQuery
fieldOf _
= ((Int64 -> f Int64) -> RequestQuery -> f RequestQuery)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> RequestQuery
-> f RequestQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestQuery -> Int64)
-> (RequestQuery -> Int64 -> RequestQuery)
-> Lens RequestQuery RequestQuery Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestQuery -> Int64
_RequestQuery'height
(\ x__ :: RequestQuery
x__ y__ :: Int64
y__ -> RequestQuery
x__ {_RequestQuery'height :: Int64
_RequestQuery'height = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestQuery "prove" Prelude.Bool where
fieldOf :: Proxy# "prove"
-> (Bool -> f Bool) -> RequestQuery -> f RequestQuery
fieldOf _
= ((Bool -> f Bool) -> RequestQuery -> f RequestQuery)
-> ((Bool -> f Bool) -> Bool -> f Bool)
-> (Bool -> f Bool)
-> RequestQuery
-> f RequestQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestQuery -> Bool)
-> (RequestQuery -> Bool -> RequestQuery)
-> Lens RequestQuery RequestQuery Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestQuery -> Bool
_RequestQuery'prove (\ x__ :: RequestQuery
x__ y__ :: Bool
y__ -> RequestQuery
x__ {_RequestQuery'prove :: Bool
_RequestQuery'prove = Bool
y__}))
(Bool -> f Bool) -> Bool -> f Bool
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RequestQuery where
messageName :: Proxy RequestQuery -> Text
messageName _ = String -> Text
Data.Text.pack "types.RequestQuery"
fieldsByTag :: Map Tag (FieldDescriptor RequestQuery)
fieldsByTag
= let
data'__field_descriptor :: FieldDescriptor RequestQuery
data'__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor RequestQuery ByteString
-> FieldDescriptor RequestQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"data"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens RequestQuery RequestQuery ByteString ByteString
-> FieldAccessor RequestQuery ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'")) ::
Data.ProtoLens.FieldDescriptor RequestQuery
path__field_descriptor :: FieldDescriptor RequestQuery
path__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor RequestQuery Text
-> FieldDescriptor RequestQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"path"
(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 RequestQuery RequestQuery Text Text
-> FieldAccessor RequestQuery 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 "path" 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 @"path")) ::
Data.ProtoLens.FieldDescriptor RequestQuery
height__field_descriptor :: FieldDescriptor RequestQuery
height__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor RequestQuery Int64
-> FieldDescriptor RequestQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"height"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens RequestQuery RequestQuery Int64 Int64
-> FieldAccessor RequestQuery Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "height" 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 @"height")) ::
Data.ProtoLens.FieldDescriptor RequestQuery
prove__field_descriptor :: FieldDescriptor RequestQuery
prove__field_descriptor
= String
-> FieldTypeDescriptor Bool
-> FieldAccessor RequestQuery Bool
-> FieldDescriptor RequestQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"prove"
(ScalarField Bool -> FieldTypeDescriptor Bool
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Bool
Data.ProtoLens.BoolField ::
Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
(WireDefault Bool
-> Lens RequestQuery RequestQuery Bool Bool
-> FieldAccessor RequestQuery Bool
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Bool
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "prove" 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 @"prove")) ::
Data.ProtoLens.FieldDescriptor RequestQuery
in
[(Tag, FieldDescriptor RequestQuery)]
-> Map Tag (FieldDescriptor RequestQuery)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RequestQuery
data'__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor RequestQuery
path__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor RequestQuery
height__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor RequestQuery
prove__field_descriptor)]
unknownFields :: LensLike' f RequestQuery FieldSet
unknownFields
= (RequestQuery -> FieldSet)
-> (RequestQuery -> FieldSet -> RequestQuery)
-> Lens' RequestQuery FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestQuery -> FieldSet
_RequestQuery'_unknownFields
(\ x__ :: RequestQuery
x__ y__ :: FieldSet
y__ -> RequestQuery
x__ {_RequestQuery'_unknownFields :: FieldSet
_RequestQuery'_unknownFields = FieldSet
y__})
defMessage :: RequestQuery
defMessage
= $WRequestQuery'_constructor :: ByteString -> Text -> Int64 -> Bool -> FieldSet -> RequestQuery
RequestQuery'_constructor
{_RequestQuery'data' :: ByteString
_RequestQuery'data' = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestQuery'path :: Text
_RequestQuery'path = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestQuery'height :: Int64
_RequestQuery'height = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestQuery'prove :: Bool
_RequestQuery'prove = Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestQuery'_unknownFields :: FieldSet
_RequestQuery'_unknownFields = []}
parseMessage :: Parser RequestQuery
parseMessage
= let
loop ::
RequestQuery -> Data.ProtoLens.Encoding.Bytes.Parser RequestQuery
loop :: RequestQuery -> Parser RequestQuery
loop x :: RequestQuery
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]))))
RequestQuery -> Parser RequestQuery
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter RequestQuery RequestQuery FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestQuery -> RequestQuery
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 RequestQuery RequestQuery FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) RequestQuery
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"data"
RequestQuery -> Parser RequestQuery
loop (Setter RequestQuery RequestQuery ByteString ByteString
-> ByteString -> RequestQuery -> RequestQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") ByteString
y RequestQuery
x)
18
-> 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))
"path"
RequestQuery -> Parser RequestQuery
loop (Setter RequestQuery RequestQuery Text Text
-> Text -> RequestQuery -> RequestQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "path" 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 @"path") Text
y RequestQuery
x)
24
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"height"
RequestQuery -> Parser RequestQuery
loop (Setter RequestQuery RequestQuery Int64 Int64
-> Int64 -> RequestQuery -> RequestQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "height" 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 @"height") Int64
y RequestQuery
x)
32
-> do Bool
y <- Parser Bool -> String -> Parser Bool
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Bool) -> Parser Word64 -> Parser Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
(Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude./=) 0) Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"prove"
RequestQuery -> Parser RequestQuery
loop (Setter RequestQuery RequestQuery Bool Bool
-> Bool -> RequestQuery -> RequestQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "prove" 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 @"prove") Bool
y RequestQuery
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
RequestQuery -> Parser RequestQuery
loop
(Setter RequestQuery RequestQuery FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestQuery -> RequestQuery
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 RequestQuery RequestQuery FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RequestQuery
x)
in
Parser RequestQuery -> String -> Parser RequestQuery
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do RequestQuery -> Parser RequestQuery
loop RequestQuery
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RequestQuery"
buildMessage :: RequestQuery -> Builder
buildMessage
= \ _x :: RequestQuery
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v = FoldLike ByteString RequestQuery RequestQuery ByteString ByteString
-> RequestQuery -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") RequestQuery
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text RequestQuery RequestQuery Text Text
-> RequestQuery -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "path" 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 @"path") RequestQuery
_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 18)
((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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 RequestQuery RequestQuery Int64 Int64
-> RequestQuery -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "height" 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 @"height") RequestQuery
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 24)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Bool
_v = FoldLike Bool RequestQuery RequestQuery Bool Bool
-> RequestQuery -> Bool
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "prove" 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 @"prove") RequestQuery
_x
in
if Bool -> Bool -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Bool
_v Bool
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 32)
((Word64 -> Builder) -> (Bool -> Word64) -> Bool -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(\ b :: Bool
b -> if Bool
b then 1 else 0)
Bool
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet RequestQuery RequestQuery FieldSet FieldSet
-> RequestQuery -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet RequestQuery RequestQuery FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RequestQuery
_x)))))
instance Control.DeepSeq.NFData RequestQuery where
rnf :: RequestQuery -> ()
rnf
= \ x__ :: RequestQuery
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestQuery -> FieldSet
_RequestQuery'_unknownFields RequestQuery
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestQuery -> ByteString
_RequestQuery'data' RequestQuery
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestQuery -> Text
_RequestQuery'path RequestQuery
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestQuery -> Int64
_RequestQuery'height RequestQuery
x__)
(Bool -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RequestQuery -> Bool
_RequestQuery'prove RequestQuery
x__) ()))))
data RequestSetOption
= RequestSetOption'_constructor {RequestSetOption -> Text
_RequestSetOption'key :: !Data.Text.Text,
RequestSetOption -> Text
_RequestSetOption'value :: !Data.Text.Text,
RequestSetOption -> FieldSet
_RequestSetOption'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (RequestSetOption -> RequestSetOption -> Bool
(RequestSetOption -> RequestSetOption -> Bool)
-> (RequestSetOption -> RequestSetOption -> Bool)
-> Eq RequestSetOption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestSetOption -> RequestSetOption -> Bool
$c/= :: RequestSetOption -> RequestSetOption -> Bool
== :: RequestSetOption -> RequestSetOption -> Bool
$c== :: RequestSetOption -> RequestSetOption -> Bool
Prelude.Eq, Eq RequestSetOption
Eq RequestSetOption =>
(RequestSetOption -> RequestSetOption -> Ordering)
-> (RequestSetOption -> RequestSetOption -> Bool)
-> (RequestSetOption -> RequestSetOption -> Bool)
-> (RequestSetOption -> RequestSetOption -> Bool)
-> (RequestSetOption -> RequestSetOption -> Bool)
-> (RequestSetOption -> RequestSetOption -> RequestSetOption)
-> (RequestSetOption -> RequestSetOption -> RequestSetOption)
-> Ord RequestSetOption
RequestSetOption -> RequestSetOption -> Bool
RequestSetOption -> RequestSetOption -> Ordering
RequestSetOption -> RequestSetOption -> RequestSetOption
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 :: RequestSetOption -> RequestSetOption -> RequestSetOption
$cmin :: RequestSetOption -> RequestSetOption -> RequestSetOption
max :: RequestSetOption -> RequestSetOption -> RequestSetOption
$cmax :: RequestSetOption -> RequestSetOption -> RequestSetOption
>= :: RequestSetOption -> RequestSetOption -> Bool
$c>= :: RequestSetOption -> RequestSetOption -> Bool
> :: RequestSetOption -> RequestSetOption -> Bool
$c> :: RequestSetOption -> RequestSetOption -> Bool
<= :: RequestSetOption -> RequestSetOption -> Bool
$c<= :: RequestSetOption -> RequestSetOption -> Bool
< :: RequestSetOption -> RequestSetOption -> Bool
$c< :: RequestSetOption -> RequestSetOption -> Bool
compare :: RequestSetOption -> RequestSetOption -> Ordering
$ccompare :: RequestSetOption -> RequestSetOption -> Ordering
$cp1Ord :: Eq RequestSetOption
Prelude.Ord)
instance Prelude.Show RequestSetOption where
showsPrec :: Int -> RequestSetOption -> ShowS
showsPrec _ __x :: RequestSetOption
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(RequestSetOption -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RequestSetOption
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RequestSetOption "key" Data.Text.Text where
fieldOf :: Proxy# "key"
-> (Text -> f Text) -> RequestSetOption -> f RequestSetOption
fieldOf _
= ((Text -> f Text) -> RequestSetOption -> f RequestSetOption)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> RequestSetOption
-> f RequestSetOption
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestSetOption -> Text)
-> (RequestSetOption -> Text -> RequestSetOption)
-> Lens RequestSetOption RequestSetOption Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestSetOption -> Text
_RequestSetOption'key
(\ x__ :: RequestSetOption
x__ y__ :: Text
y__ -> RequestSetOption
x__ {_RequestSetOption'key :: Text
_RequestSetOption'key = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RequestSetOption "value" Data.Text.Text where
fieldOf :: Proxy# "value"
-> (Text -> f Text) -> RequestSetOption -> f RequestSetOption
fieldOf _
= ((Text -> f Text) -> RequestSetOption -> f RequestSetOption)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> RequestSetOption
-> f RequestSetOption
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((RequestSetOption -> Text)
-> (RequestSetOption -> Text -> RequestSetOption)
-> Lens RequestSetOption RequestSetOption Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestSetOption -> Text
_RequestSetOption'value
(\ x__ :: RequestSetOption
x__ y__ :: Text
y__ -> RequestSetOption
x__ {_RequestSetOption'value :: Text
_RequestSetOption'value = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RequestSetOption where
messageName :: Proxy RequestSetOption -> Text
messageName _ = String -> Text
Data.Text.pack "types.RequestSetOption"
fieldsByTag :: Map Tag (FieldDescriptor RequestSetOption)
fieldsByTag
= let
key__field_descriptor :: FieldDescriptor RequestSetOption
key__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor RequestSetOption Text
-> FieldDescriptor RequestSetOption
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"key"
(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 RequestSetOption RequestSetOption Text Text
-> FieldAccessor RequestSetOption 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 "key" 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 @"key")) ::
Data.ProtoLens.FieldDescriptor RequestSetOption
value__field_descriptor :: FieldDescriptor RequestSetOption
value__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor RequestSetOption Text
-> FieldDescriptor RequestSetOption
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"value"
(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 RequestSetOption RequestSetOption Text Text
-> FieldAccessor RequestSetOption 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 "value" 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 @"value")) ::
Data.ProtoLens.FieldDescriptor RequestSetOption
in
[(Tag, FieldDescriptor RequestSetOption)]
-> Map Tag (FieldDescriptor RequestSetOption)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RequestSetOption
key__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor RequestSetOption
value__field_descriptor)]
unknownFields :: LensLike' f RequestSetOption FieldSet
unknownFields
= (RequestSetOption -> FieldSet)
-> (RequestSetOption -> FieldSet -> RequestSetOption)
-> Lens' RequestSetOption FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
RequestSetOption -> FieldSet
_RequestSetOption'_unknownFields
(\ x__ :: RequestSetOption
x__ y__ :: FieldSet
y__ -> RequestSetOption
x__ {_RequestSetOption'_unknownFields :: FieldSet
_RequestSetOption'_unknownFields = FieldSet
y__})
defMessage :: RequestSetOption
defMessage
= $WRequestSetOption'_constructor :: Text -> Text -> FieldSet -> RequestSetOption
RequestSetOption'_constructor
{_RequestSetOption'key :: Text
_RequestSetOption'key = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestSetOption'value :: Text
_RequestSetOption'value = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_RequestSetOption'_unknownFields :: FieldSet
_RequestSetOption'_unknownFields = []}
parseMessage :: Parser RequestSetOption
parseMessage
= let
loop ::
RequestSetOption
-> Data.ProtoLens.Encoding.Bytes.Parser RequestSetOption
loop :: RequestSetOption -> Parser RequestSetOption
loop x :: RequestSetOption
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]))))
RequestSetOption -> Parser RequestSetOption
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter RequestSetOption RequestSetOption FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestSetOption -> RequestSetOption
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 RequestSetOption RequestSetOption FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) RequestSetOption
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))
"key"
RequestSetOption -> Parser RequestSetOption
loop (Setter RequestSetOption RequestSetOption Text Text
-> Text -> RequestSetOption -> RequestSetOption
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") Text
y RequestSetOption
x)
18
-> 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))
"value"
RequestSetOption -> Parser RequestSetOption
loop (Setter RequestSetOption RequestSetOption Text Text
-> Text -> RequestSetOption -> RequestSetOption
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") Text
y RequestSetOption
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
RequestSetOption -> Parser RequestSetOption
loop
(Setter RequestSetOption RequestSetOption FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RequestSetOption -> RequestSetOption
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 RequestSetOption RequestSetOption FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RequestSetOption
x)
in
Parser RequestSetOption -> String -> Parser RequestSetOption
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do RequestSetOption -> Parser RequestSetOption
loop RequestSetOption
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RequestSetOption"
buildMessage :: RequestSetOption -> Builder
buildMessage
= \ _x :: RequestSetOption
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text RequestSetOption RequestSetOption Text Text
-> RequestSetOption -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") RequestSetOption
_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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text RequestSetOption RequestSetOption Text Text
-> RequestSetOption -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") RequestSetOption
_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 18)
((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 RequestSetOption RequestSetOption FieldSet FieldSet
-> RequestSetOption -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet RequestSetOption RequestSetOption FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RequestSetOption
_x)))
instance Control.DeepSeq.NFData RequestSetOption where
rnf :: RequestSetOption -> ()
rnf
= \ x__ :: RequestSetOption
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestSetOption -> FieldSet
_RequestSetOption'_unknownFields RequestSetOption
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(RequestSetOption -> Text
_RequestSetOption'key RequestSetOption
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RequestSetOption -> Text
_RequestSetOption'value RequestSetOption
x__) ()))
data Response
= Response'_constructor {Response -> Maybe Response'Value
_Response'value :: !(Prelude.Maybe Response'Value),
Response -> FieldSet
_Response'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (Response -> Response -> Bool
(Response -> Response -> Bool)
-> (Response -> Response -> Bool) -> Eq Response
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Response -> Response -> Bool
$c/= :: Response -> Response -> Bool
== :: Response -> Response -> Bool
$c== :: Response -> Response -> Bool
Prelude.Eq, Eq Response
Eq Response =>
(Response -> Response -> Ordering)
-> (Response -> Response -> Bool)
-> (Response -> Response -> Bool)
-> (Response -> Response -> Bool)
-> (Response -> Response -> Bool)
-> (Response -> Response -> Response)
-> (Response -> Response -> Response)
-> Ord Response
Response -> Response -> Bool
Response -> Response -> Ordering
Response -> Response -> Response
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 :: Response -> Response -> Response
$cmin :: Response -> Response -> Response
max :: Response -> Response -> Response
$cmax :: Response -> Response -> Response
>= :: Response -> Response -> Bool
$c>= :: Response -> Response -> Bool
> :: Response -> Response -> Bool
$c> :: Response -> Response -> Bool
<= :: Response -> Response -> Bool
$c<= :: Response -> Response -> Bool
< :: Response -> Response -> Bool
$c< :: Response -> Response -> Bool
compare :: Response -> Response -> Ordering
$ccompare :: Response -> Response -> Ordering
$cp1Ord :: Eq Response
Prelude.Ord)
instance Prelude.Show Response where
showsPrec :: Int -> Response -> ShowS
showsPrec _ __x :: Response
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(Response -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Response
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
data Response'Value
= Response'Exception !ResponseException |
Response'Echo !ResponseEcho |
Response'Flush !ResponseFlush |
Response'Info !ResponseInfo |
Response'SetOption !ResponseSetOption |
Response'InitChain !ResponseInitChain |
Response'Query !ResponseQuery |
Response'BeginBlock !ResponseBeginBlock |
Response'CheckTx !ResponseCheckTx |
Response'DeliverTx !ResponseDeliverTx |
Response'EndBlock !ResponseEndBlock |
Response'Commit !ResponseCommit
deriving (Int -> Response'Value -> ShowS
[Response'Value] -> ShowS
Response'Value -> String
(Int -> Response'Value -> ShowS)
-> (Response'Value -> String)
-> ([Response'Value] -> ShowS)
-> Show Response'Value
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Response'Value] -> ShowS
$cshowList :: [Response'Value] -> ShowS
show :: Response'Value -> String
$cshow :: Response'Value -> String
showsPrec :: Int -> Response'Value -> ShowS
$cshowsPrec :: Int -> Response'Value -> ShowS
Prelude.Show, Response'Value -> Response'Value -> Bool
(Response'Value -> Response'Value -> Bool)
-> (Response'Value -> Response'Value -> Bool) -> Eq Response'Value
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Response'Value -> Response'Value -> Bool
$c/= :: Response'Value -> Response'Value -> Bool
== :: Response'Value -> Response'Value -> Bool
$c== :: Response'Value -> Response'Value -> Bool
Prelude.Eq, Eq Response'Value
Eq Response'Value =>
(Response'Value -> Response'Value -> Ordering)
-> (Response'Value -> Response'Value -> Bool)
-> (Response'Value -> Response'Value -> Bool)
-> (Response'Value -> Response'Value -> Bool)
-> (Response'Value -> Response'Value -> Bool)
-> (Response'Value -> Response'Value -> Response'Value)
-> (Response'Value -> Response'Value -> Response'Value)
-> Ord Response'Value
Response'Value -> Response'Value -> Bool
Response'Value -> Response'Value -> Ordering
Response'Value -> Response'Value -> Response'Value
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 :: Response'Value -> Response'Value -> Response'Value
$cmin :: Response'Value -> Response'Value -> Response'Value
max :: Response'Value -> Response'Value -> Response'Value
$cmax :: Response'Value -> Response'Value -> Response'Value
>= :: Response'Value -> Response'Value -> Bool
$c>= :: Response'Value -> Response'Value -> Bool
> :: Response'Value -> Response'Value -> Bool
$c> :: Response'Value -> Response'Value -> Bool
<= :: Response'Value -> Response'Value -> Bool
$c<= :: Response'Value -> Response'Value -> Bool
< :: Response'Value -> Response'Value -> Bool
$c< :: Response'Value -> Response'Value -> Bool
compare :: Response'Value -> Response'Value -> Ordering
$ccompare :: Response'Value -> Response'Value -> Ordering
$cp1Ord :: Eq Response'Value
Prelude.Ord)
instance Data.ProtoLens.Field.HasField Response "maybe'value" (Prelude.Maybe Response'Value) where
fieldOf :: Proxy# "maybe'value"
-> (Maybe Response'Value -> f (Maybe Response'Value))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe Response'Value -> f (Maybe Response'Value))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe Response'Value -> f (Maybe Response'Value))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(Maybe Response'Value -> f (Maybe Response'Value))
-> Maybe Response'Value -> f (Maybe Response'Value)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Response "maybe'exception" (Prelude.Maybe ResponseException) where
fieldOf :: Proxy# "maybe'exception"
-> (Maybe ResponseException -> f (Maybe ResponseException))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseException -> f (Maybe ResponseException))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseException -> f (Maybe ResponseException))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseException)
-> (Maybe Response'Value
-> Maybe ResponseException -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseException)
(Maybe ResponseException)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Exception x__val :: ResponseException
x__val)) -> ResponseException -> Maybe ResponseException
forall a. a -> Maybe a
Prelude.Just ResponseException
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseException
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseException
y__ -> (ResponseException -> Response'Value)
-> Maybe ResponseException -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseException -> Response'Value
Response'Exception Maybe ResponseException
y__))
instance Data.ProtoLens.Field.HasField Response "exception" ResponseException where
fieldOf :: Proxy# "exception"
-> (ResponseException -> f ResponseException)
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseException -> f ResponseException)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseException -> f ResponseException)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseException -> f (Maybe ResponseException))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseException -> f ResponseException)
-> Maybe ResponseException -> f (Maybe ResponseException))
-> (ResponseException -> f ResponseException)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseException)
-> (Maybe Response'Value
-> Maybe ResponseException -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseException)
(Maybe ResponseException)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Exception x__val :: ResponseException
x__val)) -> ResponseException -> Maybe ResponseException
forall a. a -> Maybe a
Prelude.Just ResponseException
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseException
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseException
y__ -> (ResponseException -> Response'Value)
-> Maybe ResponseException -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseException -> Response'Value
Response'Exception Maybe ResponseException
y__))
(ResponseException
-> Lens' (Maybe ResponseException) ResponseException
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseException
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'echo" (Prelude.Maybe ResponseEcho) where
fieldOf :: Proxy# "maybe'echo"
-> (Maybe ResponseEcho -> f (Maybe ResponseEcho))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseEcho -> f (Maybe ResponseEcho))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseEcho -> f (Maybe ResponseEcho))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseEcho)
-> (Maybe Response'Value
-> Maybe ResponseEcho -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseEcho)
(Maybe ResponseEcho)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Echo x__val :: ResponseEcho
x__val)) -> ResponseEcho -> Maybe ResponseEcho
forall a. a -> Maybe a
Prelude.Just ResponseEcho
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseEcho
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseEcho
y__ -> (ResponseEcho -> Response'Value)
-> Maybe ResponseEcho -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseEcho -> Response'Value
Response'Echo Maybe ResponseEcho
y__))
instance Data.ProtoLens.Field.HasField Response "echo" ResponseEcho where
fieldOf :: Proxy# "echo"
-> (ResponseEcho -> f ResponseEcho) -> Response -> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseEcho -> f ResponseEcho)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseEcho -> f ResponseEcho)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseEcho -> f (Maybe ResponseEcho))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseEcho -> f ResponseEcho)
-> Maybe ResponseEcho -> f (Maybe ResponseEcho))
-> (ResponseEcho -> f ResponseEcho)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseEcho)
-> (Maybe Response'Value
-> Maybe ResponseEcho -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseEcho)
(Maybe ResponseEcho)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Echo x__val :: ResponseEcho
x__val)) -> ResponseEcho -> Maybe ResponseEcho
forall a. a -> Maybe a
Prelude.Just ResponseEcho
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseEcho
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseEcho
y__ -> (ResponseEcho -> Response'Value)
-> Maybe ResponseEcho -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseEcho -> Response'Value
Response'Echo Maybe ResponseEcho
y__))
(ResponseEcho -> Lens' (Maybe ResponseEcho) ResponseEcho
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseEcho
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'flush" (Prelude.Maybe ResponseFlush) where
fieldOf :: Proxy# "maybe'flush"
-> (Maybe ResponseFlush -> f (Maybe ResponseFlush))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseFlush -> f (Maybe ResponseFlush))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseFlush -> f (Maybe ResponseFlush))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseFlush)
-> (Maybe Response'Value
-> Maybe ResponseFlush -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseFlush)
(Maybe ResponseFlush)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Flush x__val :: ResponseFlush
x__val)) -> ResponseFlush -> Maybe ResponseFlush
forall a. a -> Maybe a
Prelude.Just ResponseFlush
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseFlush
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseFlush
y__ -> (ResponseFlush -> Response'Value)
-> Maybe ResponseFlush -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseFlush -> Response'Value
Response'Flush Maybe ResponseFlush
y__))
instance Data.ProtoLens.Field.HasField Response "flush" ResponseFlush where
fieldOf :: Proxy# "flush"
-> (ResponseFlush -> f ResponseFlush) -> Response -> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseFlush -> f ResponseFlush)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseFlush -> f ResponseFlush)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseFlush -> f (Maybe ResponseFlush))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseFlush -> f ResponseFlush)
-> Maybe ResponseFlush -> f (Maybe ResponseFlush))
-> (ResponseFlush -> f ResponseFlush)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseFlush)
-> (Maybe Response'Value
-> Maybe ResponseFlush -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseFlush)
(Maybe ResponseFlush)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Flush x__val :: ResponseFlush
x__val)) -> ResponseFlush -> Maybe ResponseFlush
forall a. a -> Maybe a
Prelude.Just ResponseFlush
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseFlush
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseFlush
y__ -> (ResponseFlush -> Response'Value)
-> Maybe ResponseFlush -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseFlush -> Response'Value
Response'Flush Maybe ResponseFlush
y__))
(ResponseFlush -> Lens' (Maybe ResponseFlush) ResponseFlush
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseFlush
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'info" (Prelude.Maybe ResponseInfo) where
fieldOf :: Proxy# "maybe'info"
-> (Maybe ResponseInfo -> f (Maybe ResponseInfo))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseInfo -> f (Maybe ResponseInfo))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseInfo -> f (Maybe ResponseInfo))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseInfo)
-> (Maybe Response'Value
-> Maybe ResponseInfo -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseInfo)
(Maybe ResponseInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Info x__val :: ResponseInfo
x__val)) -> ResponseInfo -> Maybe ResponseInfo
forall a. a -> Maybe a
Prelude.Just ResponseInfo
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseInfo
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseInfo
y__ -> (ResponseInfo -> Response'Value)
-> Maybe ResponseInfo -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseInfo -> Response'Value
Response'Info Maybe ResponseInfo
y__))
instance Data.ProtoLens.Field.HasField Response "info" ResponseInfo where
fieldOf :: Proxy# "info"
-> (ResponseInfo -> f ResponseInfo) -> Response -> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseInfo -> f ResponseInfo)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseInfo -> f ResponseInfo)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseInfo -> f (Maybe ResponseInfo))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseInfo -> f ResponseInfo)
-> Maybe ResponseInfo -> f (Maybe ResponseInfo))
-> (ResponseInfo -> f ResponseInfo)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseInfo)
-> (Maybe Response'Value
-> Maybe ResponseInfo -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseInfo)
(Maybe ResponseInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Info x__val :: ResponseInfo
x__val)) -> ResponseInfo -> Maybe ResponseInfo
forall a. a -> Maybe a
Prelude.Just ResponseInfo
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseInfo
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseInfo
y__ -> (ResponseInfo -> Response'Value)
-> Maybe ResponseInfo -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseInfo -> Response'Value
Response'Info Maybe ResponseInfo
y__))
(ResponseInfo -> Lens' (Maybe ResponseInfo) ResponseInfo
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseInfo
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'setOption" (Prelude.Maybe ResponseSetOption) where
fieldOf :: Proxy# "maybe'setOption"
-> (Maybe ResponseSetOption -> f (Maybe ResponseSetOption))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseSetOption -> f (Maybe ResponseSetOption))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseSetOption -> f (Maybe ResponseSetOption))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseSetOption)
-> (Maybe Response'Value
-> Maybe ResponseSetOption -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseSetOption)
(Maybe ResponseSetOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'SetOption x__val :: ResponseSetOption
x__val)) -> ResponseSetOption -> Maybe ResponseSetOption
forall a. a -> Maybe a
Prelude.Just ResponseSetOption
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseSetOption
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseSetOption
y__ -> (ResponseSetOption -> Response'Value)
-> Maybe ResponseSetOption -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseSetOption -> Response'Value
Response'SetOption Maybe ResponseSetOption
y__))
instance Data.ProtoLens.Field.HasField Response "setOption" ResponseSetOption where
fieldOf :: Proxy# "setOption"
-> (ResponseSetOption -> f ResponseSetOption)
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseSetOption -> f ResponseSetOption)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseSetOption -> f ResponseSetOption)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseSetOption -> f (Maybe ResponseSetOption))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseSetOption -> f ResponseSetOption)
-> Maybe ResponseSetOption -> f (Maybe ResponseSetOption))
-> (ResponseSetOption -> f ResponseSetOption)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseSetOption)
-> (Maybe Response'Value
-> Maybe ResponseSetOption -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseSetOption)
(Maybe ResponseSetOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'SetOption x__val :: ResponseSetOption
x__val)) -> ResponseSetOption -> Maybe ResponseSetOption
forall a. a -> Maybe a
Prelude.Just ResponseSetOption
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseSetOption
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseSetOption
y__ -> (ResponseSetOption -> Response'Value)
-> Maybe ResponseSetOption -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseSetOption -> Response'Value
Response'SetOption Maybe ResponseSetOption
y__))
(ResponseSetOption
-> Lens' (Maybe ResponseSetOption) ResponseSetOption
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseSetOption
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'initChain" (Prelude.Maybe ResponseInitChain) where
fieldOf :: Proxy# "maybe'initChain"
-> (Maybe ResponseInitChain -> f (Maybe ResponseInitChain))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseInitChain -> f (Maybe ResponseInitChain))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseInitChain -> f (Maybe ResponseInitChain))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseInitChain)
-> (Maybe Response'Value
-> Maybe ResponseInitChain -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseInitChain)
(Maybe ResponseInitChain)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'InitChain x__val :: ResponseInitChain
x__val)) -> ResponseInitChain -> Maybe ResponseInitChain
forall a. a -> Maybe a
Prelude.Just ResponseInitChain
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseInitChain
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseInitChain
y__ -> (ResponseInitChain -> Response'Value)
-> Maybe ResponseInitChain -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseInitChain -> Response'Value
Response'InitChain Maybe ResponseInitChain
y__))
instance Data.ProtoLens.Field.HasField Response "initChain" ResponseInitChain where
fieldOf :: Proxy# "initChain"
-> (ResponseInitChain -> f ResponseInitChain)
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseInitChain -> f ResponseInitChain)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseInitChain -> f ResponseInitChain)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseInitChain -> f (Maybe ResponseInitChain))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseInitChain -> f ResponseInitChain)
-> Maybe ResponseInitChain -> f (Maybe ResponseInitChain))
-> (ResponseInitChain -> f ResponseInitChain)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseInitChain)
-> (Maybe Response'Value
-> Maybe ResponseInitChain -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseInitChain)
(Maybe ResponseInitChain)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'InitChain x__val :: ResponseInitChain
x__val)) -> ResponseInitChain -> Maybe ResponseInitChain
forall a. a -> Maybe a
Prelude.Just ResponseInitChain
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseInitChain
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseInitChain
y__ -> (ResponseInitChain -> Response'Value)
-> Maybe ResponseInitChain -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseInitChain -> Response'Value
Response'InitChain Maybe ResponseInitChain
y__))
(ResponseInitChain
-> Lens' (Maybe ResponseInitChain) ResponseInitChain
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseInitChain
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'query" (Prelude.Maybe ResponseQuery) where
fieldOf :: Proxy# "maybe'query"
-> (Maybe ResponseQuery -> f (Maybe ResponseQuery))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseQuery -> f (Maybe ResponseQuery))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseQuery -> f (Maybe ResponseQuery))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseQuery)
-> (Maybe Response'Value
-> Maybe ResponseQuery -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseQuery)
(Maybe ResponseQuery)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Query x__val :: ResponseQuery
x__val)) -> ResponseQuery -> Maybe ResponseQuery
forall a. a -> Maybe a
Prelude.Just ResponseQuery
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseQuery
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseQuery
y__ -> (ResponseQuery -> Response'Value)
-> Maybe ResponseQuery -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseQuery -> Response'Value
Response'Query Maybe ResponseQuery
y__))
instance Data.ProtoLens.Field.HasField Response "query" ResponseQuery where
fieldOf :: Proxy# "query"
-> (ResponseQuery -> f ResponseQuery) -> Response -> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseQuery -> f ResponseQuery)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseQuery -> f ResponseQuery)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseQuery -> f (Maybe ResponseQuery))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseQuery -> f ResponseQuery)
-> Maybe ResponseQuery -> f (Maybe ResponseQuery))
-> (ResponseQuery -> f ResponseQuery)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseQuery)
-> (Maybe Response'Value
-> Maybe ResponseQuery -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseQuery)
(Maybe ResponseQuery)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Query x__val :: ResponseQuery
x__val)) -> ResponseQuery -> Maybe ResponseQuery
forall a. a -> Maybe a
Prelude.Just ResponseQuery
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseQuery
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseQuery
y__ -> (ResponseQuery -> Response'Value)
-> Maybe ResponseQuery -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseQuery -> Response'Value
Response'Query Maybe ResponseQuery
y__))
(ResponseQuery -> Lens' (Maybe ResponseQuery) ResponseQuery
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseQuery
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'beginBlock" (Prelude.Maybe ResponseBeginBlock) where
fieldOf :: Proxy# "maybe'beginBlock"
-> (Maybe ResponseBeginBlock -> f (Maybe ResponseBeginBlock))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseBeginBlock -> f (Maybe ResponseBeginBlock))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseBeginBlock -> f (Maybe ResponseBeginBlock))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseBeginBlock)
-> (Maybe Response'Value
-> Maybe ResponseBeginBlock -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseBeginBlock)
(Maybe ResponseBeginBlock)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'BeginBlock x__val :: ResponseBeginBlock
x__val)) -> ResponseBeginBlock -> Maybe ResponseBeginBlock
forall a. a -> Maybe a
Prelude.Just ResponseBeginBlock
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseBeginBlock
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseBeginBlock
y__ -> (ResponseBeginBlock -> Response'Value)
-> Maybe ResponseBeginBlock -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseBeginBlock -> Response'Value
Response'BeginBlock Maybe ResponseBeginBlock
y__))
instance Data.ProtoLens.Field.HasField Response "beginBlock" ResponseBeginBlock where
fieldOf :: Proxy# "beginBlock"
-> (ResponseBeginBlock -> f ResponseBeginBlock)
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseBeginBlock -> f ResponseBeginBlock)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseBeginBlock -> f ResponseBeginBlock)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseBeginBlock -> f (Maybe ResponseBeginBlock))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseBeginBlock -> f ResponseBeginBlock)
-> Maybe ResponseBeginBlock -> f (Maybe ResponseBeginBlock))
-> (ResponseBeginBlock -> f ResponseBeginBlock)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseBeginBlock)
-> (Maybe Response'Value
-> Maybe ResponseBeginBlock -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseBeginBlock)
(Maybe ResponseBeginBlock)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'BeginBlock x__val :: ResponseBeginBlock
x__val)) -> ResponseBeginBlock -> Maybe ResponseBeginBlock
forall a. a -> Maybe a
Prelude.Just ResponseBeginBlock
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseBeginBlock
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseBeginBlock
y__ -> (ResponseBeginBlock -> Response'Value)
-> Maybe ResponseBeginBlock -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseBeginBlock -> Response'Value
Response'BeginBlock Maybe ResponseBeginBlock
y__))
(ResponseBeginBlock
-> Lens' (Maybe ResponseBeginBlock) ResponseBeginBlock
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseBeginBlock
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'checkTx" (Prelude.Maybe ResponseCheckTx) where
fieldOf :: Proxy# "maybe'checkTx"
-> (Maybe ResponseCheckTx -> f (Maybe ResponseCheckTx))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseCheckTx -> f (Maybe ResponseCheckTx))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseCheckTx -> f (Maybe ResponseCheckTx))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseCheckTx)
-> (Maybe Response'Value
-> Maybe ResponseCheckTx -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseCheckTx)
(Maybe ResponseCheckTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'CheckTx x__val :: ResponseCheckTx
x__val)) -> ResponseCheckTx -> Maybe ResponseCheckTx
forall a. a -> Maybe a
Prelude.Just ResponseCheckTx
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseCheckTx
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseCheckTx
y__ -> (ResponseCheckTx -> Response'Value)
-> Maybe ResponseCheckTx -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseCheckTx -> Response'Value
Response'CheckTx Maybe ResponseCheckTx
y__))
instance Data.ProtoLens.Field.HasField Response "checkTx" ResponseCheckTx where
fieldOf :: Proxy# "checkTx"
-> (ResponseCheckTx -> f ResponseCheckTx) -> Response -> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseCheckTx -> f ResponseCheckTx)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseCheckTx -> f ResponseCheckTx)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseCheckTx -> f (Maybe ResponseCheckTx))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseCheckTx -> f ResponseCheckTx)
-> Maybe ResponseCheckTx -> f (Maybe ResponseCheckTx))
-> (ResponseCheckTx -> f ResponseCheckTx)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseCheckTx)
-> (Maybe Response'Value
-> Maybe ResponseCheckTx -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseCheckTx)
(Maybe ResponseCheckTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'CheckTx x__val :: ResponseCheckTx
x__val)) -> ResponseCheckTx -> Maybe ResponseCheckTx
forall a. a -> Maybe a
Prelude.Just ResponseCheckTx
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseCheckTx
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseCheckTx
y__ -> (ResponseCheckTx -> Response'Value)
-> Maybe ResponseCheckTx -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseCheckTx -> Response'Value
Response'CheckTx Maybe ResponseCheckTx
y__))
(ResponseCheckTx -> Lens' (Maybe ResponseCheckTx) ResponseCheckTx
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseCheckTx
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'deliverTx" (Prelude.Maybe ResponseDeliverTx) where
fieldOf :: Proxy# "maybe'deliverTx"
-> (Maybe ResponseDeliverTx -> f (Maybe ResponseDeliverTx))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseDeliverTx -> f (Maybe ResponseDeliverTx))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseDeliverTx -> f (Maybe ResponseDeliverTx))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseDeliverTx)
-> (Maybe Response'Value
-> Maybe ResponseDeliverTx -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseDeliverTx)
(Maybe ResponseDeliverTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'DeliverTx x__val :: ResponseDeliverTx
x__val)) -> ResponseDeliverTx -> Maybe ResponseDeliverTx
forall a. a -> Maybe a
Prelude.Just ResponseDeliverTx
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseDeliverTx
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseDeliverTx
y__ -> (ResponseDeliverTx -> Response'Value)
-> Maybe ResponseDeliverTx -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseDeliverTx -> Response'Value
Response'DeliverTx Maybe ResponseDeliverTx
y__))
instance Data.ProtoLens.Field.HasField Response "deliverTx" ResponseDeliverTx where
fieldOf :: Proxy# "deliverTx"
-> (ResponseDeliverTx -> f ResponseDeliverTx)
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseDeliverTx -> f ResponseDeliverTx)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseDeliverTx -> f ResponseDeliverTx)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseDeliverTx -> f (Maybe ResponseDeliverTx))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseDeliverTx -> f ResponseDeliverTx)
-> Maybe ResponseDeliverTx -> f (Maybe ResponseDeliverTx))
-> (ResponseDeliverTx -> f ResponseDeliverTx)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseDeliverTx)
-> (Maybe Response'Value
-> Maybe ResponseDeliverTx -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseDeliverTx)
(Maybe ResponseDeliverTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'DeliverTx x__val :: ResponseDeliverTx
x__val)) -> ResponseDeliverTx -> Maybe ResponseDeliverTx
forall a. a -> Maybe a
Prelude.Just ResponseDeliverTx
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseDeliverTx
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseDeliverTx
y__ -> (ResponseDeliverTx -> Response'Value)
-> Maybe ResponseDeliverTx -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseDeliverTx -> Response'Value
Response'DeliverTx Maybe ResponseDeliverTx
y__))
(ResponseDeliverTx
-> Lens' (Maybe ResponseDeliverTx) ResponseDeliverTx
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseDeliverTx
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'endBlock" (Prelude.Maybe ResponseEndBlock) where
fieldOf :: Proxy# "maybe'endBlock"
-> (Maybe ResponseEndBlock -> f (Maybe ResponseEndBlock))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseEndBlock -> f (Maybe ResponseEndBlock))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseEndBlock -> f (Maybe ResponseEndBlock))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseEndBlock)
-> (Maybe Response'Value
-> Maybe ResponseEndBlock -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseEndBlock)
(Maybe ResponseEndBlock)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'EndBlock x__val :: ResponseEndBlock
x__val)) -> ResponseEndBlock -> Maybe ResponseEndBlock
forall a. a -> Maybe a
Prelude.Just ResponseEndBlock
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseEndBlock
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseEndBlock
y__ -> (ResponseEndBlock -> Response'Value)
-> Maybe ResponseEndBlock -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseEndBlock -> Response'Value
Response'EndBlock Maybe ResponseEndBlock
y__))
instance Data.ProtoLens.Field.HasField Response "endBlock" ResponseEndBlock where
fieldOf :: Proxy# "endBlock"
-> (ResponseEndBlock -> f ResponseEndBlock)
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseEndBlock -> f ResponseEndBlock)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseEndBlock -> f ResponseEndBlock)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseEndBlock -> f (Maybe ResponseEndBlock))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseEndBlock -> f ResponseEndBlock)
-> Maybe ResponseEndBlock -> f (Maybe ResponseEndBlock))
-> (ResponseEndBlock -> f ResponseEndBlock)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseEndBlock)
-> (Maybe Response'Value
-> Maybe ResponseEndBlock -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseEndBlock)
(Maybe ResponseEndBlock)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'EndBlock x__val :: ResponseEndBlock
x__val)) -> ResponseEndBlock -> Maybe ResponseEndBlock
forall a. a -> Maybe a
Prelude.Just ResponseEndBlock
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseEndBlock
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseEndBlock
y__ -> (ResponseEndBlock -> Response'Value)
-> Maybe ResponseEndBlock -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseEndBlock -> Response'Value
Response'EndBlock Maybe ResponseEndBlock
y__))
(ResponseEndBlock -> Lens' (Maybe ResponseEndBlock) ResponseEndBlock
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseEndBlock
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'commit" (Prelude.Maybe ResponseCommit) where
fieldOf :: Proxy# "maybe'commit"
-> (Maybe ResponseCommit -> f (Maybe ResponseCommit))
-> Response
-> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((Maybe ResponseCommit -> f (Maybe ResponseCommit))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (Maybe ResponseCommit -> f (Maybe ResponseCommit))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
((Maybe Response'Value -> Maybe ResponseCommit)
-> (Maybe Response'Value
-> Maybe ResponseCommit -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseCommit)
(Maybe ResponseCommit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Commit x__val :: ResponseCommit
x__val)) -> ResponseCommit -> Maybe ResponseCommit
forall a. a -> Maybe a
Prelude.Just ResponseCommit
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseCommit
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseCommit
y__ -> (ResponseCommit -> Response'Value)
-> Maybe ResponseCommit -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseCommit -> Response'Value
Response'Commit Maybe ResponseCommit
y__))
instance Data.ProtoLens.Field.HasField Response "commit" ResponseCommit where
fieldOf :: Proxy# "commit"
-> (ResponseCommit -> f ResponseCommit) -> Response -> f Response
fieldOf _
= ((Maybe Response'Value -> f (Maybe Response'Value))
-> Response -> f Response)
-> ((ResponseCommit -> f ResponseCommit)
-> Maybe Response'Value -> f (Maybe Response'Value))
-> (ResponseCommit -> f ResponseCommit)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Response -> Maybe Response'Value)
-> (Response -> Maybe Response'Value -> Response)
-> Lens
Response Response (Maybe Response'Value) (Maybe Response'Value)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> Maybe Response'Value
_Response'value (\ x__ :: Response
x__ y__ :: Maybe Response'Value
y__ -> Response
x__ {_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
y__}))
(((Maybe ResponseCommit -> f (Maybe ResponseCommit))
-> Maybe Response'Value -> f (Maybe Response'Value))
-> ((ResponseCommit -> f ResponseCommit)
-> Maybe ResponseCommit -> f (Maybe ResponseCommit))
-> (ResponseCommit -> f ResponseCommit)
-> Maybe Response'Value
-> f (Maybe Response'Value)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe Response'Value -> Maybe ResponseCommit)
-> (Maybe Response'Value
-> Maybe ResponseCommit -> Maybe Response'Value)
-> Lens
(Maybe Response'Value)
(Maybe Response'Value)
(Maybe ResponseCommit)
(Maybe ResponseCommit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ x__ :: Maybe Response'Value
x__
-> case Maybe Response'Value
x__ of
(Prelude.Just (Response'Commit x__val :: ResponseCommit
x__val)) -> ResponseCommit -> Maybe ResponseCommit
forall a. a -> Maybe a
Prelude.Just ResponseCommit
x__val
_otherwise :: Maybe Response'Value
_otherwise -> Maybe ResponseCommit
forall a. Maybe a
Prelude.Nothing)
(\ _ y__ :: Maybe ResponseCommit
y__ -> (ResponseCommit -> Response'Value)
-> Maybe ResponseCommit -> Maybe Response'Value
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap ResponseCommit -> Response'Value
Response'Commit Maybe ResponseCommit
y__))
(ResponseCommit -> Lens' (Maybe ResponseCommit) ResponseCommit
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ResponseCommit
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message Response where
messageName :: Proxy Response -> Text
messageName _ = String -> Text
Data.Text.pack "types.Response"
fieldsByTag :: Map Tag (FieldDescriptor Response)
fieldsByTag
= let
exception__field_descriptor :: FieldDescriptor Response
exception__field_descriptor
= String
-> FieldTypeDescriptor ResponseException
-> FieldAccessor Response ResponseException
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"exception"
(MessageOrGroup -> FieldTypeDescriptor ResponseException
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseException)
(Lens' Response (Maybe ResponseException)
-> FieldAccessor Response ResponseException
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'exception" 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'exception")) ::
Data.ProtoLens.FieldDescriptor Response
echo__field_descriptor :: FieldDescriptor Response
echo__field_descriptor
= String
-> FieldTypeDescriptor ResponseEcho
-> FieldAccessor Response ResponseEcho
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"echo"
(MessageOrGroup -> FieldTypeDescriptor ResponseEcho
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseEcho)
(Lens' Response (Maybe ResponseEcho)
-> FieldAccessor Response ResponseEcho
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'echo" 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'echo")) ::
Data.ProtoLens.FieldDescriptor Response
flush__field_descriptor :: FieldDescriptor Response
flush__field_descriptor
= String
-> FieldTypeDescriptor ResponseFlush
-> FieldAccessor Response ResponseFlush
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"flush"
(MessageOrGroup -> FieldTypeDescriptor ResponseFlush
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseFlush)
(Lens' Response (Maybe ResponseFlush)
-> FieldAccessor Response ResponseFlush
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'flush" 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'flush")) ::
Data.ProtoLens.FieldDescriptor Response
info__field_descriptor :: FieldDescriptor Response
info__field_descriptor
= String
-> FieldTypeDescriptor ResponseInfo
-> FieldAccessor Response ResponseInfo
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"info"
(MessageOrGroup -> FieldTypeDescriptor ResponseInfo
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseInfo)
(Lens' Response (Maybe ResponseInfo)
-> FieldAccessor Response ResponseInfo
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'info" 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'info")) ::
Data.ProtoLens.FieldDescriptor Response
setOption__field_descriptor :: FieldDescriptor Response
setOption__field_descriptor
= String
-> FieldTypeDescriptor ResponseSetOption
-> FieldAccessor Response ResponseSetOption
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"set_option"
(MessageOrGroup -> FieldTypeDescriptor ResponseSetOption
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseSetOption)
(Lens' Response (Maybe ResponseSetOption)
-> FieldAccessor Response ResponseSetOption
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'setOption" 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'setOption")) ::
Data.ProtoLens.FieldDescriptor Response
initChain__field_descriptor :: FieldDescriptor Response
initChain__field_descriptor
= String
-> FieldTypeDescriptor ResponseInitChain
-> FieldAccessor Response ResponseInitChain
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"init_chain"
(MessageOrGroup -> FieldTypeDescriptor ResponseInitChain
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseInitChain)
(Lens' Response (Maybe ResponseInitChain)
-> FieldAccessor Response ResponseInitChain
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'initChain" 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'initChain")) ::
Data.ProtoLens.FieldDescriptor Response
query__field_descriptor :: FieldDescriptor Response
query__field_descriptor
= String
-> FieldTypeDescriptor ResponseQuery
-> FieldAccessor Response ResponseQuery
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"query"
(MessageOrGroup -> FieldTypeDescriptor ResponseQuery
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseQuery)
(Lens' Response (Maybe ResponseQuery)
-> FieldAccessor Response ResponseQuery
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'query" 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'query")) ::
Data.ProtoLens.FieldDescriptor Response
beginBlock__field_descriptor :: FieldDescriptor Response
beginBlock__field_descriptor
= String
-> FieldTypeDescriptor ResponseBeginBlock
-> FieldAccessor Response ResponseBeginBlock
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"begin_block"
(MessageOrGroup -> FieldTypeDescriptor ResponseBeginBlock
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseBeginBlock)
(Lens' Response (Maybe ResponseBeginBlock)
-> FieldAccessor Response ResponseBeginBlock
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'beginBlock" 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'beginBlock")) ::
Data.ProtoLens.FieldDescriptor Response
checkTx__field_descriptor :: FieldDescriptor Response
checkTx__field_descriptor
= String
-> FieldTypeDescriptor ResponseCheckTx
-> FieldAccessor Response ResponseCheckTx
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"check_tx"
(MessageOrGroup -> FieldTypeDescriptor ResponseCheckTx
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseCheckTx)
(Lens' Response (Maybe ResponseCheckTx)
-> FieldAccessor Response ResponseCheckTx
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'checkTx" 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'checkTx")) ::
Data.ProtoLens.FieldDescriptor Response
deliverTx__field_descriptor :: FieldDescriptor Response
deliverTx__field_descriptor
= String
-> FieldTypeDescriptor ResponseDeliverTx
-> FieldAccessor Response ResponseDeliverTx
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"deliver_tx"
(MessageOrGroup -> FieldTypeDescriptor ResponseDeliverTx
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseDeliverTx)
(Lens' Response (Maybe ResponseDeliverTx)
-> FieldAccessor Response ResponseDeliverTx
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'deliverTx" 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'deliverTx")) ::
Data.ProtoLens.FieldDescriptor Response
endBlock__field_descriptor :: FieldDescriptor Response
endBlock__field_descriptor
= String
-> FieldTypeDescriptor ResponseEndBlock
-> FieldAccessor Response ResponseEndBlock
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"end_block"
(MessageOrGroup -> FieldTypeDescriptor ResponseEndBlock
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseEndBlock)
(Lens' Response (Maybe ResponseEndBlock)
-> FieldAccessor Response ResponseEndBlock
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'endBlock" 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'endBlock")) ::
Data.ProtoLens.FieldDescriptor Response
commit__field_descriptor :: FieldDescriptor Response
commit__field_descriptor
= String
-> FieldTypeDescriptor ResponseCommit
-> FieldAccessor Response ResponseCommit
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"commit"
(MessageOrGroup -> FieldTypeDescriptor ResponseCommit
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ResponseCommit)
(Lens' Response (Maybe ResponseCommit)
-> FieldAccessor Response ResponseCommit
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'commit" 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'commit")) ::
Data.ProtoLens.FieldDescriptor Response
in
[(Tag, FieldDescriptor Response)]
-> Map Tag (FieldDescriptor Response)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Response
exception__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor Response
echo__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor Response
flush__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor Response
info__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor Response
setOption__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 6, FieldDescriptor Response
initChain__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 7, FieldDescriptor Response
query__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 8, FieldDescriptor Response
beginBlock__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 9, FieldDescriptor Response
checkTx__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 10, FieldDescriptor Response
deliverTx__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 11, FieldDescriptor Response
endBlock__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 12, FieldDescriptor Response
commit__field_descriptor)]
unknownFields :: LensLike' f Response FieldSet
unknownFields
= (Response -> FieldSet)
-> (Response -> FieldSet -> Response) -> Lens' Response FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Response -> FieldSet
_Response'_unknownFields
(\ x__ :: Response
x__ y__ :: FieldSet
y__ -> Response
x__ {_Response'_unknownFields :: FieldSet
_Response'_unknownFields = FieldSet
y__})
defMessage :: Response
defMessage
= $WResponse'_constructor :: Maybe Response'Value -> FieldSet -> Response
Response'_constructor
{_Response'value :: Maybe Response'Value
_Response'value = Maybe Response'Value
forall a. Maybe a
Prelude.Nothing, _Response'_unknownFields :: FieldSet
_Response'_unknownFields = []}
parseMessage :: Parser Response
parseMessage
= let
loop :: Response -> Data.ProtoLens.Encoding.Bytes.Parser Response
loop :: Response -> Parser Response
loop x :: Response
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]))))
Response -> Parser Response
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter Response Response FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Response -> Response
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 Response Response FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Response
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do ResponseException
y <- Parser ResponseException -> String -> Parser ResponseException
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseException -> Parser ResponseException
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 ResponseException
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"exception"
Response -> Parser Response
loop
(Setter Response Response ResponseException ResponseException
-> ResponseException -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "exception" 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 @"exception") ResponseException
y Response
x)
18
-> do ResponseEcho
y <- Parser ResponseEcho -> String -> Parser ResponseEcho
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseEcho -> Parser ResponseEcho
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 ResponseEcho
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"echo"
Response -> Parser Response
loop (Setter Response Response ResponseEcho ResponseEcho
-> ResponseEcho -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "echo" 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 @"echo") ResponseEcho
y Response
x)
26
-> do ResponseFlush
y <- Parser ResponseFlush -> String -> Parser ResponseFlush
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseFlush -> Parser ResponseFlush
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 ResponseFlush
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"flush"
Response -> Parser Response
loop (Setter Response Response ResponseFlush ResponseFlush
-> ResponseFlush -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "flush" 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 @"flush") ResponseFlush
y Response
x)
34
-> do ResponseInfo
y <- Parser ResponseInfo -> String -> Parser ResponseInfo
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseInfo -> Parser ResponseInfo
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 ResponseInfo
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"info"
Response -> Parser Response
loop (Setter Response Response ResponseInfo ResponseInfo
-> ResponseInfo -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "info" 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 @"info") ResponseInfo
y Response
x)
42
-> do ResponseSetOption
y <- Parser ResponseSetOption -> String -> Parser ResponseSetOption
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseSetOption -> Parser ResponseSetOption
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 ResponseSetOption
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"set_option"
Response -> Parser Response
loop
(Setter Response Response ResponseSetOption ResponseSetOption
-> ResponseSetOption -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "setOption" 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 @"setOption") ResponseSetOption
y Response
x)
50
-> do ResponseInitChain
y <- Parser ResponseInitChain -> String -> Parser ResponseInitChain
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseInitChain -> Parser ResponseInitChain
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 ResponseInitChain
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"init_chain"
Response -> Parser Response
loop
(Setter Response Response ResponseInitChain ResponseInitChain
-> ResponseInitChain -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "initChain" 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 @"initChain") ResponseInitChain
y Response
x)
58
-> do ResponseQuery
y <- Parser ResponseQuery -> String -> Parser ResponseQuery
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseQuery -> Parser ResponseQuery
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 ResponseQuery
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"query"
Response -> Parser Response
loop (Setter Response Response ResponseQuery ResponseQuery
-> ResponseQuery -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "query" 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 @"query") ResponseQuery
y Response
x)
66
-> do ResponseBeginBlock
y <- Parser ResponseBeginBlock -> String -> Parser ResponseBeginBlock
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseBeginBlock -> Parser ResponseBeginBlock
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 ResponseBeginBlock
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"begin_block"
Response -> Parser Response
loop
(Setter Response Response ResponseBeginBlock ResponseBeginBlock
-> ResponseBeginBlock -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "beginBlock" 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 @"beginBlock") ResponseBeginBlock
y Response
x)
74
-> do ResponseCheckTx
y <- Parser ResponseCheckTx -> String -> Parser ResponseCheckTx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseCheckTx -> Parser ResponseCheckTx
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 ResponseCheckTx
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"check_tx"
Response -> Parser Response
loop (Setter Response Response ResponseCheckTx ResponseCheckTx
-> ResponseCheckTx -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "checkTx" 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 @"checkTx") ResponseCheckTx
y Response
x)
82
-> do ResponseDeliverTx
y <- Parser ResponseDeliverTx -> String -> Parser ResponseDeliverTx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseDeliverTx -> Parser ResponseDeliverTx
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 ResponseDeliverTx
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"deliver_tx"
Response -> Parser Response
loop
(Setter Response Response ResponseDeliverTx ResponseDeliverTx
-> ResponseDeliverTx -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "deliverTx" 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 @"deliverTx") ResponseDeliverTx
y Response
x)
90
-> do ResponseEndBlock
y <- Parser ResponseEndBlock -> String -> Parser ResponseEndBlock
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseEndBlock -> Parser ResponseEndBlock
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 ResponseEndBlock
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"end_block"
Response -> Parser Response
loop
(Setter Response Response ResponseEndBlock ResponseEndBlock
-> ResponseEndBlock -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "endBlock" 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 @"endBlock") ResponseEndBlock
y Response
x)
98
-> do ResponseCommit
y <- Parser ResponseCommit -> String -> Parser ResponseCommit
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ResponseCommit -> Parser ResponseCommit
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 ResponseCommit
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"commit"
Response -> Parser Response
loop (Setter Response Response ResponseCommit ResponseCommit
-> ResponseCommit -> Response -> Response
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "commit" 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 @"commit") ResponseCommit
y Response
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
Response -> Parser Response
loop
(Setter Response Response FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Response -> Response
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 Response Response FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Response
x)
in
Parser Response -> String -> Parser Response
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Response -> Parser Response
loop Response
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "Response"
buildMessage :: Response -> Builder
buildMessage
= \ _x :: Response
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe Response'Value)
Response
Response
(Maybe Response'Value)
(Maybe Response'Value)
-> Response -> Maybe Response'Value
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'value" 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'value") Response
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just (Response'Exception v :: ResponseException
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (ResponseException -> ByteString)
-> ResponseException
-> 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))
ResponseException -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseException
v)
(Prelude.Just (Response'Echo v :: ResponseEcho
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (ResponseEcho -> ByteString) -> ResponseEcho -> 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))
ResponseEcho -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseEcho
v)
(Prelude.Just (Response'Flush v :: ResponseFlush
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
((ByteString -> Builder)
-> (ResponseFlush -> ByteString) -> ResponseFlush -> 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))
ResponseFlush -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseFlush
v)
(Prelude.Just (Response'Info v :: ResponseInfo
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 34)
((ByteString -> Builder)
-> (ResponseInfo -> ByteString) -> ResponseInfo -> 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))
ResponseInfo -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseInfo
v)
(Prelude.Just (Response'SetOption v :: ResponseSetOption
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 42)
((ByteString -> Builder)
-> (ResponseSetOption -> ByteString)
-> ResponseSetOption
-> 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))
ResponseSetOption -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseSetOption
v)
(Prelude.Just (Response'InitChain v :: ResponseInitChain
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 50)
((ByteString -> Builder)
-> (ResponseInitChain -> ByteString)
-> ResponseInitChain
-> 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))
ResponseInitChain -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseInitChain
v)
(Prelude.Just (Response'Query v :: ResponseQuery
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 58)
((ByteString -> Builder)
-> (ResponseQuery -> ByteString) -> ResponseQuery -> 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))
ResponseQuery -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseQuery
v)
(Prelude.Just (Response'BeginBlock v :: ResponseBeginBlock
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 66)
((ByteString -> Builder)
-> (ResponseBeginBlock -> ByteString)
-> ResponseBeginBlock
-> 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))
ResponseBeginBlock -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseBeginBlock
v)
(Prelude.Just (Response'CheckTx v :: ResponseCheckTx
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 74)
((ByteString -> Builder)
-> (ResponseCheckTx -> ByteString) -> ResponseCheckTx -> 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))
ResponseCheckTx -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseCheckTx
v)
(Prelude.Just (Response'DeliverTx v :: ResponseDeliverTx
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 82)
((ByteString -> Builder)
-> (ResponseDeliverTx -> ByteString)
-> ResponseDeliverTx
-> 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))
ResponseDeliverTx -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseDeliverTx
v)
(Prelude.Just (Response'EndBlock v :: ResponseEndBlock
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 90)
((ByteString -> Builder)
-> (ResponseEndBlock -> ByteString) -> ResponseEndBlock -> 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))
ResponseEndBlock -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseEndBlock
v)
(Prelude.Just (Response'Commit v :: ResponseCommit
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 98)
((ByteString -> Builder)
-> (ResponseCommit -> ByteString) -> ResponseCommit -> 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))
ResponseCommit -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ResponseCommit
v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet Response Response FieldSet FieldSet
-> Response -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Response Response FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Response
_x))
instance Control.DeepSeq.NFData Response where
rnf :: Response -> ()
rnf
= \ x__ :: Response
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Response -> FieldSet
_Response'_unknownFields Response
x__)
(Maybe Response'Value -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Response -> Maybe Response'Value
_Response'value Response
x__) ())
instance Control.DeepSeq.NFData Response'Value where
rnf :: Response'Value -> ()
rnf (Response'Exception x__ :: ResponseException
x__) = ResponseException -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseException
x__
rnf (Response'Echo x__ :: ResponseEcho
x__) = ResponseEcho -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseEcho
x__
rnf (Response'Flush x__ :: ResponseFlush
x__) = ResponseFlush -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseFlush
x__
rnf (Response'Info x__ :: ResponseInfo
x__) = ResponseInfo -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseInfo
x__
rnf (Response'SetOption x__ :: ResponseSetOption
x__) = ResponseSetOption -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseSetOption
x__
rnf (Response'InitChain x__ :: ResponseInitChain
x__) = ResponseInitChain -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseInitChain
x__
rnf (Response'Query x__ :: ResponseQuery
x__) = ResponseQuery -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseQuery
x__
rnf (Response'BeginBlock x__ :: ResponseBeginBlock
x__) = ResponseBeginBlock -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseBeginBlock
x__
rnf (Response'CheckTx x__ :: ResponseCheckTx
x__) = ResponseCheckTx -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseCheckTx
x__
rnf (Response'DeliverTx x__ :: ResponseDeliverTx
x__) = ResponseDeliverTx -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseDeliverTx
x__
rnf (Response'EndBlock x__ :: ResponseEndBlock
x__) = ResponseEndBlock -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseEndBlock
x__
rnf (Response'Commit x__ :: ResponseCommit
x__) = ResponseCommit -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf ResponseCommit
x__
_Response'Exception ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseException
_Response'Exception :: p ResponseException (f ResponseException)
-> p Response'Value (f Response'Value)
_Response'Exception
= (ResponseException -> Response'Value)
-> (Response'Value -> Maybe ResponseException)
-> Prism
Response'Value Response'Value ResponseException ResponseException
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseException -> Response'Value
Response'Exception
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'Exception p__val :: ResponseException
p__val) -> ResponseException -> Maybe ResponseException
forall a. a -> Maybe a
Prelude.Just ResponseException
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseException
forall a. Maybe a
Prelude.Nothing)
_Response'Echo ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseEcho
_Response'Echo :: p ResponseEcho (f ResponseEcho)
-> p Response'Value (f Response'Value)
_Response'Echo
= (ResponseEcho -> Response'Value)
-> (Response'Value -> Maybe ResponseEcho)
-> Prism Response'Value Response'Value ResponseEcho ResponseEcho
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseEcho -> Response'Value
Response'Echo
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'Echo p__val :: ResponseEcho
p__val) -> ResponseEcho -> Maybe ResponseEcho
forall a. a -> Maybe a
Prelude.Just ResponseEcho
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseEcho
forall a. Maybe a
Prelude.Nothing)
_Response'Flush ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseFlush
_Response'Flush :: p ResponseFlush (f ResponseFlush)
-> p Response'Value (f Response'Value)
_Response'Flush
= (ResponseFlush -> Response'Value)
-> (Response'Value -> Maybe ResponseFlush)
-> Prism Response'Value Response'Value ResponseFlush ResponseFlush
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseFlush -> Response'Value
Response'Flush
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'Flush p__val :: ResponseFlush
p__val) -> ResponseFlush -> Maybe ResponseFlush
forall a. a -> Maybe a
Prelude.Just ResponseFlush
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseFlush
forall a. Maybe a
Prelude.Nothing)
_Response'Info ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseInfo
_Response'Info :: p ResponseInfo (f ResponseInfo)
-> p Response'Value (f Response'Value)
_Response'Info
= (ResponseInfo -> Response'Value)
-> (Response'Value -> Maybe ResponseInfo)
-> Prism Response'Value Response'Value ResponseInfo ResponseInfo
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseInfo -> Response'Value
Response'Info
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'Info p__val :: ResponseInfo
p__val) -> ResponseInfo -> Maybe ResponseInfo
forall a. a -> Maybe a
Prelude.Just ResponseInfo
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseInfo
forall a. Maybe a
Prelude.Nothing)
_Response'SetOption ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseSetOption
_Response'SetOption :: p ResponseSetOption (f ResponseSetOption)
-> p Response'Value (f Response'Value)
_Response'SetOption
= (ResponseSetOption -> Response'Value)
-> (Response'Value -> Maybe ResponseSetOption)
-> Prism
Response'Value Response'Value ResponseSetOption ResponseSetOption
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseSetOption -> Response'Value
Response'SetOption
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'SetOption p__val :: ResponseSetOption
p__val) -> ResponseSetOption -> Maybe ResponseSetOption
forall a. a -> Maybe a
Prelude.Just ResponseSetOption
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseSetOption
forall a. Maybe a
Prelude.Nothing)
_Response'InitChain ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseInitChain
_Response'InitChain :: p ResponseInitChain (f ResponseInitChain)
-> p Response'Value (f Response'Value)
_Response'InitChain
= (ResponseInitChain -> Response'Value)
-> (Response'Value -> Maybe ResponseInitChain)
-> Prism
Response'Value Response'Value ResponseInitChain ResponseInitChain
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseInitChain -> Response'Value
Response'InitChain
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'InitChain p__val :: ResponseInitChain
p__val) -> ResponseInitChain -> Maybe ResponseInitChain
forall a. a -> Maybe a
Prelude.Just ResponseInitChain
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseInitChain
forall a. Maybe a
Prelude.Nothing)
_Response'Query ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseQuery
_Response'Query :: p ResponseQuery (f ResponseQuery)
-> p Response'Value (f Response'Value)
_Response'Query
= (ResponseQuery -> Response'Value)
-> (Response'Value -> Maybe ResponseQuery)
-> Prism Response'Value Response'Value ResponseQuery ResponseQuery
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseQuery -> Response'Value
Response'Query
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'Query p__val :: ResponseQuery
p__val) -> ResponseQuery -> Maybe ResponseQuery
forall a. a -> Maybe a
Prelude.Just ResponseQuery
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseQuery
forall a. Maybe a
Prelude.Nothing)
_Response'BeginBlock ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseBeginBlock
_Response'BeginBlock :: p ResponseBeginBlock (f ResponseBeginBlock)
-> p Response'Value (f Response'Value)
_Response'BeginBlock
= (ResponseBeginBlock -> Response'Value)
-> (Response'Value -> Maybe ResponseBeginBlock)
-> Prism
Response'Value Response'Value ResponseBeginBlock ResponseBeginBlock
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseBeginBlock -> Response'Value
Response'BeginBlock
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'BeginBlock p__val :: ResponseBeginBlock
p__val) -> ResponseBeginBlock -> Maybe ResponseBeginBlock
forall a. a -> Maybe a
Prelude.Just ResponseBeginBlock
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseBeginBlock
forall a. Maybe a
Prelude.Nothing)
_Response'CheckTx ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseCheckTx
_Response'CheckTx :: p ResponseCheckTx (f ResponseCheckTx)
-> p Response'Value (f Response'Value)
_Response'CheckTx
= (ResponseCheckTx -> Response'Value)
-> (Response'Value -> Maybe ResponseCheckTx)
-> Prism
Response'Value Response'Value ResponseCheckTx ResponseCheckTx
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseCheckTx -> Response'Value
Response'CheckTx
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'CheckTx p__val :: ResponseCheckTx
p__val) -> ResponseCheckTx -> Maybe ResponseCheckTx
forall a. a -> Maybe a
Prelude.Just ResponseCheckTx
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseCheckTx
forall a. Maybe a
Prelude.Nothing)
_Response'DeliverTx ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseDeliverTx
_Response'DeliverTx :: p ResponseDeliverTx (f ResponseDeliverTx)
-> p Response'Value (f Response'Value)
_Response'DeliverTx
= (ResponseDeliverTx -> Response'Value)
-> (Response'Value -> Maybe ResponseDeliverTx)
-> Prism
Response'Value Response'Value ResponseDeliverTx ResponseDeliverTx
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseDeliverTx -> Response'Value
Response'DeliverTx
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'DeliverTx p__val :: ResponseDeliverTx
p__val) -> ResponseDeliverTx -> Maybe ResponseDeliverTx
forall a. a -> Maybe a
Prelude.Just ResponseDeliverTx
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseDeliverTx
forall a. Maybe a
Prelude.Nothing)
_Response'EndBlock ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseEndBlock
_Response'EndBlock :: p ResponseEndBlock (f ResponseEndBlock)
-> p Response'Value (f Response'Value)
_Response'EndBlock
= (ResponseEndBlock -> Response'Value)
-> (Response'Value -> Maybe ResponseEndBlock)
-> Prism
Response'Value Response'Value ResponseEndBlock ResponseEndBlock
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseEndBlock -> Response'Value
Response'EndBlock
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'EndBlock p__val :: ResponseEndBlock
p__val) -> ResponseEndBlock -> Maybe ResponseEndBlock
forall a. a -> Maybe a
Prelude.Just ResponseEndBlock
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseEndBlock
forall a. Maybe a
Prelude.Nothing)
_Response'Commit ::
Data.ProtoLens.Prism.Prism' Response'Value ResponseCommit
_Response'Commit :: p ResponseCommit (f ResponseCommit)
-> p Response'Value (f Response'Value)
_Response'Commit
= (ResponseCommit -> Response'Value)
-> (Response'Value -> Maybe ResponseCommit)
-> Prism
Response'Value Response'Value ResponseCommit ResponseCommit
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
ResponseCommit -> Response'Value
Response'Commit
(\ p__ :: Response'Value
p__
-> case Response'Value
p__ of
(Response'Commit p__val :: ResponseCommit
p__val) -> ResponseCommit -> Maybe ResponseCommit
forall a. a -> Maybe a
Prelude.Just ResponseCommit
p__val
_otherwise :: Response'Value
_otherwise -> Maybe ResponseCommit
forall a. Maybe a
Prelude.Nothing)
data ResponseBeginBlock
= ResponseBeginBlock'_constructor {ResponseBeginBlock -> Vector Event
_ResponseBeginBlock'events :: !(Data.Vector.Vector Event),
ResponseBeginBlock -> FieldSet
_ResponseBeginBlock'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseBeginBlock -> ResponseBeginBlock -> Bool
(ResponseBeginBlock -> ResponseBeginBlock -> Bool)
-> (ResponseBeginBlock -> ResponseBeginBlock -> Bool)
-> Eq ResponseBeginBlock
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
$c/= :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
== :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
$c== :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
Prelude.Eq, Eq ResponseBeginBlock
Eq ResponseBeginBlock =>
(ResponseBeginBlock -> ResponseBeginBlock -> Ordering)
-> (ResponseBeginBlock -> ResponseBeginBlock -> Bool)
-> (ResponseBeginBlock -> ResponseBeginBlock -> Bool)
-> (ResponseBeginBlock -> ResponseBeginBlock -> Bool)
-> (ResponseBeginBlock -> ResponseBeginBlock -> Bool)
-> (ResponseBeginBlock -> ResponseBeginBlock -> ResponseBeginBlock)
-> (ResponseBeginBlock -> ResponseBeginBlock -> ResponseBeginBlock)
-> Ord ResponseBeginBlock
ResponseBeginBlock -> ResponseBeginBlock -> Bool
ResponseBeginBlock -> ResponseBeginBlock -> Ordering
ResponseBeginBlock -> ResponseBeginBlock -> ResponseBeginBlock
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 :: ResponseBeginBlock -> ResponseBeginBlock -> ResponseBeginBlock
$cmin :: ResponseBeginBlock -> ResponseBeginBlock -> ResponseBeginBlock
max :: ResponseBeginBlock -> ResponseBeginBlock -> ResponseBeginBlock
$cmax :: ResponseBeginBlock -> ResponseBeginBlock -> ResponseBeginBlock
>= :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
$c>= :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
> :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
$c> :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
<= :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
$c<= :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
< :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
$c< :: ResponseBeginBlock -> ResponseBeginBlock -> Bool
compare :: ResponseBeginBlock -> ResponseBeginBlock -> Ordering
$ccompare :: ResponseBeginBlock -> ResponseBeginBlock -> Ordering
$cp1Ord :: Eq ResponseBeginBlock
Prelude.Ord)
instance Prelude.Show ResponseBeginBlock where
showsPrec :: Int -> ResponseBeginBlock -> ShowS
showsPrec _ __x :: ResponseBeginBlock
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseBeginBlock -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseBeginBlock
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResponseBeginBlock "events" [Event] where
fieldOf :: Proxy# "events"
-> ([Event] -> f [Event])
-> ResponseBeginBlock
-> f ResponseBeginBlock
fieldOf _
= ((Vector Event -> f (Vector Event))
-> ResponseBeginBlock -> f ResponseBeginBlock)
-> (([Event] -> f [Event]) -> Vector Event -> f (Vector Event))
-> ([Event] -> f [Event])
-> ResponseBeginBlock
-> f ResponseBeginBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseBeginBlock -> Vector Event)
-> (ResponseBeginBlock -> Vector Event -> ResponseBeginBlock)
-> Lens
ResponseBeginBlock ResponseBeginBlock (Vector Event) (Vector Event)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseBeginBlock -> Vector Event
_ResponseBeginBlock'events
(\ x__ :: ResponseBeginBlock
x__ y__ :: Vector Event
y__ -> ResponseBeginBlock
x__ {_ResponseBeginBlock'events :: Vector Event
_ResponseBeginBlock'events = Vector Event
y__}))
((Vector Event -> [Event])
-> (Vector Event -> [Event] -> Vector Event)
-> Lens (Vector Event) (Vector Event) [Event] [Event]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector Event -> [Event]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [Event]
y__ -> [Event] -> Vector Event
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Event]
y__))
instance Data.ProtoLens.Field.HasField ResponseBeginBlock "vec'events" (Data.Vector.Vector Event) where
fieldOf :: Proxy# "vec'events"
-> (Vector Event -> f (Vector Event))
-> ResponseBeginBlock
-> f ResponseBeginBlock
fieldOf _
= ((Vector Event -> f (Vector Event))
-> ResponseBeginBlock -> f ResponseBeginBlock)
-> ((Vector Event -> f (Vector Event))
-> Vector Event -> f (Vector Event))
-> (Vector Event -> f (Vector Event))
-> ResponseBeginBlock
-> f ResponseBeginBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseBeginBlock -> Vector Event)
-> (ResponseBeginBlock -> Vector Event -> ResponseBeginBlock)
-> Lens
ResponseBeginBlock ResponseBeginBlock (Vector Event) (Vector Event)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseBeginBlock -> Vector Event
_ResponseBeginBlock'events
(\ x__ :: ResponseBeginBlock
x__ y__ :: Vector Event
y__ -> ResponseBeginBlock
x__ {_ResponseBeginBlock'events :: Vector Event
_ResponseBeginBlock'events = Vector Event
y__}))
(Vector Event -> f (Vector Event))
-> Vector Event -> f (Vector Event)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResponseBeginBlock where
messageName :: Proxy ResponseBeginBlock -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseBeginBlock"
fieldsByTag :: Map Tag (FieldDescriptor ResponseBeginBlock)
fieldsByTag
= let
events__field_descriptor :: FieldDescriptor ResponseBeginBlock
events__field_descriptor
= String
-> FieldTypeDescriptor Event
-> FieldAccessor ResponseBeginBlock Event
-> FieldDescriptor ResponseBeginBlock
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"events"
(MessageOrGroup -> FieldTypeDescriptor Event
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Event)
(Packing
-> Lens' ResponseBeginBlock [Event]
-> FieldAccessor ResponseBeginBlock Event
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "events" 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 @"events")) ::
Data.ProtoLens.FieldDescriptor ResponseBeginBlock
in
[(Tag, FieldDescriptor ResponseBeginBlock)]
-> Map Tag (FieldDescriptor ResponseBeginBlock)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResponseBeginBlock
events__field_descriptor)]
unknownFields :: LensLike' f ResponseBeginBlock FieldSet
unknownFields
= (ResponseBeginBlock -> FieldSet)
-> (ResponseBeginBlock -> FieldSet -> ResponseBeginBlock)
-> Lens' ResponseBeginBlock FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseBeginBlock -> FieldSet
_ResponseBeginBlock'_unknownFields
(\ x__ :: ResponseBeginBlock
x__ y__ :: FieldSet
y__ -> ResponseBeginBlock
x__ {_ResponseBeginBlock'_unknownFields :: FieldSet
_ResponseBeginBlock'_unknownFields = FieldSet
y__})
defMessage :: ResponseBeginBlock
defMessage
= $WResponseBeginBlock'_constructor :: Vector Event -> FieldSet -> ResponseBeginBlock
ResponseBeginBlock'_constructor
{_ResponseBeginBlock'events :: Vector Event
_ResponseBeginBlock'events = Vector Event
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_ResponseBeginBlock'_unknownFields :: FieldSet
_ResponseBeginBlock'_unknownFields = []}
parseMessage :: Parser ResponseBeginBlock
parseMessage
= let
loop ::
ResponseBeginBlock
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Event
-> Data.ProtoLens.Encoding.Bytes.Parser ResponseBeginBlock
loop :: ResponseBeginBlock
-> Growing Vector RealWorld Event -> Parser ResponseBeginBlock
loop x :: ResponseBeginBlock
x mutable'events :: Growing Vector RealWorld Event
mutable'events
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector Event
frozen'events <- IO (Vector Event) -> Parser (Vector Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Event -> IO (Vector Event)
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 Event
Growing Vector (PrimState IO) Event
mutable'events)
(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]))))
ResponseBeginBlock -> Parser ResponseBeginBlock
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseBeginBlock ResponseBeginBlock FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> ResponseBeginBlock
-> ResponseBeginBlock
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 ResponseBeginBlock ResponseBeginBlock FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
ResponseBeginBlock ResponseBeginBlock (Vector Event) (Vector Event)
-> Vector Event -> ResponseBeginBlock -> ResponseBeginBlock
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'events" 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'events") Vector Event
frozen'events ResponseBeginBlock
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do !Event
y <- Parser Event -> String -> Parser Event
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Event -> Parser Event
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 Event
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"events"
Growing Vector RealWorld Event
v <- IO (Growing Vector RealWorld Event)
-> Parser (Growing Vector RealWorld Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Event
-> Event -> IO (Growing Vector (PrimState IO) Event)
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 Event
Growing Vector (PrimState IO) Event
mutable'events Event
y)
ResponseBeginBlock
-> Growing Vector RealWorld Event -> Parser ResponseBeginBlock
loop ResponseBeginBlock
x Growing Vector RealWorld Event
v
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseBeginBlock
-> Growing Vector RealWorld Event -> Parser ResponseBeginBlock
loop
(Setter ResponseBeginBlock ResponseBeginBlock FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> ResponseBeginBlock
-> ResponseBeginBlock
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 ResponseBeginBlock ResponseBeginBlock FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseBeginBlock
x)
Growing Vector RealWorld Event
mutable'events
in
Parser ResponseBeginBlock -> String -> Parser ResponseBeginBlock
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld Event
mutable'events <- IO (Growing Vector RealWorld Event)
-> Parser (Growing Vector RealWorld Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld Event)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
ResponseBeginBlock
-> Growing Vector RealWorld Event -> Parser ResponseBeginBlock
loop ResponseBeginBlock
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld Event
mutable'events)
"ResponseBeginBlock"
buildMessage :: ResponseBeginBlock -> Builder
buildMessage
= \ _x :: ResponseBeginBlock
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((Event -> Builder) -> Vector Event -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: Event
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (Event -> ByteString) -> Event -> 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))
Event -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Event
_v))
(FoldLike
(Vector Event)
ResponseBeginBlock
ResponseBeginBlock
(Vector Event)
(Vector Event)
-> ResponseBeginBlock -> Vector Event
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'events" 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'events") ResponseBeginBlock
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet ResponseBeginBlock ResponseBeginBlock FieldSet FieldSet
-> ResponseBeginBlock -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet ResponseBeginBlock ResponseBeginBlock FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseBeginBlock
_x))
instance Control.DeepSeq.NFData ResponseBeginBlock where
rnf :: ResponseBeginBlock -> ()
rnf
= \ x__ :: ResponseBeginBlock
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseBeginBlock -> FieldSet
_ResponseBeginBlock'_unknownFields ResponseBeginBlock
x__)
(Vector Event -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ResponseBeginBlock -> Vector Event
_ResponseBeginBlock'events ResponseBeginBlock
x__) ())
data ResponseCheckTx
= ResponseCheckTx'_constructor {ResponseCheckTx -> Word32
_ResponseCheckTx'code :: !Data.Word.Word32,
ResponseCheckTx -> ByteString
_ResponseCheckTx'data' :: !Data.ByteString.ByteString,
ResponseCheckTx -> Text
_ResponseCheckTx'log :: !Data.Text.Text,
ResponseCheckTx -> Text
_ResponseCheckTx'info :: !Data.Text.Text,
ResponseCheckTx -> Int64
_ResponseCheckTx'gasWanted :: !Data.Int.Int64,
ResponseCheckTx -> Int64
_ResponseCheckTx'gasUsed :: !Data.Int.Int64,
ResponseCheckTx -> Vector Event
_ResponseCheckTx'events :: !(Data.Vector.Vector Event),
ResponseCheckTx -> Text
_ResponseCheckTx'codespace :: !Data.Text.Text,
ResponseCheckTx -> FieldSet
_ResponseCheckTx'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseCheckTx -> ResponseCheckTx -> Bool
(ResponseCheckTx -> ResponseCheckTx -> Bool)
-> (ResponseCheckTx -> ResponseCheckTx -> Bool)
-> Eq ResponseCheckTx
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseCheckTx -> ResponseCheckTx -> Bool
$c/= :: ResponseCheckTx -> ResponseCheckTx -> Bool
== :: ResponseCheckTx -> ResponseCheckTx -> Bool
$c== :: ResponseCheckTx -> ResponseCheckTx -> Bool
Prelude.Eq, Eq ResponseCheckTx
Eq ResponseCheckTx =>
(ResponseCheckTx -> ResponseCheckTx -> Ordering)
-> (ResponseCheckTx -> ResponseCheckTx -> Bool)
-> (ResponseCheckTx -> ResponseCheckTx -> Bool)
-> (ResponseCheckTx -> ResponseCheckTx -> Bool)
-> (ResponseCheckTx -> ResponseCheckTx -> Bool)
-> (ResponseCheckTx -> ResponseCheckTx -> ResponseCheckTx)
-> (ResponseCheckTx -> ResponseCheckTx -> ResponseCheckTx)
-> Ord ResponseCheckTx
ResponseCheckTx -> ResponseCheckTx -> Bool
ResponseCheckTx -> ResponseCheckTx -> Ordering
ResponseCheckTx -> ResponseCheckTx -> ResponseCheckTx
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 :: ResponseCheckTx -> ResponseCheckTx -> ResponseCheckTx
$cmin :: ResponseCheckTx -> ResponseCheckTx -> ResponseCheckTx
max :: ResponseCheckTx -> ResponseCheckTx -> ResponseCheckTx
$cmax :: ResponseCheckTx -> ResponseCheckTx -> ResponseCheckTx
>= :: ResponseCheckTx -> ResponseCheckTx -> Bool
$c>= :: ResponseCheckTx -> ResponseCheckTx -> Bool
> :: ResponseCheckTx -> ResponseCheckTx -> Bool
$c> :: ResponseCheckTx -> ResponseCheckTx -> Bool
<= :: ResponseCheckTx -> ResponseCheckTx -> Bool
$c<= :: ResponseCheckTx -> ResponseCheckTx -> Bool
< :: ResponseCheckTx -> ResponseCheckTx -> Bool
$c< :: ResponseCheckTx -> ResponseCheckTx -> Bool
compare :: ResponseCheckTx -> ResponseCheckTx -> Ordering
$ccompare :: ResponseCheckTx -> ResponseCheckTx -> Ordering
$cp1Ord :: Eq ResponseCheckTx
Prelude.Ord)
instance Prelude.Show ResponseCheckTx where
showsPrec :: Int -> ResponseCheckTx -> ShowS
showsPrec _ __x :: ResponseCheckTx
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseCheckTx -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseCheckTx
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResponseCheckTx "code" Data.Word.Word32 where
fieldOf :: Proxy# "code"
-> (Word32 -> f Word32) -> ResponseCheckTx -> f ResponseCheckTx
fieldOf _
= ((Word32 -> f Word32) -> ResponseCheckTx -> f ResponseCheckTx)
-> ((Word32 -> f Word32) -> Word32 -> f Word32)
-> (Word32 -> f Word32)
-> ResponseCheckTx
-> f ResponseCheckTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseCheckTx -> Word32)
-> (ResponseCheckTx -> Word32 -> ResponseCheckTx)
-> Lens ResponseCheckTx ResponseCheckTx Word32 Word32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCheckTx -> Word32
_ResponseCheckTx'code
(\ x__ :: ResponseCheckTx
x__ y__ :: Word32
y__ -> ResponseCheckTx
x__ {_ResponseCheckTx'code :: Word32
_ResponseCheckTx'code = Word32
y__}))
(Word32 -> f Word32) -> Word32 -> f Word32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseCheckTx "data'" Data.ByteString.ByteString where
fieldOf :: Proxy# "data'"
-> (ByteString -> f ByteString)
-> ResponseCheckTx
-> f ResponseCheckTx
fieldOf _
= ((ByteString -> f ByteString)
-> ResponseCheckTx -> f ResponseCheckTx)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> ResponseCheckTx
-> f ResponseCheckTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseCheckTx -> ByteString)
-> (ResponseCheckTx -> ByteString -> ResponseCheckTx)
-> Lens ResponseCheckTx ResponseCheckTx ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCheckTx -> ByteString
_ResponseCheckTx'data'
(\ x__ :: ResponseCheckTx
x__ y__ :: ByteString
y__ -> ResponseCheckTx
x__ {_ResponseCheckTx'data' :: ByteString
_ResponseCheckTx'data' = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseCheckTx "log" Data.Text.Text where
fieldOf :: Proxy# "log"
-> (Text -> f Text) -> ResponseCheckTx -> f ResponseCheckTx
fieldOf _
= ((Text -> f Text) -> ResponseCheckTx -> f ResponseCheckTx)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseCheckTx
-> f ResponseCheckTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseCheckTx -> Text)
-> (ResponseCheckTx -> Text -> ResponseCheckTx)
-> Lens ResponseCheckTx ResponseCheckTx Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCheckTx -> Text
_ResponseCheckTx'log
(\ x__ :: ResponseCheckTx
x__ y__ :: Text
y__ -> ResponseCheckTx
x__ {_ResponseCheckTx'log :: Text
_ResponseCheckTx'log = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseCheckTx "info" Data.Text.Text where
fieldOf :: Proxy# "info"
-> (Text -> f Text) -> ResponseCheckTx -> f ResponseCheckTx
fieldOf _
= ((Text -> f Text) -> ResponseCheckTx -> f ResponseCheckTx)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseCheckTx
-> f ResponseCheckTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseCheckTx -> Text)
-> (ResponseCheckTx -> Text -> ResponseCheckTx)
-> Lens ResponseCheckTx ResponseCheckTx Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCheckTx -> Text
_ResponseCheckTx'info
(\ x__ :: ResponseCheckTx
x__ y__ :: Text
y__ -> ResponseCheckTx
x__ {_ResponseCheckTx'info :: Text
_ResponseCheckTx'info = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseCheckTx "gasWanted" Data.Int.Int64 where
fieldOf :: Proxy# "gasWanted"
-> (Int64 -> f Int64) -> ResponseCheckTx -> f ResponseCheckTx
fieldOf _
= ((Int64 -> f Int64) -> ResponseCheckTx -> f ResponseCheckTx)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ResponseCheckTx
-> f ResponseCheckTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseCheckTx -> Int64)
-> (ResponseCheckTx -> Int64 -> ResponseCheckTx)
-> Lens ResponseCheckTx ResponseCheckTx Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCheckTx -> Int64
_ResponseCheckTx'gasWanted
(\ x__ :: ResponseCheckTx
x__ y__ :: Int64
y__ -> ResponseCheckTx
x__ {_ResponseCheckTx'gasWanted :: Int64
_ResponseCheckTx'gasWanted = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseCheckTx "gasUsed" Data.Int.Int64 where
fieldOf :: Proxy# "gasUsed"
-> (Int64 -> f Int64) -> ResponseCheckTx -> f ResponseCheckTx
fieldOf _
= ((Int64 -> f Int64) -> ResponseCheckTx -> f ResponseCheckTx)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ResponseCheckTx
-> f ResponseCheckTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseCheckTx -> Int64)
-> (ResponseCheckTx -> Int64 -> ResponseCheckTx)
-> Lens ResponseCheckTx ResponseCheckTx Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCheckTx -> Int64
_ResponseCheckTx'gasUsed
(\ x__ :: ResponseCheckTx
x__ y__ :: Int64
y__ -> ResponseCheckTx
x__ {_ResponseCheckTx'gasUsed :: Int64
_ResponseCheckTx'gasUsed = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseCheckTx "events" [Event] where
fieldOf :: Proxy# "events"
-> ([Event] -> f [Event]) -> ResponseCheckTx -> f ResponseCheckTx
fieldOf _
= ((Vector Event -> f (Vector Event))
-> ResponseCheckTx -> f ResponseCheckTx)
-> (([Event] -> f [Event]) -> Vector Event -> f (Vector Event))
-> ([Event] -> f [Event])
-> ResponseCheckTx
-> f ResponseCheckTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseCheckTx -> Vector Event)
-> (ResponseCheckTx -> Vector Event -> ResponseCheckTx)
-> Lens
ResponseCheckTx ResponseCheckTx (Vector Event) (Vector Event)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCheckTx -> Vector Event
_ResponseCheckTx'events
(\ x__ :: ResponseCheckTx
x__ y__ :: Vector Event
y__ -> ResponseCheckTx
x__ {_ResponseCheckTx'events :: Vector Event
_ResponseCheckTx'events = Vector Event
y__}))
((Vector Event -> [Event])
-> (Vector Event -> [Event] -> Vector Event)
-> Lens (Vector Event) (Vector Event) [Event] [Event]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector Event -> [Event]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [Event]
y__ -> [Event] -> Vector Event
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Event]
y__))
instance Data.ProtoLens.Field.HasField ResponseCheckTx "vec'events" (Data.Vector.Vector Event) where
fieldOf :: Proxy# "vec'events"
-> (Vector Event -> f (Vector Event))
-> ResponseCheckTx
-> f ResponseCheckTx
fieldOf _
= ((Vector Event -> f (Vector Event))
-> ResponseCheckTx -> f ResponseCheckTx)
-> ((Vector Event -> f (Vector Event))
-> Vector Event -> f (Vector Event))
-> (Vector Event -> f (Vector Event))
-> ResponseCheckTx
-> f ResponseCheckTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseCheckTx -> Vector Event)
-> (ResponseCheckTx -> Vector Event -> ResponseCheckTx)
-> Lens
ResponseCheckTx ResponseCheckTx (Vector Event) (Vector Event)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCheckTx -> Vector Event
_ResponseCheckTx'events
(\ x__ :: ResponseCheckTx
x__ y__ :: Vector Event
y__ -> ResponseCheckTx
x__ {_ResponseCheckTx'events :: Vector Event
_ResponseCheckTx'events = Vector Event
y__}))
(Vector Event -> f (Vector Event))
-> Vector Event -> f (Vector Event)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseCheckTx "codespace" Data.Text.Text where
fieldOf :: Proxy# "codespace"
-> (Text -> f Text) -> ResponseCheckTx -> f ResponseCheckTx
fieldOf _
= ((Text -> f Text) -> ResponseCheckTx -> f ResponseCheckTx)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseCheckTx
-> f ResponseCheckTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseCheckTx -> Text)
-> (ResponseCheckTx -> Text -> ResponseCheckTx)
-> Lens ResponseCheckTx ResponseCheckTx Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCheckTx -> Text
_ResponseCheckTx'codespace
(\ x__ :: ResponseCheckTx
x__ y__ :: Text
y__ -> ResponseCheckTx
x__ {_ResponseCheckTx'codespace :: Text
_ResponseCheckTx'codespace = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResponseCheckTx where
messageName :: Proxy ResponseCheckTx -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseCheckTx"
fieldsByTag :: Map Tag (FieldDescriptor ResponseCheckTx)
fieldsByTag
= let
code__field_descriptor :: FieldDescriptor ResponseCheckTx
code__field_descriptor
= String
-> FieldTypeDescriptor Word32
-> FieldAccessor ResponseCheckTx Word32
-> FieldDescriptor ResponseCheckTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"code"
(ScalarField Word32 -> FieldTypeDescriptor Word32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word32
Data.ProtoLens.UInt32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
(WireDefault Word32
-> Lens ResponseCheckTx ResponseCheckTx Word32 Word32
-> FieldAccessor ResponseCheckTx Word32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Word32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "code" 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 @"code")) ::
Data.ProtoLens.FieldDescriptor ResponseCheckTx
data'__field_descriptor :: FieldDescriptor ResponseCheckTx
data'__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor ResponseCheckTx ByteString
-> FieldDescriptor ResponseCheckTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"data"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens ResponseCheckTx ResponseCheckTx ByteString ByteString
-> FieldAccessor ResponseCheckTx ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'")) ::
Data.ProtoLens.FieldDescriptor ResponseCheckTx
log__field_descriptor :: FieldDescriptor ResponseCheckTx
log__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseCheckTx Text
-> FieldDescriptor ResponseCheckTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"log"
(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 ResponseCheckTx ResponseCheckTx Text Text
-> FieldAccessor ResponseCheckTx 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 "log" 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 @"log")) ::
Data.ProtoLens.FieldDescriptor ResponseCheckTx
info__field_descriptor :: FieldDescriptor ResponseCheckTx
info__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseCheckTx Text
-> FieldDescriptor ResponseCheckTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"info"
(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 ResponseCheckTx ResponseCheckTx Text Text
-> FieldAccessor ResponseCheckTx 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 "info" 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 @"info")) ::
Data.ProtoLens.FieldDescriptor ResponseCheckTx
gasWanted__field_descriptor :: FieldDescriptor ResponseCheckTx
gasWanted__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor ResponseCheckTx Int64
-> FieldDescriptor ResponseCheckTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"gas_wanted"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens ResponseCheckTx ResponseCheckTx Int64 Int64
-> FieldAccessor ResponseCheckTx Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "gasWanted" 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 @"gasWanted")) ::
Data.ProtoLens.FieldDescriptor ResponseCheckTx
gasUsed__field_descriptor :: FieldDescriptor ResponseCheckTx
gasUsed__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor ResponseCheckTx Int64
-> FieldDescriptor ResponseCheckTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"gas_used"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens ResponseCheckTx ResponseCheckTx Int64 Int64
-> FieldAccessor ResponseCheckTx Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "gasUsed" 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 @"gasUsed")) ::
Data.ProtoLens.FieldDescriptor ResponseCheckTx
events__field_descriptor :: FieldDescriptor ResponseCheckTx
events__field_descriptor
= String
-> FieldTypeDescriptor Event
-> FieldAccessor ResponseCheckTx Event
-> FieldDescriptor ResponseCheckTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"events"
(MessageOrGroup -> FieldTypeDescriptor Event
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Event)
(Packing
-> Lens' ResponseCheckTx [Event]
-> FieldAccessor ResponseCheckTx Event
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "events" 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 @"events")) ::
Data.ProtoLens.FieldDescriptor ResponseCheckTx
codespace__field_descriptor :: FieldDescriptor ResponseCheckTx
codespace__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseCheckTx Text
-> FieldDescriptor ResponseCheckTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"codespace"
(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 ResponseCheckTx ResponseCheckTx Text Text
-> FieldAccessor ResponseCheckTx 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 "codespace" 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 @"codespace")) ::
Data.ProtoLens.FieldDescriptor ResponseCheckTx
in
[(Tag, FieldDescriptor ResponseCheckTx)]
-> Map Tag (FieldDescriptor ResponseCheckTx)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResponseCheckTx
code__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ResponseCheckTx
data'__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor ResponseCheckTx
log__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor ResponseCheckTx
info__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor ResponseCheckTx
gasWanted__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 6, FieldDescriptor ResponseCheckTx
gasUsed__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 7, FieldDescriptor ResponseCheckTx
events__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 8, FieldDescriptor ResponseCheckTx
codespace__field_descriptor)]
unknownFields :: LensLike' f ResponseCheckTx FieldSet
unknownFields
= (ResponseCheckTx -> FieldSet)
-> (ResponseCheckTx -> FieldSet -> ResponseCheckTx)
-> Lens' ResponseCheckTx FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCheckTx -> FieldSet
_ResponseCheckTx'_unknownFields
(\ x__ :: ResponseCheckTx
x__ y__ :: FieldSet
y__ -> ResponseCheckTx
x__ {_ResponseCheckTx'_unknownFields :: FieldSet
_ResponseCheckTx'_unknownFields = FieldSet
y__})
defMessage :: ResponseCheckTx
defMessage
= $WResponseCheckTx'_constructor :: Word32
-> ByteString
-> Text
-> Text
-> Int64
-> Int64
-> Vector Event
-> Text
-> FieldSet
-> ResponseCheckTx
ResponseCheckTx'_constructor
{_ResponseCheckTx'code :: Word32
_ResponseCheckTx'code = Word32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseCheckTx'data' :: ByteString
_ResponseCheckTx'data' = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseCheckTx'log :: Text
_ResponseCheckTx'log = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseCheckTx'info :: Text
_ResponseCheckTx'info = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseCheckTx'gasWanted :: Int64
_ResponseCheckTx'gasWanted = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseCheckTx'gasUsed :: Int64
_ResponseCheckTx'gasUsed = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseCheckTx'events :: Vector Event
_ResponseCheckTx'events = Vector Event
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_ResponseCheckTx'codespace :: Text
_ResponseCheckTx'codespace = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseCheckTx'_unknownFields :: FieldSet
_ResponseCheckTx'_unknownFields = []}
parseMessage :: Parser ResponseCheckTx
parseMessage
= let
loop ::
ResponseCheckTx
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Event
-> Data.ProtoLens.Encoding.Bytes.Parser ResponseCheckTx
loop :: ResponseCheckTx
-> Growing Vector RealWorld Event -> Parser ResponseCheckTx
loop x :: ResponseCheckTx
x mutable'events :: Growing Vector RealWorld Event
mutable'events
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector Event
frozen'events <- IO (Vector Event) -> Parser (Vector Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Event -> IO (Vector Event)
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 Event
Growing Vector (PrimState IO) Event
mutable'events)
(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]))))
ResponseCheckTx -> Parser ResponseCheckTx
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseCheckTx ResponseCheckTx FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseCheckTx -> ResponseCheckTx
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 ResponseCheckTx ResponseCheckTx FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
ResponseCheckTx ResponseCheckTx (Vector Event) (Vector Event)
-> Vector Event -> ResponseCheckTx -> ResponseCheckTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'events" 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'events") Vector Event
frozen'events ResponseCheckTx
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Word32
y <- Parser Word32 -> String -> Parser Word32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Word32) -> Parser Word64 -> Parser Word32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"code"
ResponseCheckTx
-> Growing Vector RealWorld Event -> Parser ResponseCheckTx
loop
(Setter ResponseCheckTx ResponseCheckTx Word32 Word32
-> Word32 -> ResponseCheckTx -> ResponseCheckTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "code" 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 @"code") Word32
y ResponseCheckTx
x)
Growing Vector RealWorld Event
mutable'events
18
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"data"
ResponseCheckTx
-> Growing Vector RealWorld Event -> Parser ResponseCheckTx
loop
(Setter ResponseCheckTx ResponseCheckTx ByteString ByteString
-> ByteString -> ResponseCheckTx -> ResponseCheckTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") ByteString
y ResponseCheckTx
x)
Growing Vector RealWorld Event
mutable'events
26
-> 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))
"log"
ResponseCheckTx
-> Growing Vector RealWorld Event -> Parser ResponseCheckTx
loop
(Setter ResponseCheckTx ResponseCheckTx Text Text
-> Text -> ResponseCheckTx -> ResponseCheckTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "log" 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 @"log") Text
y ResponseCheckTx
x)
Growing Vector RealWorld Event
mutable'events
34
-> 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))
"info"
ResponseCheckTx
-> Growing Vector RealWorld Event -> Parser ResponseCheckTx
loop
(Setter ResponseCheckTx ResponseCheckTx Text Text
-> Text -> ResponseCheckTx -> ResponseCheckTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "info" 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 @"info") Text
y ResponseCheckTx
x)
Growing Vector RealWorld Event
mutable'events
40
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"gas_wanted"
ResponseCheckTx
-> Growing Vector RealWorld Event -> Parser ResponseCheckTx
loop
(Setter ResponseCheckTx ResponseCheckTx Int64 Int64
-> Int64 -> ResponseCheckTx -> ResponseCheckTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "gasWanted" 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 @"gasWanted") Int64
y ResponseCheckTx
x)
Growing Vector RealWorld Event
mutable'events
48
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"gas_used"
ResponseCheckTx
-> Growing Vector RealWorld Event -> Parser ResponseCheckTx
loop
(Setter ResponseCheckTx ResponseCheckTx Int64 Int64
-> Int64 -> ResponseCheckTx -> ResponseCheckTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "gasUsed" 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 @"gasUsed") Int64
y ResponseCheckTx
x)
Growing Vector RealWorld Event
mutable'events
58
-> do !Event
y <- Parser Event -> String -> Parser Event
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Event -> Parser Event
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 Event
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"events"
Growing Vector RealWorld Event
v <- IO (Growing Vector RealWorld Event)
-> Parser (Growing Vector RealWorld Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Event
-> Event -> IO (Growing Vector (PrimState IO) Event)
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 Event
Growing Vector (PrimState IO) Event
mutable'events Event
y)
ResponseCheckTx
-> Growing Vector RealWorld Event -> Parser ResponseCheckTx
loop ResponseCheckTx
x Growing Vector RealWorld Event
v
66
-> 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))
"codespace"
ResponseCheckTx
-> Growing Vector RealWorld Event -> Parser ResponseCheckTx
loop
(Setter ResponseCheckTx ResponseCheckTx Text Text
-> Text -> ResponseCheckTx -> ResponseCheckTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "codespace" 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 @"codespace") Text
y ResponseCheckTx
x)
Growing Vector RealWorld Event
mutable'events
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseCheckTx
-> Growing Vector RealWorld Event -> Parser ResponseCheckTx
loop
(Setter ResponseCheckTx ResponseCheckTx FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseCheckTx -> ResponseCheckTx
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 ResponseCheckTx ResponseCheckTx FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseCheckTx
x)
Growing Vector RealWorld Event
mutable'events
in
Parser ResponseCheckTx -> String -> Parser ResponseCheckTx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld Event
mutable'events <- IO (Growing Vector RealWorld Event)
-> Parser (Growing Vector RealWorld Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld Event)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
ResponseCheckTx
-> Growing Vector RealWorld Event -> Parser ResponseCheckTx
loop ResponseCheckTx
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld Event
mutable'events)
"ResponseCheckTx"
buildMessage :: ResponseCheckTx -> Builder
buildMessage
= \ _x :: ResponseCheckTx
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Word32
_v = FoldLike Word32 ResponseCheckTx ResponseCheckTx Word32 Word32
-> ResponseCheckTx -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "code" 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 @"code") ResponseCheckTx
_x
in
if Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word32
_v Word32
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) -> (Word32 -> Word64) -> Word32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word32
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v = FoldLike
ByteString ResponseCheckTx ResponseCheckTx ByteString ByteString
-> ResponseCheckTx -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") ResponseCheckTx
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 18)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text ResponseCheckTx ResponseCheckTx Text Text
-> ResponseCheckTx -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "log" 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 @"log") ResponseCheckTx
_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 26)
((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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text ResponseCheckTx ResponseCheckTx Text Text
-> ResponseCheckTx -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "info" 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 @"info") ResponseCheckTx
_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 34)
((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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 ResponseCheckTx ResponseCheckTx Int64 Int64
-> ResponseCheckTx -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "gasWanted" 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 @"gasWanted") ResponseCheckTx
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 40)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 ResponseCheckTx ResponseCheckTx Int64 Int64
-> ResponseCheckTx -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "gasUsed" 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 @"gasUsed") ResponseCheckTx
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 48)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((Event -> Builder) -> Vector Event -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: Event
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 58)
((ByteString -> Builder)
-> (Event -> ByteString) -> Event -> 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))
Event -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Event
_v))
(FoldLike
(Vector Event)
ResponseCheckTx
ResponseCheckTx
(Vector Event)
(Vector Event)
-> ResponseCheckTx -> Vector Event
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'events" 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'events") ResponseCheckTx
_x))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v
= FoldLike Text ResponseCheckTx ResponseCheckTx Text Text
-> ResponseCheckTx -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "codespace" 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 @"codespace") ResponseCheckTx
_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 66)
((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 ResponseCheckTx ResponseCheckTx FieldSet FieldSet
-> ResponseCheckTx -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ResponseCheckTx ResponseCheckTx FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseCheckTx
_x)))))))))
instance Control.DeepSeq.NFData ResponseCheckTx where
rnf :: ResponseCheckTx -> ()
rnf
= \ x__ :: ResponseCheckTx
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseCheckTx -> FieldSet
_ResponseCheckTx'_unknownFields ResponseCheckTx
x__)
(Word32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseCheckTx -> Word32
_ResponseCheckTx'code ResponseCheckTx
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseCheckTx -> ByteString
_ResponseCheckTx'data' ResponseCheckTx
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseCheckTx -> Text
_ResponseCheckTx'log ResponseCheckTx
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseCheckTx -> Text
_ResponseCheckTx'info ResponseCheckTx
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseCheckTx -> Int64
_ResponseCheckTx'gasWanted ResponseCheckTx
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseCheckTx -> Int64
_ResponseCheckTx'gasUsed ResponseCheckTx
x__)
(Vector Event -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseCheckTx -> Vector Event
_ResponseCheckTx'events ResponseCheckTx
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseCheckTx -> Text
_ResponseCheckTx'codespace ResponseCheckTx
x__) ()))))))))
data ResponseCommit
= ResponseCommit'_constructor {ResponseCommit -> ByteString
_ResponseCommit'data' :: !Data.ByteString.ByteString,
ResponseCommit -> FieldSet
_ResponseCommit'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseCommit -> ResponseCommit -> Bool
(ResponseCommit -> ResponseCommit -> Bool)
-> (ResponseCommit -> ResponseCommit -> Bool) -> Eq ResponseCommit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseCommit -> ResponseCommit -> Bool
$c/= :: ResponseCommit -> ResponseCommit -> Bool
== :: ResponseCommit -> ResponseCommit -> Bool
$c== :: ResponseCommit -> ResponseCommit -> Bool
Prelude.Eq, Eq ResponseCommit
Eq ResponseCommit =>
(ResponseCommit -> ResponseCommit -> Ordering)
-> (ResponseCommit -> ResponseCommit -> Bool)
-> (ResponseCommit -> ResponseCommit -> Bool)
-> (ResponseCommit -> ResponseCommit -> Bool)
-> (ResponseCommit -> ResponseCommit -> Bool)
-> (ResponseCommit -> ResponseCommit -> ResponseCommit)
-> (ResponseCommit -> ResponseCommit -> ResponseCommit)
-> Ord ResponseCommit
ResponseCommit -> ResponseCommit -> Bool
ResponseCommit -> ResponseCommit -> Ordering
ResponseCommit -> ResponseCommit -> ResponseCommit
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 :: ResponseCommit -> ResponseCommit -> ResponseCommit
$cmin :: ResponseCommit -> ResponseCommit -> ResponseCommit
max :: ResponseCommit -> ResponseCommit -> ResponseCommit
$cmax :: ResponseCommit -> ResponseCommit -> ResponseCommit
>= :: ResponseCommit -> ResponseCommit -> Bool
$c>= :: ResponseCommit -> ResponseCommit -> Bool
> :: ResponseCommit -> ResponseCommit -> Bool
$c> :: ResponseCommit -> ResponseCommit -> Bool
<= :: ResponseCommit -> ResponseCommit -> Bool
$c<= :: ResponseCommit -> ResponseCommit -> Bool
< :: ResponseCommit -> ResponseCommit -> Bool
$c< :: ResponseCommit -> ResponseCommit -> Bool
compare :: ResponseCommit -> ResponseCommit -> Ordering
$ccompare :: ResponseCommit -> ResponseCommit -> Ordering
$cp1Ord :: Eq ResponseCommit
Prelude.Ord)
instance Prelude.Show ResponseCommit where
showsPrec :: Int -> ResponseCommit -> ShowS
showsPrec _ __x :: ResponseCommit
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseCommit -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseCommit
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResponseCommit "data'" Data.ByteString.ByteString where
fieldOf :: Proxy# "data'"
-> (ByteString -> f ByteString)
-> ResponseCommit
-> f ResponseCommit
fieldOf _
= ((ByteString -> f ByteString)
-> ResponseCommit -> f ResponseCommit)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> ResponseCommit
-> f ResponseCommit
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseCommit -> ByteString)
-> (ResponseCommit -> ByteString -> ResponseCommit)
-> Lens ResponseCommit ResponseCommit ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCommit -> ByteString
_ResponseCommit'data'
(\ x__ :: ResponseCommit
x__ y__ :: ByteString
y__ -> ResponseCommit
x__ {_ResponseCommit'data' :: ByteString
_ResponseCommit'data' = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResponseCommit where
messageName :: Proxy ResponseCommit -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseCommit"
fieldsByTag :: Map Tag (FieldDescriptor ResponseCommit)
fieldsByTag
= let
data'__field_descriptor :: FieldDescriptor ResponseCommit
data'__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor ResponseCommit ByteString
-> FieldDescriptor ResponseCommit
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"data"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens ResponseCommit ResponseCommit ByteString ByteString
-> FieldAccessor ResponseCommit ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'")) ::
Data.ProtoLens.FieldDescriptor ResponseCommit
in
[(Tag, FieldDescriptor ResponseCommit)]
-> Map Tag (FieldDescriptor ResponseCommit)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ResponseCommit
data'__field_descriptor)]
unknownFields :: LensLike' f ResponseCommit FieldSet
unknownFields
= (ResponseCommit -> FieldSet)
-> (ResponseCommit -> FieldSet -> ResponseCommit)
-> Lens' ResponseCommit FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseCommit -> FieldSet
_ResponseCommit'_unknownFields
(\ x__ :: ResponseCommit
x__ y__ :: FieldSet
y__ -> ResponseCommit
x__ {_ResponseCommit'_unknownFields :: FieldSet
_ResponseCommit'_unknownFields = FieldSet
y__})
defMessage :: ResponseCommit
defMessage
= $WResponseCommit'_constructor :: ByteString -> FieldSet -> ResponseCommit
ResponseCommit'_constructor
{_ResponseCommit'data' :: ByteString
_ResponseCommit'data' = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseCommit'_unknownFields :: FieldSet
_ResponseCommit'_unknownFields = []}
parseMessage :: Parser ResponseCommit
parseMessage
= let
loop ::
ResponseCommit
-> Data.ProtoLens.Encoding.Bytes.Parser ResponseCommit
loop :: ResponseCommit -> Parser ResponseCommit
loop x :: ResponseCommit
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]))))
ResponseCommit -> Parser ResponseCommit
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseCommit ResponseCommit FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseCommit -> ResponseCommit
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 ResponseCommit ResponseCommit FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ResponseCommit
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
18
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"data"
ResponseCommit -> Parser ResponseCommit
loop (Setter ResponseCommit ResponseCommit ByteString ByteString
-> ByteString -> ResponseCommit -> ResponseCommit
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") ByteString
y ResponseCommit
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseCommit -> Parser ResponseCommit
loop
(Setter ResponseCommit ResponseCommit FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseCommit -> ResponseCommit
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 ResponseCommit ResponseCommit FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseCommit
x)
in
Parser ResponseCommit -> String -> Parser ResponseCommit
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ResponseCommit -> Parser ResponseCommit
loop ResponseCommit
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ResponseCommit"
buildMessage :: ResponseCommit -> Builder
buildMessage
= \ _x :: ResponseCommit
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v = FoldLike
ByteString ResponseCommit ResponseCommit ByteString ByteString
-> ResponseCommit -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") ResponseCommit
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 18)
((\ 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))
ByteString
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet ResponseCommit ResponseCommit FieldSet FieldSet
-> ResponseCommit -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ResponseCommit ResponseCommit FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseCommit
_x))
instance Control.DeepSeq.NFData ResponseCommit where
rnf :: ResponseCommit -> ()
rnf
= \ x__ :: ResponseCommit
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseCommit -> FieldSet
_ResponseCommit'_unknownFields ResponseCommit
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ResponseCommit -> ByteString
_ResponseCommit'data' ResponseCommit
x__) ())
data ResponseDeliverTx
= ResponseDeliverTx'_constructor {ResponseDeliverTx -> Word32
_ResponseDeliverTx'code :: !Data.Word.Word32,
ResponseDeliverTx -> ByteString
_ResponseDeliverTx'data' :: !Data.ByteString.ByteString,
ResponseDeliverTx -> Text
_ResponseDeliverTx'log :: !Data.Text.Text,
ResponseDeliverTx -> Text
_ResponseDeliverTx'info :: !Data.Text.Text,
ResponseDeliverTx -> Int64
_ResponseDeliverTx'gasWanted :: !Data.Int.Int64,
ResponseDeliverTx -> Int64
_ResponseDeliverTx'gasUsed :: !Data.Int.Int64,
ResponseDeliverTx -> Vector Event
_ResponseDeliverTx'events :: !(Data.Vector.Vector Event),
ResponseDeliverTx -> Text
_ResponseDeliverTx'codespace :: !Data.Text.Text,
ResponseDeliverTx -> FieldSet
_ResponseDeliverTx'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseDeliverTx -> ResponseDeliverTx -> Bool
(ResponseDeliverTx -> ResponseDeliverTx -> Bool)
-> (ResponseDeliverTx -> ResponseDeliverTx -> Bool)
-> Eq ResponseDeliverTx
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
$c/= :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
== :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
$c== :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
Prelude.Eq, Eq ResponseDeliverTx
Eq ResponseDeliverTx =>
(ResponseDeliverTx -> ResponseDeliverTx -> Ordering)
-> (ResponseDeliverTx -> ResponseDeliverTx -> Bool)
-> (ResponseDeliverTx -> ResponseDeliverTx -> Bool)
-> (ResponseDeliverTx -> ResponseDeliverTx -> Bool)
-> (ResponseDeliverTx -> ResponseDeliverTx -> Bool)
-> (ResponseDeliverTx -> ResponseDeliverTx -> ResponseDeliverTx)
-> (ResponseDeliverTx -> ResponseDeliverTx -> ResponseDeliverTx)
-> Ord ResponseDeliverTx
ResponseDeliverTx -> ResponseDeliverTx -> Bool
ResponseDeliverTx -> ResponseDeliverTx -> Ordering
ResponseDeliverTx -> ResponseDeliverTx -> ResponseDeliverTx
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 :: ResponseDeliverTx -> ResponseDeliverTx -> ResponseDeliverTx
$cmin :: ResponseDeliverTx -> ResponseDeliverTx -> ResponseDeliverTx
max :: ResponseDeliverTx -> ResponseDeliverTx -> ResponseDeliverTx
$cmax :: ResponseDeliverTx -> ResponseDeliverTx -> ResponseDeliverTx
>= :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
$c>= :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
> :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
$c> :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
<= :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
$c<= :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
< :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
$c< :: ResponseDeliverTx -> ResponseDeliverTx -> Bool
compare :: ResponseDeliverTx -> ResponseDeliverTx -> Ordering
$ccompare :: ResponseDeliverTx -> ResponseDeliverTx -> Ordering
$cp1Ord :: Eq ResponseDeliverTx
Prelude.Ord)
instance Prelude.Show ResponseDeliverTx where
showsPrec :: Int -> ResponseDeliverTx -> ShowS
showsPrec _ __x :: ResponseDeliverTx
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseDeliverTx -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseDeliverTx
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResponseDeliverTx "code" Data.Word.Word32 where
fieldOf :: Proxy# "code"
-> (Word32 -> f Word32) -> ResponseDeliverTx -> f ResponseDeliverTx
fieldOf _
= ((Word32 -> f Word32) -> ResponseDeliverTx -> f ResponseDeliverTx)
-> ((Word32 -> f Word32) -> Word32 -> f Word32)
-> (Word32 -> f Word32)
-> ResponseDeliverTx
-> f ResponseDeliverTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseDeliverTx -> Word32)
-> (ResponseDeliverTx -> Word32 -> ResponseDeliverTx)
-> Lens ResponseDeliverTx ResponseDeliverTx Word32 Word32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseDeliverTx -> Word32
_ResponseDeliverTx'code
(\ x__ :: ResponseDeliverTx
x__ y__ :: Word32
y__ -> ResponseDeliverTx
x__ {_ResponseDeliverTx'code :: Word32
_ResponseDeliverTx'code = Word32
y__}))
(Word32 -> f Word32) -> Word32 -> f Word32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseDeliverTx "data'" Data.ByteString.ByteString where
fieldOf :: Proxy# "data'"
-> (ByteString -> f ByteString)
-> ResponseDeliverTx
-> f ResponseDeliverTx
fieldOf _
= ((ByteString -> f ByteString)
-> ResponseDeliverTx -> f ResponseDeliverTx)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> ResponseDeliverTx
-> f ResponseDeliverTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseDeliverTx -> ByteString)
-> (ResponseDeliverTx -> ByteString -> ResponseDeliverTx)
-> Lens ResponseDeliverTx ResponseDeliverTx ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseDeliverTx -> ByteString
_ResponseDeliverTx'data'
(\ x__ :: ResponseDeliverTx
x__ y__ :: ByteString
y__ -> ResponseDeliverTx
x__ {_ResponseDeliverTx'data' :: ByteString
_ResponseDeliverTx'data' = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseDeliverTx "log" Data.Text.Text where
fieldOf :: Proxy# "log"
-> (Text -> f Text) -> ResponseDeliverTx -> f ResponseDeliverTx
fieldOf _
= ((Text -> f Text) -> ResponseDeliverTx -> f ResponseDeliverTx)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseDeliverTx
-> f ResponseDeliverTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseDeliverTx -> Text)
-> (ResponseDeliverTx -> Text -> ResponseDeliverTx)
-> Lens ResponseDeliverTx ResponseDeliverTx Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseDeliverTx -> Text
_ResponseDeliverTx'log
(\ x__ :: ResponseDeliverTx
x__ y__ :: Text
y__ -> ResponseDeliverTx
x__ {_ResponseDeliverTx'log :: Text
_ResponseDeliverTx'log = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseDeliverTx "info" Data.Text.Text where
fieldOf :: Proxy# "info"
-> (Text -> f Text) -> ResponseDeliverTx -> f ResponseDeliverTx
fieldOf _
= ((Text -> f Text) -> ResponseDeliverTx -> f ResponseDeliverTx)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseDeliverTx
-> f ResponseDeliverTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseDeliverTx -> Text)
-> (ResponseDeliverTx -> Text -> ResponseDeliverTx)
-> Lens ResponseDeliverTx ResponseDeliverTx Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseDeliverTx -> Text
_ResponseDeliverTx'info
(\ x__ :: ResponseDeliverTx
x__ y__ :: Text
y__ -> ResponseDeliverTx
x__ {_ResponseDeliverTx'info :: Text
_ResponseDeliverTx'info = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseDeliverTx "gasWanted" Data.Int.Int64 where
fieldOf :: Proxy# "gasWanted"
-> (Int64 -> f Int64) -> ResponseDeliverTx -> f ResponseDeliverTx
fieldOf _
= ((Int64 -> f Int64) -> ResponseDeliverTx -> f ResponseDeliverTx)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ResponseDeliverTx
-> f ResponseDeliverTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseDeliverTx -> Int64)
-> (ResponseDeliverTx -> Int64 -> ResponseDeliverTx)
-> Lens ResponseDeliverTx ResponseDeliverTx Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseDeliverTx -> Int64
_ResponseDeliverTx'gasWanted
(\ x__ :: ResponseDeliverTx
x__ y__ :: Int64
y__ -> ResponseDeliverTx
x__ {_ResponseDeliverTx'gasWanted :: Int64
_ResponseDeliverTx'gasWanted = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseDeliverTx "gasUsed" Data.Int.Int64 where
fieldOf :: Proxy# "gasUsed"
-> (Int64 -> f Int64) -> ResponseDeliverTx -> f ResponseDeliverTx
fieldOf _
= ((Int64 -> f Int64) -> ResponseDeliverTx -> f ResponseDeliverTx)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ResponseDeliverTx
-> f ResponseDeliverTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseDeliverTx -> Int64)
-> (ResponseDeliverTx -> Int64 -> ResponseDeliverTx)
-> Lens ResponseDeliverTx ResponseDeliverTx Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseDeliverTx -> Int64
_ResponseDeliverTx'gasUsed
(\ x__ :: ResponseDeliverTx
x__ y__ :: Int64
y__ -> ResponseDeliverTx
x__ {_ResponseDeliverTx'gasUsed :: Int64
_ResponseDeliverTx'gasUsed = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseDeliverTx "events" [Event] where
fieldOf :: Proxy# "events"
-> ([Event] -> f [Event])
-> ResponseDeliverTx
-> f ResponseDeliverTx
fieldOf _
= ((Vector Event -> f (Vector Event))
-> ResponseDeliverTx -> f ResponseDeliverTx)
-> (([Event] -> f [Event]) -> Vector Event -> f (Vector Event))
-> ([Event] -> f [Event])
-> ResponseDeliverTx
-> f ResponseDeliverTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseDeliverTx -> Vector Event)
-> (ResponseDeliverTx -> Vector Event -> ResponseDeliverTx)
-> Lens
ResponseDeliverTx ResponseDeliverTx (Vector Event) (Vector Event)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseDeliverTx -> Vector Event
_ResponseDeliverTx'events
(\ x__ :: ResponseDeliverTx
x__ y__ :: Vector Event
y__ -> ResponseDeliverTx
x__ {_ResponseDeliverTx'events :: Vector Event
_ResponseDeliverTx'events = Vector Event
y__}))
((Vector Event -> [Event])
-> (Vector Event -> [Event] -> Vector Event)
-> Lens (Vector Event) (Vector Event) [Event] [Event]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector Event -> [Event]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [Event]
y__ -> [Event] -> Vector Event
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Event]
y__))
instance Data.ProtoLens.Field.HasField ResponseDeliverTx "vec'events" (Data.Vector.Vector Event) where
fieldOf :: Proxy# "vec'events"
-> (Vector Event -> f (Vector Event))
-> ResponseDeliverTx
-> f ResponseDeliverTx
fieldOf _
= ((Vector Event -> f (Vector Event))
-> ResponseDeliverTx -> f ResponseDeliverTx)
-> ((Vector Event -> f (Vector Event))
-> Vector Event -> f (Vector Event))
-> (Vector Event -> f (Vector Event))
-> ResponseDeliverTx
-> f ResponseDeliverTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseDeliverTx -> Vector Event)
-> (ResponseDeliverTx -> Vector Event -> ResponseDeliverTx)
-> Lens
ResponseDeliverTx ResponseDeliverTx (Vector Event) (Vector Event)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseDeliverTx -> Vector Event
_ResponseDeliverTx'events
(\ x__ :: ResponseDeliverTx
x__ y__ :: Vector Event
y__ -> ResponseDeliverTx
x__ {_ResponseDeliverTx'events :: Vector Event
_ResponseDeliverTx'events = Vector Event
y__}))
(Vector Event -> f (Vector Event))
-> Vector Event -> f (Vector Event)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseDeliverTx "codespace" Data.Text.Text where
fieldOf :: Proxy# "codespace"
-> (Text -> f Text) -> ResponseDeliverTx -> f ResponseDeliverTx
fieldOf _
= ((Text -> f Text) -> ResponseDeliverTx -> f ResponseDeliverTx)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseDeliverTx
-> f ResponseDeliverTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseDeliverTx -> Text)
-> (ResponseDeliverTx -> Text -> ResponseDeliverTx)
-> Lens ResponseDeliverTx ResponseDeliverTx Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseDeliverTx -> Text
_ResponseDeliverTx'codespace
(\ x__ :: ResponseDeliverTx
x__ y__ :: Text
y__ -> ResponseDeliverTx
x__ {_ResponseDeliverTx'codespace :: Text
_ResponseDeliverTx'codespace = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResponseDeliverTx where
messageName :: Proxy ResponseDeliverTx -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseDeliverTx"
fieldsByTag :: Map Tag (FieldDescriptor ResponseDeliverTx)
fieldsByTag
= let
code__field_descriptor :: FieldDescriptor ResponseDeliverTx
code__field_descriptor
= String
-> FieldTypeDescriptor Word32
-> FieldAccessor ResponseDeliverTx Word32
-> FieldDescriptor ResponseDeliverTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"code"
(ScalarField Word32 -> FieldTypeDescriptor Word32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word32
Data.ProtoLens.UInt32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
(WireDefault Word32
-> Lens ResponseDeliverTx ResponseDeliverTx Word32 Word32
-> FieldAccessor ResponseDeliverTx Word32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Word32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "code" 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 @"code")) ::
Data.ProtoLens.FieldDescriptor ResponseDeliverTx
data'__field_descriptor :: FieldDescriptor ResponseDeliverTx
data'__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor ResponseDeliverTx ByteString
-> FieldDescriptor ResponseDeliverTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"data"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens ResponseDeliverTx ResponseDeliverTx ByteString ByteString
-> FieldAccessor ResponseDeliverTx ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'")) ::
Data.ProtoLens.FieldDescriptor ResponseDeliverTx
log__field_descriptor :: FieldDescriptor ResponseDeliverTx
log__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseDeliverTx Text
-> FieldDescriptor ResponseDeliverTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"log"
(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 ResponseDeliverTx ResponseDeliverTx Text Text
-> FieldAccessor ResponseDeliverTx 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 "log" 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 @"log")) ::
Data.ProtoLens.FieldDescriptor ResponseDeliverTx
info__field_descriptor :: FieldDescriptor ResponseDeliverTx
info__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseDeliverTx Text
-> FieldDescriptor ResponseDeliverTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"info"
(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 ResponseDeliverTx ResponseDeliverTx Text Text
-> FieldAccessor ResponseDeliverTx 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 "info" 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 @"info")) ::
Data.ProtoLens.FieldDescriptor ResponseDeliverTx
gasWanted__field_descriptor :: FieldDescriptor ResponseDeliverTx
gasWanted__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor ResponseDeliverTx Int64
-> FieldDescriptor ResponseDeliverTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"gas_wanted"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens ResponseDeliverTx ResponseDeliverTx Int64 Int64
-> FieldAccessor ResponseDeliverTx Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "gasWanted" 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 @"gasWanted")) ::
Data.ProtoLens.FieldDescriptor ResponseDeliverTx
gasUsed__field_descriptor :: FieldDescriptor ResponseDeliverTx
gasUsed__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor ResponseDeliverTx Int64
-> FieldDescriptor ResponseDeliverTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"gas_used"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens ResponseDeliverTx ResponseDeliverTx Int64 Int64
-> FieldAccessor ResponseDeliverTx Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "gasUsed" 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 @"gasUsed")) ::
Data.ProtoLens.FieldDescriptor ResponseDeliverTx
events__field_descriptor :: FieldDescriptor ResponseDeliverTx
events__field_descriptor
= String
-> FieldTypeDescriptor Event
-> FieldAccessor ResponseDeliverTx Event
-> FieldDescriptor ResponseDeliverTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"events"
(MessageOrGroup -> FieldTypeDescriptor Event
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Event)
(Packing
-> Lens' ResponseDeliverTx [Event]
-> FieldAccessor ResponseDeliverTx Event
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "events" 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 @"events")) ::
Data.ProtoLens.FieldDescriptor ResponseDeliverTx
codespace__field_descriptor :: FieldDescriptor ResponseDeliverTx
codespace__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseDeliverTx Text
-> FieldDescriptor ResponseDeliverTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"codespace"
(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 ResponseDeliverTx ResponseDeliverTx Text Text
-> FieldAccessor ResponseDeliverTx 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 "codespace" 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 @"codespace")) ::
Data.ProtoLens.FieldDescriptor ResponseDeliverTx
in
[(Tag, FieldDescriptor ResponseDeliverTx)]
-> Map Tag (FieldDescriptor ResponseDeliverTx)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResponseDeliverTx
code__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ResponseDeliverTx
data'__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor ResponseDeliverTx
log__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor ResponseDeliverTx
info__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor ResponseDeliverTx
gasWanted__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 6, FieldDescriptor ResponseDeliverTx
gasUsed__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 7, FieldDescriptor ResponseDeliverTx
events__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 8, FieldDescriptor ResponseDeliverTx
codespace__field_descriptor)]
unknownFields :: LensLike' f ResponseDeliverTx FieldSet
unknownFields
= (ResponseDeliverTx -> FieldSet)
-> (ResponseDeliverTx -> FieldSet -> ResponseDeliverTx)
-> Lens' ResponseDeliverTx FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseDeliverTx -> FieldSet
_ResponseDeliverTx'_unknownFields
(\ x__ :: ResponseDeliverTx
x__ y__ :: FieldSet
y__ -> ResponseDeliverTx
x__ {_ResponseDeliverTx'_unknownFields :: FieldSet
_ResponseDeliverTx'_unknownFields = FieldSet
y__})
defMessage :: ResponseDeliverTx
defMessage
= $WResponseDeliverTx'_constructor :: Word32
-> ByteString
-> Text
-> Text
-> Int64
-> Int64
-> Vector Event
-> Text
-> FieldSet
-> ResponseDeliverTx
ResponseDeliverTx'_constructor
{_ResponseDeliverTx'code :: Word32
_ResponseDeliverTx'code = Word32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseDeliverTx'data' :: ByteString
_ResponseDeliverTx'data' = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseDeliverTx'log :: Text
_ResponseDeliverTx'log = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseDeliverTx'info :: Text
_ResponseDeliverTx'info = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseDeliverTx'gasWanted :: Int64
_ResponseDeliverTx'gasWanted = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseDeliverTx'gasUsed :: Int64
_ResponseDeliverTx'gasUsed = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseDeliverTx'events :: Vector Event
_ResponseDeliverTx'events = Vector Event
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_ResponseDeliverTx'codespace :: Text
_ResponseDeliverTx'codespace = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseDeliverTx'_unknownFields :: FieldSet
_ResponseDeliverTx'_unknownFields = []}
parseMessage :: Parser ResponseDeliverTx
parseMessage
= let
loop ::
ResponseDeliverTx
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Event
-> Data.ProtoLens.Encoding.Bytes.Parser ResponseDeliverTx
loop :: ResponseDeliverTx
-> Growing Vector RealWorld Event -> Parser ResponseDeliverTx
loop x :: ResponseDeliverTx
x mutable'events :: Growing Vector RealWorld Event
mutable'events
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector Event
frozen'events <- IO (Vector Event) -> Parser (Vector Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Event -> IO (Vector Event)
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 Event
Growing Vector (PrimState IO) Event
mutable'events)
(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]))))
ResponseDeliverTx -> Parser ResponseDeliverTx
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseDeliverTx ResponseDeliverTx FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseDeliverTx -> ResponseDeliverTx
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 ResponseDeliverTx ResponseDeliverTx FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
ResponseDeliverTx ResponseDeliverTx (Vector Event) (Vector Event)
-> Vector Event -> ResponseDeliverTx -> ResponseDeliverTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'events" 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'events") Vector Event
frozen'events ResponseDeliverTx
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Word32
y <- Parser Word32 -> String -> Parser Word32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Word32) -> Parser Word64 -> Parser Word32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"code"
ResponseDeliverTx
-> Growing Vector RealWorld Event -> Parser ResponseDeliverTx
loop
(Setter ResponseDeliverTx ResponseDeliverTx Word32 Word32
-> Word32 -> ResponseDeliverTx -> ResponseDeliverTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "code" 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 @"code") Word32
y ResponseDeliverTx
x)
Growing Vector RealWorld Event
mutable'events
18
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"data"
ResponseDeliverTx
-> Growing Vector RealWorld Event -> Parser ResponseDeliverTx
loop
(Setter ResponseDeliverTx ResponseDeliverTx ByteString ByteString
-> ByteString -> ResponseDeliverTx -> ResponseDeliverTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") ByteString
y ResponseDeliverTx
x)
Growing Vector RealWorld Event
mutable'events
26
-> 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))
"log"
ResponseDeliverTx
-> Growing Vector RealWorld Event -> Parser ResponseDeliverTx
loop
(Setter ResponseDeliverTx ResponseDeliverTx Text Text
-> Text -> ResponseDeliverTx -> ResponseDeliverTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "log" 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 @"log") Text
y ResponseDeliverTx
x)
Growing Vector RealWorld Event
mutable'events
34
-> 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))
"info"
ResponseDeliverTx
-> Growing Vector RealWorld Event -> Parser ResponseDeliverTx
loop
(Setter ResponseDeliverTx ResponseDeliverTx Text Text
-> Text -> ResponseDeliverTx -> ResponseDeliverTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "info" 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 @"info") Text
y ResponseDeliverTx
x)
Growing Vector RealWorld Event
mutable'events
40
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"gas_wanted"
ResponseDeliverTx
-> Growing Vector RealWorld Event -> Parser ResponseDeliverTx
loop
(Setter ResponseDeliverTx ResponseDeliverTx Int64 Int64
-> Int64 -> ResponseDeliverTx -> ResponseDeliverTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "gasWanted" 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 @"gasWanted") Int64
y ResponseDeliverTx
x)
Growing Vector RealWorld Event
mutable'events
48
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"gas_used"
ResponseDeliverTx
-> Growing Vector RealWorld Event -> Parser ResponseDeliverTx
loop
(Setter ResponseDeliverTx ResponseDeliverTx Int64 Int64
-> Int64 -> ResponseDeliverTx -> ResponseDeliverTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "gasUsed" 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 @"gasUsed") Int64
y ResponseDeliverTx
x)
Growing Vector RealWorld Event
mutable'events
58
-> do !Event
y <- Parser Event -> String -> Parser Event
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Event -> Parser Event
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 Event
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"events"
Growing Vector RealWorld Event
v <- IO (Growing Vector RealWorld Event)
-> Parser (Growing Vector RealWorld Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Event
-> Event -> IO (Growing Vector (PrimState IO) Event)
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 Event
Growing Vector (PrimState IO) Event
mutable'events Event
y)
ResponseDeliverTx
-> Growing Vector RealWorld Event -> Parser ResponseDeliverTx
loop ResponseDeliverTx
x Growing Vector RealWorld Event
v
66
-> 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))
"codespace"
ResponseDeliverTx
-> Growing Vector RealWorld Event -> Parser ResponseDeliverTx
loop
(Setter ResponseDeliverTx ResponseDeliverTx Text Text
-> Text -> ResponseDeliverTx -> ResponseDeliverTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "codespace" 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 @"codespace") Text
y ResponseDeliverTx
x)
Growing Vector RealWorld Event
mutable'events
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseDeliverTx
-> Growing Vector RealWorld Event -> Parser ResponseDeliverTx
loop
(Setter ResponseDeliverTx ResponseDeliverTx FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseDeliverTx -> ResponseDeliverTx
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 ResponseDeliverTx ResponseDeliverTx FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseDeliverTx
x)
Growing Vector RealWorld Event
mutable'events
in
Parser ResponseDeliverTx -> String -> Parser ResponseDeliverTx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld Event
mutable'events <- IO (Growing Vector RealWorld Event)
-> Parser (Growing Vector RealWorld Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld Event)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
ResponseDeliverTx
-> Growing Vector RealWorld Event -> Parser ResponseDeliverTx
loop ResponseDeliverTx
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld Event
mutable'events)
"ResponseDeliverTx"
buildMessage :: ResponseDeliverTx -> Builder
buildMessage
= \ _x :: ResponseDeliverTx
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Word32
_v = FoldLike Word32 ResponseDeliverTx ResponseDeliverTx Word32 Word32
-> ResponseDeliverTx -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "code" 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 @"code") ResponseDeliverTx
_x
in
if Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word32
_v Word32
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) -> (Word32 -> Word64) -> Word32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word32
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v = FoldLike
ByteString
ResponseDeliverTx
ResponseDeliverTx
ByteString
ByteString
-> ResponseDeliverTx -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") ResponseDeliverTx
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 18)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text ResponseDeliverTx ResponseDeliverTx Text Text
-> ResponseDeliverTx -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "log" 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 @"log") ResponseDeliverTx
_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 26)
((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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text ResponseDeliverTx ResponseDeliverTx Text Text
-> ResponseDeliverTx -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "info" 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 @"info") ResponseDeliverTx
_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 34)
((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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 ResponseDeliverTx ResponseDeliverTx Int64 Int64
-> ResponseDeliverTx -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "gasWanted" 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 @"gasWanted") ResponseDeliverTx
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 40)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 ResponseDeliverTx ResponseDeliverTx Int64 Int64
-> ResponseDeliverTx -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "gasUsed" 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 @"gasUsed") ResponseDeliverTx
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 48)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((Event -> Builder) -> Vector Event -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: Event
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 58)
((ByteString -> Builder)
-> (Event -> ByteString) -> Event -> 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))
Event -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Event
_v))
(FoldLike
(Vector Event)
ResponseDeliverTx
ResponseDeliverTx
(Vector Event)
(Vector Event)
-> ResponseDeliverTx -> Vector Event
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'events" 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'events") ResponseDeliverTx
_x))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v
= FoldLike Text ResponseDeliverTx ResponseDeliverTx Text Text
-> ResponseDeliverTx -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "codespace" 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 @"codespace") ResponseDeliverTx
_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 66)
((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 ResponseDeliverTx ResponseDeliverTx FieldSet FieldSet
-> ResponseDeliverTx -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet ResponseDeliverTx ResponseDeliverTx FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseDeliverTx
_x)))))))))
instance Control.DeepSeq.NFData ResponseDeliverTx where
rnf :: ResponseDeliverTx -> ()
rnf
= \ x__ :: ResponseDeliverTx
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseDeliverTx -> FieldSet
_ResponseDeliverTx'_unknownFields ResponseDeliverTx
x__)
(Word32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseDeliverTx -> Word32
_ResponseDeliverTx'code ResponseDeliverTx
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseDeliverTx -> ByteString
_ResponseDeliverTx'data' ResponseDeliverTx
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseDeliverTx -> Text
_ResponseDeliverTx'log ResponseDeliverTx
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseDeliverTx -> Text
_ResponseDeliverTx'info ResponseDeliverTx
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseDeliverTx -> Int64
_ResponseDeliverTx'gasWanted ResponseDeliverTx
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseDeliverTx -> Int64
_ResponseDeliverTx'gasUsed ResponseDeliverTx
x__)
(Vector Event -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseDeliverTx -> Vector Event
_ResponseDeliverTx'events ResponseDeliverTx
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseDeliverTx -> Text
_ResponseDeliverTx'codespace ResponseDeliverTx
x__) ()))))))))
data ResponseEcho
= ResponseEcho'_constructor {ResponseEcho -> Text
_ResponseEcho'message :: !Data.Text.Text,
ResponseEcho -> FieldSet
_ResponseEcho'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseEcho -> ResponseEcho -> Bool
(ResponseEcho -> ResponseEcho -> Bool)
-> (ResponseEcho -> ResponseEcho -> Bool) -> Eq ResponseEcho
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseEcho -> ResponseEcho -> Bool
$c/= :: ResponseEcho -> ResponseEcho -> Bool
== :: ResponseEcho -> ResponseEcho -> Bool
$c== :: ResponseEcho -> ResponseEcho -> Bool
Prelude.Eq, Eq ResponseEcho
Eq ResponseEcho =>
(ResponseEcho -> ResponseEcho -> Ordering)
-> (ResponseEcho -> ResponseEcho -> Bool)
-> (ResponseEcho -> ResponseEcho -> Bool)
-> (ResponseEcho -> ResponseEcho -> Bool)
-> (ResponseEcho -> ResponseEcho -> Bool)
-> (ResponseEcho -> ResponseEcho -> ResponseEcho)
-> (ResponseEcho -> ResponseEcho -> ResponseEcho)
-> Ord ResponseEcho
ResponseEcho -> ResponseEcho -> Bool
ResponseEcho -> ResponseEcho -> Ordering
ResponseEcho -> ResponseEcho -> ResponseEcho
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 :: ResponseEcho -> ResponseEcho -> ResponseEcho
$cmin :: ResponseEcho -> ResponseEcho -> ResponseEcho
max :: ResponseEcho -> ResponseEcho -> ResponseEcho
$cmax :: ResponseEcho -> ResponseEcho -> ResponseEcho
>= :: ResponseEcho -> ResponseEcho -> Bool
$c>= :: ResponseEcho -> ResponseEcho -> Bool
> :: ResponseEcho -> ResponseEcho -> Bool
$c> :: ResponseEcho -> ResponseEcho -> Bool
<= :: ResponseEcho -> ResponseEcho -> Bool
$c<= :: ResponseEcho -> ResponseEcho -> Bool
< :: ResponseEcho -> ResponseEcho -> Bool
$c< :: ResponseEcho -> ResponseEcho -> Bool
compare :: ResponseEcho -> ResponseEcho -> Ordering
$ccompare :: ResponseEcho -> ResponseEcho -> Ordering
$cp1Ord :: Eq ResponseEcho
Prelude.Ord)
instance Prelude.Show ResponseEcho where
showsPrec :: Int -> ResponseEcho -> ShowS
showsPrec _ __x :: ResponseEcho
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseEcho -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseEcho
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResponseEcho "message" Data.Text.Text where
fieldOf :: Proxy# "message"
-> (Text -> f Text) -> ResponseEcho -> f ResponseEcho
fieldOf _
= ((Text -> f Text) -> ResponseEcho -> f ResponseEcho)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseEcho
-> f ResponseEcho
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseEcho -> Text)
-> (ResponseEcho -> Text -> ResponseEcho)
-> Lens ResponseEcho ResponseEcho Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseEcho -> Text
_ResponseEcho'message
(\ x__ :: ResponseEcho
x__ y__ :: Text
y__ -> ResponseEcho
x__ {_ResponseEcho'message :: Text
_ResponseEcho'message = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResponseEcho where
messageName :: Proxy ResponseEcho -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseEcho"
fieldsByTag :: Map Tag (FieldDescriptor ResponseEcho)
fieldsByTag
= let
message__field_descriptor :: FieldDescriptor ResponseEcho
message__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseEcho Text
-> FieldDescriptor ResponseEcho
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"message"
(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 ResponseEcho ResponseEcho Text Text
-> FieldAccessor ResponseEcho 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 "message" 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 @"message")) ::
Data.ProtoLens.FieldDescriptor ResponseEcho
in
[(Tag, FieldDescriptor ResponseEcho)]
-> Map Tag (FieldDescriptor ResponseEcho)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResponseEcho
message__field_descriptor)]
unknownFields :: LensLike' f ResponseEcho FieldSet
unknownFields
= (ResponseEcho -> FieldSet)
-> (ResponseEcho -> FieldSet -> ResponseEcho)
-> Lens' ResponseEcho FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseEcho -> FieldSet
_ResponseEcho'_unknownFields
(\ x__ :: ResponseEcho
x__ y__ :: FieldSet
y__ -> ResponseEcho
x__ {_ResponseEcho'_unknownFields :: FieldSet
_ResponseEcho'_unknownFields = FieldSet
y__})
defMessage :: ResponseEcho
defMessage
= $WResponseEcho'_constructor :: Text -> FieldSet -> ResponseEcho
ResponseEcho'_constructor
{_ResponseEcho'message :: Text
_ResponseEcho'message = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseEcho'_unknownFields :: FieldSet
_ResponseEcho'_unknownFields = []}
parseMessage :: Parser ResponseEcho
parseMessage
= let
loop ::
ResponseEcho -> Data.ProtoLens.Encoding.Bytes.Parser ResponseEcho
loop :: ResponseEcho -> Parser ResponseEcho
loop x :: ResponseEcho
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]))))
ResponseEcho -> Parser ResponseEcho
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseEcho ResponseEcho FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseEcho -> ResponseEcho
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 ResponseEcho ResponseEcho FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ResponseEcho
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))
"message"
ResponseEcho -> Parser ResponseEcho
loop (Setter ResponseEcho ResponseEcho Text Text
-> Text -> ResponseEcho -> ResponseEcho
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "message" 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 @"message") Text
y ResponseEcho
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseEcho -> Parser ResponseEcho
loop
(Setter ResponseEcho ResponseEcho FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseEcho -> ResponseEcho
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 ResponseEcho ResponseEcho FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseEcho
x)
in
Parser ResponseEcho -> String -> Parser ResponseEcho
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ResponseEcho -> Parser ResponseEcho
loop ResponseEcho
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ResponseEcho"
buildMessage :: ResponseEcho -> Builder
buildMessage
= \ _x :: ResponseEcho
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text ResponseEcho ResponseEcho Text Text
-> ResponseEcho -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "message" 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 @"message") ResponseEcho
_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 ResponseEcho ResponseEcho FieldSet FieldSet
-> ResponseEcho -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ResponseEcho ResponseEcho FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseEcho
_x))
instance Control.DeepSeq.NFData ResponseEcho where
rnf :: ResponseEcho -> ()
rnf
= \ x__ :: ResponseEcho
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseEcho -> FieldSet
_ResponseEcho'_unknownFields ResponseEcho
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ResponseEcho -> Text
_ResponseEcho'message ResponseEcho
x__) ())
data ResponseEndBlock
= ResponseEndBlock'_constructor {ResponseEndBlock -> Vector ValidatorUpdate
_ResponseEndBlock'validatorUpdates :: !(Data.Vector.Vector ValidatorUpdate),
ResponseEndBlock -> Maybe ConsensusParams
_ResponseEndBlock'consensusParamUpdates :: !(Prelude.Maybe ConsensusParams),
ResponseEndBlock -> Vector Event
_ResponseEndBlock'events :: !(Data.Vector.Vector Event),
ResponseEndBlock -> FieldSet
_ResponseEndBlock'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseEndBlock -> ResponseEndBlock -> Bool
(ResponseEndBlock -> ResponseEndBlock -> Bool)
-> (ResponseEndBlock -> ResponseEndBlock -> Bool)
-> Eq ResponseEndBlock
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseEndBlock -> ResponseEndBlock -> Bool
$c/= :: ResponseEndBlock -> ResponseEndBlock -> Bool
== :: ResponseEndBlock -> ResponseEndBlock -> Bool
$c== :: ResponseEndBlock -> ResponseEndBlock -> Bool
Prelude.Eq, Eq ResponseEndBlock
Eq ResponseEndBlock =>
(ResponseEndBlock -> ResponseEndBlock -> Ordering)
-> (ResponseEndBlock -> ResponseEndBlock -> Bool)
-> (ResponseEndBlock -> ResponseEndBlock -> Bool)
-> (ResponseEndBlock -> ResponseEndBlock -> Bool)
-> (ResponseEndBlock -> ResponseEndBlock -> Bool)
-> (ResponseEndBlock -> ResponseEndBlock -> ResponseEndBlock)
-> (ResponseEndBlock -> ResponseEndBlock -> ResponseEndBlock)
-> Ord ResponseEndBlock
ResponseEndBlock -> ResponseEndBlock -> Bool
ResponseEndBlock -> ResponseEndBlock -> Ordering
ResponseEndBlock -> ResponseEndBlock -> ResponseEndBlock
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 :: ResponseEndBlock -> ResponseEndBlock -> ResponseEndBlock
$cmin :: ResponseEndBlock -> ResponseEndBlock -> ResponseEndBlock
max :: ResponseEndBlock -> ResponseEndBlock -> ResponseEndBlock
$cmax :: ResponseEndBlock -> ResponseEndBlock -> ResponseEndBlock
>= :: ResponseEndBlock -> ResponseEndBlock -> Bool
$c>= :: ResponseEndBlock -> ResponseEndBlock -> Bool
> :: ResponseEndBlock -> ResponseEndBlock -> Bool
$c> :: ResponseEndBlock -> ResponseEndBlock -> Bool
<= :: ResponseEndBlock -> ResponseEndBlock -> Bool
$c<= :: ResponseEndBlock -> ResponseEndBlock -> Bool
< :: ResponseEndBlock -> ResponseEndBlock -> Bool
$c< :: ResponseEndBlock -> ResponseEndBlock -> Bool
compare :: ResponseEndBlock -> ResponseEndBlock -> Ordering
$ccompare :: ResponseEndBlock -> ResponseEndBlock -> Ordering
$cp1Ord :: Eq ResponseEndBlock
Prelude.Ord)
instance Prelude.Show ResponseEndBlock where
showsPrec :: Int -> ResponseEndBlock -> ShowS
showsPrec _ __x :: ResponseEndBlock
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseEndBlock -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseEndBlock
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResponseEndBlock "validatorUpdates" [ValidatorUpdate] where
fieldOf :: Proxy# "validatorUpdates"
-> ([ValidatorUpdate] -> f [ValidatorUpdate])
-> ResponseEndBlock
-> f ResponseEndBlock
fieldOf _
= ((Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> ResponseEndBlock -> f ResponseEndBlock)
-> (([ValidatorUpdate] -> f [ValidatorUpdate])
-> Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> ([ValidatorUpdate] -> f [ValidatorUpdate])
-> ResponseEndBlock
-> f ResponseEndBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseEndBlock -> Vector ValidatorUpdate)
-> (ResponseEndBlock -> Vector ValidatorUpdate -> ResponseEndBlock)
-> Lens
ResponseEndBlock
ResponseEndBlock
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseEndBlock -> Vector ValidatorUpdate
_ResponseEndBlock'validatorUpdates
(\ x__ :: ResponseEndBlock
x__ y__ :: Vector ValidatorUpdate
y__ -> ResponseEndBlock
x__ {_ResponseEndBlock'validatorUpdates :: Vector ValidatorUpdate
_ResponseEndBlock'validatorUpdates = Vector ValidatorUpdate
y__}))
((Vector ValidatorUpdate -> [ValidatorUpdate])
-> (Vector ValidatorUpdate
-> [ValidatorUpdate] -> Vector ValidatorUpdate)
-> Lens
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
[ValidatorUpdate]
[ValidatorUpdate]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector ValidatorUpdate -> [ValidatorUpdate]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [ValidatorUpdate]
y__ -> [ValidatorUpdate] -> Vector ValidatorUpdate
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [ValidatorUpdate]
y__))
instance Data.ProtoLens.Field.HasField ResponseEndBlock "vec'validatorUpdates" (Data.Vector.Vector ValidatorUpdate) where
fieldOf :: Proxy# "vec'validatorUpdates"
-> (Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> ResponseEndBlock
-> f ResponseEndBlock
fieldOf _
= ((Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> ResponseEndBlock -> f ResponseEndBlock)
-> ((Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> (Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> ResponseEndBlock
-> f ResponseEndBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseEndBlock -> Vector ValidatorUpdate)
-> (ResponseEndBlock -> Vector ValidatorUpdate -> ResponseEndBlock)
-> Lens
ResponseEndBlock
ResponseEndBlock
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseEndBlock -> Vector ValidatorUpdate
_ResponseEndBlock'validatorUpdates
(\ x__ :: ResponseEndBlock
x__ y__ :: Vector ValidatorUpdate
y__ -> ResponseEndBlock
x__ {_ResponseEndBlock'validatorUpdates :: Vector ValidatorUpdate
_ResponseEndBlock'validatorUpdates = Vector ValidatorUpdate
y__}))
(Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> Vector ValidatorUpdate -> f (Vector ValidatorUpdate)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseEndBlock "consensusParamUpdates" ConsensusParams where
fieldOf :: Proxy# "consensusParamUpdates"
-> (ConsensusParams -> f ConsensusParams)
-> ResponseEndBlock
-> f ResponseEndBlock
fieldOf _
= ((Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> ResponseEndBlock -> f ResponseEndBlock)
-> ((ConsensusParams -> f ConsensusParams)
-> Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> (ConsensusParams -> f ConsensusParams)
-> ResponseEndBlock
-> f ResponseEndBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseEndBlock -> Maybe ConsensusParams)
-> (ResponseEndBlock -> Maybe ConsensusParams -> ResponseEndBlock)
-> Lens
ResponseEndBlock
ResponseEndBlock
(Maybe ConsensusParams)
(Maybe ConsensusParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseEndBlock -> Maybe ConsensusParams
_ResponseEndBlock'consensusParamUpdates
(\ x__ :: ResponseEndBlock
x__ y__ :: Maybe ConsensusParams
y__ -> ResponseEndBlock
x__ {_ResponseEndBlock'consensusParamUpdates :: Maybe ConsensusParams
_ResponseEndBlock'consensusParamUpdates = Maybe ConsensusParams
y__}))
(ConsensusParams -> Lens' (Maybe ConsensusParams) ConsensusParams
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ConsensusParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ResponseEndBlock "maybe'consensusParamUpdates" (Prelude.Maybe ConsensusParams) where
fieldOf :: Proxy# "maybe'consensusParamUpdates"
-> (Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> ResponseEndBlock
-> f ResponseEndBlock
fieldOf _
= ((Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> ResponseEndBlock -> f ResponseEndBlock)
-> ((Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> (Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> ResponseEndBlock
-> f ResponseEndBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseEndBlock -> Maybe ConsensusParams)
-> (ResponseEndBlock -> Maybe ConsensusParams -> ResponseEndBlock)
-> Lens
ResponseEndBlock
ResponseEndBlock
(Maybe ConsensusParams)
(Maybe ConsensusParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseEndBlock -> Maybe ConsensusParams
_ResponseEndBlock'consensusParamUpdates
(\ x__ :: ResponseEndBlock
x__ y__ :: Maybe ConsensusParams
y__ -> ResponseEndBlock
x__ {_ResponseEndBlock'consensusParamUpdates :: Maybe ConsensusParams
_ResponseEndBlock'consensusParamUpdates = Maybe ConsensusParams
y__}))
(Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> Maybe ConsensusParams -> f (Maybe ConsensusParams)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseEndBlock "events" [Event] where
fieldOf :: Proxy# "events"
-> ([Event] -> f [Event]) -> ResponseEndBlock -> f ResponseEndBlock
fieldOf _
= ((Vector Event -> f (Vector Event))
-> ResponseEndBlock -> f ResponseEndBlock)
-> (([Event] -> f [Event]) -> Vector Event -> f (Vector Event))
-> ([Event] -> f [Event])
-> ResponseEndBlock
-> f ResponseEndBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseEndBlock -> Vector Event)
-> (ResponseEndBlock -> Vector Event -> ResponseEndBlock)
-> Lens
ResponseEndBlock ResponseEndBlock (Vector Event) (Vector Event)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseEndBlock -> Vector Event
_ResponseEndBlock'events
(\ x__ :: ResponseEndBlock
x__ y__ :: Vector Event
y__ -> ResponseEndBlock
x__ {_ResponseEndBlock'events :: Vector Event
_ResponseEndBlock'events = Vector Event
y__}))
((Vector Event -> [Event])
-> (Vector Event -> [Event] -> Vector Event)
-> Lens (Vector Event) (Vector Event) [Event] [Event]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector Event -> [Event]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [Event]
y__ -> [Event] -> Vector Event
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Event]
y__))
instance Data.ProtoLens.Field.HasField ResponseEndBlock "vec'events" (Data.Vector.Vector Event) where
fieldOf :: Proxy# "vec'events"
-> (Vector Event -> f (Vector Event))
-> ResponseEndBlock
-> f ResponseEndBlock
fieldOf _
= ((Vector Event -> f (Vector Event))
-> ResponseEndBlock -> f ResponseEndBlock)
-> ((Vector Event -> f (Vector Event))
-> Vector Event -> f (Vector Event))
-> (Vector Event -> f (Vector Event))
-> ResponseEndBlock
-> f ResponseEndBlock
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseEndBlock -> Vector Event)
-> (ResponseEndBlock -> Vector Event -> ResponseEndBlock)
-> Lens
ResponseEndBlock ResponseEndBlock (Vector Event) (Vector Event)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseEndBlock -> Vector Event
_ResponseEndBlock'events
(\ x__ :: ResponseEndBlock
x__ y__ :: Vector Event
y__ -> ResponseEndBlock
x__ {_ResponseEndBlock'events :: Vector Event
_ResponseEndBlock'events = Vector Event
y__}))
(Vector Event -> f (Vector Event))
-> Vector Event -> f (Vector Event)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResponseEndBlock where
messageName :: Proxy ResponseEndBlock -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseEndBlock"
fieldsByTag :: Map Tag (FieldDescriptor ResponseEndBlock)
fieldsByTag
= let
validatorUpdates__field_descriptor :: FieldDescriptor ResponseEndBlock
validatorUpdates__field_descriptor
= String
-> FieldTypeDescriptor ValidatorUpdate
-> FieldAccessor ResponseEndBlock ValidatorUpdate
-> FieldDescriptor ResponseEndBlock
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"validator_updates"
(MessageOrGroup -> FieldTypeDescriptor ValidatorUpdate
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ValidatorUpdate)
(Packing
-> Lens' ResponseEndBlock [ValidatorUpdate]
-> FieldAccessor ResponseEndBlock ValidatorUpdate
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked
(forall s a (f :: * -> *).
(HasField s "validatorUpdates" 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 @"validatorUpdates")) ::
Data.ProtoLens.FieldDescriptor ResponseEndBlock
consensusParamUpdates__field_descriptor :: FieldDescriptor ResponseEndBlock
consensusParamUpdates__field_descriptor
= String
-> FieldTypeDescriptor ConsensusParams
-> FieldAccessor ResponseEndBlock ConsensusParams
-> FieldDescriptor ResponseEndBlock
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"consensus_param_updates"
(MessageOrGroup -> FieldTypeDescriptor ConsensusParams
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ConsensusParams)
(Lens
ResponseEndBlock
ResponseEndBlock
(Maybe ConsensusParams)
(Maybe ConsensusParams)
-> FieldAccessor ResponseEndBlock ConsensusParams
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'consensusParamUpdates" 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'consensusParamUpdates")) ::
Data.ProtoLens.FieldDescriptor ResponseEndBlock
events__field_descriptor :: FieldDescriptor ResponseEndBlock
events__field_descriptor
= String
-> FieldTypeDescriptor Event
-> FieldAccessor ResponseEndBlock Event
-> FieldDescriptor ResponseEndBlock
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"events"
(MessageOrGroup -> FieldTypeDescriptor Event
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Event)
(Packing
-> Lens' ResponseEndBlock [Event]
-> FieldAccessor ResponseEndBlock Event
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "events" 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 @"events")) ::
Data.ProtoLens.FieldDescriptor ResponseEndBlock
in
[(Tag, FieldDescriptor ResponseEndBlock)]
-> Map Tag (FieldDescriptor ResponseEndBlock)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResponseEndBlock
validatorUpdates__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ResponseEndBlock
consensusParamUpdates__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor ResponseEndBlock
events__field_descriptor)]
unknownFields :: LensLike' f ResponseEndBlock FieldSet
unknownFields
= (ResponseEndBlock -> FieldSet)
-> (ResponseEndBlock -> FieldSet -> ResponseEndBlock)
-> Lens' ResponseEndBlock FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseEndBlock -> FieldSet
_ResponseEndBlock'_unknownFields
(\ x__ :: ResponseEndBlock
x__ y__ :: FieldSet
y__ -> ResponseEndBlock
x__ {_ResponseEndBlock'_unknownFields :: FieldSet
_ResponseEndBlock'_unknownFields = FieldSet
y__})
defMessage :: ResponseEndBlock
defMessage
= $WResponseEndBlock'_constructor :: Vector ValidatorUpdate
-> Maybe ConsensusParams
-> Vector Event
-> FieldSet
-> ResponseEndBlock
ResponseEndBlock'_constructor
{_ResponseEndBlock'validatorUpdates :: Vector ValidatorUpdate
_ResponseEndBlock'validatorUpdates = Vector ValidatorUpdate
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_ResponseEndBlock'consensusParamUpdates :: Maybe ConsensusParams
_ResponseEndBlock'consensusParamUpdates = Maybe ConsensusParams
forall a. Maybe a
Prelude.Nothing,
_ResponseEndBlock'events :: Vector Event
_ResponseEndBlock'events = Vector Event
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_ResponseEndBlock'_unknownFields :: FieldSet
_ResponseEndBlock'_unknownFields = []}
parseMessage :: Parser ResponseEndBlock
parseMessage
= let
loop ::
ResponseEndBlock
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Event
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ValidatorUpdate
-> Data.ProtoLens.Encoding.Bytes.Parser ResponseEndBlock
loop :: ResponseEndBlock
-> Growing Vector RealWorld Event
-> Growing Vector RealWorld ValidatorUpdate
-> Parser ResponseEndBlock
loop x :: ResponseEndBlock
x mutable'events :: Growing Vector RealWorld Event
mutable'events mutable'validatorUpdates :: Growing Vector RealWorld ValidatorUpdate
mutable'validatorUpdates
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector Event
frozen'events <- IO (Vector Event) -> Parser (Vector Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Event -> IO (Vector Event)
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 Event
Growing Vector (PrimState IO) Event
mutable'events)
Vector ValidatorUpdate
frozen'validatorUpdates <- IO (Vector ValidatorUpdate) -> Parser (Vector ValidatorUpdate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) ValidatorUpdate
-> IO (Vector ValidatorUpdate)
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 ValidatorUpdate
Growing Vector (PrimState IO) ValidatorUpdate
mutable'validatorUpdates)
(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]))))
ResponseEndBlock -> Parser ResponseEndBlock
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseEndBlock ResponseEndBlock FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseEndBlock -> ResponseEndBlock
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 ResponseEndBlock ResponseEndBlock FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
ResponseEndBlock ResponseEndBlock (Vector Event) (Vector Event)
-> Vector Event -> ResponseEndBlock -> ResponseEndBlock
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'events" 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'events")
Vector Event
frozen'events
(Setter
ResponseEndBlock
ResponseEndBlock
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
-> Vector ValidatorUpdate -> ResponseEndBlock -> ResponseEndBlock
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'validatorUpdates" 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'validatorUpdates")
Vector ValidatorUpdate
frozen'validatorUpdates
ResponseEndBlock
x)))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do !ValidatorUpdate
y <- Parser ValidatorUpdate -> String -> Parser ValidatorUpdate
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ValidatorUpdate -> Parser ValidatorUpdate
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 ValidatorUpdate
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"validator_updates"
Growing Vector RealWorld ValidatorUpdate
v <- IO (Growing Vector RealWorld ValidatorUpdate)
-> Parser (Growing Vector RealWorld ValidatorUpdate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) ValidatorUpdate
-> ValidatorUpdate
-> IO (Growing Vector (PrimState IO) ValidatorUpdate)
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 ValidatorUpdate
Growing Vector (PrimState IO) ValidatorUpdate
mutable'validatorUpdates ValidatorUpdate
y)
ResponseEndBlock
-> Growing Vector RealWorld Event
-> Growing Vector RealWorld ValidatorUpdate
-> Parser ResponseEndBlock
loop ResponseEndBlock
x Growing Vector RealWorld Event
mutable'events Growing Vector RealWorld ValidatorUpdate
v
18
-> do ConsensusParams
y <- Parser ConsensusParams -> String -> Parser ConsensusParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ConsensusParams -> Parser ConsensusParams
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 ConsensusParams
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"consensus_param_updates"
ResponseEndBlock
-> Growing Vector RealWorld Event
-> Growing Vector RealWorld ValidatorUpdate
-> Parser ResponseEndBlock
loop
(Setter
ResponseEndBlock ResponseEndBlock ConsensusParams ConsensusParams
-> ConsensusParams -> ResponseEndBlock -> ResponseEndBlock
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "consensusParamUpdates" 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 @"consensusParamUpdates") ConsensusParams
y ResponseEndBlock
x)
Growing Vector RealWorld Event
mutable'events
Growing Vector RealWorld ValidatorUpdate
mutable'validatorUpdates
26
-> do !Event
y <- Parser Event -> String -> Parser Event
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Event -> Parser Event
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 Event
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"events"
Growing Vector RealWorld Event
v <- IO (Growing Vector RealWorld Event)
-> Parser (Growing Vector RealWorld Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Event
-> Event -> IO (Growing Vector (PrimState IO) Event)
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 Event
Growing Vector (PrimState IO) Event
mutable'events Event
y)
ResponseEndBlock
-> Growing Vector RealWorld Event
-> Growing Vector RealWorld ValidatorUpdate
-> Parser ResponseEndBlock
loop ResponseEndBlock
x Growing Vector RealWorld Event
v Growing Vector RealWorld ValidatorUpdate
mutable'validatorUpdates
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseEndBlock
-> Growing Vector RealWorld Event
-> Growing Vector RealWorld ValidatorUpdate
-> Parser ResponseEndBlock
loop
(Setter ResponseEndBlock ResponseEndBlock FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseEndBlock -> ResponseEndBlock
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 ResponseEndBlock ResponseEndBlock FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseEndBlock
x)
Growing Vector RealWorld Event
mutable'events
Growing Vector RealWorld ValidatorUpdate
mutable'validatorUpdates
in
Parser ResponseEndBlock -> String -> Parser ResponseEndBlock
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld Event
mutable'events <- IO (Growing Vector RealWorld Event)
-> Parser (Growing Vector RealWorld Event)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld Event)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
Growing Vector RealWorld ValidatorUpdate
mutable'validatorUpdates <- IO (Growing Vector RealWorld ValidatorUpdate)
-> Parser (Growing Vector RealWorld ValidatorUpdate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld ValidatorUpdate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
ResponseEndBlock
-> Growing Vector RealWorld Event
-> Growing Vector RealWorld ValidatorUpdate
-> Parser ResponseEndBlock
loop
ResponseEndBlock
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld Event
mutable'events Growing Vector RealWorld ValidatorUpdate
mutable'validatorUpdates)
"ResponseEndBlock"
buildMessage :: ResponseEndBlock -> Builder
buildMessage
= \ _x :: ResponseEndBlock
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((ValidatorUpdate -> Builder) -> Vector ValidatorUpdate -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: ValidatorUpdate
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (ValidatorUpdate -> ByteString) -> ValidatorUpdate -> 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))
ValidatorUpdate -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ValidatorUpdate
_v))
(FoldLike
(Vector ValidatorUpdate)
ResponseEndBlock
ResponseEndBlock
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
-> ResponseEndBlock -> Vector ValidatorUpdate
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "vec'validatorUpdates" 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'validatorUpdates") ResponseEndBlock
_x))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe ConsensusParams)
ResponseEndBlock
ResponseEndBlock
(Maybe ConsensusParams)
(Maybe ConsensusParams)
-> ResponseEndBlock -> Maybe ConsensusParams
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'consensusParamUpdates" 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'consensusParamUpdates") ResponseEndBlock
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: ConsensusParams
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (ConsensusParams -> ByteString) -> ConsensusParams -> 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))
ConsensusParams -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ConsensusParams
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((Event -> Builder) -> Vector Event -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: Event
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
((ByteString -> Builder)
-> (Event -> ByteString) -> Event -> 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))
Event -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Event
_v))
(FoldLike
(Vector Event)
ResponseEndBlock
ResponseEndBlock
(Vector Event)
(Vector Event)
-> ResponseEndBlock -> Vector Event
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'events" 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'events") ResponseEndBlock
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet ResponseEndBlock ResponseEndBlock FieldSet FieldSet
-> ResponseEndBlock -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet ResponseEndBlock ResponseEndBlock FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseEndBlock
_x))))
instance Control.DeepSeq.NFData ResponseEndBlock where
rnf :: ResponseEndBlock -> ()
rnf
= \ x__ :: ResponseEndBlock
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseEndBlock -> FieldSet
_ResponseEndBlock'_unknownFields ResponseEndBlock
x__)
(Vector ValidatorUpdate -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseEndBlock -> Vector ValidatorUpdate
_ResponseEndBlock'validatorUpdates ResponseEndBlock
x__)
(Maybe ConsensusParams -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseEndBlock -> Maybe ConsensusParams
_ResponseEndBlock'consensusParamUpdates ResponseEndBlock
x__)
(Vector Event -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ResponseEndBlock -> Vector Event
_ResponseEndBlock'events ResponseEndBlock
x__) ())))
data ResponseException
= ResponseException'_constructor {ResponseException -> Text
_ResponseException'error :: !Data.Text.Text,
ResponseException -> FieldSet
_ResponseException'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseException -> ResponseException -> Bool
(ResponseException -> ResponseException -> Bool)
-> (ResponseException -> ResponseException -> Bool)
-> Eq ResponseException
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseException -> ResponseException -> Bool
$c/= :: ResponseException -> ResponseException -> Bool
== :: ResponseException -> ResponseException -> Bool
$c== :: ResponseException -> ResponseException -> Bool
Prelude.Eq, Eq ResponseException
Eq ResponseException =>
(ResponseException -> ResponseException -> Ordering)
-> (ResponseException -> ResponseException -> Bool)
-> (ResponseException -> ResponseException -> Bool)
-> (ResponseException -> ResponseException -> Bool)
-> (ResponseException -> ResponseException -> Bool)
-> (ResponseException -> ResponseException -> ResponseException)
-> (ResponseException -> ResponseException -> ResponseException)
-> Ord ResponseException
ResponseException -> ResponseException -> Bool
ResponseException -> ResponseException -> Ordering
ResponseException -> ResponseException -> ResponseException
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 :: ResponseException -> ResponseException -> ResponseException
$cmin :: ResponseException -> ResponseException -> ResponseException
max :: ResponseException -> ResponseException -> ResponseException
$cmax :: ResponseException -> ResponseException -> ResponseException
>= :: ResponseException -> ResponseException -> Bool
$c>= :: ResponseException -> ResponseException -> Bool
> :: ResponseException -> ResponseException -> Bool
$c> :: ResponseException -> ResponseException -> Bool
<= :: ResponseException -> ResponseException -> Bool
$c<= :: ResponseException -> ResponseException -> Bool
< :: ResponseException -> ResponseException -> Bool
$c< :: ResponseException -> ResponseException -> Bool
compare :: ResponseException -> ResponseException -> Ordering
$ccompare :: ResponseException -> ResponseException -> Ordering
$cp1Ord :: Eq ResponseException
Prelude.Ord)
instance Prelude.Show ResponseException where
showsPrec :: Int -> ResponseException -> ShowS
showsPrec _ __x :: ResponseException
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseException -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseException
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResponseException "error" Data.Text.Text where
fieldOf :: Proxy# "error"
-> (Text -> f Text) -> ResponseException -> f ResponseException
fieldOf _
= ((Text -> f Text) -> ResponseException -> f ResponseException)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseException
-> f ResponseException
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseException -> Text)
-> (ResponseException -> Text -> ResponseException)
-> Lens ResponseException ResponseException Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseException -> Text
_ResponseException'error
(\ x__ :: ResponseException
x__ y__ :: Text
y__ -> ResponseException
x__ {_ResponseException'error :: Text
_ResponseException'error = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResponseException where
messageName :: Proxy ResponseException -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseException"
fieldsByTag :: Map Tag (FieldDescriptor ResponseException)
fieldsByTag
= let
error__field_descriptor :: FieldDescriptor ResponseException
error__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseException Text
-> FieldDescriptor ResponseException
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"error"
(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 ResponseException ResponseException Text Text
-> FieldAccessor ResponseException 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 "error" 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 @"error")) ::
Data.ProtoLens.FieldDescriptor ResponseException
in
[(Tag, FieldDescriptor ResponseException)]
-> Map Tag (FieldDescriptor ResponseException)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResponseException
error__field_descriptor)]
unknownFields :: LensLike' f ResponseException FieldSet
unknownFields
= (ResponseException -> FieldSet)
-> (ResponseException -> FieldSet -> ResponseException)
-> Lens' ResponseException FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseException -> FieldSet
_ResponseException'_unknownFields
(\ x__ :: ResponseException
x__ y__ :: FieldSet
y__ -> ResponseException
x__ {_ResponseException'_unknownFields :: FieldSet
_ResponseException'_unknownFields = FieldSet
y__})
defMessage :: ResponseException
defMessage
= $WResponseException'_constructor :: Text -> FieldSet -> ResponseException
ResponseException'_constructor
{_ResponseException'error :: Text
_ResponseException'error = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseException'_unknownFields :: FieldSet
_ResponseException'_unknownFields = []}
parseMessage :: Parser ResponseException
parseMessage
= let
loop ::
ResponseException
-> Data.ProtoLens.Encoding.Bytes.Parser ResponseException
loop :: ResponseException -> Parser ResponseException
loop x :: ResponseException
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]))))
ResponseException -> Parser ResponseException
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseException ResponseException FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseException -> ResponseException
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 ResponseException ResponseException FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ResponseException
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))
"error"
ResponseException -> Parser ResponseException
loop (Setter ResponseException ResponseException Text Text
-> Text -> ResponseException -> ResponseException
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "error" 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 @"error") Text
y ResponseException
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseException -> Parser ResponseException
loop
(Setter ResponseException ResponseException FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseException -> ResponseException
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 ResponseException ResponseException FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseException
x)
in
Parser ResponseException -> String -> Parser ResponseException
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ResponseException -> Parser ResponseException
loop ResponseException
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ResponseException"
buildMessage :: ResponseException -> Builder
buildMessage
= \ _x :: ResponseException
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text ResponseException ResponseException Text Text
-> ResponseException -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "error" 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 @"error") ResponseException
_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 ResponseException ResponseException FieldSet FieldSet
-> ResponseException -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet ResponseException ResponseException FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseException
_x))
instance Control.DeepSeq.NFData ResponseException where
rnf :: ResponseException -> ()
rnf
= \ x__ :: ResponseException
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseException -> FieldSet
_ResponseException'_unknownFields ResponseException
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ResponseException -> Text
_ResponseException'error ResponseException
x__) ())
data ResponseFlush
= ResponseFlush'_constructor {ResponseFlush -> FieldSet
_ResponseFlush'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseFlush -> ResponseFlush -> Bool
(ResponseFlush -> ResponseFlush -> Bool)
-> (ResponseFlush -> ResponseFlush -> Bool) -> Eq ResponseFlush
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseFlush -> ResponseFlush -> Bool
$c/= :: ResponseFlush -> ResponseFlush -> Bool
== :: ResponseFlush -> ResponseFlush -> Bool
$c== :: ResponseFlush -> ResponseFlush -> Bool
Prelude.Eq, Eq ResponseFlush
Eq ResponseFlush =>
(ResponseFlush -> ResponseFlush -> Ordering)
-> (ResponseFlush -> ResponseFlush -> Bool)
-> (ResponseFlush -> ResponseFlush -> Bool)
-> (ResponseFlush -> ResponseFlush -> Bool)
-> (ResponseFlush -> ResponseFlush -> Bool)
-> (ResponseFlush -> ResponseFlush -> ResponseFlush)
-> (ResponseFlush -> ResponseFlush -> ResponseFlush)
-> Ord ResponseFlush
ResponseFlush -> ResponseFlush -> Bool
ResponseFlush -> ResponseFlush -> Ordering
ResponseFlush -> ResponseFlush -> ResponseFlush
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 :: ResponseFlush -> ResponseFlush -> ResponseFlush
$cmin :: ResponseFlush -> ResponseFlush -> ResponseFlush
max :: ResponseFlush -> ResponseFlush -> ResponseFlush
$cmax :: ResponseFlush -> ResponseFlush -> ResponseFlush
>= :: ResponseFlush -> ResponseFlush -> Bool
$c>= :: ResponseFlush -> ResponseFlush -> Bool
> :: ResponseFlush -> ResponseFlush -> Bool
$c> :: ResponseFlush -> ResponseFlush -> Bool
<= :: ResponseFlush -> ResponseFlush -> Bool
$c<= :: ResponseFlush -> ResponseFlush -> Bool
< :: ResponseFlush -> ResponseFlush -> Bool
$c< :: ResponseFlush -> ResponseFlush -> Bool
compare :: ResponseFlush -> ResponseFlush -> Ordering
$ccompare :: ResponseFlush -> ResponseFlush -> Ordering
$cp1Ord :: Eq ResponseFlush
Prelude.Ord)
instance Prelude.Show ResponseFlush where
showsPrec :: Int -> ResponseFlush -> ShowS
showsPrec _ __x :: ResponseFlush
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseFlush -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseFlush
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Message ResponseFlush where
messageName :: Proxy ResponseFlush -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseFlush"
fieldsByTag :: Map Tag (FieldDescriptor ResponseFlush)
fieldsByTag = let in [(Tag, FieldDescriptor ResponseFlush)]
-> Map Tag (FieldDescriptor ResponseFlush)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList []
unknownFields :: LensLike' f ResponseFlush FieldSet
unknownFields
= (ResponseFlush -> FieldSet)
-> (ResponseFlush -> FieldSet -> ResponseFlush)
-> Lens' ResponseFlush FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseFlush -> FieldSet
_ResponseFlush'_unknownFields
(\ x__ :: ResponseFlush
x__ y__ :: FieldSet
y__ -> ResponseFlush
x__ {_ResponseFlush'_unknownFields :: FieldSet
_ResponseFlush'_unknownFields = FieldSet
y__})
defMessage :: ResponseFlush
defMessage
= $WResponseFlush'_constructor :: FieldSet -> ResponseFlush
ResponseFlush'_constructor {_ResponseFlush'_unknownFields :: FieldSet
_ResponseFlush'_unknownFields = []}
parseMessage :: Parser ResponseFlush
parseMessage
= let
loop ::
ResponseFlush -> Data.ProtoLens.Encoding.Bytes.Parser ResponseFlush
loop :: ResponseFlush -> Parser ResponseFlush
loop x :: ResponseFlush
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]))))
ResponseFlush -> Parser ResponseFlush
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseFlush ResponseFlush FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseFlush -> ResponseFlush
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 ResponseFlush ResponseFlush FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ResponseFlush
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of {
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseFlush -> Parser ResponseFlush
loop
(Setter ResponseFlush ResponseFlush FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseFlush -> ResponseFlush
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 ResponseFlush ResponseFlush FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseFlush
x) }
in
Parser ResponseFlush -> String -> Parser ResponseFlush
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ResponseFlush -> Parser ResponseFlush
loop ResponseFlush
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ResponseFlush"
buildMessage :: ResponseFlush -> Builder
buildMessage
= \ _x :: ResponseFlush
_x
-> FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet ResponseFlush ResponseFlush FieldSet FieldSet
-> ResponseFlush -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ResponseFlush ResponseFlush FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseFlush
_x)
instance Control.DeepSeq.NFData ResponseFlush where
rnf :: ResponseFlush -> ()
rnf
= \ x__ :: ResponseFlush
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ResponseFlush -> FieldSet
_ResponseFlush'_unknownFields ResponseFlush
x__) ()
data ResponseInfo
= ResponseInfo'_constructor {ResponseInfo -> Text
_ResponseInfo'data' :: !Data.Text.Text,
ResponseInfo -> Text
_ResponseInfo'version :: !Data.Text.Text,
ResponseInfo -> Word64
_ResponseInfo'appVersion :: !Data.Word.Word64,
ResponseInfo -> Int64
_ResponseInfo'lastBlockHeight :: !Data.Int.Int64,
ResponseInfo -> ByteString
_ResponseInfo'lastBlockAppHash :: !Data.ByteString.ByteString,
ResponseInfo -> FieldSet
_ResponseInfo'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseInfo -> ResponseInfo -> Bool
(ResponseInfo -> ResponseInfo -> Bool)
-> (ResponseInfo -> ResponseInfo -> Bool) -> Eq ResponseInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseInfo -> ResponseInfo -> Bool
$c/= :: ResponseInfo -> ResponseInfo -> Bool
== :: ResponseInfo -> ResponseInfo -> Bool
$c== :: ResponseInfo -> ResponseInfo -> Bool
Prelude.Eq, Eq ResponseInfo
Eq ResponseInfo =>
(ResponseInfo -> ResponseInfo -> Ordering)
-> (ResponseInfo -> ResponseInfo -> Bool)
-> (ResponseInfo -> ResponseInfo -> Bool)
-> (ResponseInfo -> ResponseInfo -> Bool)
-> (ResponseInfo -> ResponseInfo -> Bool)
-> (ResponseInfo -> ResponseInfo -> ResponseInfo)
-> (ResponseInfo -> ResponseInfo -> ResponseInfo)
-> Ord ResponseInfo
ResponseInfo -> ResponseInfo -> Bool
ResponseInfo -> ResponseInfo -> Ordering
ResponseInfo -> ResponseInfo -> ResponseInfo
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 :: ResponseInfo -> ResponseInfo -> ResponseInfo
$cmin :: ResponseInfo -> ResponseInfo -> ResponseInfo
max :: ResponseInfo -> ResponseInfo -> ResponseInfo
$cmax :: ResponseInfo -> ResponseInfo -> ResponseInfo
>= :: ResponseInfo -> ResponseInfo -> Bool
$c>= :: ResponseInfo -> ResponseInfo -> Bool
> :: ResponseInfo -> ResponseInfo -> Bool
$c> :: ResponseInfo -> ResponseInfo -> Bool
<= :: ResponseInfo -> ResponseInfo -> Bool
$c<= :: ResponseInfo -> ResponseInfo -> Bool
< :: ResponseInfo -> ResponseInfo -> Bool
$c< :: ResponseInfo -> ResponseInfo -> Bool
compare :: ResponseInfo -> ResponseInfo -> Ordering
$ccompare :: ResponseInfo -> ResponseInfo -> Ordering
$cp1Ord :: Eq ResponseInfo
Prelude.Ord)
instance Prelude.Show ResponseInfo where
showsPrec :: Int -> ResponseInfo -> ShowS
showsPrec _ __x :: ResponseInfo
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseInfo -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseInfo
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResponseInfo "data'" Data.Text.Text where
fieldOf :: Proxy# "data'"
-> (Text -> f Text) -> ResponseInfo -> f ResponseInfo
fieldOf _
= ((Text -> f Text) -> ResponseInfo -> f ResponseInfo)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseInfo
-> f ResponseInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseInfo -> Text)
-> (ResponseInfo -> Text -> ResponseInfo)
-> Lens ResponseInfo ResponseInfo Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseInfo -> Text
_ResponseInfo'data' (\ x__ :: ResponseInfo
x__ y__ :: Text
y__ -> ResponseInfo
x__ {_ResponseInfo'data' :: Text
_ResponseInfo'data' = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseInfo "version" Data.Text.Text where
fieldOf :: Proxy# "version"
-> (Text -> f Text) -> ResponseInfo -> f ResponseInfo
fieldOf _
= ((Text -> f Text) -> ResponseInfo -> f ResponseInfo)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseInfo
-> f ResponseInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseInfo -> Text)
-> (ResponseInfo -> Text -> ResponseInfo)
-> Lens ResponseInfo ResponseInfo Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseInfo -> Text
_ResponseInfo'version
(\ x__ :: ResponseInfo
x__ y__ :: Text
y__ -> ResponseInfo
x__ {_ResponseInfo'version :: Text
_ResponseInfo'version = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseInfo "appVersion" Data.Word.Word64 where
fieldOf :: Proxy# "appVersion"
-> (Word64 -> f Word64) -> ResponseInfo -> f ResponseInfo
fieldOf _
= ((Word64 -> f Word64) -> ResponseInfo -> f ResponseInfo)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> ResponseInfo
-> f ResponseInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseInfo -> Word64)
-> (ResponseInfo -> Word64 -> ResponseInfo)
-> Lens ResponseInfo ResponseInfo Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseInfo -> Word64
_ResponseInfo'appVersion
(\ x__ :: ResponseInfo
x__ y__ :: Word64
y__ -> ResponseInfo
x__ {_ResponseInfo'appVersion :: Word64
_ResponseInfo'appVersion = Word64
y__}))
(Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseInfo "lastBlockHeight" Data.Int.Int64 where
fieldOf :: Proxy# "lastBlockHeight"
-> (Int64 -> f Int64) -> ResponseInfo -> f ResponseInfo
fieldOf _
= ((Int64 -> f Int64) -> ResponseInfo -> f ResponseInfo)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ResponseInfo
-> f ResponseInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseInfo -> Int64)
-> (ResponseInfo -> Int64 -> ResponseInfo)
-> Lens ResponseInfo ResponseInfo Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseInfo -> Int64
_ResponseInfo'lastBlockHeight
(\ x__ :: ResponseInfo
x__ y__ :: Int64
y__ -> ResponseInfo
x__ {_ResponseInfo'lastBlockHeight :: Int64
_ResponseInfo'lastBlockHeight = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseInfo "lastBlockAppHash" Data.ByteString.ByteString where
fieldOf :: Proxy# "lastBlockAppHash"
-> (ByteString -> f ByteString) -> ResponseInfo -> f ResponseInfo
fieldOf _
= ((ByteString -> f ByteString) -> ResponseInfo -> f ResponseInfo)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> ResponseInfo
-> f ResponseInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseInfo -> ByteString)
-> (ResponseInfo -> ByteString -> ResponseInfo)
-> Lens ResponseInfo ResponseInfo ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseInfo -> ByteString
_ResponseInfo'lastBlockAppHash
(\ x__ :: ResponseInfo
x__ y__ :: ByteString
y__ -> ResponseInfo
x__ {_ResponseInfo'lastBlockAppHash :: ByteString
_ResponseInfo'lastBlockAppHash = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResponseInfo where
messageName :: Proxy ResponseInfo -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseInfo"
fieldsByTag :: Map Tag (FieldDescriptor ResponseInfo)
fieldsByTag
= let
data'__field_descriptor :: FieldDescriptor ResponseInfo
data'__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseInfo Text
-> FieldDescriptor ResponseInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"data"
(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 ResponseInfo ResponseInfo Text Text
-> FieldAccessor ResponseInfo 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 "data'" 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 @"data'")) ::
Data.ProtoLens.FieldDescriptor ResponseInfo
version__field_descriptor :: FieldDescriptor ResponseInfo
version__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseInfo Text
-> FieldDescriptor ResponseInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"version"
(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 ResponseInfo ResponseInfo Text Text
-> FieldAccessor ResponseInfo 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 "version" 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 @"version")) ::
Data.ProtoLens.FieldDescriptor ResponseInfo
appVersion__field_descriptor :: FieldDescriptor ResponseInfo
appVersion__field_descriptor
= String
-> FieldTypeDescriptor Word64
-> FieldAccessor ResponseInfo Word64
-> FieldDescriptor ResponseInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"app_version"
(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 ResponseInfo ResponseInfo Word64 Word64
-> FieldAccessor ResponseInfo 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 "appVersion" 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 @"appVersion")) ::
Data.ProtoLens.FieldDescriptor ResponseInfo
lastBlockHeight__field_descriptor :: FieldDescriptor ResponseInfo
lastBlockHeight__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor ResponseInfo Int64
-> FieldDescriptor ResponseInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"last_block_height"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens ResponseInfo ResponseInfo Int64 Int64
-> FieldAccessor ResponseInfo Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "lastBlockHeight" 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 @"lastBlockHeight")) ::
Data.ProtoLens.FieldDescriptor ResponseInfo
lastBlockAppHash__field_descriptor :: FieldDescriptor ResponseInfo
lastBlockAppHash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor ResponseInfo ByteString
-> FieldDescriptor ResponseInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"last_block_app_hash"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens ResponseInfo ResponseInfo ByteString ByteString
-> FieldAccessor ResponseInfo ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "lastBlockAppHash" 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 @"lastBlockAppHash")) ::
Data.ProtoLens.FieldDescriptor ResponseInfo
in
[(Tag, FieldDescriptor ResponseInfo)]
-> Map Tag (FieldDescriptor ResponseInfo)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResponseInfo
data'__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ResponseInfo
version__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor ResponseInfo
appVersion__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor ResponseInfo
lastBlockHeight__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor ResponseInfo
lastBlockAppHash__field_descriptor)]
unknownFields :: LensLike' f ResponseInfo FieldSet
unknownFields
= (ResponseInfo -> FieldSet)
-> (ResponseInfo -> FieldSet -> ResponseInfo)
-> Lens' ResponseInfo FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseInfo -> FieldSet
_ResponseInfo'_unknownFields
(\ x__ :: ResponseInfo
x__ y__ :: FieldSet
y__ -> ResponseInfo
x__ {_ResponseInfo'_unknownFields :: FieldSet
_ResponseInfo'_unknownFields = FieldSet
y__})
defMessage :: ResponseInfo
defMessage
= $WResponseInfo'_constructor :: Text
-> Text
-> Word64
-> Int64
-> ByteString
-> FieldSet
-> ResponseInfo
ResponseInfo'_constructor
{_ResponseInfo'data' :: Text
_ResponseInfo'data' = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseInfo'version :: Text
_ResponseInfo'version = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseInfo'appVersion :: Word64
_ResponseInfo'appVersion = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseInfo'lastBlockHeight :: Int64
_ResponseInfo'lastBlockHeight = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseInfo'lastBlockAppHash :: ByteString
_ResponseInfo'lastBlockAppHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseInfo'_unknownFields :: FieldSet
_ResponseInfo'_unknownFields = []}
parseMessage :: Parser ResponseInfo
parseMessage
= let
loop ::
ResponseInfo -> Data.ProtoLens.Encoding.Bytes.Parser ResponseInfo
loop :: ResponseInfo -> Parser ResponseInfo
loop x :: ResponseInfo
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]))))
ResponseInfo -> Parser ResponseInfo
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseInfo ResponseInfo FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseInfo -> ResponseInfo
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 ResponseInfo ResponseInfo FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ResponseInfo
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))
"data"
ResponseInfo -> Parser ResponseInfo
loop (Setter ResponseInfo ResponseInfo Text Text
-> Text -> ResponseInfo -> ResponseInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") Text
y ResponseInfo
x)
18
-> 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))
"version"
ResponseInfo -> Parser ResponseInfo
loop (Setter ResponseInfo ResponseInfo Text Text
-> Text -> ResponseInfo -> ResponseInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "version" 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 @"version") Text
y ResponseInfo
x)
24
-> 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 "app_version"
ResponseInfo -> Parser ResponseInfo
loop
(Setter ResponseInfo ResponseInfo Word64 Word64
-> Word64 -> ResponseInfo -> ResponseInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "appVersion" 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 @"appVersion") Word64
y ResponseInfo
x)
32
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"last_block_height"
ResponseInfo -> Parser ResponseInfo
loop
(Setter ResponseInfo ResponseInfo Int64 Int64
-> Int64 -> ResponseInfo -> ResponseInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "lastBlockHeight" 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 @"lastBlockHeight") Int64
y ResponseInfo
x)
42
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"last_block_app_hash"
ResponseInfo -> Parser ResponseInfo
loop
(Setter ResponseInfo ResponseInfo ByteString ByteString
-> ByteString -> ResponseInfo -> ResponseInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "lastBlockAppHash" 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 @"lastBlockAppHash") ByteString
y ResponseInfo
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseInfo -> Parser ResponseInfo
loop
(Setter ResponseInfo ResponseInfo FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseInfo -> ResponseInfo
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 ResponseInfo ResponseInfo FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseInfo
x)
in
Parser ResponseInfo -> String -> Parser ResponseInfo
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ResponseInfo -> Parser ResponseInfo
loop ResponseInfo
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ResponseInfo"
buildMessage :: ResponseInfo -> Builder
buildMessage
= \ _x :: ResponseInfo
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text ResponseInfo ResponseInfo Text Text
-> ResponseInfo -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "data'" 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 @"data'") ResponseInfo
_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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text ResponseInfo ResponseInfo Text Text
-> ResponseInfo -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" 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 @"version") ResponseInfo
_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 18)
((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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Word64
_v
= FoldLike Word64 ResponseInfo ResponseInfo Word64 Word64
-> ResponseInfo -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "appVersion" 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 @"appVersion") ResponseInfo
_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 24)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v
= FoldLike Int64 ResponseInfo ResponseInfo Int64 Int64
-> ResponseInfo -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "lastBlockHeight" 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 @"lastBlockHeight") ResponseInfo
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 32)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike ByteString ResponseInfo ResponseInfo ByteString ByteString
-> ResponseInfo -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "lastBlockAppHash" 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 @"lastBlockAppHash") ResponseInfo
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 42)
((\ 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))
ByteString
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet ResponseInfo ResponseInfo FieldSet FieldSet
-> ResponseInfo -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ResponseInfo ResponseInfo FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseInfo
_x))))))
instance Control.DeepSeq.NFData ResponseInfo where
rnf :: ResponseInfo -> ()
rnf
= \ x__ :: ResponseInfo
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseInfo -> FieldSet
_ResponseInfo'_unknownFields ResponseInfo
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseInfo -> Text
_ResponseInfo'data' ResponseInfo
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseInfo -> Text
_ResponseInfo'version ResponseInfo
x__)
(Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseInfo -> Word64
_ResponseInfo'appVersion ResponseInfo
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseInfo -> Int64
_ResponseInfo'lastBlockHeight ResponseInfo
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseInfo -> ByteString
_ResponseInfo'lastBlockAppHash ResponseInfo
x__) ())))))
data ResponseInitChain
= ResponseInitChain'_constructor {ResponseInitChain -> Maybe ConsensusParams
_ResponseInitChain'consensusParams :: !(Prelude.Maybe ConsensusParams),
ResponseInitChain -> Vector ValidatorUpdate
_ResponseInitChain'validators :: !(Data.Vector.Vector ValidatorUpdate),
ResponseInitChain -> FieldSet
_ResponseInitChain'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseInitChain -> ResponseInitChain -> Bool
(ResponseInitChain -> ResponseInitChain -> Bool)
-> (ResponseInitChain -> ResponseInitChain -> Bool)
-> Eq ResponseInitChain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseInitChain -> ResponseInitChain -> Bool
$c/= :: ResponseInitChain -> ResponseInitChain -> Bool
== :: ResponseInitChain -> ResponseInitChain -> Bool
$c== :: ResponseInitChain -> ResponseInitChain -> Bool
Prelude.Eq, Eq ResponseInitChain
Eq ResponseInitChain =>
(ResponseInitChain -> ResponseInitChain -> Ordering)
-> (ResponseInitChain -> ResponseInitChain -> Bool)
-> (ResponseInitChain -> ResponseInitChain -> Bool)
-> (ResponseInitChain -> ResponseInitChain -> Bool)
-> (ResponseInitChain -> ResponseInitChain -> Bool)
-> (ResponseInitChain -> ResponseInitChain -> ResponseInitChain)
-> (ResponseInitChain -> ResponseInitChain -> ResponseInitChain)
-> Ord ResponseInitChain
ResponseInitChain -> ResponseInitChain -> Bool
ResponseInitChain -> ResponseInitChain -> Ordering
ResponseInitChain -> ResponseInitChain -> ResponseInitChain
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 :: ResponseInitChain -> ResponseInitChain -> ResponseInitChain
$cmin :: ResponseInitChain -> ResponseInitChain -> ResponseInitChain
max :: ResponseInitChain -> ResponseInitChain -> ResponseInitChain
$cmax :: ResponseInitChain -> ResponseInitChain -> ResponseInitChain
>= :: ResponseInitChain -> ResponseInitChain -> Bool
$c>= :: ResponseInitChain -> ResponseInitChain -> Bool
> :: ResponseInitChain -> ResponseInitChain -> Bool
$c> :: ResponseInitChain -> ResponseInitChain -> Bool
<= :: ResponseInitChain -> ResponseInitChain -> Bool
$c<= :: ResponseInitChain -> ResponseInitChain -> Bool
< :: ResponseInitChain -> ResponseInitChain -> Bool
$c< :: ResponseInitChain -> ResponseInitChain -> Bool
compare :: ResponseInitChain -> ResponseInitChain -> Ordering
$ccompare :: ResponseInitChain -> ResponseInitChain -> Ordering
$cp1Ord :: Eq ResponseInitChain
Prelude.Ord)
instance Prelude.Show ResponseInitChain where
showsPrec :: Int -> ResponseInitChain -> ShowS
showsPrec _ __x :: ResponseInitChain
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseInitChain -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseInitChain
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResponseInitChain "consensusParams" ConsensusParams where
fieldOf :: Proxy# "consensusParams"
-> (ConsensusParams -> f ConsensusParams)
-> ResponseInitChain
-> f ResponseInitChain
fieldOf _
= ((Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> ResponseInitChain -> f ResponseInitChain)
-> ((ConsensusParams -> f ConsensusParams)
-> Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> (ConsensusParams -> f ConsensusParams)
-> ResponseInitChain
-> f ResponseInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseInitChain -> Maybe ConsensusParams)
-> (ResponseInitChain
-> Maybe ConsensusParams -> ResponseInitChain)
-> Lens
ResponseInitChain
ResponseInitChain
(Maybe ConsensusParams)
(Maybe ConsensusParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseInitChain -> Maybe ConsensusParams
_ResponseInitChain'consensusParams
(\ x__ :: ResponseInitChain
x__ y__ :: Maybe ConsensusParams
y__ -> ResponseInitChain
x__ {_ResponseInitChain'consensusParams :: Maybe ConsensusParams
_ResponseInitChain'consensusParams = Maybe ConsensusParams
y__}))
(ConsensusParams -> Lens' (Maybe ConsensusParams) ConsensusParams
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ConsensusParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ResponseInitChain "maybe'consensusParams" (Prelude.Maybe ConsensusParams) where
fieldOf :: Proxy# "maybe'consensusParams"
-> (Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> ResponseInitChain
-> f ResponseInitChain
fieldOf _
= ((Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> ResponseInitChain -> f ResponseInitChain)
-> ((Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> (Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> ResponseInitChain
-> f ResponseInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseInitChain -> Maybe ConsensusParams)
-> (ResponseInitChain
-> Maybe ConsensusParams -> ResponseInitChain)
-> Lens
ResponseInitChain
ResponseInitChain
(Maybe ConsensusParams)
(Maybe ConsensusParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseInitChain -> Maybe ConsensusParams
_ResponseInitChain'consensusParams
(\ x__ :: ResponseInitChain
x__ y__ :: Maybe ConsensusParams
y__ -> ResponseInitChain
x__ {_ResponseInitChain'consensusParams :: Maybe ConsensusParams
_ResponseInitChain'consensusParams = Maybe ConsensusParams
y__}))
(Maybe ConsensusParams -> f (Maybe ConsensusParams))
-> Maybe ConsensusParams -> f (Maybe ConsensusParams)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseInitChain "validators" [ValidatorUpdate] where
fieldOf :: Proxy# "validators"
-> ([ValidatorUpdate] -> f [ValidatorUpdate])
-> ResponseInitChain
-> f ResponseInitChain
fieldOf _
= ((Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> ResponseInitChain -> f ResponseInitChain)
-> (([ValidatorUpdate] -> f [ValidatorUpdate])
-> Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> ([ValidatorUpdate] -> f [ValidatorUpdate])
-> ResponseInitChain
-> f ResponseInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseInitChain -> Vector ValidatorUpdate)
-> (ResponseInitChain
-> Vector ValidatorUpdate -> ResponseInitChain)
-> Lens
ResponseInitChain
ResponseInitChain
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseInitChain -> Vector ValidatorUpdate
_ResponseInitChain'validators
(\ x__ :: ResponseInitChain
x__ y__ :: Vector ValidatorUpdate
y__ -> ResponseInitChain
x__ {_ResponseInitChain'validators :: Vector ValidatorUpdate
_ResponseInitChain'validators = Vector ValidatorUpdate
y__}))
((Vector ValidatorUpdate -> [ValidatorUpdate])
-> (Vector ValidatorUpdate
-> [ValidatorUpdate] -> Vector ValidatorUpdate)
-> Lens
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
[ValidatorUpdate]
[ValidatorUpdate]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector ValidatorUpdate -> [ValidatorUpdate]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [ValidatorUpdate]
y__ -> [ValidatorUpdate] -> Vector ValidatorUpdate
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [ValidatorUpdate]
y__))
instance Data.ProtoLens.Field.HasField ResponseInitChain "vec'validators" (Data.Vector.Vector ValidatorUpdate) where
fieldOf :: Proxy# "vec'validators"
-> (Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> ResponseInitChain
-> f ResponseInitChain
fieldOf _
= ((Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> ResponseInitChain -> f ResponseInitChain)
-> ((Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> (Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> ResponseInitChain
-> f ResponseInitChain
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseInitChain -> Vector ValidatorUpdate)
-> (ResponseInitChain
-> Vector ValidatorUpdate -> ResponseInitChain)
-> Lens
ResponseInitChain
ResponseInitChain
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseInitChain -> Vector ValidatorUpdate
_ResponseInitChain'validators
(\ x__ :: ResponseInitChain
x__ y__ :: Vector ValidatorUpdate
y__ -> ResponseInitChain
x__ {_ResponseInitChain'validators :: Vector ValidatorUpdate
_ResponseInitChain'validators = Vector ValidatorUpdate
y__}))
(Vector ValidatorUpdate -> f (Vector ValidatorUpdate))
-> Vector ValidatorUpdate -> f (Vector ValidatorUpdate)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResponseInitChain where
messageName :: Proxy ResponseInitChain -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseInitChain"
fieldsByTag :: Map Tag (FieldDescriptor ResponseInitChain)
fieldsByTag
= let
consensusParams__field_descriptor :: FieldDescriptor ResponseInitChain
consensusParams__field_descriptor
= String
-> FieldTypeDescriptor ConsensusParams
-> FieldAccessor ResponseInitChain ConsensusParams
-> FieldDescriptor ResponseInitChain
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"consensus_params"
(MessageOrGroup -> FieldTypeDescriptor ConsensusParams
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ConsensusParams)
(Lens
ResponseInitChain
ResponseInitChain
(Maybe ConsensusParams)
(Maybe ConsensusParams)
-> FieldAccessor ResponseInitChain ConsensusParams
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'consensusParams" 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'consensusParams")) ::
Data.ProtoLens.FieldDescriptor ResponseInitChain
validators__field_descriptor :: FieldDescriptor ResponseInitChain
validators__field_descriptor
= String
-> FieldTypeDescriptor ValidatorUpdate
-> FieldAccessor ResponseInitChain ValidatorUpdate
-> FieldDescriptor ResponseInitChain
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"validators"
(MessageOrGroup -> FieldTypeDescriptor ValidatorUpdate
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ValidatorUpdate)
(Packing
-> Lens' ResponseInitChain [ValidatorUpdate]
-> FieldAccessor ResponseInitChain ValidatorUpdate
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked
(forall s a (f :: * -> *).
(HasField s "validators" 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 @"validators")) ::
Data.ProtoLens.FieldDescriptor ResponseInitChain
in
[(Tag, FieldDescriptor ResponseInitChain)]
-> Map Tag (FieldDescriptor ResponseInitChain)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResponseInitChain
consensusParams__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ResponseInitChain
validators__field_descriptor)]
unknownFields :: LensLike' f ResponseInitChain FieldSet
unknownFields
= (ResponseInitChain -> FieldSet)
-> (ResponseInitChain -> FieldSet -> ResponseInitChain)
-> Lens' ResponseInitChain FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseInitChain -> FieldSet
_ResponseInitChain'_unknownFields
(\ x__ :: ResponseInitChain
x__ y__ :: FieldSet
y__ -> ResponseInitChain
x__ {_ResponseInitChain'_unknownFields :: FieldSet
_ResponseInitChain'_unknownFields = FieldSet
y__})
defMessage :: ResponseInitChain
defMessage
= $WResponseInitChain'_constructor :: Maybe ConsensusParams
-> Vector ValidatorUpdate -> FieldSet -> ResponseInitChain
ResponseInitChain'_constructor
{_ResponseInitChain'consensusParams :: Maybe ConsensusParams
_ResponseInitChain'consensusParams = Maybe ConsensusParams
forall a. Maybe a
Prelude.Nothing,
_ResponseInitChain'validators :: Vector ValidatorUpdate
_ResponseInitChain'validators = Vector ValidatorUpdate
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_ResponseInitChain'_unknownFields :: FieldSet
_ResponseInitChain'_unknownFields = []}
parseMessage :: Parser ResponseInitChain
parseMessage
= let
loop ::
ResponseInitChain
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ValidatorUpdate
-> Data.ProtoLens.Encoding.Bytes.Parser ResponseInitChain
loop :: ResponseInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser ResponseInitChain
loop x :: ResponseInitChain
x mutable'validators :: Growing Vector RealWorld ValidatorUpdate
mutable'validators
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector ValidatorUpdate
frozen'validators <- IO (Vector ValidatorUpdate) -> Parser (Vector ValidatorUpdate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) ValidatorUpdate
-> IO (Vector ValidatorUpdate)
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 ValidatorUpdate
Growing Vector (PrimState IO) ValidatorUpdate
mutable'validators)
(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]))))
ResponseInitChain -> Parser ResponseInitChain
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseInitChain ResponseInitChain FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseInitChain -> ResponseInitChain
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 ResponseInitChain ResponseInitChain FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
ResponseInitChain
ResponseInitChain
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
-> Vector ValidatorUpdate -> ResponseInitChain -> ResponseInitChain
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'validators" 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'validators")
Vector ValidatorUpdate
frozen'validators
ResponseInitChain
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do ConsensusParams
y <- Parser ConsensusParams -> String -> Parser ConsensusParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ConsensusParams -> Parser ConsensusParams
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 ConsensusParams
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"consensus_params"
ResponseInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser ResponseInitChain
loop
(Setter
ResponseInitChain ResponseInitChain ConsensusParams ConsensusParams
-> ConsensusParams -> ResponseInitChain -> ResponseInitChain
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "consensusParams" 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 @"consensusParams") ConsensusParams
y ResponseInitChain
x)
Growing Vector RealWorld ValidatorUpdate
mutable'validators
18
-> do !ValidatorUpdate
y <- Parser ValidatorUpdate -> String -> Parser ValidatorUpdate
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ValidatorUpdate -> Parser ValidatorUpdate
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 ValidatorUpdate
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"validators"
Growing Vector RealWorld ValidatorUpdate
v <- IO (Growing Vector RealWorld ValidatorUpdate)
-> Parser (Growing Vector RealWorld ValidatorUpdate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) ValidatorUpdate
-> ValidatorUpdate
-> IO (Growing Vector (PrimState IO) ValidatorUpdate)
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 ValidatorUpdate
Growing Vector (PrimState IO) ValidatorUpdate
mutable'validators ValidatorUpdate
y)
ResponseInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser ResponseInitChain
loop ResponseInitChain
x Growing Vector RealWorld ValidatorUpdate
v
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser ResponseInitChain
loop
(Setter ResponseInitChain ResponseInitChain FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseInitChain -> ResponseInitChain
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 ResponseInitChain ResponseInitChain FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseInitChain
x)
Growing Vector RealWorld ValidatorUpdate
mutable'validators
in
Parser ResponseInitChain -> String -> Parser ResponseInitChain
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld ValidatorUpdate
mutable'validators <- IO (Growing Vector RealWorld ValidatorUpdate)
-> Parser (Growing Vector RealWorld ValidatorUpdate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld ValidatorUpdate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
ResponseInitChain
-> Growing Vector RealWorld ValidatorUpdate
-> Parser ResponseInitChain
loop ResponseInitChain
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld ValidatorUpdate
mutable'validators)
"ResponseInitChain"
buildMessage :: ResponseInitChain -> Builder
buildMessage
= \ _x :: ResponseInitChain
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe ConsensusParams)
ResponseInitChain
ResponseInitChain
(Maybe ConsensusParams)
(Maybe ConsensusParams)
-> ResponseInitChain -> Maybe ConsensusParams
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'consensusParams" 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'consensusParams") ResponseInitChain
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: ConsensusParams
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (ConsensusParams -> ByteString) -> ConsensusParams -> 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))
ConsensusParams -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ConsensusParams
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((ValidatorUpdate -> Builder) -> Vector ValidatorUpdate -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: ValidatorUpdate
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (ValidatorUpdate -> ByteString) -> ValidatorUpdate -> 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))
ValidatorUpdate -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
ValidatorUpdate
_v))
(FoldLike
(Vector ValidatorUpdate)
ResponseInitChain
ResponseInitChain
(Vector ValidatorUpdate)
(Vector ValidatorUpdate)
-> ResponseInitChain -> Vector ValidatorUpdate
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "vec'validators" 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'validators") ResponseInitChain
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet ResponseInitChain ResponseInitChain FieldSet FieldSet
-> ResponseInitChain -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet ResponseInitChain ResponseInitChain FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseInitChain
_x)))
instance Control.DeepSeq.NFData ResponseInitChain where
rnf :: ResponseInitChain -> ()
rnf
= \ x__ :: ResponseInitChain
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseInitChain -> FieldSet
_ResponseInitChain'_unknownFields ResponseInitChain
x__)
(Maybe ConsensusParams -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseInitChain -> Maybe ConsensusParams
_ResponseInitChain'consensusParams ResponseInitChain
x__)
(Vector ValidatorUpdate -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ResponseInitChain -> Vector ValidatorUpdate
_ResponseInitChain'validators ResponseInitChain
x__) ()))
data ResponseQuery
= ResponseQuery'_constructor {ResponseQuery -> Word32
_ResponseQuery'code :: !Data.Word.Word32,
ResponseQuery -> Text
_ResponseQuery'log :: !Data.Text.Text,
ResponseQuery -> Text
_ResponseQuery'info :: !Data.Text.Text,
ResponseQuery -> Int64
_ResponseQuery'index :: !Data.Int.Int64,
ResponseQuery -> ByteString
_ResponseQuery'key :: !Data.ByteString.ByteString,
ResponseQuery -> ByteString
_ResponseQuery'value :: !Data.ByteString.ByteString,
ResponseQuery -> Maybe Proof
_ResponseQuery'proof :: !(Prelude.Maybe Proto.Tendermint.Tendermint.Crypto.Merkle.Merkle.Proof),
ResponseQuery -> Int64
_ResponseQuery'height :: !Data.Int.Int64,
ResponseQuery -> Text
_ResponseQuery'codespace :: !Data.Text.Text,
ResponseQuery -> FieldSet
_ResponseQuery'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseQuery -> ResponseQuery -> Bool
(ResponseQuery -> ResponseQuery -> Bool)
-> (ResponseQuery -> ResponseQuery -> Bool) -> Eq ResponseQuery
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseQuery -> ResponseQuery -> Bool
$c/= :: ResponseQuery -> ResponseQuery -> Bool
== :: ResponseQuery -> ResponseQuery -> Bool
$c== :: ResponseQuery -> ResponseQuery -> Bool
Prelude.Eq, Eq ResponseQuery
Eq ResponseQuery =>
(ResponseQuery -> ResponseQuery -> Ordering)
-> (ResponseQuery -> ResponseQuery -> Bool)
-> (ResponseQuery -> ResponseQuery -> Bool)
-> (ResponseQuery -> ResponseQuery -> Bool)
-> (ResponseQuery -> ResponseQuery -> Bool)
-> (ResponseQuery -> ResponseQuery -> ResponseQuery)
-> (ResponseQuery -> ResponseQuery -> ResponseQuery)
-> Ord ResponseQuery
ResponseQuery -> ResponseQuery -> Bool
ResponseQuery -> ResponseQuery -> Ordering
ResponseQuery -> ResponseQuery -> ResponseQuery
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 :: ResponseQuery -> ResponseQuery -> ResponseQuery
$cmin :: ResponseQuery -> ResponseQuery -> ResponseQuery
max :: ResponseQuery -> ResponseQuery -> ResponseQuery
$cmax :: ResponseQuery -> ResponseQuery -> ResponseQuery
>= :: ResponseQuery -> ResponseQuery -> Bool
$c>= :: ResponseQuery -> ResponseQuery -> Bool
> :: ResponseQuery -> ResponseQuery -> Bool
$c> :: ResponseQuery -> ResponseQuery -> Bool
<= :: ResponseQuery -> ResponseQuery -> Bool
$c<= :: ResponseQuery -> ResponseQuery -> Bool
< :: ResponseQuery -> ResponseQuery -> Bool
$c< :: ResponseQuery -> ResponseQuery -> Bool
compare :: ResponseQuery -> ResponseQuery -> Ordering
$ccompare :: ResponseQuery -> ResponseQuery -> Ordering
$cp1Ord :: Eq ResponseQuery
Prelude.Ord)
instance Prelude.Show ResponseQuery where
showsPrec :: Int -> ResponseQuery -> ShowS
showsPrec _ __x :: ResponseQuery
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseQuery -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseQuery
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResponseQuery "code" Data.Word.Word32 where
fieldOf :: Proxy# "code"
-> (Word32 -> f Word32) -> ResponseQuery -> f ResponseQuery
fieldOf _
= ((Word32 -> f Word32) -> ResponseQuery -> f ResponseQuery)
-> ((Word32 -> f Word32) -> Word32 -> f Word32)
-> (Word32 -> f Word32)
-> ResponseQuery
-> f ResponseQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseQuery -> Word32)
-> (ResponseQuery -> Word32 -> ResponseQuery)
-> Lens ResponseQuery ResponseQuery Word32 Word32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseQuery -> Word32
_ResponseQuery'code (\ x__ :: ResponseQuery
x__ y__ :: Word32
y__ -> ResponseQuery
x__ {_ResponseQuery'code :: Word32
_ResponseQuery'code = Word32
y__}))
(Word32 -> f Word32) -> Word32 -> f Word32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseQuery "log" Data.Text.Text where
fieldOf :: Proxy# "log"
-> (Text -> f Text) -> ResponseQuery -> f ResponseQuery
fieldOf _
= ((Text -> f Text) -> ResponseQuery -> f ResponseQuery)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseQuery
-> f ResponseQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseQuery -> Text)
-> (ResponseQuery -> Text -> ResponseQuery)
-> Lens ResponseQuery ResponseQuery Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseQuery -> Text
_ResponseQuery'log (\ x__ :: ResponseQuery
x__ y__ :: Text
y__ -> ResponseQuery
x__ {_ResponseQuery'log :: Text
_ResponseQuery'log = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseQuery "info" Data.Text.Text where
fieldOf :: Proxy# "info"
-> (Text -> f Text) -> ResponseQuery -> f ResponseQuery
fieldOf _
= ((Text -> f Text) -> ResponseQuery -> f ResponseQuery)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseQuery
-> f ResponseQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseQuery -> Text)
-> (ResponseQuery -> Text -> ResponseQuery)
-> Lens ResponseQuery ResponseQuery Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseQuery -> Text
_ResponseQuery'info (\ x__ :: ResponseQuery
x__ y__ :: Text
y__ -> ResponseQuery
x__ {_ResponseQuery'info :: Text
_ResponseQuery'info = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseQuery "index" Data.Int.Int64 where
fieldOf :: Proxy# "index"
-> (Int64 -> f Int64) -> ResponseQuery -> f ResponseQuery
fieldOf _
= ((Int64 -> f Int64) -> ResponseQuery -> f ResponseQuery)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ResponseQuery
-> f ResponseQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseQuery -> Int64)
-> (ResponseQuery -> Int64 -> ResponseQuery)
-> Lens ResponseQuery ResponseQuery Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseQuery -> Int64
_ResponseQuery'index
(\ x__ :: ResponseQuery
x__ y__ :: Int64
y__ -> ResponseQuery
x__ {_ResponseQuery'index :: Int64
_ResponseQuery'index = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseQuery "key" Data.ByteString.ByteString where
fieldOf :: Proxy# "key"
-> (ByteString -> f ByteString) -> ResponseQuery -> f ResponseQuery
fieldOf _
= ((ByteString -> f ByteString) -> ResponseQuery -> f ResponseQuery)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> ResponseQuery
-> f ResponseQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseQuery -> ByteString)
-> (ResponseQuery -> ByteString -> ResponseQuery)
-> Lens ResponseQuery ResponseQuery ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseQuery -> ByteString
_ResponseQuery'key (\ x__ :: ResponseQuery
x__ y__ :: ByteString
y__ -> ResponseQuery
x__ {_ResponseQuery'key :: ByteString
_ResponseQuery'key = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseQuery "value" Data.ByteString.ByteString where
fieldOf :: Proxy# "value"
-> (ByteString -> f ByteString) -> ResponseQuery -> f ResponseQuery
fieldOf _
= ((ByteString -> f ByteString) -> ResponseQuery -> f ResponseQuery)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> ResponseQuery
-> f ResponseQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseQuery -> ByteString)
-> (ResponseQuery -> ByteString -> ResponseQuery)
-> Lens ResponseQuery ResponseQuery ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseQuery -> ByteString
_ResponseQuery'value
(\ x__ :: ResponseQuery
x__ y__ :: ByteString
y__ -> ResponseQuery
x__ {_ResponseQuery'value :: ByteString
_ResponseQuery'value = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseQuery "proof" Proto.Tendermint.Tendermint.Crypto.Merkle.Merkle.Proof where
fieldOf :: Proxy# "proof"
-> (Proof -> f Proof) -> ResponseQuery -> f ResponseQuery
fieldOf _
= ((Maybe Proof -> f (Maybe Proof))
-> ResponseQuery -> f ResponseQuery)
-> ((Proof -> f Proof) -> Maybe Proof -> f (Maybe Proof))
-> (Proof -> f Proof)
-> ResponseQuery
-> f ResponseQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseQuery -> Maybe Proof)
-> (ResponseQuery -> Maybe Proof -> ResponseQuery)
-> Lens ResponseQuery ResponseQuery (Maybe Proof) (Maybe Proof)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseQuery -> Maybe Proof
_ResponseQuery'proof
(\ x__ :: ResponseQuery
x__ y__ :: Maybe Proof
y__ -> ResponseQuery
x__ {_ResponseQuery'proof :: Maybe Proof
_ResponseQuery'proof = Maybe Proof
y__}))
(Proof -> Lens' (Maybe Proof) Proof
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Proof
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ResponseQuery "maybe'proof" (Prelude.Maybe Proto.Tendermint.Tendermint.Crypto.Merkle.Merkle.Proof) where
fieldOf :: Proxy# "maybe'proof"
-> (Maybe Proof -> f (Maybe Proof))
-> ResponseQuery
-> f ResponseQuery
fieldOf _
= ((Maybe Proof -> f (Maybe Proof))
-> ResponseQuery -> f ResponseQuery)
-> ((Maybe Proof -> f (Maybe Proof))
-> Maybe Proof -> f (Maybe Proof))
-> (Maybe Proof -> f (Maybe Proof))
-> ResponseQuery
-> f ResponseQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseQuery -> Maybe Proof)
-> (ResponseQuery -> Maybe Proof -> ResponseQuery)
-> Lens ResponseQuery ResponseQuery (Maybe Proof) (Maybe Proof)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseQuery -> Maybe Proof
_ResponseQuery'proof
(\ x__ :: ResponseQuery
x__ y__ :: Maybe Proof
y__ -> ResponseQuery
x__ {_ResponseQuery'proof :: Maybe Proof
_ResponseQuery'proof = Maybe Proof
y__}))
(Maybe Proof -> f (Maybe Proof)) -> Maybe Proof -> f (Maybe Proof)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseQuery "height" Data.Int.Int64 where
fieldOf :: Proxy# "height"
-> (Int64 -> f Int64) -> ResponseQuery -> f ResponseQuery
fieldOf _
= ((Int64 -> f Int64) -> ResponseQuery -> f ResponseQuery)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ResponseQuery
-> f ResponseQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseQuery -> Int64)
-> (ResponseQuery -> Int64 -> ResponseQuery)
-> Lens ResponseQuery ResponseQuery Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseQuery -> Int64
_ResponseQuery'height
(\ x__ :: ResponseQuery
x__ y__ :: Int64
y__ -> ResponseQuery
x__ {_ResponseQuery'height :: Int64
_ResponseQuery'height = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseQuery "codespace" Data.Text.Text where
fieldOf :: Proxy# "codespace"
-> (Text -> f Text) -> ResponseQuery -> f ResponseQuery
fieldOf _
= ((Text -> f Text) -> ResponseQuery -> f ResponseQuery)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseQuery
-> f ResponseQuery
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseQuery -> Text)
-> (ResponseQuery -> Text -> ResponseQuery)
-> Lens ResponseQuery ResponseQuery Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseQuery -> Text
_ResponseQuery'codespace
(\ x__ :: ResponseQuery
x__ y__ :: Text
y__ -> ResponseQuery
x__ {_ResponseQuery'codespace :: Text
_ResponseQuery'codespace = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResponseQuery where
messageName :: Proxy ResponseQuery -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseQuery"
fieldsByTag :: Map Tag (FieldDescriptor ResponseQuery)
fieldsByTag
= let
code__field_descriptor :: FieldDescriptor ResponseQuery
code__field_descriptor
= String
-> FieldTypeDescriptor Word32
-> FieldAccessor ResponseQuery Word32
-> FieldDescriptor ResponseQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"code"
(ScalarField Word32 -> FieldTypeDescriptor Word32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word32
Data.ProtoLens.UInt32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
(WireDefault Word32
-> Lens ResponseQuery ResponseQuery Word32 Word32
-> FieldAccessor ResponseQuery Word32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Word32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "code" 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 @"code")) ::
Data.ProtoLens.FieldDescriptor ResponseQuery
log__field_descriptor :: FieldDescriptor ResponseQuery
log__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseQuery Text
-> FieldDescriptor ResponseQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"log"
(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 ResponseQuery ResponseQuery Text Text
-> FieldAccessor ResponseQuery 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 "log" 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 @"log")) ::
Data.ProtoLens.FieldDescriptor ResponseQuery
info__field_descriptor :: FieldDescriptor ResponseQuery
info__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseQuery Text
-> FieldDescriptor ResponseQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"info"
(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 ResponseQuery ResponseQuery Text Text
-> FieldAccessor ResponseQuery 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 "info" 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 @"info")) ::
Data.ProtoLens.FieldDescriptor ResponseQuery
index__field_descriptor :: FieldDescriptor ResponseQuery
index__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor ResponseQuery Int64
-> FieldDescriptor ResponseQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"index"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens ResponseQuery ResponseQuery Int64 Int64
-> FieldAccessor ResponseQuery Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "index" 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 @"index")) ::
Data.ProtoLens.FieldDescriptor ResponseQuery
key__field_descriptor :: FieldDescriptor ResponseQuery
key__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor ResponseQuery ByteString
-> FieldDescriptor ResponseQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"key"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens ResponseQuery ResponseQuery ByteString ByteString
-> FieldAccessor ResponseQuery ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" 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 @"key")) ::
Data.ProtoLens.FieldDescriptor ResponseQuery
value__field_descriptor :: FieldDescriptor ResponseQuery
value__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor ResponseQuery ByteString
-> FieldDescriptor ResponseQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"value"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens ResponseQuery ResponseQuery ByteString ByteString
-> FieldAccessor ResponseQuery ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "value" 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 @"value")) ::
Data.ProtoLens.FieldDescriptor ResponseQuery
proof__field_descriptor :: FieldDescriptor ResponseQuery
proof__field_descriptor
= String
-> FieldTypeDescriptor Proof
-> FieldAccessor ResponseQuery Proof
-> FieldDescriptor ResponseQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"proof"
(MessageOrGroup -> FieldTypeDescriptor Proof
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tendermint.Tendermint.Crypto.Merkle.Merkle.Proof)
(Lens ResponseQuery ResponseQuery (Maybe Proof) (Maybe Proof)
-> FieldAccessor ResponseQuery Proof
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'proof" 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'proof")) ::
Data.ProtoLens.FieldDescriptor ResponseQuery
height__field_descriptor :: FieldDescriptor ResponseQuery
height__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor ResponseQuery Int64
-> FieldDescriptor ResponseQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"height"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens ResponseQuery ResponseQuery Int64 Int64
-> FieldAccessor ResponseQuery Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "height" 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 @"height")) ::
Data.ProtoLens.FieldDescriptor ResponseQuery
codespace__field_descriptor :: FieldDescriptor ResponseQuery
codespace__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseQuery Text
-> FieldDescriptor ResponseQuery
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"codespace"
(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 ResponseQuery ResponseQuery Text Text
-> FieldAccessor ResponseQuery 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 "codespace" 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 @"codespace")) ::
Data.ProtoLens.FieldDescriptor ResponseQuery
in
[(Tag, FieldDescriptor ResponseQuery)]
-> Map Tag (FieldDescriptor ResponseQuery)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResponseQuery
code__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor ResponseQuery
log__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor ResponseQuery
info__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor ResponseQuery
index__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 6, FieldDescriptor ResponseQuery
key__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 7, FieldDescriptor ResponseQuery
value__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 8, FieldDescriptor ResponseQuery
proof__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 9, FieldDescriptor ResponseQuery
height__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 10, FieldDescriptor ResponseQuery
codespace__field_descriptor)]
unknownFields :: LensLike' f ResponseQuery FieldSet
unknownFields
= (ResponseQuery -> FieldSet)
-> (ResponseQuery -> FieldSet -> ResponseQuery)
-> Lens' ResponseQuery FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseQuery -> FieldSet
_ResponseQuery'_unknownFields
(\ x__ :: ResponseQuery
x__ y__ :: FieldSet
y__ -> ResponseQuery
x__ {_ResponseQuery'_unknownFields :: FieldSet
_ResponseQuery'_unknownFields = FieldSet
y__})
defMessage :: ResponseQuery
defMessage
= $WResponseQuery'_constructor :: Word32
-> Text
-> Text
-> Int64
-> ByteString
-> ByteString
-> Maybe Proof
-> Int64
-> Text
-> FieldSet
-> ResponseQuery
ResponseQuery'_constructor
{_ResponseQuery'code :: Word32
_ResponseQuery'code = Word32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseQuery'log :: Text
_ResponseQuery'log = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseQuery'info :: Text
_ResponseQuery'info = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseQuery'index :: Int64
_ResponseQuery'index = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseQuery'key :: ByteString
_ResponseQuery'key = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseQuery'value :: ByteString
_ResponseQuery'value = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseQuery'proof :: Maybe Proof
_ResponseQuery'proof = Maybe Proof
forall a. Maybe a
Prelude.Nothing,
_ResponseQuery'height :: Int64
_ResponseQuery'height = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseQuery'codespace :: Text
_ResponseQuery'codespace = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseQuery'_unknownFields :: FieldSet
_ResponseQuery'_unknownFields = []}
parseMessage :: Parser ResponseQuery
parseMessage
= let
loop ::
ResponseQuery -> Data.ProtoLens.Encoding.Bytes.Parser ResponseQuery
loop :: ResponseQuery -> Parser ResponseQuery
loop x :: ResponseQuery
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]))))
ResponseQuery -> Parser ResponseQuery
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseQuery ResponseQuery FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseQuery -> ResponseQuery
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 ResponseQuery ResponseQuery FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ResponseQuery
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Word32
y <- Parser Word32 -> String -> Parser Word32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Word32) -> Parser Word64 -> Parser Word32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"code"
ResponseQuery -> Parser ResponseQuery
loop (Setter ResponseQuery ResponseQuery Word32 Word32
-> Word32 -> ResponseQuery -> ResponseQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "code" 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 @"code") Word32
y ResponseQuery
x)
26
-> 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))
"log"
ResponseQuery -> Parser ResponseQuery
loop (Setter ResponseQuery ResponseQuery Text Text
-> Text -> ResponseQuery -> ResponseQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "log" 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 @"log") Text
y ResponseQuery
x)
34
-> 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))
"info"
ResponseQuery -> Parser ResponseQuery
loop (Setter ResponseQuery ResponseQuery Text Text
-> Text -> ResponseQuery -> ResponseQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "info" 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 @"info") Text
y ResponseQuery
x)
40
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"index"
ResponseQuery -> Parser ResponseQuery
loop (Setter ResponseQuery ResponseQuery Int64 Int64
-> Int64 -> ResponseQuery -> ResponseQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "index" 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 @"index") Int64
y ResponseQuery
x)
50
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"key"
ResponseQuery -> Parser ResponseQuery
loop (Setter ResponseQuery ResponseQuery ByteString ByteString
-> ByteString -> ResponseQuery -> ResponseQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") ByteString
y ResponseQuery
x)
58
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"value"
ResponseQuery -> Parser ResponseQuery
loop (Setter ResponseQuery ResponseQuery ByteString ByteString
-> ByteString -> ResponseQuery -> ResponseQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") ByteString
y ResponseQuery
x)
66
-> do Proof
y <- Parser Proof -> String -> Parser Proof
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Proof -> Parser Proof
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 Proof
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"proof"
ResponseQuery -> Parser ResponseQuery
loop (Setter ResponseQuery ResponseQuery Proof Proof
-> Proof -> ResponseQuery -> ResponseQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "proof" 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 @"proof") Proof
y ResponseQuery
x)
72
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"height"
ResponseQuery -> Parser ResponseQuery
loop (Setter ResponseQuery ResponseQuery Int64 Int64
-> Int64 -> ResponseQuery -> ResponseQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "height" 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 @"height") Int64
y ResponseQuery
x)
82
-> 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))
"codespace"
ResponseQuery -> Parser ResponseQuery
loop
(Setter ResponseQuery ResponseQuery Text Text
-> Text -> ResponseQuery -> ResponseQuery
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "codespace" 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 @"codespace") Text
y ResponseQuery
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseQuery -> Parser ResponseQuery
loop
(Setter ResponseQuery ResponseQuery FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseQuery -> ResponseQuery
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 ResponseQuery ResponseQuery FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseQuery
x)
in
Parser ResponseQuery -> String -> Parser ResponseQuery
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ResponseQuery -> Parser ResponseQuery
loop ResponseQuery
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ResponseQuery"
buildMessage :: ResponseQuery -> Builder
buildMessage
= \ _x :: ResponseQuery
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Word32
_v = FoldLike Word32 ResponseQuery ResponseQuery Word32 Word32
-> ResponseQuery -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "code" 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 @"code") ResponseQuery
_x
in
if Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word32
_v Word32
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) -> (Word32 -> Word64) -> Word32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word32
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text ResponseQuery ResponseQuery Text Text
-> ResponseQuery -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "log" 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 @"log") ResponseQuery
_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 26)
((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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text ResponseQuery ResponseQuery Text Text
-> ResponseQuery -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "info" 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 @"info") ResponseQuery
_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 34)
((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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 ResponseQuery ResponseQuery Int64 Int64
-> ResponseQuery -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "index" 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 @"index") ResponseQuery
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 40)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: ByteString
_v = FoldLike
ByteString ResponseQuery ResponseQuery ByteString ByteString
-> ResponseQuery -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") ResponseQuery
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 50)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v = FoldLike
ByteString ResponseQuery ResponseQuery ByteString ByteString
-> ResponseQuery -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") ResponseQuery
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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 58)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe Proof)
ResponseQuery
ResponseQuery
(Maybe Proof)
(Maybe Proof)
-> ResponseQuery -> Maybe Proof
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'proof" 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'proof") ResponseQuery
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: Proof
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 66)
((ByteString -> Builder)
-> (Proof -> ByteString) -> Proof -> 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))
Proof -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Proof
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v
= FoldLike Int64 ResponseQuery ResponseQuery Int64 Int64
-> ResponseQuery -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "height" 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 @"height") ResponseQuery
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 72)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Int64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v
= FoldLike Text ResponseQuery ResponseQuery Text Text
-> ResponseQuery -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "codespace" 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 @"codespace") ResponseQuery
_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 82)
((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 ResponseQuery ResponseQuery FieldSet FieldSet
-> ResponseQuery -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ResponseQuery ResponseQuery FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseQuery
_x))))))))))
instance Control.DeepSeq.NFData ResponseQuery where
rnf :: ResponseQuery -> ()
rnf
= \ x__ :: ResponseQuery
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseQuery -> FieldSet
_ResponseQuery'_unknownFields ResponseQuery
x__)
(Word32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseQuery -> Word32
_ResponseQuery'code ResponseQuery
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseQuery -> Text
_ResponseQuery'log ResponseQuery
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseQuery -> Text
_ResponseQuery'info ResponseQuery
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseQuery -> Int64
_ResponseQuery'index ResponseQuery
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseQuery -> ByteString
_ResponseQuery'key ResponseQuery
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseQuery -> ByteString
_ResponseQuery'value ResponseQuery
x__)
(Maybe Proof -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseQuery -> Maybe Proof
_ResponseQuery'proof ResponseQuery
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseQuery -> Int64
_ResponseQuery'height ResponseQuery
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseQuery -> Text
_ResponseQuery'codespace ResponseQuery
x__) ())))))))))
data ResponseSetOption
= ResponseSetOption'_constructor {ResponseSetOption -> Word32
_ResponseSetOption'code :: !Data.Word.Word32,
ResponseSetOption -> Text
_ResponseSetOption'log :: !Data.Text.Text,
ResponseSetOption -> Text
_ResponseSetOption'info :: !Data.Text.Text,
ResponseSetOption -> FieldSet
_ResponseSetOption'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ResponseSetOption -> ResponseSetOption -> Bool
(ResponseSetOption -> ResponseSetOption -> Bool)
-> (ResponseSetOption -> ResponseSetOption -> Bool)
-> Eq ResponseSetOption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseSetOption -> ResponseSetOption -> Bool
$c/= :: ResponseSetOption -> ResponseSetOption -> Bool
== :: ResponseSetOption -> ResponseSetOption -> Bool
$c== :: ResponseSetOption -> ResponseSetOption -> Bool
Prelude.Eq, Eq ResponseSetOption
Eq ResponseSetOption =>
(ResponseSetOption -> ResponseSetOption -> Ordering)
-> (ResponseSetOption -> ResponseSetOption -> Bool)
-> (ResponseSetOption -> ResponseSetOption -> Bool)
-> (ResponseSetOption -> ResponseSetOption -> Bool)
-> (ResponseSetOption -> ResponseSetOption -> Bool)
-> (ResponseSetOption -> ResponseSetOption -> ResponseSetOption)
-> (ResponseSetOption -> ResponseSetOption -> ResponseSetOption)
-> Ord ResponseSetOption
ResponseSetOption -> ResponseSetOption -> Bool
ResponseSetOption -> ResponseSetOption -> Ordering
ResponseSetOption -> ResponseSetOption -> ResponseSetOption
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 :: ResponseSetOption -> ResponseSetOption -> ResponseSetOption
$cmin :: ResponseSetOption -> ResponseSetOption -> ResponseSetOption
max :: ResponseSetOption -> ResponseSetOption -> ResponseSetOption
$cmax :: ResponseSetOption -> ResponseSetOption -> ResponseSetOption
>= :: ResponseSetOption -> ResponseSetOption -> Bool
$c>= :: ResponseSetOption -> ResponseSetOption -> Bool
> :: ResponseSetOption -> ResponseSetOption -> Bool
$c> :: ResponseSetOption -> ResponseSetOption -> Bool
<= :: ResponseSetOption -> ResponseSetOption -> Bool
$c<= :: ResponseSetOption -> ResponseSetOption -> Bool
< :: ResponseSetOption -> ResponseSetOption -> Bool
$c< :: ResponseSetOption -> ResponseSetOption -> Bool
compare :: ResponseSetOption -> ResponseSetOption -> Ordering
$ccompare :: ResponseSetOption -> ResponseSetOption -> Ordering
$cp1Ord :: Eq ResponseSetOption
Prelude.Ord)
instance Prelude.Show ResponseSetOption where
showsPrec :: Int -> ResponseSetOption -> ShowS
showsPrec _ __x :: ResponseSetOption
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ResponseSetOption -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResponseSetOption
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResponseSetOption "code" Data.Word.Word32 where
fieldOf :: Proxy# "code"
-> (Word32 -> f Word32) -> ResponseSetOption -> f ResponseSetOption
fieldOf _
= ((Word32 -> f Word32) -> ResponseSetOption -> f ResponseSetOption)
-> ((Word32 -> f Word32) -> Word32 -> f Word32)
-> (Word32 -> f Word32)
-> ResponseSetOption
-> f ResponseSetOption
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseSetOption -> Word32)
-> (ResponseSetOption -> Word32 -> ResponseSetOption)
-> Lens ResponseSetOption ResponseSetOption Word32 Word32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseSetOption -> Word32
_ResponseSetOption'code
(\ x__ :: ResponseSetOption
x__ y__ :: Word32
y__ -> ResponseSetOption
x__ {_ResponseSetOption'code :: Word32
_ResponseSetOption'code = Word32
y__}))
(Word32 -> f Word32) -> Word32 -> f Word32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseSetOption "log" Data.Text.Text where
fieldOf :: Proxy# "log"
-> (Text -> f Text) -> ResponseSetOption -> f ResponseSetOption
fieldOf _
= ((Text -> f Text) -> ResponseSetOption -> f ResponseSetOption)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseSetOption
-> f ResponseSetOption
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseSetOption -> Text)
-> (ResponseSetOption -> Text -> ResponseSetOption)
-> Lens ResponseSetOption ResponseSetOption Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseSetOption -> Text
_ResponseSetOption'log
(\ x__ :: ResponseSetOption
x__ y__ :: Text
y__ -> ResponseSetOption
x__ {_ResponseSetOption'log :: Text
_ResponseSetOption'log = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResponseSetOption "info" Data.Text.Text where
fieldOf :: Proxy# "info"
-> (Text -> f Text) -> ResponseSetOption -> f ResponseSetOption
fieldOf _
= ((Text -> f Text) -> ResponseSetOption -> f ResponseSetOption)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResponseSetOption
-> f ResponseSetOption
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ResponseSetOption -> Text)
-> (ResponseSetOption -> Text -> ResponseSetOption)
-> Lens ResponseSetOption ResponseSetOption Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseSetOption -> Text
_ResponseSetOption'info
(\ x__ :: ResponseSetOption
x__ y__ :: Text
y__ -> ResponseSetOption
x__ {_ResponseSetOption'info :: Text
_ResponseSetOption'info = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResponseSetOption where
messageName :: Proxy ResponseSetOption -> Text
messageName _ = String -> Text
Data.Text.pack "types.ResponseSetOption"
fieldsByTag :: Map Tag (FieldDescriptor ResponseSetOption)
fieldsByTag
= let
code__field_descriptor :: FieldDescriptor ResponseSetOption
code__field_descriptor
= String
-> FieldTypeDescriptor Word32
-> FieldAccessor ResponseSetOption Word32
-> FieldDescriptor ResponseSetOption
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"code"
(ScalarField Word32 -> FieldTypeDescriptor Word32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word32
Data.ProtoLens.UInt32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
(WireDefault Word32
-> Lens ResponseSetOption ResponseSetOption Word32 Word32
-> FieldAccessor ResponseSetOption Word32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Word32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "code" 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 @"code")) ::
Data.ProtoLens.FieldDescriptor ResponseSetOption
log__field_descriptor :: FieldDescriptor ResponseSetOption
log__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseSetOption Text
-> FieldDescriptor ResponseSetOption
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"log"
(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 ResponseSetOption ResponseSetOption Text Text
-> FieldAccessor ResponseSetOption 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 "log" 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 @"log")) ::
Data.ProtoLens.FieldDescriptor ResponseSetOption
info__field_descriptor :: FieldDescriptor ResponseSetOption
info__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ResponseSetOption Text
-> FieldDescriptor ResponseSetOption
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"info"
(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 ResponseSetOption ResponseSetOption Text Text
-> FieldAccessor ResponseSetOption 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 "info" 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 @"info")) ::
Data.ProtoLens.FieldDescriptor ResponseSetOption
in
[(Tag, FieldDescriptor ResponseSetOption)]
-> Map Tag (FieldDescriptor ResponseSetOption)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResponseSetOption
code__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor ResponseSetOption
log__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor ResponseSetOption
info__field_descriptor)]
unknownFields :: LensLike' f ResponseSetOption FieldSet
unknownFields
= (ResponseSetOption -> FieldSet)
-> (ResponseSetOption -> FieldSet -> ResponseSetOption)
-> Lens' ResponseSetOption FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ResponseSetOption -> FieldSet
_ResponseSetOption'_unknownFields
(\ x__ :: ResponseSetOption
x__ y__ :: FieldSet
y__ -> ResponseSetOption
x__ {_ResponseSetOption'_unknownFields :: FieldSet
_ResponseSetOption'_unknownFields = FieldSet
y__})
defMessage :: ResponseSetOption
defMessage
= $WResponseSetOption'_constructor :: Word32 -> Text -> Text -> FieldSet -> ResponseSetOption
ResponseSetOption'_constructor
{_ResponseSetOption'code :: Word32
_ResponseSetOption'code = Word32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseSetOption'log :: Text
_ResponseSetOption'log = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseSetOption'info :: Text
_ResponseSetOption'info = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ResponseSetOption'_unknownFields :: FieldSet
_ResponseSetOption'_unknownFields = []}
parseMessage :: Parser ResponseSetOption
parseMessage
= let
loop ::
ResponseSetOption
-> Data.ProtoLens.Encoding.Bytes.Parser ResponseSetOption
loop :: ResponseSetOption -> Parser ResponseSetOption
loop x :: ResponseSetOption
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]))))
ResponseSetOption -> Parser ResponseSetOption
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ResponseSetOption ResponseSetOption FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseSetOption -> ResponseSetOption
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 ResponseSetOption ResponseSetOption FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ResponseSetOption
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Word32
y <- Parser Word32 -> String -> Parser Word32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Word32) -> Parser Word64 -> Parser Word32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"code"
ResponseSetOption -> Parser ResponseSetOption
loop (Setter ResponseSetOption ResponseSetOption Word32 Word32
-> Word32 -> ResponseSetOption -> ResponseSetOption
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "code" 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 @"code") Word32
y ResponseSetOption
x)
26
-> 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))
"log"
ResponseSetOption -> Parser ResponseSetOption
loop (Setter ResponseSetOption ResponseSetOption Text Text
-> Text -> ResponseSetOption -> ResponseSetOption
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "log" 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 @"log") Text
y ResponseSetOption
x)
34
-> 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))
"info"
ResponseSetOption -> Parser ResponseSetOption
loop (Setter ResponseSetOption ResponseSetOption Text Text
-> Text -> ResponseSetOption -> ResponseSetOption
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "info" 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 @"info") Text
y ResponseSetOption
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ResponseSetOption -> Parser ResponseSetOption
loop
(Setter ResponseSetOption ResponseSetOption FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ResponseSetOption -> ResponseSetOption
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 ResponseSetOption ResponseSetOption FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResponseSetOption
x)
in
Parser ResponseSetOption -> String -> Parser ResponseSetOption
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ResponseSetOption -> Parser ResponseSetOption
loop ResponseSetOption
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ResponseSetOption"
buildMessage :: ResponseSetOption -> Builder
buildMessage
= \ _x :: ResponseSetOption
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Word32
_v = FoldLike Word32 ResponseSetOption ResponseSetOption Word32 Word32
-> ResponseSetOption -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "code" 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 @"code") ResponseSetOption
_x
in
if Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word32
_v Word32
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) -> (Word32 -> Word64) -> Word32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word32
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text ResponseSetOption ResponseSetOption Text Text
-> ResponseSetOption -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "log" 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 @"log") ResponseSetOption
_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 26)
((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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text ResponseSetOption ResponseSetOption Text Text
-> ResponseSetOption -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "info" 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 @"info") ResponseSetOption
_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 34)
((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 ResponseSetOption ResponseSetOption FieldSet FieldSet
-> ResponseSetOption -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet ResponseSetOption ResponseSetOption FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResponseSetOption
_x))))
instance Control.DeepSeq.NFData ResponseSetOption where
rnf :: ResponseSetOption -> ()
rnf
= \ x__ :: ResponseSetOption
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseSetOption -> FieldSet
_ResponseSetOption'_unknownFields ResponseSetOption
x__)
(Word32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseSetOption -> Word32
_ResponseSetOption'code ResponseSetOption
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ResponseSetOption -> Text
_ResponseSetOption'log ResponseSetOption
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ResponseSetOption -> Text
_ResponseSetOption'info ResponseSetOption
x__) ())))
data Validator
= Validator'_constructor {Validator -> ByteString
_Validator'address :: !Data.ByteString.ByteString,
Validator -> Int64
_Validator'power :: !Data.Int.Int64,
Validator -> FieldSet
_Validator'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (Validator -> Validator -> Bool
(Validator -> Validator -> Bool)
-> (Validator -> Validator -> Bool) -> Eq Validator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Validator -> Validator -> Bool
$c/= :: Validator -> Validator -> Bool
== :: Validator -> Validator -> Bool
$c== :: Validator -> Validator -> Bool
Prelude.Eq, Eq Validator
Eq Validator =>
(Validator -> Validator -> Ordering)
-> (Validator -> Validator -> Bool)
-> (Validator -> Validator -> Bool)
-> (Validator -> Validator -> Bool)
-> (Validator -> Validator -> Bool)
-> (Validator -> Validator -> Validator)
-> (Validator -> Validator -> Validator)
-> Ord Validator
Validator -> Validator -> Bool
Validator -> Validator -> Ordering
Validator -> Validator -> Validator
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 :: Validator -> Validator -> Validator
$cmin :: Validator -> Validator -> Validator
max :: Validator -> Validator -> Validator
$cmax :: Validator -> Validator -> Validator
>= :: Validator -> Validator -> Bool
$c>= :: Validator -> Validator -> Bool
> :: Validator -> Validator -> Bool
$c> :: Validator -> Validator -> Bool
<= :: Validator -> Validator -> Bool
$c<= :: Validator -> Validator -> Bool
< :: Validator -> Validator -> Bool
$c< :: Validator -> Validator -> Bool
compare :: Validator -> Validator -> Ordering
$ccompare :: Validator -> Validator -> Ordering
$cp1Ord :: Eq Validator
Prelude.Ord)
instance Prelude.Show Validator where
showsPrec :: Int -> Validator -> ShowS
showsPrec _ __x :: Validator
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(Validator -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Validator
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField Validator "address" Data.ByteString.ByteString where
fieldOf :: Proxy# "address"
-> (ByteString -> f ByteString) -> Validator -> f Validator
fieldOf _
= ((ByteString -> f ByteString) -> Validator -> f Validator)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> Validator
-> f Validator
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Validator -> ByteString)
-> (Validator -> ByteString -> Validator)
-> Lens Validator Validator ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Validator -> ByteString
_Validator'address (\ x__ :: Validator
x__ y__ :: ByteString
y__ -> Validator
x__ {_Validator'address :: ByteString
_Validator'address = ByteString
y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Validator "power" Data.Int.Int64 where
fieldOf :: Proxy# "power" -> (Int64 -> f Int64) -> Validator -> f Validator
fieldOf _
= ((Int64 -> f Int64) -> Validator -> f Validator)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> Validator
-> f Validator
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Validator -> Int64)
-> (Validator -> Int64 -> Validator)
-> Lens Validator Validator Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Validator -> Int64
_Validator'power (\ x__ :: Validator
x__ y__ :: Int64
y__ -> Validator
x__ {_Validator'power :: Int64
_Validator'power = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Validator where
messageName :: Proxy Validator -> Text
messageName _ = String -> Text
Data.Text.pack "types.Validator"
fieldsByTag :: Map Tag (FieldDescriptor Validator)
fieldsByTag
= let
address__field_descriptor :: FieldDescriptor Validator
address__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor Validator ByteString
-> FieldDescriptor Validator
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"address"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens Validator Validator ByteString ByteString
-> FieldAccessor Validator ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "address" 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 @"address")) ::
Data.ProtoLens.FieldDescriptor Validator
power__field_descriptor :: FieldDescriptor Validator
power__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor Validator Int64
-> FieldDescriptor Validator
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"power"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens Validator Validator Int64 Int64
-> FieldAccessor Validator Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "power" 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 @"power")) ::
Data.ProtoLens.FieldDescriptor Validator
in
[(Tag, FieldDescriptor Validator)]
-> Map Tag (FieldDescriptor Validator)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Validator
address__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor Validator
power__field_descriptor)]
unknownFields :: LensLike' f Validator FieldSet
unknownFields
= (Validator -> FieldSet)
-> (Validator -> FieldSet -> Validator) -> Lens' Validator FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Validator -> FieldSet
_Validator'_unknownFields
(\ x__ :: Validator
x__ y__ :: FieldSet
y__ -> Validator
x__ {_Validator'_unknownFields :: FieldSet
_Validator'_unknownFields = FieldSet
y__})
defMessage :: Validator
defMessage
= $WValidator'_constructor :: ByteString -> Int64 -> FieldSet -> Validator
Validator'_constructor
{_Validator'address :: ByteString
_Validator'address = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Validator'power :: Int64
_Validator'power = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Validator'_unknownFields :: FieldSet
_Validator'_unknownFields = []}
parseMessage :: Parser Validator
parseMessage
= let
loop :: Validator -> Data.ProtoLens.Encoding.Bytes.Parser Validator
loop :: Validator -> Parser Validator
loop x :: Validator
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]))))
Validator -> Parser Validator
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter Validator Validator FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Validator -> Validator
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 Validator Validator FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Validator
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(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))
"address"
Validator -> Parser Validator
loop (Setter Validator Validator ByteString ByteString
-> ByteString -> Validator -> Validator
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "address" 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 @"address") ByteString
y Validator
x)
24
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"power"
Validator -> Parser Validator
loop (Setter Validator Validator Int64 Int64
-> Int64 -> Validator -> Validator
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "power" 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 @"power") Int64
y Validator
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
Validator -> Parser Validator
loop
(Setter Validator Validator FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Validator -> Validator
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 Validator Validator FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Validator
x)
in
Parser Validator -> String -> Parser Validator
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Validator -> Parser Validator
loop Validator
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "Validator"
buildMessage :: Validator -> Builder
buildMessage
= \ _x :: Validator
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v = FoldLike ByteString Validator Validator ByteString ByteString
-> Validator -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "address" 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 @"address") Validator
_x
in
if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
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)
((\ 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))
ByteString
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 Validator Validator Int64 Int64
-> Validator -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "power" 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 @"power") Validator
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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 24)
((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet Validator Validator FieldSet FieldSet
-> Validator -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Validator Validator FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Validator
_x)))
instance Control.DeepSeq.NFData Validator where
rnf :: Validator -> ()
rnf
= \ x__ :: Validator
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Validator -> FieldSet
_Validator'_unknownFields Validator
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Validator -> ByteString
_Validator'address Validator
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Validator -> Int64
_Validator'power Validator
x__) ()))
data ValidatorParams
= ValidatorParams'_constructor {ValidatorParams -> Vector Text
_ValidatorParams'pubKeyTypes :: !(Data.Vector.Vector Data.Text.Text),
ValidatorParams -> FieldSet
_ValidatorParams'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ValidatorParams -> ValidatorParams -> Bool
(ValidatorParams -> ValidatorParams -> Bool)
-> (ValidatorParams -> ValidatorParams -> Bool)
-> Eq ValidatorParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ValidatorParams -> ValidatorParams -> Bool
$c/= :: ValidatorParams -> ValidatorParams -> Bool
== :: ValidatorParams -> ValidatorParams -> Bool
$c== :: ValidatorParams -> ValidatorParams -> Bool
Prelude.Eq, Eq ValidatorParams
Eq ValidatorParams =>
(ValidatorParams -> ValidatorParams -> Ordering)
-> (ValidatorParams -> ValidatorParams -> Bool)
-> (ValidatorParams -> ValidatorParams -> Bool)
-> (ValidatorParams -> ValidatorParams -> Bool)
-> (ValidatorParams -> ValidatorParams -> Bool)
-> (ValidatorParams -> ValidatorParams -> ValidatorParams)
-> (ValidatorParams -> ValidatorParams -> ValidatorParams)
-> Ord ValidatorParams
ValidatorParams -> ValidatorParams -> Bool
ValidatorParams -> ValidatorParams -> Ordering
ValidatorParams -> ValidatorParams -> ValidatorParams
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 :: ValidatorParams -> ValidatorParams -> ValidatorParams
$cmin :: ValidatorParams -> ValidatorParams -> ValidatorParams
max :: ValidatorParams -> ValidatorParams -> ValidatorParams
$cmax :: ValidatorParams -> ValidatorParams -> ValidatorParams
>= :: ValidatorParams -> ValidatorParams -> Bool
$c>= :: ValidatorParams -> ValidatorParams -> Bool
> :: ValidatorParams -> ValidatorParams -> Bool
$c> :: ValidatorParams -> ValidatorParams -> Bool
<= :: ValidatorParams -> ValidatorParams -> Bool
$c<= :: ValidatorParams -> ValidatorParams -> Bool
< :: ValidatorParams -> ValidatorParams -> Bool
$c< :: ValidatorParams -> ValidatorParams -> Bool
compare :: ValidatorParams -> ValidatorParams -> Ordering
$ccompare :: ValidatorParams -> ValidatorParams -> Ordering
$cp1Ord :: Eq ValidatorParams
Prelude.Ord)
instance Prelude.Show ValidatorParams where
showsPrec :: Int -> ValidatorParams -> ShowS
showsPrec _ __x :: ValidatorParams
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ValidatorParams -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ValidatorParams
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ValidatorParams "pubKeyTypes" [Data.Text.Text] where
fieldOf :: Proxy# "pubKeyTypes"
-> ([Text] -> f [Text]) -> ValidatorParams -> f ValidatorParams
fieldOf _
= ((Vector Text -> f (Vector Text))
-> ValidatorParams -> f ValidatorParams)
-> (([Text] -> f [Text]) -> Vector Text -> f (Vector Text))
-> ([Text] -> f [Text])
-> ValidatorParams
-> f ValidatorParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ValidatorParams -> Vector Text)
-> (ValidatorParams -> Vector Text -> ValidatorParams)
-> Lens ValidatorParams ValidatorParams (Vector Text) (Vector Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ValidatorParams -> Vector Text
_ValidatorParams'pubKeyTypes
(\ x__ :: ValidatorParams
x__ y__ :: Vector Text
y__ -> ValidatorParams
x__ {_ValidatorParams'pubKeyTypes :: Vector Text
_ValidatorParams'pubKeyTypes = Vector Text
y__}))
((Vector Text -> [Text])
-> (Vector Text -> [Text] -> Vector Text)
-> Lens (Vector Text) (Vector Text) [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector Text -> [Text]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [Text]
y__ -> [Text] -> Vector Text
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Text]
y__))
instance Data.ProtoLens.Field.HasField ValidatorParams "vec'pubKeyTypes" (Data.Vector.Vector Data.Text.Text) where
fieldOf :: Proxy# "vec'pubKeyTypes"
-> (Vector Text -> f (Vector Text))
-> ValidatorParams
-> f ValidatorParams
fieldOf _
= ((Vector Text -> f (Vector Text))
-> ValidatorParams -> f ValidatorParams)
-> ((Vector Text -> f (Vector Text))
-> Vector Text -> f (Vector Text))
-> (Vector Text -> f (Vector Text))
-> ValidatorParams
-> f ValidatorParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ValidatorParams -> Vector Text)
-> (ValidatorParams -> Vector Text -> ValidatorParams)
-> Lens ValidatorParams ValidatorParams (Vector Text) (Vector Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ValidatorParams -> Vector Text
_ValidatorParams'pubKeyTypes
(\ x__ :: ValidatorParams
x__ y__ :: Vector Text
y__ -> ValidatorParams
x__ {_ValidatorParams'pubKeyTypes :: Vector Text
_ValidatorParams'pubKeyTypes = Vector Text
y__}))
(Vector Text -> f (Vector Text)) -> Vector Text -> f (Vector Text)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ValidatorParams where
messageName :: Proxy ValidatorParams -> Text
messageName _ = String -> Text
Data.Text.pack "types.ValidatorParams"
fieldsByTag :: Map Tag (FieldDescriptor ValidatorParams)
fieldsByTag
= let
pubKeyTypes__field_descriptor :: FieldDescriptor ValidatorParams
pubKeyTypes__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor ValidatorParams Text
-> FieldDescriptor ValidatorParams
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"pub_key_types"
(ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
(Packing
-> Lens' ValidatorParams [Text]
-> FieldAccessor ValidatorParams Text
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked
(forall s a (f :: * -> *).
(HasField s "pubKeyTypes" 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 @"pubKeyTypes")) ::
Data.ProtoLens.FieldDescriptor ValidatorParams
in
[(Tag, FieldDescriptor ValidatorParams)]
-> Map Tag (FieldDescriptor ValidatorParams)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ValidatorParams
pubKeyTypes__field_descriptor)]
unknownFields :: LensLike' f ValidatorParams FieldSet
unknownFields
= (ValidatorParams -> FieldSet)
-> (ValidatorParams -> FieldSet -> ValidatorParams)
-> Lens' ValidatorParams FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ValidatorParams -> FieldSet
_ValidatorParams'_unknownFields
(\ x__ :: ValidatorParams
x__ y__ :: FieldSet
y__ -> ValidatorParams
x__ {_ValidatorParams'_unknownFields :: FieldSet
_ValidatorParams'_unknownFields = FieldSet
y__})
defMessage :: ValidatorParams
defMessage
= $WValidatorParams'_constructor :: Vector Text -> FieldSet -> ValidatorParams
ValidatorParams'_constructor
{_ValidatorParams'pubKeyTypes :: Vector Text
_ValidatorParams'pubKeyTypes = Vector Text
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_ValidatorParams'_unknownFields :: FieldSet
_ValidatorParams'_unknownFields = []}
parseMessage :: Parser ValidatorParams
parseMessage
= let
loop ::
ValidatorParams
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Text.Text
-> Data.ProtoLens.Encoding.Bytes.Parser ValidatorParams
loop :: ValidatorParams
-> Growing Vector RealWorld Text -> Parser ValidatorParams
loop x :: ValidatorParams
x mutable'pubKeyTypes :: Growing Vector RealWorld Text
mutable'pubKeyTypes
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector Text
frozen'pubKeyTypes <- IO (Vector Text) -> Parser (Vector Text)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Text -> IO (Vector Text)
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 Text
Growing Vector (PrimState IO) Text
mutable'pubKeyTypes)
(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]))))
ValidatorParams -> Parser ValidatorParams
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ValidatorParams ValidatorParams FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ValidatorParams -> ValidatorParams
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 ValidatorParams ValidatorParams FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter ValidatorParams ValidatorParams (Vector Text) (Vector Text)
-> Vector Text -> ValidatorParams -> ValidatorParams
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'pubKeyTypes" 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'pubKeyTypes")
Vector Text
frozen'pubKeyTypes
ValidatorParams
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))
"pub_key_types"
Growing Vector RealWorld Text
v <- IO (Growing Vector RealWorld Text)
-> Parser (Growing Vector RealWorld Text)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Text
-> Text -> IO (Growing Vector (PrimState IO) Text)
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 Text
Growing Vector (PrimState IO) Text
mutable'pubKeyTypes Text
y)
ValidatorParams
-> Growing Vector RealWorld Text -> Parser ValidatorParams
loop ValidatorParams
x Growing Vector RealWorld Text
v
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ValidatorParams
-> Growing Vector RealWorld Text -> Parser ValidatorParams
loop
(Setter ValidatorParams ValidatorParams FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ValidatorParams -> ValidatorParams
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 ValidatorParams ValidatorParams FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ValidatorParams
x)
Growing Vector RealWorld Text
mutable'pubKeyTypes
in
Parser ValidatorParams -> String -> Parser ValidatorParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld Text
mutable'pubKeyTypes <- IO (Growing Vector RealWorld Text)
-> Parser (Growing Vector RealWorld Text)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld Text)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
ValidatorParams
-> Growing Vector RealWorld Text -> Parser ValidatorParams
loop ValidatorParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld Text
mutable'pubKeyTypes)
"ValidatorParams"
buildMessage :: ValidatorParams -> Builder
buildMessage
= \ _x :: ValidatorParams
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((Text -> Builder) -> Vector Text -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: Text
_v
-> 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))
(FoldLike
(Vector Text)
ValidatorParams
ValidatorParams
(Vector Text)
(Vector Text)
-> ValidatorParams -> Vector Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "vec'pubKeyTypes" 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'pubKeyTypes") ValidatorParams
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet ValidatorParams ValidatorParams FieldSet FieldSet
-> ValidatorParams -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ValidatorParams ValidatorParams FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ValidatorParams
_x))
instance Control.DeepSeq.NFData ValidatorParams where
rnf :: ValidatorParams -> ()
rnf
= \ x__ :: ValidatorParams
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ValidatorParams -> FieldSet
_ValidatorParams'_unknownFields ValidatorParams
x__)
(Vector Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ValidatorParams -> Vector Text
_ValidatorParams'pubKeyTypes ValidatorParams
x__) ())
data ValidatorUpdate
= ValidatorUpdate'_constructor {ValidatorUpdate -> Maybe PubKey
_ValidatorUpdate'pubKey :: !(Prelude.Maybe PubKey),
ValidatorUpdate -> Int64
_ValidatorUpdate'power :: !Data.Int.Int64,
ValidatorUpdate -> FieldSet
_ValidatorUpdate'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (ValidatorUpdate -> ValidatorUpdate -> Bool
(ValidatorUpdate -> ValidatorUpdate -> Bool)
-> (ValidatorUpdate -> ValidatorUpdate -> Bool)
-> Eq ValidatorUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ValidatorUpdate -> ValidatorUpdate -> Bool
$c/= :: ValidatorUpdate -> ValidatorUpdate -> Bool
== :: ValidatorUpdate -> ValidatorUpdate -> Bool
$c== :: ValidatorUpdate -> ValidatorUpdate -> Bool
Prelude.Eq, Eq ValidatorUpdate
Eq ValidatorUpdate =>
(ValidatorUpdate -> ValidatorUpdate -> Ordering)
-> (ValidatorUpdate -> ValidatorUpdate -> Bool)
-> (ValidatorUpdate -> ValidatorUpdate -> Bool)
-> (ValidatorUpdate -> ValidatorUpdate -> Bool)
-> (ValidatorUpdate -> ValidatorUpdate -> Bool)
-> (ValidatorUpdate -> ValidatorUpdate -> ValidatorUpdate)
-> (ValidatorUpdate -> ValidatorUpdate -> ValidatorUpdate)
-> Ord ValidatorUpdate
ValidatorUpdate -> ValidatorUpdate -> Bool
ValidatorUpdate -> ValidatorUpdate -> Ordering
ValidatorUpdate -> ValidatorUpdate -> ValidatorUpdate
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 :: ValidatorUpdate -> ValidatorUpdate -> ValidatorUpdate
$cmin :: ValidatorUpdate -> ValidatorUpdate -> ValidatorUpdate
max :: ValidatorUpdate -> ValidatorUpdate -> ValidatorUpdate
$cmax :: ValidatorUpdate -> ValidatorUpdate -> ValidatorUpdate
>= :: ValidatorUpdate -> ValidatorUpdate -> Bool
$c>= :: ValidatorUpdate -> ValidatorUpdate -> Bool
> :: ValidatorUpdate -> ValidatorUpdate -> Bool
$c> :: ValidatorUpdate -> ValidatorUpdate -> Bool
<= :: ValidatorUpdate -> ValidatorUpdate -> Bool
$c<= :: ValidatorUpdate -> ValidatorUpdate -> Bool
< :: ValidatorUpdate -> ValidatorUpdate -> Bool
$c< :: ValidatorUpdate -> ValidatorUpdate -> Bool
compare :: ValidatorUpdate -> ValidatorUpdate -> Ordering
$ccompare :: ValidatorUpdate -> ValidatorUpdate -> Ordering
$cp1Ord :: Eq ValidatorUpdate
Prelude.Ord)
instance Prelude.Show ValidatorUpdate where
showsPrec :: Int -> ValidatorUpdate -> ShowS
showsPrec _ __x :: ValidatorUpdate
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(ValidatorUpdate -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ValidatorUpdate
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ValidatorUpdate "pubKey" PubKey where
fieldOf :: Proxy# "pubKey"
-> (PubKey -> f PubKey) -> ValidatorUpdate -> f ValidatorUpdate
fieldOf _
= ((Maybe PubKey -> f (Maybe PubKey))
-> ValidatorUpdate -> f ValidatorUpdate)
-> ((PubKey -> f PubKey) -> Maybe PubKey -> f (Maybe PubKey))
-> (PubKey -> f PubKey)
-> ValidatorUpdate
-> f ValidatorUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ValidatorUpdate -> Maybe PubKey)
-> (ValidatorUpdate -> Maybe PubKey -> ValidatorUpdate)
-> Lens
ValidatorUpdate ValidatorUpdate (Maybe PubKey) (Maybe PubKey)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ValidatorUpdate -> Maybe PubKey
_ValidatorUpdate'pubKey
(\ x__ :: ValidatorUpdate
x__ y__ :: Maybe PubKey
y__ -> ValidatorUpdate
x__ {_ValidatorUpdate'pubKey :: Maybe PubKey
_ValidatorUpdate'pubKey = Maybe PubKey
y__}))
(PubKey -> Lens' (Maybe PubKey) PubKey
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens PubKey
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ValidatorUpdate "maybe'pubKey" (Prelude.Maybe PubKey) where
fieldOf :: Proxy# "maybe'pubKey"
-> (Maybe PubKey -> f (Maybe PubKey))
-> ValidatorUpdate
-> f ValidatorUpdate
fieldOf _
= ((Maybe PubKey -> f (Maybe PubKey))
-> ValidatorUpdate -> f ValidatorUpdate)
-> ((Maybe PubKey -> f (Maybe PubKey))
-> Maybe PubKey -> f (Maybe PubKey))
-> (Maybe PubKey -> f (Maybe PubKey))
-> ValidatorUpdate
-> f ValidatorUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ValidatorUpdate -> Maybe PubKey)
-> (ValidatorUpdate -> Maybe PubKey -> ValidatorUpdate)
-> Lens
ValidatorUpdate ValidatorUpdate (Maybe PubKey) (Maybe PubKey)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ValidatorUpdate -> Maybe PubKey
_ValidatorUpdate'pubKey
(\ x__ :: ValidatorUpdate
x__ y__ :: Maybe PubKey
y__ -> ValidatorUpdate
x__ {_ValidatorUpdate'pubKey :: Maybe PubKey
_ValidatorUpdate'pubKey = Maybe PubKey
y__}))
(Maybe PubKey -> f (Maybe PubKey))
-> Maybe PubKey -> f (Maybe PubKey)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ValidatorUpdate "power" Data.Int.Int64 where
fieldOf :: Proxy# "power"
-> (Int64 -> f Int64) -> ValidatorUpdate -> f ValidatorUpdate
fieldOf _
= ((Int64 -> f Int64) -> ValidatorUpdate -> f ValidatorUpdate)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ValidatorUpdate
-> f ValidatorUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ValidatorUpdate -> Int64)
-> (ValidatorUpdate -> Int64 -> ValidatorUpdate)
-> Lens ValidatorUpdate ValidatorUpdate Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ValidatorUpdate -> Int64
_ValidatorUpdate'power
(\ x__ :: ValidatorUpdate
x__ y__ :: Int64
y__ -> ValidatorUpdate
x__ {_ValidatorUpdate'power :: Int64
_ValidatorUpdate'power = Int64
y__}))
(Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ValidatorUpdate where
messageName :: Proxy ValidatorUpdate -> Text
messageName _ = String -> Text
Data.Text.pack "types.ValidatorUpdate"
fieldsByTag :: Map Tag (FieldDescriptor ValidatorUpdate)
fieldsByTag
= let
pubKey__field_descriptor :: FieldDescriptor ValidatorUpdate
pubKey__field_descriptor
= String
-> FieldTypeDescriptor PubKey
-> FieldAccessor ValidatorUpdate PubKey
-> FieldDescriptor ValidatorUpdate
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"pub_key"
(MessageOrGroup -> FieldTypeDescriptor PubKey
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor PubKey)
(Lens ValidatorUpdate ValidatorUpdate (Maybe PubKey) (Maybe PubKey)
-> FieldAccessor ValidatorUpdate PubKey
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'pubKey" 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'pubKey")) ::
Data.ProtoLens.FieldDescriptor ValidatorUpdate
power__field_descriptor :: FieldDescriptor ValidatorUpdate
power__field_descriptor
= String
-> FieldTypeDescriptor Int64
-> FieldAccessor ValidatorUpdate Int64
-> FieldDescriptor ValidatorUpdate
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"power"
(ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
(WireDefault Int64
-> Lens ValidatorUpdate ValidatorUpdate Int64 Int64
-> FieldAccessor ValidatorUpdate Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "power" 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 @"power")) ::
Data.ProtoLens.FieldDescriptor ValidatorUpdate
in
[(Tag, FieldDescriptor ValidatorUpdate)]
-> Map Tag (FieldDescriptor ValidatorUpdate)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ValidatorUpdate
pubKey__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ValidatorUpdate
power__field_descriptor)]
unknownFields :: LensLike' f ValidatorUpdate FieldSet
unknownFields
= (ValidatorUpdate -> FieldSet)
-> (ValidatorUpdate -> FieldSet -> ValidatorUpdate)
-> Lens' ValidatorUpdate FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ValidatorUpdate -> FieldSet
_ValidatorUpdate'_unknownFields
(\ x__ :: ValidatorUpdate
x__ y__ :: FieldSet
y__ -> ValidatorUpdate
x__ {_ValidatorUpdate'_unknownFields :: FieldSet
_ValidatorUpdate'_unknownFields = FieldSet
y__})
defMessage :: ValidatorUpdate
defMessage
= $WValidatorUpdate'_constructor :: Maybe PubKey -> Int64 -> FieldSet -> ValidatorUpdate
ValidatorUpdate'_constructor
{_ValidatorUpdate'pubKey :: Maybe PubKey
_ValidatorUpdate'pubKey = Maybe PubKey
forall a. Maybe a
Prelude.Nothing,
_ValidatorUpdate'power :: Int64
_ValidatorUpdate'power = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ValidatorUpdate'_unknownFields :: FieldSet
_ValidatorUpdate'_unknownFields = []}
parseMessage :: Parser ValidatorUpdate
parseMessage
= let
loop ::
ValidatorUpdate
-> Data.ProtoLens.Encoding.Bytes.Parser ValidatorUpdate
loop :: ValidatorUpdate -> Parser ValidatorUpdate
loop x :: ValidatorUpdate
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]))))
ValidatorUpdate -> Parser ValidatorUpdate
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter ValidatorUpdate ValidatorUpdate FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ValidatorUpdate -> ValidatorUpdate
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 ValidatorUpdate ValidatorUpdate FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ValidatorUpdate
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do PubKey
y <- Parser PubKey -> String -> Parser PubKey
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser PubKey -> Parser PubKey
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 PubKey
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"pub_key"
ValidatorUpdate -> Parser ValidatorUpdate
loop (Setter ValidatorUpdate ValidatorUpdate PubKey PubKey
-> PubKey -> ValidatorUpdate -> ValidatorUpdate
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "pubKey" 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 @"pubKey") PubKey
y ValidatorUpdate
x)
16
-> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"power"
ValidatorUpdate -> Parser ValidatorUpdate
loop (Setter ValidatorUpdate ValidatorUpdate Int64 Int64
-> Int64 -> ValidatorUpdate -> ValidatorUpdate
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "power" 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 @"power") Int64
y ValidatorUpdate
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
ValidatorUpdate -> Parser ValidatorUpdate
loop
(Setter ValidatorUpdate ValidatorUpdate FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ValidatorUpdate -> ValidatorUpdate
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 ValidatorUpdate ValidatorUpdate FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ValidatorUpdate
x)
in
Parser ValidatorUpdate -> String -> Parser ValidatorUpdate
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ValidatorUpdate -> Parser ValidatorUpdate
loop ValidatorUpdate
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ValidatorUpdate"
buildMessage :: ValidatorUpdate -> Builder
buildMessage
= \ _x :: ValidatorUpdate
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe PubKey)
ValidatorUpdate
ValidatorUpdate
(Maybe PubKey)
(Maybe PubKey)
-> ValidatorUpdate -> Maybe PubKey
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'pubKey" 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'pubKey") ValidatorUpdate
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: PubKey
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (PubKey -> ByteString) -> PubKey -> 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))
PubKey -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
PubKey
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int64
_v = FoldLike Int64 ValidatorUpdate ValidatorUpdate Int64 Int64
-> ValidatorUpdate -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "power" 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 @"power") ValidatorUpdate
_x
in
if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet ValidatorUpdate ValidatorUpdate FieldSet FieldSet
-> ValidatorUpdate -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ValidatorUpdate ValidatorUpdate FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ValidatorUpdate
_x)))
instance Control.DeepSeq.NFData ValidatorUpdate where
rnf :: ValidatorUpdate -> ()
rnf
= \ x__ :: ValidatorUpdate
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ValidatorUpdate -> FieldSet
_ValidatorUpdate'_unknownFields ValidatorUpdate
x__)
(Maybe PubKey -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ValidatorUpdate -> Maybe PubKey
_ValidatorUpdate'pubKey ValidatorUpdate
x__)
(Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ValidatorUpdate -> Int64
_ValidatorUpdate'power ValidatorUpdate
x__) ()))
data Version
= Version'_constructor {Version -> Word64
_Version'block :: !Data.Word.Word64,
Version -> Word64
_Version'app :: !Data.Word.Word64,
Version -> FieldSet
_Version'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (Version -> Version -> Bool
(Version -> Version -> Bool)
-> (Version -> Version -> Bool) -> Eq Version
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Version -> Version -> Bool
$c/= :: Version -> Version -> Bool
== :: Version -> Version -> Bool
$c== :: Version -> Version -> Bool
Prelude.Eq, Eq Version
Eq Version =>
(Version -> Version -> Ordering)
-> (Version -> Version -> Bool)
-> (Version -> Version -> Bool)
-> (Version -> Version -> Bool)
-> (Version -> Version -> Bool)
-> (Version -> Version -> Version)
-> (Version -> Version -> Version)
-> Ord Version
Version -> Version -> Bool
Version -> Version -> Ordering
Version -> Version -> Version
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 :: Version -> Version -> Version
$cmin :: Version -> Version -> Version
max :: Version -> Version -> Version
$cmax :: Version -> Version -> Version
>= :: Version -> Version -> Bool
$c>= :: Version -> Version -> Bool
> :: Version -> Version -> Bool
$c> :: Version -> Version -> Bool
<= :: Version -> Version -> Bool
$c<= :: Version -> Version -> Bool
< :: Version -> Version -> Bool
$c< :: Version -> Version -> Bool
compare :: Version -> Version -> Ordering
$ccompare :: Version -> Version -> Ordering
$cp1Ord :: Eq Version
Prelude.Ord)
instance Prelude.Show Version where
showsPrec :: Int -> Version -> ShowS
showsPrec _ __x :: Version
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(Version -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Version
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField Version "block" Data.Word.Word64 where
fieldOf :: Proxy# "block" -> (Word64 -> f Word64) -> Version -> f Version
fieldOf _
= ((Word64 -> f Word64) -> Version -> f Version)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> Version
-> f Version
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Version -> Word64)
-> (Version -> Word64 -> Version)
-> Lens Version Version Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Version -> Word64
_Version'block (\ x__ :: Version
x__ y__ :: Word64
y__ -> Version
x__ {_Version'block :: Word64
_Version'block = Word64
y__}))
(Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Version "app" Data.Word.Word64 where
fieldOf :: Proxy# "app" -> (Word64 -> f Word64) -> Version -> f Version
fieldOf _
= ((Word64 -> f Word64) -> Version -> f Version)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> Version
-> f Version
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Version -> Word64)
-> (Version -> Word64 -> Version)
-> Lens Version Version Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Version -> Word64
_Version'app (\ x__ :: Version
x__ y__ :: Word64
y__ -> Version
x__ {_Version'app :: Word64
_Version'app = Word64
y__}))
(Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Version where
messageName :: Proxy Version -> Text
messageName _ = String -> Text
Data.Text.pack "types.Version"
fieldsByTag :: Map Tag (FieldDescriptor Version)
fieldsByTag
= let
block__field_descriptor :: FieldDescriptor Version
block__field_descriptor
= String
-> FieldTypeDescriptor Word64
-> FieldAccessor Version Word64
-> FieldDescriptor Version
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"Block"
(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 Version Version Word64 Word64
-> FieldAccessor Version 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 "block" 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 @"block")) ::
Data.ProtoLens.FieldDescriptor Version
app__field_descriptor :: FieldDescriptor Version
app__field_descriptor
= String
-> FieldTypeDescriptor Word64
-> FieldAccessor Version Word64
-> FieldDescriptor Version
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"App"
(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 Version Version Word64 Word64
-> FieldAccessor Version 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 "app" 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 @"app")) ::
Data.ProtoLens.FieldDescriptor Version
in
[(Tag, FieldDescriptor Version)]
-> Map Tag (FieldDescriptor Version)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Version
block__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor Version
app__field_descriptor)]
unknownFields :: LensLike' f Version FieldSet
unknownFields
= (Version -> FieldSet)
-> (Version -> FieldSet -> Version) -> Lens' Version FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Version -> FieldSet
_Version'_unknownFields
(\ x__ :: Version
x__ y__ :: FieldSet
y__ -> Version
x__ {_Version'_unknownFields :: FieldSet
_Version'_unknownFields = FieldSet
y__})
defMessage :: Version
defMessage
= $WVersion'_constructor :: Word64 -> Word64 -> FieldSet -> Version
Version'_constructor
{_Version'block :: Word64
_Version'block = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Version'app :: Word64
_Version'app = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_Version'_unknownFields :: FieldSet
_Version'_unknownFields = []}
parseMessage :: Parser Version
parseMessage
= let
loop :: Version -> Data.ProtoLens.Encoding.Bytes.Parser Version
loop :: Version -> Parser Version
loop x :: Version
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]))))
Version -> Parser Version
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter Version Version FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Version -> Version
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 Version Version FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Version
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 "Block"
Version -> Parser Version
loop (Setter Version Version Word64 Word64
-> Word64 -> Version -> Version
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "block" 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 @"block") Word64
y Version
x)
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 "App"
Version -> Parser Version
loop (Setter Version Version Word64 Word64
-> Word64 -> Version -> Version
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "app" 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 @"app") Word64
y Version
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
Version -> Parser Version
loop
(Setter Version Version FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Version -> Version
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 Version Version FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Version
x)
in
Parser Version -> String -> Parser Version
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Version -> Parser Version
loop Version
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "Version"
buildMessage :: Version -> Builder
buildMessage
= \ _x :: Version
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Word64
_v = FoldLike Word64 Version Version Word64 Word64 -> Version -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "block" 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 @"block") Version
_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))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Word64
_v = FoldLike Word64 Version Version Word64 Word64 -> Version -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "app" 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 @"app") Version
_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 Version Version FieldSet FieldSet
-> Version -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Version Version FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Version
_x)))
instance Control.DeepSeq.NFData Version where
rnf :: Version -> ()
rnf
= \ x__ :: Version
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Version -> FieldSet
_Version'_unknownFields Version
x__)
(Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(Version -> Word64
_Version'block Version
x__)
(Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Version -> Word64
_Version'app Version
x__) ()))
data VoteInfo
= VoteInfo'_constructor {VoteInfo -> Maybe Validator
_VoteInfo'validator :: !(Prelude.Maybe Validator),
VoteInfo -> Bool
_VoteInfo'signedLastBlock :: !Prelude.Bool,
VoteInfo -> FieldSet
_VoteInfo'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving (VoteInfo -> VoteInfo -> Bool
(VoteInfo -> VoteInfo -> Bool)
-> (VoteInfo -> VoteInfo -> Bool) -> Eq VoteInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VoteInfo -> VoteInfo -> Bool
$c/= :: VoteInfo -> VoteInfo -> Bool
== :: VoteInfo -> VoteInfo -> Bool
$c== :: VoteInfo -> VoteInfo -> Bool
Prelude.Eq, Eq VoteInfo
Eq VoteInfo =>
(VoteInfo -> VoteInfo -> Ordering)
-> (VoteInfo -> VoteInfo -> Bool)
-> (VoteInfo -> VoteInfo -> Bool)
-> (VoteInfo -> VoteInfo -> Bool)
-> (VoteInfo -> VoteInfo -> Bool)
-> (VoteInfo -> VoteInfo -> VoteInfo)
-> (VoteInfo -> VoteInfo -> VoteInfo)
-> Ord VoteInfo
VoteInfo -> VoteInfo -> Bool
VoteInfo -> VoteInfo -> Ordering
VoteInfo -> VoteInfo -> VoteInfo
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 :: VoteInfo -> VoteInfo -> VoteInfo
$cmin :: VoteInfo -> VoteInfo -> VoteInfo
max :: VoteInfo -> VoteInfo -> VoteInfo
$cmax :: VoteInfo -> VoteInfo -> VoteInfo
>= :: VoteInfo -> VoteInfo -> Bool
$c>= :: VoteInfo -> VoteInfo -> Bool
> :: VoteInfo -> VoteInfo -> Bool
$c> :: VoteInfo -> VoteInfo -> Bool
<= :: VoteInfo -> VoteInfo -> Bool
$c<= :: VoteInfo -> VoteInfo -> Bool
< :: VoteInfo -> VoteInfo -> Bool
$c< :: VoteInfo -> VoteInfo -> Bool
compare :: VoteInfo -> VoteInfo -> Ordering
$ccompare :: VoteInfo -> VoteInfo -> Ordering
$cp1Ord :: Eq VoteInfo
Prelude.Ord)
instance Prelude.Show VoteInfo where
showsPrec :: Int -> VoteInfo -> ShowS
showsPrec _ __x :: VoteInfo
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(VoteInfo -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort VoteInfo
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField VoteInfo "validator" Validator where
fieldOf :: Proxy# "validator"
-> (Validator -> f Validator) -> VoteInfo -> f VoteInfo
fieldOf _
= ((Maybe Validator -> f (Maybe Validator))
-> VoteInfo -> f VoteInfo)
-> ((Validator -> f Validator)
-> Maybe Validator -> f (Maybe Validator))
-> (Validator -> f Validator)
-> VoteInfo
-> f VoteInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((VoteInfo -> Maybe Validator)
-> (VoteInfo -> Maybe Validator -> VoteInfo)
-> Lens VoteInfo VoteInfo (Maybe Validator) (Maybe Validator)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
VoteInfo -> Maybe Validator
_VoteInfo'validator (\ x__ :: VoteInfo
x__ y__ :: Maybe Validator
y__ -> VoteInfo
x__ {_VoteInfo'validator :: Maybe Validator
_VoteInfo'validator = Maybe Validator
y__}))
(Validator -> Lens' (Maybe Validator) Validator
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Validator
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField VoteInfo "maybe'validator" (Prelude.Maybe Validator) where
fieldOf :: Proxy# "maybe'validator"
-> (Maybe Validator -> f (Maybe Validator))
-> VoteInfo
-> f VoteInfo
fieldOf _
= ((Maybe Validator -> f (Maybe Validator))
-> VoteInfo -> f VoteInfo)
-> ((Maybe Validator -> f (Maybe Validator))
-> Maybe Validator -> f (Maybe Validator))
-> (Maybe Validator -> f (Maybe Validator))
-> VoteInfo
-> f VoteInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((VoteInfo -> Maybe Validator)
-> (VoteInfo -> Maybe Validator -> VoteInfo)
-> Lens VoteInfo VoteInfo (Maybe Validator) (Maybe Validator)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
VoteInfo -> Maybe Validator
_VoteInfo'validator (\ x__ :: VoteInfo
x__ y__ :: Maybe Validator
y__ -> VoteInfo
x__ {_VoteInfo'validator :: Maybe Validator
_VoteInfo'validator = Maybe Validator
y__}))
(Maybe Validator -> f (Maybe Validator))
-> Maybe Validator -> f (Maybe Validator)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField VoteInfo "signedLastBlock" Prelude.Bool where
fieldOf :: Proxy# "signedLastBlock"
-> (Bool -> f Bool) -> VoteInfo -> f VoteInfo
fieldOf _
= ((Bool -> f Bool) -> VoteInfo -> f VoteInfo)
-> ((Bool -> f Bool) -> Bool -> f Bool)
-> (Bool -> f Bool)
-> VoteInfo
-> f VoteInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((VoteInfo -> Bool)
-> (VoteInfo -> Bool -> VoteInfo)
-> Lens VoteInfo VoteInfo Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
VoteInfo -> Bool
_VoteInfo'signedLastBlock
(\ x__ :: VoteInfo
x__ y__ :: Bool
y__ -> VoteInfo
x__ {_VoteInfo'signedLastBlock :: Bool
_VoteInfo'signedLastBlock = Bool
y__}))
(Bool -> f Bool) -> Bool -> f Bool
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message VoteInfo where
messageName :: Proxy VoteInfo -> Text
messageName _ = String -> Text
Data.Text.pack "types.VoteInfo"
fieldsByTag :: Map Tag (FieldDescriptor VoteInfo)
fieldsByTag
= let
validator__field_descriptor :: FieldDescriptor VoteInfo
validator__field_descriptor
= String
-> FieldTypeDescriptor Validator
-> FieldAccessor VoteInfo Validator
-> FieldDescriptor VoteInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"validator"
(MessageOrGroup -> FieldTypeDescriptor Validator
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Validator)
(Lens VoteInfo VoteInfo (Maybe Validator) (Maybe Validator)
-> FieldAccessor VoteInfo Validator
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'validator" 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'validator")) ::
Data.ProtoLens.FieldDescriptor VoteInfo
signedLastBlock__field_descriptor :: FieldDescriptor VoteInfo
signedLastBlock__field_descriptor
= String
-> FieldTypeDescriptor Bool
-> FieldAccessor VoteInfo Bool
-> FieldDescriptor VoteInfo
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"signed_last_block"
(ScalarField Bool -> FieldTypeDescriptor Bool
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Bool
Data.ProtoLens.BoolField ::
Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
(WireDefault Bool
-> Lens VoteInfo VoteInfo Bool Bool -> FieldAccessor VoteInfo Bool
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Bool
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "signedLastBlock" 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 @"signedLastBlock")) ::
Data.ProtoLens.FieldDescriptor VoteInfo
in
[(Tag, FieldDescriptor VoteInfo)]
-> Map Tag (FieldDescriptor VoteInfo)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor VoteInfo
validator__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor VoteInfo
signedLastBlock__field_descriptor)]
unknownFields :: LensLike' f VoteInfo FieldSet
unknownFields
= (VoteInfo -> FieldSet)
-> (VoteInfo -> FieldSet -> VoteInfo) -> Lens' VoteInfo FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
VoteInfo -> FieldSet
_VoteInfo'_unknownFields
(\ x__ :: VoteInfo
x__ y__ :: FieldSet
y__ -> VoteInfo
x__ {_VoteInfo'_unknownFields :: FieldSet
_VoteInfo'_unknownFields = FieldSet
y__})
defMessage :: VoteInfo
defMessage
= $WVoteInfo'_constructor :: Maybe Validator -> Bool -> FieldSet -> VoteInfo
VoteInfo'_constructor
{_VoteInfo'validator :: Maybe Validator
_VoteInfo'validator = Maybe Validator
forall a. Maybe a
Prelude.Nothing,
_VoteInfo'signedLastBlock :: Bool
_VoteInfo'signedLastBlock = Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_VoteInfo'_unknownFields :: FieldSet
_VoteInfo'_unknownFields = []}
parseMessage :: Parser VoteInfo
parseMessage
= let
loop :: VoteInfo -> Data.ProtoLens.Encoding.Bytes.Parser VoteInfo
loop :: VoteInfo -> Parser VoteInfo
loop x :: VoteInfo
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]))))
VoteInfo -> Parser VoteInfo
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter VoteInfo VoteInfo FieldSet FieldSet
-> (FieldSet -> FieldSet) -> VoteInfo -> VoteInfo
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 VoteInfo VoteInfo FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) VoteInfo
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do Validator
y <- Parser Validator -> String -> Parser Validator
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser Validator -> Parser Validator
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 Validator
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"validator"
VoteInfo -> Parser VoteInfo
loop
(Setter VoteInfo VoteInfo Validator Validator
-> Validator -> VoteInfo -> VoteInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "validator" 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 @"validator") Validator
y VoteInfo
x)
16
-> do Bool
y <- Parser Bool -> String -> Parser Bool
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Bool) -> Parser Word64 -> Parser Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
(Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude./=) 0) Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"signed_last_block"
VoteInfo -> Parser VoteInfo
loop
(Setter VoteInfo VoteInfo Bool Bool -> Bool -> VoteInfo -> VoteInfo
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "signedLastBlock" 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 @"signedLastBlock") Bool
y VoteInfo
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
VoteInfo -> Parser VoteInfo
loop
(Setter VoteInfo VoteInfo FieldSet FieldSet
-> (FieldSet -> FieldSet) -> VoteInfo -> VoteInfo
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 VoteInfo VoteInfo FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) VoteInfo
x)
in
Parser VoteInfo -> String -> Parser VoteInfo
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do VoteInfo -> Parser VoteInfo
loop VoteInfo
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "VoteInfo"
buildMessage :: VoteInfo -> Builder
buildMessage
= \ _x :: VoteInfo
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe Validator)
VoteInfo
VoteInfo
(Maybe Validator)
(Maybe Validator)
-> VoteInfo -> Maybe Validator
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'validator" 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'validator") VoteInfo
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: Validator
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (Validator -> ByteString) -> Validator -> 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))
Validator -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
Validator
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Bool
_v
= FoldLike Bool VoteInfo VoteInfo Bool Bool -> VoteInfo -> Bool
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "signedLastBlock" 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 @"signedLastBlock") VoteInfo
_x
in
if Bool -> Bool -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Bool
_v Bool
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) -> (Bool -> Word64) -> Bool -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(\ b :: Bool
b -> if Bool
b then 1 else 0)
Bool
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet VoteInfo VoteInfo FieldSet FieldSet
-> VoteInfo -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet VoteInfo VoteInfo FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields VoteInfo
_x)))
instance Control.DeepSeq.NFData VoteInfo where
rnf :: VoteInfo -> ()
rnf
= \ x__ :: VoteInfo
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(VoteInfo -> FieldSet
_VoteInfo'_unknownFields VoteInfo
x__)
(Maybe Validator -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(VoteInfo -> Maybe Validator
_VoteInfo'validator VoteInfo
x__)
(Bool -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (VoteInfo -> Bool
_VoteInfo'signedLastBlock VoteInfo
x__) ()))
data ABCIApplication = ABCIApplication {}
instance Data.ProtoLens.Service.Types.Service ABCIApplication where
type ServiceName ABCIApplication = "ABCIApplication"
type ServicePackage ABCIApplication = "types"
type ServiceMethods ABCIApplication = '["beginBlock",
"checkTx",
"commit",
"deliverTx",
"echo",
"endBlock",
"flush",
"info",
"initChain",
"query",
"setOption"]
instance Data.ProtoLens.Service.Types.HasMethodImpl ABCIApplication "echo" where
type MethodName ABCIApplication "echo" = "Echo"
type MethodInput ABCIApplication "echo" = RequestEcho
type MethodOutput ABCIApplication "echo" = ResponseEcho
type MethodStreamingType ABCIApplication "echo" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl ABCIApplication "flush" where
type MethodName ABCIApplication "flush" = "Flush"
type MethodInput ABCIApplication "flush" = RequestFlush
type MethodOutput ABCIApplication "flush" = ResponseFlush
type MethodStreamingType ABCIApplication "flush" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl ABCIApplication "info" where
type MethodName ABCIApplication "info" = "Info"
type MethodInput ABCIApplication "info" = RequestInfo
type MethodOutput ABCIApplication "info" = ResponseInfo
type MethodStreamingType ABCIApplication "info" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl ABCIApplication "setOption" where
type MethodName ABCIApplication "setOption" = "SetOption"
type MethodInput ABCIApplication "setOption" = RequestSetOption
type MethodOutput ABCIApplication "setOption" = ResponseSetOption
type MethodStreamingType ABCIApplication "setOption" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl ABCIApplication "deliverTx" where
type MethodName ABCIApplication "deliverTx" = "DeliverTx"
type MethodInput ABCIApplication "deliverTx" = RequestDeliverTx
type MethodOutput ABCIApplication "deliverTx" = ResponseDeliverTx
type MethodStreamingType ABCIApplication "deliverTx" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl ABCIApplication "checkTx" where
type MethodName ABCIApplication "checkTx" = "CheckTx"
type MethodInput ABCIApplication "checkTx" = RequestCheckTx
type MethodOutput ABCIApplication "checkTx" = ResponseCheckTx
type MethodStreamingType ABCIApplication "checkTx" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl ABCIApplication "query" where
type MethodName ABCIApplication "query" = "Query"
type MethodInput ABCIApplication "query" = RequestQuery
type MethodOutput ABCIApplication "query" = ResponseQuery
type MethodStreamingType ABCIApplication "query" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl ABCIApplication "commit" where
type MethodName ABCIApplication "commit" = "Commit"
type MethodInput ABCIApplication "commit" = RequestCommit
type MethodOutput ABCIApplication "commit" = ResponseCommit
type MethodStreamingType ABCIApplication "commit" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl ABCIApplication "initChain" where
type MethodName ABCIApplication "initChain" = "InitChain"
type MethodInput ABCIApplication "initChain" = RequestInitChain
type MethodOutput ABCIApplication "initChain" = ResponseInitChain
type MethodStreamingType ABCIApplication "initChain" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl ABCIApplication "beginBlock" where
type MethodName ABCIApplication "beginBlock" = "BeginBlock"
type MethodInput ABCIApplication "beginBlock" = RequestBeginBlock
type MethodOutput ABCIApplication "beginBlock" = ResponseBeginBlock
type MethodStreamingType ABCIApplication "beginBlock" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl ABCIApplication "endBlock" where
type MethodName ABCIApplication "endBlock" = "EndBlock"
type MethodInput ABCIApplication "endBlock" = RequestEndBlock
type MethodOutput ABCIApplication "endBlock" = ResponseEndBlock
type MethodStreamingType ABCIApplication "endBlock" = 'Data.ProtoLens.Service.Types.NonStreaming