{- This file was auto-generated from types.proto by the proto-lens-protoc program. -}
{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications#-}
{-# OPTIONS_GHC -Wno-unused-imports#-}
{-# OPTIONS_GHC -Wno-duplicate-exports#-}
{-# OPTIONS_GHC -Wno-dodgy-exports#-}
module Proto.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
{- | Fields :
     
         * 'Proto.Types_Fields.hash' @:: Lens' BlockID Data.ByteString.ByteString@
         * 'Proto.Types_Fields.partsHeader' @:: Lens' BlockID PartSetHeader@
         * 'Proto.Types_Fields.maybe'partsHeader' @:: Lens' BlockID (Prelude.Maybe PartSetHeader)@ -}
data BlockID
  = BlockID'_constructor {BlockID -> ByteString
_BlockID'hash :: !Data.ByteString.ByteString,
                          BlockID -> Maybe PartSetHeader
_BlockID'partsHeader :: !(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__) ()))
{- | Fields :
     
         * 'Proto.Types_Fields.maxBytes' @:: Lens' BlockParams Data.Int.Int64@
         * 'Proto.Types_Fields.maxGas' @:: Lens' BlockParams Data.Int.Int64@ -}
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__) ()))
{- | Fields :
     
         * 'Proto.Types_Fields.block' @:: Lens' ConsensusParams BlockParams@
         * 'Proto.Types_Fields.maybe'block' @:: Lens' ConsensusParams (Prelude.Maybe BlockParams)@
         * 'Proto.Types_Fields.evidence' @:: Lens' ConsensusParams EvidenceParams@
         * 'Proto.Types_Fields.maybe'evidence' @:: Lens' ConsensusParams (Prelude.Maybe EvidenceParams)@
         * 'Proto.Types_Fields.validator' @:: Lens' ConsensusParams ValidatorParams@
         * 'Proto.Types_Fields.maybe'validator' @:: Lens' ConsensusParams (Prelude.Maybe ValidatorParams)@ -}
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__) ())))
{- | Fields :
     
         * 'Proto.Types_Fields.type'' @:: Lens' Event Data.Text.Text@
         * 'Proto.Types_Fields.attributes' @:: Lens' Event [Proto.Tendermint.Tendermint.Libs.Common.Types.KVPair]@
         * 'Proto.Types_Fields.vec'attributes' @:: Lens' Event (Data.Vector.Vector Proto.Tendermint.Tendermint.Libs.Common.Types.KVPair)@ -}
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__) ()))
{- | Fields :
     
         * 'Proto.Types_Fields.type'' @:: Lens' Evidence Data.Text.Text@
         * 'Proto.Types_Fields.validator' @:: Lens' Evidence Validator@
         * 'Proto.Types_Fields.maybe'validator' @:: Lens' Evidence (Prelude.Maybe Validator)@
         * 'Proto.Types_Fields.height' @:: Lens' Evidence Data.Int.Int64@
         * 'Proto.Types_Fields.time' @:: Lens' Evidence Proto.Google.Protobuf.Timestamp.Timestamp@
         * 'Proto.Types_Fields.maybe'time' @:: Lens' Evidence (Prelude.Maybe Proto.Google.Protobuf.Timestamp.Timestamp)@
         * 'Proto.Types_Fields.totalVotingPower' @:: Lens' Evidence Data.Int.Int64@ -}
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__) ())))))
{- | Fields :
     
         * 'Proto.Types_Fields.maxAge' @:: Lens' EvidenceParams Data.Int.Int64@ -}
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__) ())
{- | Fields :
     
         * 'Proto.Types_Fields.version' @:: Lens' Header Version@
         * 'Proto.Types_Fields.maybe'version' @:: Lens' Header (Prelude.Maybe Version)@
         * 'Proto.Types_Fields.chainId' @:: Lens' Header Data.Text.Text@
         * 'Proto.Types_Fields.height' @:: Lens' Header Data.Int.Int64@
         * 'Proto.Types_Fields.time' @:: Lens' Header Proto.Google.Protobuf.Timestamp.Timestamp@
         * 'Proto.Types_Fields.maybe'time' @:: Lens' Header (Prelude.Maybe Proto.Google.Protobuf.Timestamp.Timestamp)@
         * 'Proto.Types_Fields.numTxs' @:: Lens' Header Data.Int.Int64@
         * 'Proto.Types_Fields.totalTxs' @:: Lens' Header Data.Int.Int64@
         * 'Proto.Types_Fields.lastBlockId' @:: Lens' Header BlockID@
         * 'Proto.Types_Fields.maybe'lastBlockId' @:: Lens' Header (Prelude.Maybe BlockID)@
         * 'Proto.Types_Fields.lastCommitHash' @:: Lens' Header Data.ByteString.ByteString@
         * 'Proto.Types_Fields.dataHash' @:: Lens' Header Data.ByteString.ByteString@
         * 'Proto.Types_Fields.validatorsHash' @:: Lens' Header Data.ByteString.ByteString@
         * 'Proto.Types_Fields.nextValidatorsHash' @:: Lens' Header Data.ByteString.ByteString@
         * 'Proto.Types_Fields.consensusHash' @:: Lens' Header Data.ByteString.ByteString@
         * 'Proto.Types_Fields.appHash' @:: Lens' Header Data.ByteString.ByteString@
         * 'Proto.Types_Fields.lastResultsHash' @:: Lens' Header Data.ByteString.ByteString@
         * 'Proto.Types_Fields.evidenceHash' @:: Lens' Header Data.ByteString.ByteString@
         * 'Proto.Types_Fields.proposerAddress' @:: Lens' Header Data.ByteString.ByteString@ -}
data Header
  = Header'_constructor {Header -> Maybe Version
_Header'version :: !(Prelude.Maybe Version),
                         Header -> Text
_Header'chainId :: !Data.Text.Text,
                         Header -> Int64
_Header'height :: !Data.Int.Int64,
                         Header -> Maybe Timestamp
_Header'time :: !(Prelude.Maybe Proto.Google.Protobuf.Timestamp.Timestamp),
                         Header -> Int64
_Header'numTxs :: !Data.Int.Int64,
                         Header -> Int64
_Header'totalTxs :: !Data.Int.Int64,
                         Header -> Maybe BlockID
_Header'lastBlockId :: !(Prelude.Maybe BlockID),
                         Header -> ByteString
_Header'lastCommitHash :: !Data.ByteString.ByteString,
                         Header -> ByteString
_Header'dataHash :: !Data.ByteString.ByteString,
                         Header -> ByteString
_Header'validatorsHash :: !Data.ByteString.ByteString,
                         Header -> ByteString
_Header'nextValidatorsHash :: !Data.ByteString.ByteString,
                         Header -> ByteString
_Header'consensusHash :: !Data.ByteString.ByteString,
                         Header -> ByteString
_Header'appHash :: !Data.ByteString.ByteString,
                         Header -> ByteString
_Header'lastResultsHash :: !Data.ByteString.ByteString,
                         Header -> ByteString
_Header'evidenceHash :: !Data.ByteString.ByteString,
                         Header -> ByteString
_Header'proposerAddress :: !Data.ByteString.ByteString,
                         Header -> FieldSet
_Header'_unknownFields :: !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__)
                                                             ()))))))))))))))))
{- | Fields :
     
         * 'Proto.Types_Fields.round' @:: Lens' LastCommitInfo Data.Int.Int32@
         * 'Proto.Types_Fields.votes' @:: Lens' LastCommitInfo [VoteInfo]@
         * 'Proto.Types_Fields.vec'votes' @:: Lens' LastCommitInfo (Data.Vector.Vector VoteInfo)@ -}
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__) ()))
{- | Fields :
     
         * 'Proto.Types_Fields.total' @:: Lens' PartSetHeader Data.Int.Int32@
         * 'Proto.Types_Fields.hash' @:: Lens' PartSetHeader Data.ByteString.ByteString@ -}
data PartSetHeader
  = PartSetHeader'_constructor {PartSetHeader -> Int32
_PartSetHeader'total :: !Data.Int.Int32,
                                PartSetHeader -> ByteString
_PartSetHeader'hash :: !Data.ByteString.ByteString,
                                PartSetHeader -> FieldSet
_PartSetHeader'_unknownFields :: !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