{- This file was auto-generated from iavl/api.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.Iavl.Api (
        IAVLService(..), DeleteVersionRequest(), DeleteVersionResponse(),
        GetRequest(), GetResponse(), GetVersionedRequest(),
        GetWithProofResponse(), HasRequest(), HasResponse(),
        HashResponse(), PathToLeaf(), ProofInnerNode(), ProofLeafNode(),
        RangeProof(), RemoveRequest(), RemoveResponse(),
        SaveVersionResponse(), SetRequest(), SetResponse(),
        VerifyAbsenceRequest(), VerifyItemRequest(), VerifyRequest(),
        VersionExistsRequest(), VersionExistsResponse(), VersionResponse()
    ) 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.Google.Api.Annotations
import qualified Proto.Google.Protobuf.Empty
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.version' @:: Lens' DeleteVersionRequest Data.Int.Int64@ -}
data DeleteVersionRequest
  = DeleteVersionRequest'_constructor {DeleteVersionRequest -> Int64
_DeleteVersionRequest'version :: !Data.Int.Int64,
                                       DeleteVersionRequest -> FieldSet
_DeleteVersionRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (DeleteVersionRequest -> DeleteVersionRequest -> Bool
(DeleteVersionRequest -> DeleteVersionRequest -> Bool)
-> (DeleteVersionRequest -> DeleteVersionRequest -> Bool)
-> Eq DeleteVersionRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
$c/= :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
== :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
$c== :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
Prelude.Eq, Eq DeleteVersionRequest
Eq DeleteVersionRequest =>
(DeleteVersionRequest -> DeleteVersionRequest -> Ordering)
-> (DeleteVersionRequest -> DeleteVersionRequest -> Bool)
-> (DeleteVersionRequest -> DeleteVersionRequest -> Bool)
-> (DeleteVersionRequest -> DeleteVersionRequest -> Bool)
-> (DeleteVersionRequest -> DeleteVersionRequest -> Bool)
-> (DeleteVersionRequest
    -> DeleteVersionRequest -> DeleteVersionRequest)
-> (DeleteVersionRequest
    -> DeleteVersionRequest -> DeleteVersionRequest)
-> Ord DeleteVersionRequest
DeleteVersionRequest -> DeleteVersionRequest -> Bool
DeleteVersionRequest -> DeleteVersionRequest -> Ordering
DeleteVersionRequest
-> DeleteVersionRequest -> DeleteVersionRequest
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 :: DeleteVersionRequest
-> DeleteVersionRequest -> DeleteVersionRequest
$cmin :: DeleteVersionRequest
-> DeleteVersionRequest -> DeleteVersionRequest
max :: DeleteVersionRequest
-> DeleteVersionRequest -> DeleteVersionRequest
$cmax :: DeleteVersionRequest
-> DeleteVersionRequest -> DeleteVersionRequest
>= :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
$c>= :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
> :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
$c> :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
<= :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
$c<= :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
< :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
$c< :: DeleteVersionRequest -> DeleteVersionRequest -> Bool
compare :: DeleteVersionRequest -> DeleteVersionRequest -> Ordering
$ccompare :: DeleteVersionRequest -> DeleteVersionRequest -> Ordering
$cp1Ord :: Eq DeleteVersionRequest
Prelude.Ord)
instance Prelude.Show DeleteVersionRequest where
  showsPrec :: Int -> DeleteVersionRequest -> ShowS
showsPrec _ __x :: DeleteVersionRequest
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (DeleteVersionRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort DeleteVersionRequest
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField DeleteVersionRequest "version" Data.Int.Int64 where
  fieldOf :: Proxy# "version"
-> (Int64 -> f Int64)
-> DeleteVersionRequest
-> f DeleteVersionRequest
fieldOf _
    = ((Int64 -> f Int64)
 -> DeleteVersionRequest -> f DeleteVersionRequest)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> DeleteVersionRequest
-> f DeleteVersionRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((DeleteVersionRequest -> Int64)
-> (DeleteVersionRequest -> Int64 -> DeleteVersionRequest)
-> Lens DeleteVersionRequest DeleteVersionRequest Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           DeleteVersionRequest -> Int64
_DeleteVersionRequest'version
           (\ x__ :: DeleteVersionRequest
x__ y__ :: Int64
y__ -> DeleteVersionRequest
x__ {_DeleteVersionRequest'version :: Int64
_DeleteVersionRequest'version = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message DeleteVersionRequest where
  messageName :: Proxy DeleteVersionRequest -> Text
messageName _ = String -> Text
Data.Text.pack "proto.DeleteVersionRequest"
  fieldsByTag :: Map Tag (FieldDescriptor DeleteVersionRequest)
fieldsByTag
    = let
        version__field_descriptor :: FieldDescriptor DeleteVersionRequest
version__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor DeleteVersionRequest Int64
-> FieldDescriptor DeleteVersionRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "version"
              (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 DeleteVersionRequest DeleteVersionRequest Int64 Int64
-> FieldAccessor DeleteVersionRequest 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 "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version")) ::
              Data.ProtoLens.FieldDescriptor DeleteVersionRequest
      in
        [(Tag, FieldDescriptor DeleteVersionRequest)]
-> Map Tag (FieldDescriptor DeleteVersionRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor DeleteVersionRequest
version__field_descriptor)]
  unknownFields :: LensLike' f DeleteVersionRequest FieldSet
unknownFields
    = (DeleteVersionRequest -> FieldSet)
-> (DeleteVersionRequest -> FieldSet -> DeleteVersionRequest)
-> Lens' DeleteVersionRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        DeleteVersionRequest -> FieldSet
_DeleteVersionRequest'_unknownFields
        (\ x__ :: DeleteVersionRequest
x__ y__ :: FieldSet
y__ -> DeleteVersionRequest
x__ {_DeleteVersionRequest'_unknownFields :: FieldSet
_DeleteVersionRequest'_unknownFields = FieldSet
y__})
  defMessage :: DeleteVersionRequest
defMessage
    = $WDeleteVersionRequest'_constructor :: Int64 -> FieldSet -> DeleteVersionRequest
DeleteVersionRequest'_constructor
        {_DeleteVersionRequest'version :: Int64
_DeleteVersionRequest'version = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _DeleteVersionRequest'_unknownFields :: FieldSet
_DeleteVersionRequest'_unknownFields = []}
  parseMessage :: Parser DeleteVersionRequest
parseMessage
    = let
        loop ::
          DeleteVersionRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser DeleteVersionRequest
        loop :: DeleteVersionRequest -> Parser DeleteVersionRequest
loop x :: DeleteVersionRequest
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]))))
                      DeleteVersionRequest -> Parser DeleteVersionRequest
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter DeleteVersionRequest DeleteVersionRequest FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> DeleteVersionRequest
-> DeleteVersionRequest
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 DeleteVersionRequest DeleteVersionRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) DeleteVersionRequest
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)
                                       "version"
                                DeleteVersionRequest -> Parser DeleteVersionRequest
loop (Setter DeleteVersionRequest DeleteVersionRequest Int64 Int64
-> Int64 -> DeleteVersionRequest -> DeleteVersionRequest
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") Int64
y DeleteVersionRequest
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                DeleteVersionRequest -> Parser DeleteVersionRequest
loop
                                  (Setter DeleteVersionRequest DeleteVersionRequest FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> DeleteVersionRequest
-> DeleteVersionRequest
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 DeleteVersionRequest DeleteVersionRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) DeleteVersionRequest
x)
      in
        Parser DeleteVersionRequest
-> String -> Parser DeleteVersionRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do DeleteVersionRequest -> Parser DeleteVersionRequest
loop DeleteVersionRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "DeleteVersionRequest"
  buildMessage :: DeleteVersionRequest -> Builder
buildMessage
    = \ _x :: DeleteVersionRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Int64
_v = FoldLike
  Int64 DeleteVersionRequest DeleteVersionRequest Int64 Int64
-> DeleteVersionRequest -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version") DeleteVersionRequest
_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
  DeleteVersionRequest
  DeleteVersionRequest
  FieldSet
  FieldSet
-> DeleteVersionRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  DeleteVersionRequest
  DeleteVersionRequest
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields DeleteVersionRequest
_x))
instance Control.DeepSeq.NFData DeleteVersionRequest where
  rnf :: DeleteVersionRequest -> ()
rnf
    = \ x__ :: DeleteVersionRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (DeleteVersionRequest -> FieldSet
_DeleteVersionRequest'_unknownFields DeleteVersionRequest
x__)
             (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (DeleteVersionRequest -> Int64
_DeleteVersionRequest'version DeleteVersionRequest
x__) ())
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.rootHash' @:: Lens' DeleteVersionResponse Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.version' @:: Lens' DeleteVersionResponse Data.Int.Int64@ -}
data DeleteVersionResponse
  = DeleteVersionResponse'_constructor {DeleteVersionResponse -> ByteString
_DeleteVersionResponse'rootHash :: !Data.ByteString.ByteString,
                                        DeleteVersionResponse -> Int64
_DeleteVersionResponse'version :: !Data.Int.Int64,
                                        DeleteVersionResponse -> FieldSet
_DeleteVersionResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (DeleteVersionResponse -> DeleteVersionResponse -> Bool
(DeleteVersionResponse -> DeleteVersionResponse -> Bool)
-> (DeleteVersionResponse -> DeleteVersionResponse -> Bool)
-> Eq DeleteVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
$c/= :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
== :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
$c== :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
Prelude.Eq, Eq DeleteVersionResponse
Eq DeleteVersionResponse =>
(DeleteVersionResponse -> DeleteVersionResponse -> Ordering)
-> (DeleteVersionResponse -> DeleteVersionResponse -> Bool)
-> (DeleteVersionResponse -> DeleteVersionResponse -> Bool)
-> (DeleteVersionResponse -> DeleteVersionResponse -> Bool)
-> (DeleteVersionResponse -> DeleteVersionResponse -> Bool)
-> (DeleteVersionResponse
    -> DeleteVersionResponse -> DeleteVersionResponse)
-> (DeleteVersionResponse
    -> DeleteVersionResponse -> DeleteVersionResponse)
-> Ord DeleteVersionResponse
DeleteVersionResponse -> DeleteVersionResponse -> Bool
DeleteVersionResponse -> DeleteVersionResponse -> Ordering
DeleteVersionResponse
-> DeleteVersionResponse -> DeleteVersionResponse
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 :: DeleteVersionResponse
-> DeleteVersionResponse -> DeleteVersionResponse
$cmin :: DeleteVersionResponse
-> DeleteVersionResponse -> DeleteVersionResponse
max :: DeleteVersionResponse
-> DeleteVersionResponse -> DeleteVersionResponse
$cmax :: DeleteVersionResponse
-> DeleteVersionResponse -> DeleteVersionResponse
>= :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
$c>= :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
> :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
$c> :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
<= :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
$c<= :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
< :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
$c< :: DeleteVersionResponse -> DeleteVersionResponse -> Bool
compare :: DeleteVersionResponse -> DeleteVersionResponse -> Ordering
$ccompare :: DeleteVersionResponse -> DeleteVersionResponse -> Ordering
$cp1Ord :: Eq DeleteVersionResponse
Prelude.Ord)
instance Prelude.Show DeleteVersionResponse where
  showsPrec :: Int -> DeleteVersionResponse -> ShowS
showsPrec _ __x :: DeleteVersionResponse
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (DeleteVersionResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort DeleteVersionResponse
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField DeleteVersionResponse "rootHash" Data.ByteString.ByteString where
  fieldOf :: Proxy# "rootHash"
-> (ByteString -> f ByteString)
-> DeleteVersionResponse
-> f DeleteVersionResponse
fieldOf _
    = ((ByteString -> f ByteString)
 -> DeleteVersionResponse -> f DeleteVersionResponse)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> DeleteVersionResponse
-> f DeleteVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((DeleteVersionResponse -> ByteString)
-> (DeleteVersionResponse -> ByteString -> DeleteVersionResponse)
-> Lens
     DeleteVersionResponse DeleteVersionResponse ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           DeleteVersionResponse -> ByteString
_DeleteVersionResponse'rootHash
           (\ x__ :: DeleteVersionResponse
x__ y__ :: ByteString
y__ -> DeleteVersionResponse
x__ {_DeleteVersionResponse'rootHash :: ByteString
_DeleteVersionResponse'rootHash = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField DeleteVersionResponse "version" Data.Int.Int64 where
  fieldOf :: Proxy# "version"
-> (Int64 -> f Int64)
-> DeleteVersionResponse
-> f DeleteVersionResponse
fieldOf _
    = ((Int64 -> f Int64)
 -> DeleteVersionResponse -> f DeleteVersionResponse)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> DeleteVersionResponse
-> f DeleteVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((DeleteVersionResponse -> Int64)
-> (DeleteVersionResponse -> Int64 -> DeleteVersionResponse)
-> Lens DeleteVersionResponse DeleteVersionResponse Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           DeleteVersionResponse -> Int64
_DeleteVersionResponse'version
           (\ x__ :: DeleteVersionResponse
x__ y__ :: Int64
y__ -> DeleteVersionResponse
x__ {_DeleteVersionResponse'version :: Int64
_DeleteVersionResponse'version = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message DeleteVersionResponse where
  messageName :: Proxy DeleteVersionResponse -> Text
messageName _ = String -> Text
Data.Text.pack "proto.DeleteVersionResponse"
  fieldsByTag :: Map Tag (FieldDescriptor DeleteVersionResponse)
fieldsByTag
    = let
        rootHash__field_descriptor :: FieldDescriptor DeleteVersionResponse
rootHash__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor DeleteVersionResponse ByteString
-> FieldDescriptor DeleteVersionResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "root_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
     DeleteVersionResponse DeleteVersionResponse ByteString ByteString
-> FieldAccessor DeleteVersionResponse 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 "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash")) ::
              Data.ProtoLens.FieldDescriptor DeleteVersionResponse
        version__field_descriptor :: FieldDescriptor DeleteVersionResponse
version__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor DeleteVersionResponse Int64
-> FieldDescriptor DeleteVersionResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "version"
              (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 DeleteVersionResponse DeleteVersionResponse Int64 Int64
-> FieldAccessor DeleteVersionResponse 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 "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version")) ::
              Data.ProtoLens.FieldDescriptor DeleteVersionResponse
      in
        [(Tag, FieldDescriptor DeleteVersionResponse)]
-> Map Tag (FieldDescriptor DeleteVersionResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor DeleteVersionResponse
rootHash__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor DeleteVersionResponse
version__field_descriptor)]
  unknownFields :: LensLike' f DeleteVersionResponse FieldSet
unknownFields
    = (DeleteVersionResponse -> FieldSet)
-> (DeleteVersionResponse -> FieldSet -> DeleteVersionResponse)
-> Lens' DeleteVersionResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        DeleteVersionResponse -> FieldSet
_DeleteVersionResponse'_unknownFields
        (\ x__ :: DeleteVersionResponse
x__ y__ :: FieldSet
y__ -> DeleteVersionResponse
x__ {_DeleteVersionResponse'_unknownFields :: FieldSet
_DeleteVersionResponse'_unknownFields = FieldSet
y__})
  defMessage :: DeleteVersionResponse
defMessage
    = $WDeleteVersionResponse'_constructor :: ByteString -> Int64 -> FieldSet -> DeleteVersionResponse
DeleteVersionResponse'_constructor
        {_DeleteVersionResponse'rootHash :: ByteString
_DeleteVersionResponse'rootHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _DeleteVersionResponse'version :: Int64
_DeleteVersionResponse'version = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _DeleteVersionResponse'_unknownFields :: FieldSet
_DeleteVersionResponse'_unknownFields = []}
  parseMessage :: Parser DeleteVersionResponse
parseMessage
    = let
        loop ::
          DeleteVersionResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser DeleteVersionResponse
        loop :: DeleteVersionResponse -> Parser DeleteVersionResponse
loop x :: DeleteVersionResponse
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]))))
                      DeleteVersionResponse -> Parser DeleteVersionResponse
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter
  DeleteVersionResponse DeleteVersionResponse FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> DeleteVersionResponse
-> DeleteVersionResponse
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
  DeleteVersionResponse DeleteVersionResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) DeleteVersionResponse
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))
                                       "root_hash"
                                DeleteVersionResponse -> Parser DeleteVersionResponse
loop
                                  (Setter
  DeleteVersionResponse DeleteVersionResponse ByteString ByteString
-> ByteString -> DeleteVersionResponse -> DeleteVersionResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") ByteString
y DeleteVersionResponse
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)
                                       "version"
                                DeleteVersionResponse -> Parser DeleteVersionResponse
loop (Setter DeleteVersionResponse DeleteVersionResponse Int64 Int64
-> Int64 -> DeleteVersionResponse -> DeleteVersionResponse
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") Int64
y DeleteVersionResponse
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                DeleteVersionResponse -> Parser DeleteVersionResponse
loop
                                  (Setter
  DeleteVersionResponse DeleteVersionResponse FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> DeleteVersionResponse
-> DeleteVersionResponse
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
  DeleteVersionResponse DeleteVersionResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) DeleteVersionResponse
x)
      in
        Parser DeleteVersionResponse
-> String -> Parser DeleteVersionResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do DeleteVersionResponse -> Parser DeleteVersionResponse
loop DeleteVersionResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "DeleteVersionResponse"
  buildMessage :: DeleteVersionResponse -> Builder
buildMessage
    = \ _x :: DeleteVersionResponse
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: ByteString
_v = FoldLike
  ByteString
  DeleteVersionResponse
  DeleteVersionResponse
  ByteString
  ByteString
-> DeleteVersionResponse -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") DeleteVersionResponse
_x
              in
                if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs :: ByteString
bs
                          -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                               (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         ByteString
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   _v :: Int64
_v = FoldLike
  Int64 DeleteVersionResponse DeleteVersionResponse Int64 Int64
-> DeleteVersionResponse -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version") DeleteVersionResponse
_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
  DeleteVersionResponse
  DeleteVersionResponse
  FieldSet
  FieldSet
-> DeleteVersionResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  DeleteVersionResponse
  DeleteVersionResponse
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields DeleteVersionResponse
_x)))
instance Control.DeepSeq.NFData DeleteVersionResponse where
  rnf :: DeleteVersionResponse -> ()
rnf
    = \ x__ :: DeleteVersionResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (DeleteVersionResponse -> FieldSet
_DeleteVersionResponse'_unknownFields DeleteVersionResponse
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (DeleteVersionResponse -> ByteString
_DeleteVersionResponse'rootHash DeleteVersionResponse
x__)
                (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (DeleteVersionResponse -> Int64
_DeleteVersionResponse'version DeleteVersionResponse
x__) ()))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.key' @:: Lens' GetRequest Data.ByteString.ByteString@ -}
data GetRequest
  = GetRequest'_constructor {GetRequest -> ByteString
_GetRequest'key :: !Data.ByteString.ByteString,
                             GetRequest -> FieldSet
_GetRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (GetRequest -> GetRequest -> Bool
(GetRequest -> GetRequest -> Bool)
-> (GetRequest -> GetRequest -> Bool) -> Eq GetRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRequest -> GetRequest -> Bool
$c/= :: GetRequest -> GetRequest -> Bool
== :: GetRequest -> GetRequest -> Bool
$c== :: GetRequest -> GetRequest -> Bool
Prelude.Eq, Eq GetRequest
Eq GetRequest =>
(GetRequest -> GetRequest -> Ordering)
-> (GetRequest -> GetRequest -> Bool)
-> (GetRequest -> GetRequest -> Bool)
-> (GetRequest -> GetRequest -> Bool)
-> (GetRequest -> GetRequest -> Bool)
-> (GetRequest -> GetRequest -> GetRequest)
-> (GetRequest -> GetRequest -> GetRequest)
-> Ord GetRequest
GetRequest -> GetRequest -> Bool
GetRequest -> GetRequest -> Ordering
GetRequest -> GetRequest -> GetRequest
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 :: GetRequest -> GetRequest -> GetRequest
$cmin :: GetRequest -> GetRequest -> GetRequest
max :: GetRequest -> GetRequest -> GetRequest
$cmax :: GetRequest -> GetRequest -> GetRequest
>= :: GetRequest -> GetRequest -> Bool
$c>= :: GetRequest -> GetRequest -> Bool
> :: GetRequest -> GetRequest -> Bool
$c> :: GetRequest -> GetRequest -> Bool
<= :: GetRequest -> GetRequest -> Bool
$c<= :: GetRequest -> GetRequest -> Bool
< :: GetRequest -> GetRequest -> Bool
$c< :: GetRequest -> GetRequest -> Bool
compare :: GetRequest -> GetRequest -> Ordering
$ccompare :: GetRequest -> GetRequest -> Ordering
$cp1Ord :: Eq GetRequest
Prelude.Ord)
instance Prelude.Show GetRequest where
  showsPrec :: Int -> GetRequest -> ShowS
showsPrec _ __x :: GetRequest
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (GetRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort GetRequest
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField GetRequest "key" Data.ByteString.ByteString where
  fieldOf :: Proxy# "key"
-> (ByteString -> f ByteString) -> GetRequest -> f GetRequest
fieldOf _
    = ((ByteString -> f ByteString) -> GetRequest -> f GetRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> GetRequest
-> f GetRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((GetRequest -> ByteString)
-> (GetRequest -> ByteString -> GetRequest)
-> Lens GetRequest GetRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           GetRequest -> ByteString
_GetRequest'key (\ x__ :: GetRequest
x__ y__ :: ByteString
y__ -> GetRequest
x__ {_GetRequest'key :: ByteString
_GetRequest'key = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message GetRequest where
  messageName :: Proxy GetRequest -> Text
messageName _ = String -> Text
Data.Text.pack "proto.GetRequest"
  fieldsByTag :: Map Tag (FieldDescriptor GetRequest)
fieldsByTag
    = let
        key__field_descriptor :: FieldDescriptor GetRequest
key__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor GetRequest ByteString
-> FieldDescriptor GetRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "key"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens GetRequest GetRequest ByteString ByteString
-> FieldAccessor GetRequest ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor GetRequest
      in
        [(Tag, FieldDescriptor GetRequest)]
-> Map Tag (FieldDescriptor GetRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor GetRequest
key__field_descriptor)]
  unknownFields :: LensLike' f GetRequest FieldSet
unknownFields
    = (GetRequest -> FieldSet)
-> (GetRequest -> FieldSet -> GetRequest)
-> Lens' GetRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        GetRequest -> FieldSet
_GetRequest'_unknownFields
        (\ x__ :: GetRequest
x__ y__ :: FieldSet
y__ -> GetRequest
x__ {_GetRequest'_unknownFields :: FieldSet
_GetRequest'_unknownFields = FieldSet
y__})
  defMessage :: GetRequest
defMessage
    = $WGetRequest'_constructor :: ByteString -> FieldSet -> GetRequest
GetRequest'_constructor
        {_GetRequest'key :: ByteString
_GetRequest'key = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _GetRequest'_unknownFields :: FieldSet
_GetRequest'_unknownFields = []}
  parseMessage :: Parser GetRequest
parseMessage
    = let
        loop ::
          GetRequest -> Data.ProtoLens.Encoding.Bytes.Parser GetRequest
        loop :: GetRequest -> Parser GetRequest
loop x :: GetRequest
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]))))
                      GetRequest -> Parser GetRequest
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter GetRequest GetRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> GetRequest -> GetRequest
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 GetRequest GetRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) GetRequest
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))
                                       "key"
                                GetRequest -> Parser GetRequest
loop (Setter GetRequest GetRequest ByteString ByteString
-> ByteString -> GetRequest -> GetRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") ByteString
y GetRequest
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                GetRequest -> Parser GetRequest
loop
                                  (Setter GetRequest GetRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> GetRequest -> GetRequest
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 GetRequest GetRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) GetRequest
x)
      in
        Parser GetRequest -> String -> Parser GetRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do GetRequest -> Parser GetRequest
loop GetRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "GetRequest"
  buildMessage :: GetRequest -> Builder
buildMessage
    = \ _x :: GetRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: ByteString
_v = FoldLike ByteString GetRequest GetRequest ByteString ByteString
-> GetRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") GetRequest
_x
              in
                if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs :: ByteString
bs
                          -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                               (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         ByteString
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet GetRequest GetRequest FieldSet FieldSet
-> GetRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet GetRequest GetRequest FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields GetRequest
_x))
instance Control.DeepSeq.NFData GetRequest where
  rnf :: GetRequest -> ()
rnf
    = \ x__ :: GetRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (GetRequest -> FieldSet
_GetRequest'_unknownFields GetRequest
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (GetRequest -> ByteString
_GetRequest'key GetRequest
x__) ())
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.index' @:: Lens' GetResponse Data.Int.Int64@
         * 'Proto.Iavl.Api_Fields.value' @:: Lens' GetResponse Data.ByteString.ByteString@ -}
data GetResponse
  = GetResponse'_constructor {GetResponse -> Int64
_GetResponse'index :: !Data.Int.Int64,
                              GetResponse -> ByteString
_GetResponse'value :: !Data.ByteString.ByteString,
                              GetResponse -> FieldSet
_GetResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (GetResponse -> GetResponse -> Bool
(GetResponse -> GetResponse -> Bool)
-> (GetResponse -> GetResponse -> Bool) -> Eq GetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResponse -> GetResponse -> Bool
$c/= :: GetResponse -> GetResponse -> Bool
== :: GetResponse -> GetResponse -> Bool
$c== :: GetResponse -> GetResponse -> Bool
Prelude.Eq, Eq GetResponse
Eq GetResponse =>
(GetResponse -> GetResponse -> Ordering)
-> (GetResponse -> GetResponse -> Bool)
-> (GetResponse -> GetResponse -> Bool)
-> (GetResponse -> GetResponse -> Bool)
-> (GetResponse -> GetResponse -> Bool)
-> (GetResponse -> GetResponse -> GetResponse)
-> (GetResponse -> GetResponse -> GetResponse)
-> Ord GetResponse
GetResponse -> GetResponse -> Bool
GetResponse -> GetResponse -> Ordering
GetResponse -> GetResponse -> GetResponse
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 :: GetResponse -> GetResponse -> GetResponse
$cmin :: GetResponse -> GetResponse -> GetResponse
max :: GetResponse -> GetResponse -> GetResponse
$cmax :: GetResponse -> GetResponse -> GetResponse
>= :: GetResponse -> GetResponse -> Bool
$c>= :: GetResponse -> GetResponse -> Bool
> :: GetResponse -> GetResponse -> Bool
$c> :: GetResponse -> GetResponse -> Bool
<= :: GetResponse -> GetResponse -> Bool
$c<= :: GetResponse -> GetResponse -> Bool
< :: GetResponse -> GetResponse -> Bool
$c< :: GetResponse -> GetResponse -> Bool
compare :: GetResponse -> GetResponse -> Ordering
$ccompare :: GetResponse -> GetResponse -> Ordering
$cp1Ord :: Eq GetResponse
Prelude.Ord)
instance Prelude.Show GetResponse where
  showsPrec :: Int -> GetResponse -> ShowS
showsPrec _ __x :: GetResponse
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (GetResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort GetResponse
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField GetResponse "index" Data.Int.Int64 where
  fieldOf :: Proxy# "index"
-> (Int64 -> f Int64) -> GetResponse -> f GetResponse
fieldOf _
    = ((Int64 -> f Int64) -> GetResponse -> f GetResponse)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> GetResponse
-> f GetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((GetResponse -> Int64)
-> (GetResponse -> Int64 -> GetResponse)
-> Lens GetResponse GetResponse Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           GetResponse -> Int64
_GetResponse'index (\ x__ :: GetResponse
x__ y__ :: Int64
y__ -> GetResponse
x__ {_GetResponse'index :: Int64
_GetResponse'index = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField GetResponse "value" Data.ByteString.ByteString where
  fieldOf :: Proxy# "value"
-> (ByteString -> f ByteString) -> GetResponse -> f GetResponse
fieldOf _
    = ((ByteString -> f ByteString) -> GetResponse -> f GetResponse)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> GetResponse
-> f GetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((GetResponse -> ByteString)
-> (GetResponse -> ByteString -> GetResponse)
-> Lens GetResponse GetResponse ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           GetResponse -> ByteString
_GetResponse'value (\ x__ :: GetResponse
x__ y__ :: ByteString
y__ -> GetResponse
x__ {_GetResponse'value :: ByteString
_GetResponse'value = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message GetResponse where
  messageName :: Proxy GetResponse -> Text
messageName _ = String -> Text
Data.Text.pack "proto.GetResponse"
  fieldsByTag :: Map Tag (FieldDescriptor GetResponse)
fieldsByTag
    = let
        index__field_descriptor :: FieldDescriptor GetResponse
index__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor GetResponse Int64
-> FieldDescriptor GetResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "index"
              (ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (WireDefault Int64
-> Lens GetResponse GetResponse Int64 Int64
-> FieldAccessor GetResponse Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "index" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"index")) ::
              Data.ProtoLens.FieldDescriptor GetResponse
        value__field_descriptor :: FieldDescriptor GetResponse
value__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor GetResponse ByteString
-> FieldDescriptor GetResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "value"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens GetResponse GetResponse ByteString ByteString
-> FieldAccessor GetResponse ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value")) ::
              Data.ProtoLens.FieldDescriptor GetResponse
      in
        [(Tag, FieldDescriptor GetResponse)]
-> Map Tag (FieldDescriptor GetResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor GetResponse
index__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor GetResponse
value__field_descriptor)]
  unknownFields :: LensLike' f GetResponse FieldSet
unknownFields
    = (GetResponse -> FieldSet)
-> (GetResponse -> FieldSet -> GetResponse)
-> Lens' GetResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        GetResponse -> FieldSet
_GetResponse'_unknownFields
        (\ x__ :: GetResponse
x__ y__ :: FieldSet
y__ -> GetResponse
x__ {_GetResponse'_unknownFields :: FieldSet
_GetResponse'_unknownFields = FieldSet
y__})
  defMessage :: GetResponse
defMessage
    = $WGetResponse'_constructor :: Int64 -> ByteString -> FieldSet -> GetResponse
GetResponse'_constructor
        {_GetResponse'index :: Int64
_GetResponse'index = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _GetResponse'value :: ByteString
_GetResponse'value = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _GetResponse'_unknownFields :: FieldSet
_GetResponse'_unknownFields = []}
  parseMessage :: Parser GetResponse
parseMessage
    = let
        loop ::
          GetResponse -> Data.ProtoLens.Encoding.Bytes.Parser GetResponse
        loop :: GetResponse -> Parser GetResponse
loop x :: GetResponse
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]))))
                      GetResponse -> Parser GetResponse
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter GetResponse GetResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> GetResponse -> GetResponse
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 GetResponse GetResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) GetResponse
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)
                                       "index"
                                GetResponse -> Parser GetResponse
loop (Setter GetResponse GetResponse Int64 Int64
-> Int64 -> GetResponse -> GetResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "index" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"index") Int64
y GetResponse
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))
                                       "value"
                                GetResponse -> Parser GetResponse
loop (Setter GetResponse GetResponse ByteString ByteString
-> ByteString -> GetResponse -> GetResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value") ByteString
y GetResponse
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                GetResponse -> Parser GetResponse
loop
                                  (Setter GetResponse GetResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> GetResponse -> GetResponse
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 GetResponse GetResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) GetResponse
x)
      in
        Parser GetResponse -> String -> Parser GetResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do GetResponse -> Parser GetResponse
loop GetResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "GetResponse"
  buildMessage :: GetResponse -> Builder
buildMessage
    = \ _x :: GetResponse
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Int64
_v = FoldLike Int64 GetResponse GetResponse Int64 Int64
-> GetResponse -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "index" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"index") GetResponse
_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 :: ByteString
_v = FoldLike ByteString GetResponse GetResponse ByteString ByteString
-> GetResponse -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value") GetResponse
_x
                 in
                   if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                       Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   else
                       Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs :: ByteString
bs
                             -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                  (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                  (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                            ByteString
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet GetResponse GetResponse FieldSet FieldSet
-> GetResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet GetResponse GetResponse FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields GetResponse
_x)))
instance Control.DeepSeq.NFData GetResponse where
  rnf :: GetResponse -> ()
rnf
    = \ x__ :: GetResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (GetResponse -> FieldSet
_GetResponse'_unknownFields GetResponse
x__)
             (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (GetResponse -> Int64
_GetResponse'index GetResponse
x__)
                (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (GetResponse -> ByteString
_GetResponse'value GetResponse
x__) ()))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.version' @:: Lens' GetVersionedRequest Data.Int.Int64@
         * 'Proto.Iavl.Api_Fields.key' @:: Lens' GetVersionedRequest Data.ByteString.ByteString@ -}
data GetVersionedRequest
  = GetVersionedRequest'_constructor {GetVersionedRequest -> Int64
_GetVersionedRequest'version :: !Data.Int.Int64,
                                      GetVersionedRequest -> ByteString
_GetVersionedRequest'key :: !Data.ByteString.ByteString,
                                      GetVersionedRequest -> FieldSet
_GetVersionedRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (GetVersionedRequest -> GetVersionedRequest -> Bool
(GetVersionedRequest -> GetVersionedRequest -> Bool)
-> (GetVersionedRequest -> GetVersionedRequest -> Bool)
-> Eq GetVersionedRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetVersionedRequest -> GetVersionedRequest -> Bool
$c/= :: GetVersionedRequest -> GetVersionedRequest -> Bool
== :: GetVersionedRequest -> GetVersionedRequest -> Bool
$c== :: GetVersionedRequest -> GetVersionedRequest -> Bool
Prelude.Eq, Eq GetVersionedRequest
Eq GetVersionedRequest =>
(GetVersionedRequest -> GetVersionedRequest -> Ordering)
-> (GetVersionedRequest -> GetVersionedRequest -> Bool)
-> (GetVersionedRequest -> GetVersionedRequest -> Bool)
-> (GetVersionedRequest -> GetVersionedRequest -> Bool)
-> (GetVersionedRequest -> GetVersionedRequest -> Bool)
-> (GetVersionedRequest
    -> GetVersionedRequest -> GetVersionedRequest)
-> (GetVersionedRequest
    -> GetVersionedRequest -> GetVersionedRequest)
-> Ord GetVersionedRequest
GetVersionedRequest -> GetVersionedRequest -> Bool
GetVersionedRequest -> GetVersionedRequest -> Ordering
GetVersionedRequest -> GetVersionedRequest -> GetVersionedRequest
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 :: GetVersionedRequest -> GetVersionedRequest -> GetVersionedRequest
$cmin :: GetVersionedRequest -> GetVersionedRequest -> GetVersionedRequest
max :: GetVersionedRequest -> GetVersionedRequest -> GetVersionedRequest
$cmax :: GetVersionedRequest -> GetVersionedRequest -> GetVersionedRequest
>= :: GetVersionedRequest -> GetVersionedRequest -> Bool
$c>= :: GetVersionedRequest -> GetVersionedRequest -> Bool
> :: GetVersionedRequest -> GetVersionedRequest -> Bool
$c> :: GetVersionedRequest -> GetVersionedRequest -> Bool
<= :: GetVersionedRequest -> GetVersionedRequest -> Bool
$c<= :: GetVersionedRequest -> GetVersionedRequest -> Bool
< :: GetVersionedRequest -> GetVersionedRequest -> Bool
$c< :: GetVersionedRequest -> GetVersionedRequest -> Bool
compare :: GetVersionedRequest -> GetVersionedRequest -> Ordering
$ccompare :: GetVersionedRequest -> GetVersionedRequest -> Ordering
$cp1Ord :: Eq GetVersionedRequest
Prelude.Ord)
instance Prelude.Show GetVersionedRequest where
  showsPrec :: Int -> GetVersionedRequest -> ShowS
showsPrec _ __x :: GetVersionedRequest
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (GetVersionedRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort GetVersionedRequest
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField GetVersionedRequest "version" Data.Int.Int64 where
  fieldOf :: Proxy# "version"
-> (Int64 -> f Int64)
-> GetVersionedRequest
-> f GetVersionedRequest
fieldOf _
    = ((Int64 -> f Int64)
 -> GetVersionedRequest -> f GetVersionedRequest)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> GetVersionedRequest
-> f GetVersionedRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((GetVersionedRequest -> Int64)
-> (GetVersionedRequest -> Int64 -> GetVersionedRequest)
-> Lens GetVersionedRequest GetVersionedRequest Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           GetVersionedRequest -> Int64
_GetVersionedRequest'version
           (\ x__ :: GetVersionedRequest
x__ y__ :: Int64
y__ -> GetVersionedRequest
x__ {_GetVersionedRequest'version :: Int64
_GetVersionedRequest'version = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField GetVersionedRequest "key" Data.ByteString.ByteString where
  fieldOf :: Proxy# "key"
-> (ByteString -> f ByteString)
-> GetVersionedRequest
-> f GetVersionedRequest
fieldOf _
    = ((ByteString -> f ByteString)
 -> GetVersionedRequest -> f GetVersionedRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> GetVersionedRequest
-> f GetVersionedRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((GetVersionedRequest -> ByteString)
-> (GetVersionedRequest -> ByteString -> GetVersionedRequest)
-> Lens
     GetVersionedRequest GetVersionedRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           GetVersionedRequest -> ByteString
_GetVersionedRequest'key
           (\ x__ :: GetVersionedRequest
x__ y__ :: ByteString
y__ -> GetVersionedRequest
x__ {_GetVersionedRequest'key :: ByteString
_GetVersionedRequest'key = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message GetVersionedRequest where
  messageName :: Proxy GetVersionedRequest -> Text
messageName _ = String -> Text
Data.Text.pack "proto.GetVersionedRequest"
  fieldsByTag :: Map Tag (FieldDescriptor GetVersionedRequest)
fieldsByTag
    = let
        version__field_descriptor :: FieldDescriptor GetVersionedRequest
version__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor GetVersionedRequest Int64
-> FieldDescriptor GetVersionedRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "version"
              (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 GetVersionedRequest GetVersionedRequest Int64 Int64
-> FieldAccessor GetVersionedRequest 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 "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version")) ::
              Data.ProtoLens.FieldDescriptor GetVersionedRequest
        key__field_descriptor :: FieldDescriptor GetVersionedRequest
key__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor GetVersionedRequest ByteString
-> FieldDescriptor GetVersionedRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "key"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens
     GetVersionedRequest GetVersionedRequest ByteString ByteString
-> FieldAccessor GetVersionedRequest ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor GetVersionedRequest
      in
        [(Tag, FieldDescriptor GetVersionedRequest)]
-> Map Tag (FieldDescriptor GetVersionedRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor GetVersionedRequest
version__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor GetVersionedRequest
key__field_descriptor)]
  unknownFields :: LensLike' f GetVersionedRequest FieldSet
unknownFields
    = (GetVersionedRequest -> FieldSet)
-> (GetVersionedRequest -> FieldSet -> GetVersionedRequest)
-> Lens' GetVersionedRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        GetVersionedRequest -> FieldSet
_GetVersionedRequest'_unknownFields
        (\ x__ :: GetVersionedRequest
x__ y__ :: FieldSet
y__ -> GetVersionedRequest
x__ {_GetVersionedRequest'_unknownFields :: FieldSet
_GetVersionedRequest'_unknownFields = FieldSet
y__})
  defMessage :: GetVersionedRequest
defMessage
    = $WGetVersionedRequest'_constructor :: Int64 -> ByteString -> FieldSet -> GetVersionedRequest
GetVersionedRequest'_constructor
        {_GetVersionedRequest'version :: Int64
_GetVersionedRequest'version = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _GetVersionedRequest'key :: ByteString
_GetVersionedRequest'key = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _GetVersionedRequest'_unknownFields :: FieldSet
_GetVersionedRequest'_unknownFields = []}
  parseMessage :: Parser GetVersionedRequest
parseMessage
    = let
        loop ::
          GetVersionedRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser GetVersionedRequest
        loop :: GetVersionedRequest -> Parser GetVersionedRequest
loop x :: GetVersionedRequest
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]))))
                      GetVersionedRequest -> Parser GetVersionedRequest
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter GetVersionedRequest GetVersionedRequest FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> GetVersionedRequest
-> GetVersionedRequest
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 GetVersionedRequest GetVersionedRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) GetVersionedRequest
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)
                                       "version"
                                GetVersionedRequest -> Parser GetVersionedRequest
loop (Setter GetVersionedRequest GetVersionedRequest Int64 Int64
-> Int64 -> GetVersionedRequest -> GetVersionedRequest
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") Int64
y GetVersionedRequest
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))
                                       "key"
                                GetVersionedRequest -> Parser GetVersionedRequest
loop (Setter
  GetVersionedRequest GetVersionedRequest ByteString ByteString
-> ByteString -> GetVersionedRequest -> GetVersionedRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") ByteString
y GetVersionedRequest
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                GetVersionedRequest -> Parser GetVersionedRequest
loop
                                  (Setter GetVersionedRequest GetVersionedRequest FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> GetVersionedRequest
-> GetVersionedRequest
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 GetVersionedRequest GetVersionedRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) GetVersionedRequest
x)
      in
        Parser GetVersionedRequest -> String -> Parser GetVersionedRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do GetVersionedRequest -> Parser GetVersionedRequest
loop GetVersionedRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "GetVersionedRequest"
  buildMessage :: GetVersionedRequest -> Builder
buildMessage
    = \ _x :: GetVersionedRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Int64
_v = FoldLike Int64 GetVersionedRequest GetVersionedRequest Int64 Int64
-> GetVersionedRequest -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version") GetVersionedRequest
_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 :: ByteString
_v = FoldLike
  ByteString
  GetVersionedRequest
  GetVersionedRequest
  ByteString
  ByteString
-> GetVersionedRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") GetVersionedRequest
_x
                 in
                   if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                       Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   else
                       Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs :: ByteString
bs
                             -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                  (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                  (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                            ByteString
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike
  FieldSet GetVersionedRequest GetVersionedRequest FieldSet FieldSet
-> GetVersionedRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet GetVersionedRequest GetVersionedRequest FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields GetVersionedRequest
_x)))
instance Control.DeepSeq.NFData GetVersionedRequest where
  rnf :: GetVersionedRequest -> ()
rnf
    = \ x__ :: GetVersionedRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (GetVersionedRequest -> FieldSet
_GetVersionedRequest'_unknownFields GetVersionedRequest
x__)
             (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (GetVersionedRequest -> Int64
_GetVersionedRequest'version GetVersionedRequest
x__)
                (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (GetVersionedRequest -> ByteString
_GetVersionedRequest'key GetVersionedRequest
x__) ()))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.value' @:: Lens' GetWithProofResponse Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.proof' @:: Lens' GetWithProofResponse RangeProof@
         * 'Proto.Iavl.Api_Fields.maybe'proof' @:: Lens' GetWithProofResponse (Prelude.Maybe RangeProof)@ -}
data GetWithProofResponse
  = GetWithProofResponse'_constructor {GetWithProofResponse -> ByteString
_GetWithProofResponse'value :: !Data.ByteString.ByteString,
                                       GetWithProofResponse -> Maybe RangeProof
_GetWithProofResponse'proof :: !(Prelude.Maybe RangeProof),
                                       GetWithProofResponse -> FieldSet
_GetWithProofResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (GetWithProofResponse -> GetWithProofResponse -> Bool
(GetWithProofResponse -> GetWithProofResponse -> Bool)
-> (GetWithProofResponse -> GetWithProofResponse -> Bool)
-> Eq GetWithProofResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetWithProofResponse -> GetWithProofResponse -> Bool
$c/= :: GetWithProofResponse -> GetWithProofResponse -> Bool
== :: GetWithProofResponse -> GetWithProofResponse -> Bool
$c== :: GetWithProofResponse -> GetWithProofResponse -> Bool
Prelude.Eq, Eq GetWithProofResponse
Eq GetWithProofResponse =>
(GetWithProofResponse -> GetWithProofResponse -> Ordering)
-> (GetWithProofResponse -> GetWithProofResponse -> Bool)
-> (GetWithProofResponse -> GetWithProofResponse -> Bool)
-> (GetWithProofResponse -> GetWithProofResponse -> Bool)
-> (GetWithProofResponse -> GetWithProofResponse -> Bool)
-> (GetWithProofResponse
    -> GetWithProofResponse -> GetWithProofResponse)
-> (GetWithProofResponse
    -> GetWithProofResponse -> GetWithProofResponse)
-> Ord GetWithProofResponse
GetWithProofResponse -> GetWithProofResponse -> Bool
GetWithProofResponse -> GetWithProofResponse -> Ordering
GetWithProofResponse
-> GetWithProofResponse -> GetWithProofResponse
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 :: GetWithProofResponse
-> GetWithProofResponse -> GetWithProofResponse
$cmin :: GetWithProofResponse
-> GetWithProofResponse -> GetWithProofResponse
max :: GetWithProofResponse
-> GetWithProofResponse -> GetWithProofResponse
$cmax :: GetWithProofResponse
-> GetWithProofResponse -> GetWithProofResponse
>= :: GetWithProofResponse -> GetWithProofResponse -> Bool
$c>= :: GetWithProofResponse -> GetWithProofResponse -> Bool
> :: GetWithProofResponse -> GetWithProofResponse -> Bool
$c> :: GetWithProofResponse -> GetWithProofResponse -> Bool
<= :: GetWithProofResponse -> GetWithProofResponse -> Bool
$c<= :: GetWithProofResponse -> GetWithProofResponse -> Bool
< :: GetWithProofResponse -> GetWithProofResponse -> Bool
$c< :: GetWithProofResponse -> GetWithProofResponse -> Bool
compare :: GetWithProofResponse -> GetWithProofResponse -> Ordering
$ccompare :: GetWithProofResponse -> GetWithProofResponse -> Ordering
$cp1Ord :: Eq GetWithProofResponse
Prelude.Ord)
instance Prelude.Show GetWithProofResponse where
  showsPrec :: Int -> GetWithProofResponse -> ShowS
showsPrec _ __x :: GetWithProofResponse
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (GetWithProofResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort GetWithProofResponse
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField GetWithProofResponse "value" Data.ByteString.ByteString where
  fieldOf :: Proxy# "value"
-> (ByteString -> f ByteString)
-> GetWithProofResponse
-> f GetWithProofResponse
fieldOf _
    = ((ByteString -> f ByteString)
 -> GetWithProofResponse -> f GetWithProofResponse)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> GetWithProofResponse
-> f GetWithProofResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((GetWithProofResponse -> ByteString)
-> (GetWithProofResponse -> ByteString -> GetWithProofResponse)
-> Lens
     GetWithProofResponse GetWithProofResponse ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           GetWithProofResponse -> ByteString
_GetWithProofResponse'value
           (\ x__ :: GetWithProofResponse
x__ y__ :: ByteString
y__ -> GetWithProofResponse
x__ {_GetWithProofResponse'value :: ByteString
_GetWithProofResponse'value = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField GetWithProofResponse "proof" RangeProof where
  fieldOf :: Proxy# "proof"
-> (RangeProof -> f RangeProof)
-> GetWithProofResponse
-> f GetWithProofResponse
fieldOf _
    = ((Maybe RangeProof -> f (Maybe RangeProof))
 -> GetWithProofResponse -> f GetWithProofResponse)
-> ((RangeProof -> f RangeProof)
    -> Maybe RangeProof -> f (Maybe RangeProof))
-> (RangeProof -> f RangeProof)
-> GetWithProofResponse
-> f GetWithProofResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((GetWithProofResponse -> Maybe RangeProof)
-> (GetWithProofResponse
    -> Maybe RangeProof -> GetWithProofResponse)
-> Lens
     GetWithProofResponse
     GetWithProofResponse
     (Maybe RangeProof)
     (Maybe RangeProof)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           GetWithProofResponse -> Maybe RangeProof
_GetWithProofResponse'proof
           (\ x__ :: GetWithProofResponse
x__ y__ :: Maybe RangeProof
y__ -> GetWithProofResponse
x__ {_GetWithProofResponse'proof :: Maybe RangeProof
_GetWithProofResponse'proof = Maybe RangeProof
y__}))
        (RangeProof -> Lens' (Maybe RangeProof) RangeProof
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RangeProof
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField GetWithProofResponse "maybe'proof" (Prelude.Maybe RangeProof) where
  fieldOf :: Proxy# "maybe'proof"
-> (Maybe RangeProof -> f (Maybe RangeProof))
-> GetWithProofResponse
-> f GetWithProofResponse
fieldOf _
    = ((Maybe RangeProof -> f (Maybe RangeProof))
 -> GetWithProofResponse -> f GetWithProofResponse)
-> ((Maybe RangeProof -> f (Maybe RangeProof))
    -> Maybe RangeProof -> f (Maybe RangeProof))
-> (Maybe RangeProof -> f (Maybe RangeProof))
-> GetWithProofResponse
-> f GetWithProofResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((GetWithProofResponse -> Maybe RangeProof)
-> (GetWithProofResponse
    -> Maybe RangeProof -> GetWithProofResponse)
-> Lens
     GetWithProofResponse
     GetWithProofResponse
     (Maybe RangeProof)
     (Maybe RangeProof)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           GetWithProofResponse -> Maybe RangeProof
_GetWithProofResponse'proof
           (\ x__ :: GetWithProofResponse
x__ y__ :: Maybe RangeProof
y__ -> GetWithProofResponse
x__ {_GetWithProofResponse'proof :: Maybe RangeProof
_GetWithProofResponse'proof = Maybe RangeProof
y__}))
        (Maybe RangeProof -> f (Maybe RangeProof))
-> Maybe RangeProof -> f (Maybe RangeProof)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message GetWithProofResponse where
  messageName :: Proxy GetWithProofResponse -> Text
messageName _ = String -> Text
Data.Text.pack "proto.GetWithProofResponse"
  fieldsByTag :: Map Tag (FieldDescriptor GetWithProofResponse)
fieldsByTag
    = let
        value__field_descriptor :: FieldDescriptor GetWithProofResponse
value__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor GetWithProofResponse ByteString
-> FieldDescriptor GetWithProofResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "value"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens
     GetWithProofResponse GetWithProofResponse ByteString ByteString
-> FieldAccessor GetWithProofResponse ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value")) ::
              Data.ProtoLens.FieldDescriptor GetWithProofResponse
        proof__field_descriptor :: FieldDescriptor GetWithProofResponse
proof__field_descriptor
          = String
-> FieldTypeDescriptor RangeProof
-> FieldAccessor GetWithProofResponse RangeProof
-> FieldDescriptor GetWithProofResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "proof"
              (MessageOrGroup -> FieldTypeDescriptor RangeProof
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor RangeProof)
              (Lens
  GetWithProofResponse
  GetWithProofResponse
  (Maybe RangeProof)
  (Maybe RangeProof)
-> FieldAccessor GetWithProofResponse RangeProof
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall s a (f :: * -> *).
(HasField s "maybe'proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'proof")) ::
              Data.ProtoLens.FieldDescriptor GetWithProofResponse
      in
        [(Tag, FieldDescriptor GetWithProofResponse)]
-> Map Tag (FieldDescriptor GetWithProofResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor GetWithProofResponse
value__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor GetWithProofResponse
proof__field_descriptor)]
  unknownFields :: LensLike' f GetWithProofResponse FieldSet
unknownFields
    = (GetWithProofResponse -> FieldSet)
-> (GetWithProofResponse -> FieldSet -> GetWithProofResponse)
-> Lens' GetWithProofResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        GetWithProofResponse -> FieldSet
_GetWithProofResponse'_unknownFields
        (\ x__ :: GetWithProofResponse
x__ y__ :: FieldSet
y__ -> GetWithProofResponse
x__ {_GetWithProofResponse'_unknownFields :: FieldSet
_GetWithProofResponse'_unknownFields = FieldSet
y__})
  defMessage :: GetWithProofResponse
defMessage
    = $WGetWithProofResponse'_constructor :: ByteString -> Maybe RangeProof -> FieldSet -> GetWithProofResponse
GetWithProofResponse'_constructor
        {_GetWithProofResponse'value :: ByteString
_GetWithProofResponse'value = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _GetWithProofResponse'proof :: Maybe RangeProof
_GetWithProofResponse'proof = Maybe RangeProof
forall a. Maybe a
Prelude.Nothing,
         _GetWithProofResponse'_unknownFields :: FieldSet
_GetWithProofResponse'_unknownFields = []}
  parseMessage :: Parser GetWithProofResponse
parseMessage
    = let
        loop ::
          GetWithProofResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser GetWithProofResponse
        loop :: GetWithProofResponse -> Parser GetWithProofResponse
loop x :: GetWithProofResponse
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]))))
                      GetWithProofResponse -> Parser GetWithProofResponse
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter GetWithProofResponse GetWithProofResponse FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> GetWithProofResponse
-> GetWithProofResponse
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 GetWithProofResponse GetWithProofResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) GetWithProofResponse
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))
                                       "value"
                                GetWithProofResponse -> Parser GetWithProofResponse
loop (Setter
  GetWithProofResponse GetWithProofResponse ByteString ByteString
-> ByteString -> GetWithProofResponse -> GetWithProofResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value") ByteString
y GetWithProofResponse
x)
                        18
                          -> do RangeProof
y <- Parser RangeProof -> String -> Parser RangeProof
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser RangeProof -> Parser RangeProof
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 RangeProof
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "proof"
                                GetWithProofResponse -> Parser GetWithProofResponse
loop (Setter
  GetWithProofResponse GetWithProofResponse RangeProof RangeProof
-> RangeProof -> GetWithProofResponse -> GetWithProofResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"proof") RangeProof
y GetWithProofResponse
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                GetWithProofResponse -> Parser GetWithProofResponse
loop
                                  (Setter GetWithProofResponse GetWithProofResponse FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> GetWithProofResponse
-> GetWithProofResponse
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 GetWithProofResponse GetWithProofResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) GetWithProofResponse
x)
      in
        Parser GetWithProofResponse
-> String -> Parser GetWithProofResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do GetWithProofResponse -> Parser GetWithProofResponse
loop GetWithProofResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "GetWithProofResponse"
  buildMessage :: GetWithProofResponse -> Builder
buildMessage
    = \ _x :: GetWithProofResponse
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: ByteString
_v = FoldLike
  ByteString
  GetWithProofResponse
  GetWithProofResponse
  ByteString
  ByteString
-> GetWithProofResponse -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value") GetWithProofResponse
_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 RangeProof)
  GetWithProofResponse
  GetWithProofResponse
  (Maybe RangeProof)
  (Maybe RangeProof)
-> GetWithProofResponse -> Maybe RangeProof
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'proof") GetWithProofResponse
_x
                 of
                   Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   (Prelude.Just _v :: RangeProof
_v)
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((ByteString -> Builder)
-> (RangeProof -> ByteString) -> RangeProof -> 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))
                             RangeProof -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                             RangeProof
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike
  FieldSet
  GetWithProofResponse
  GetWithProofResponse
  FieldSet
  FieldSet
-> GetWithProofResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  GetWithProofResponse
  GetWithProofResponse
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields GetWithProofResponse
_x)))
instance Control.DeepSeq.NFData GetWithProofResponse where
  rnf :: GetWithProofResponse -> ()
rnf
    = \ x__ :: GetWithProofResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (GetWithProofResponse -> FieldSet
_GetWithProofResponse'_unknownFields GetWithProofResponse
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (GetWithProofResponse -> ByteString
_GetWithProofResponse'value GetWithProofResponse
x__)
                (Maybe RangeProof -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (GetWithProofResponse -> Maybe RangeProof
_GetWithProofResponse'proof GetWithProofResponse
x__) ()))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.version' @:: Lens' HasRequest Data.Int.Int64@
         * 'Proto.Iavl.Api_Fields.key' @:: Lens' HasRequest Data.ByteString.ByteString@ -}
data HasRequest
  = HasRequest'_constructor {HasRequest -> Int64
_HasRequest'version :: !Data.Int.Int64,
                             HasRequest -> ByteString
_HasRequest'key :: !Data.ByteString.ByteString,
                             HasRequest -> FieldSet
_HasRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (HasRequest -> HasRequest -> Bool
(HasRequest -> HasRequest -> Bool)
-> (HasRequest -> HasRequest -> Bool) -> Eq HasRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HasRequest -> HasRequest -> Bool
$c/= :: HasRequest -> HasRequest -> Bool
== :: HasRequest -> HasRequest -> Bool
$c== :: HasRequest -> HasRequest -> Bool
Prelude.Eq, Eq HasRequest
Eq HasRequest =>
(HasRequest -> HasRequest -> Ordering)
-> (HasRequest -> HasRequest -> Bool)
-> (HasRequest -> HasRequest -> Bool)
-> (HasRequest -> HasRequest -> Bool)
-> (HasRequest -> HasRequest -> Bool)
-> (HasRequest -> HasRequest -> HasRequest)
-> (HasRequest -> HasRequest -> HasRequest)
-> Ord HasRequest
HasRequest -> HasRequest -> Bool
HasRequest -> HasRequest -> Ordering
HasRequest -> HasRequest -> HasRequest
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 :: HasRequest -> HasRequest -> HasRequest
$cmin :: HasRequest -> HasRequest -> HasRequest
max :: HasRequest -> HasRequest -> HasRequest
$cmax :: HasRequest -> HasRequest -> HasRequest
>= :: HasRequest -> HasRequest -> Bool
$c>= :: HasRequest -> HasRequest -> Bool
> :: HasRequest -> HasRequest -> Bool
$c> :: HasRequest -> HasRequest -> Bool
<= :: HasRequest -> HasRequest -> Bool
$c<= :: HasRequest -> HasRequest -> Bool
< :: HasRequest -> HasRequest -> Bool
$c< :: HasRequest -> HasRequest -> Bool
compare :: HasRequest -> HasRequest -> Ordering
$ccompare :: HasRequest -> HasRequest -> Ordering
$cp1Ord :: Eq HasRequest
Prelude.Ord)
instance Prelude.Show HasRequest where
  showsPrec :: Int -> HasRequest -> ShowS
showsPrec _ __x :: HasRequest
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (HasRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort HasRequest
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField HasRequest "version" Data.Int.Int64 where
  fieldOf :: Proxy# "version"
-> (Int64 -> f Int64) -> HasRequest -> f HasRequest
fieldOf _
    = ((Int64 -> f Int64) -> HasRequest -> f HasRequest)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> HasRequest
-> f HasRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((HasRequest -> Int64)
-> (HasRequest -> Int64 -> HasRequest)
-> Lens HasRequest HasRequest Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           HasRequest -> Int64
_HasRequest'version (\ x__ :: HasRequest
x__ y__ :: Int64
y__ -> HasRequest
x__ {_HasRequest'version :: Int64
_HasRequest'version = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField HasRequest "key" Data.ByteString.ByteString where
  fieldOf :: Proxy# "key"
-> (ByteString -> f ByteString) -> HasRequest -> f HasRequest
fieldOf _
    = ((ByteString -> f ByteString) -> HasRequest -> f HasRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> HasRequest
-> f HasRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((HasRequest -> ByteString)
-> (HasRequest -> ByteString -> HasRequest)
-> Lens HasRequest HasRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           HasRequest -> ByteString
_HasRequest'key (\ x__ :: HasRequest
x__ y__ :: ByteString
y__ -> HasRequest
x__ {_HasRequest'key :: ByteString
_HasRequest'key = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message HasRequest where
  messageName :: Proxy HasRequest -> Text
messageName _ = String -> Text
Data.Text.pack "proto.HasRequest"
  fieldsByTag :: Map Tag (FieldDescriptor HasRequest)
fieldsByTag
    = let
        version__field_descriptor :: FieldDescriptor HasRequest
version__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor HasRequest Int64
-> FieldDescriptor HasRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "version"
              (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 HasRequest HasRequest Int64 Int64
-> FieldAccessor HasRequest 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 "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version")) ::
              Data.ProtoLens.FieldDescriptor HasRequest
        key__field_descriptor :: FieldDescriptor HasRequest
key__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor HasRequest ByteString
-> FieldDescriptor HasRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "key"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens HasRequest HasRequest ByteString ByteString
-> FieldAccessor HasRequest ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor HasRequest
      in
        [(Tag, FieldDescriptor HasRequest)]
-> Map Tag (FieldDescriptor HasRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor HasRequest
version__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor HasRequest
key__field_descriptor)]
  unknownFields :: LensLike' f HasRequest FieldSet
unknownFields
    = (HasRequest -> FieldSet)
-> (HasRequest -> FieldSet -> HasRequest)
-> Lens' HasRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        HasRequest -> FieldSet
_HasRequest'_unknownFields
        (\ x__ :: HasRequest
x__ y__ :: FieldSet
y__ -> HasRequest
x__ {_HasRequest'_unknownFields :: FieldSet
_HasRequest'_unknownFields = FieldSet
y__})
  defMessage :: HasRequest
defMessage
    = $WHasRequest'_constructor :: Int64 -> ByteString -> FieldSet -> HasRequest
HasRequest'_constructor
        {_HasRequest'version :: Int64
_HasRequest'version = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _HasRequest'key :: ByteString
_HasRequest'key = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _HasRequest'_unknownFields :: FieldSet
_HasRequest'_unknownFields = []}
  parseMessage :: Parser HasRequest
parseMessage
    = let
        loop ::
          HasRequest -> Data.ProtoLens.Encoding.Bytes.Parser HasRequest
        loop :: HasRequest -> Parser HasRequest
loop x :: HasRequest
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]))))
                      HasRequest -> Parser HasRequest
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter HasRequest HasRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> HasRequest -> HasRequest
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 HasRequest HasRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) HasRequest
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)
                                       "version"
                                HasRequest -> Parser HasRequest
loop (Setter HasRequest HasRequest Int64 Int64
-> Int64 -> HasRequest -> HasRequest
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") Int64
y HasRequest
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))
                                       "key"
                                HasRequest -> Parser HasRequest
loop (Setter HasRequest HasRequest ByteString ByteString
-> ByteString -> HasRequest -> HasRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") ByteString
y HasRequest
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                HasRequest -> Parser HasRequest
loop
                                  (Setter HasRequest HasRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> HasRequest -> HasRequest
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 HasRequest HasRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) HasRequest
x)
      in
        Parser HasRequest -> String -> Parser HasRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do HasRequest -> Parser HasRequest
loop HasRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "HasRequest"
  buildMessage :: HasRequest -> Builder
buildMessage
    = \ _x :: HasRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Int64
_v = FoldLike Int64 HasRequest HasRequest Int64 Int64
-> HasRequest -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version") HasRequest
_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 :: ByteString
_v = FoldLike ByteString HasRequest HasRequest ByteString ByteString
-> HasRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") HasRequest
_x
                 in
                   if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                       Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   else
                       Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs :: ByteString
bs
                             -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                  (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                  (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                            ByteString
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet HasRequest HasRequest FieldSet FieldSet
-> HasRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet HasRequest HasRequest FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields HasRequest
_x)))
instance Control.DeepSeq.NFData HasRequest where
  rnf :: HasRequest -> ()
rnf
    = \ x__ :: HasRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (HasRequest -> FieldSet
_HasRequest'_unknownFields HasRequest
x__)
             (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (HasRequest -> Int64
_HasRequest'version HasRequest
x__)
                (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (HasRequest -> ByteString
_HasRequest'key HasRequest
x__) ()))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.result' @:: Lens' HasResponse Prelude.Bool@ -}
data HasResponse
  = HasResponse'_constructor {HasResponse -> Bool
_HasResponse'result :: !Prelude.Bool,
                              HasResponse -> FieldSet
_HasResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (HasResponse -> HasResponse -> Bool
(HasResponse -> HasResponse -> Bool)
-> (HasResponse -> HasResponse -> Bool) -> Eq HasResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HasResponse -> HasResponse -> Bool
$c/= :: HasResponse -> HasResponse -> Bool
== :: HasResponse -> HasResponse -> Bool
$c== :: HasResponse -> HasResponse -> Bool
Prelude.Eq, Eq HasResponse
Eq HasResponse =>
(HasResponse -> HasResponse -> Ordering)
-> (HasResponse -> HasResponse -> Bool)
-> (HasResponse -> HasResponse -> Bool)
-> (HasResponse -> HasResponse -> Bool)
-> (HasResponse -> HasResponse -> Bool)
-> (HasResponse -> HasResponse -> HasResponse)
-> (HasResponse -> HasResponse -> HasResponse)
-> Ord HasResponse
HasResponse -> HasResponse -> Bool
HasResponse -> HasResponse -> Ordering
HasResponse -> HasResponse -> HasResponse
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 :: HasResponse -> HasResponse -> HasResponse
$cmin :: HasResponse -> HasResponse -> HasResponse
max :: HasResponse -> HasResponse -> HasResponse
$cmax :: HasResponse -> HasResponse -> HasResponse
>= :: HasResponse -> HasResponse -> Bool
$c>= :: HasResponse -> HasResponse -> Bool
> :: HasResponse -> HasResponse -> Bool
$c> :: HasResponse -> HasResponse -> Bool
<= :: HasResponse -> HasResponse -> Bool
$c<= :: HasResponse -> HasResponse -> Bool
< :: HasResponse -> HasResponse -> Bool
$c< :: HasResponse -> HasResponse -> Bool
compare :: HasResponse -> HasResponse -> Ordering
$ccompare :: HasResponse -> HasResponse -> Ordering
$cp1Ord :: Eq HasResponse
Prelude.Ord)
instance Prelude.Show HasResponse where
  showsPrec :: Int -> HasResponse -> ShowS
showsPrec _ __x :: HasResponse
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (HasResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort HasResponse
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField HasResponse "result" Prelude.Bool where
  fieldOf :: Proxy# "result" -> (Bool -> f Bool) -> HasResponse -> f HasResponse
fieldOf _
    = ((Bool -> f Bool) -> HasResponse -> f HasResponse)
-> ((Bool -> f Bool) -> Bool -> f Bool)
-> (Bool -> f Bool)
-> HasResponse
-> f HasResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((HasResponse -> Bool)
-> (HasResponse -> Bool -> HasResponse)
-> Lens HasResponse HasResponse Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           HasResponse -> Bool
_HasResponse'result (\ x__ :: HasResponse
x__ y__ :: Bool
y__ -> HasResponse
x__ {_HasResponse'result :: Bool
_HasResponse'result = Bool
y__}))
        (Bool -> f Bool) -> Bool -> f Bool
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message HasResponse where
  messageName :: Proxy HasResponse -> Text
messageName _ = String -> Text
Data.Text.pack "proto.HasResponse"
  fieldsByTag :: Map Tag (FieldDescriptor HasResponse)
fieldsByTag
    = let
        result__field_descriptor :: FieldDescriptor HasResponse
result__field_descriptor
          = String
-> FieldTypeDescriptor Bool
-> FieldAccessor HasResponse Bool
-> FieldDescriptor HasResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "result"
              (ScalarField Bool -> FieldTypeDescriptor Bool
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Bool
Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (WireDefault Bool
-> Lens HasResponse HasResponse Bool Bool
-> FieldAccessor HasResponse Bool
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Bool
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "result" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"result")) ::
              Data.ProtoLens.FieldDescriptor HasResponse
      in
        [(Tag, FieldDescriptor HasResponse)]
-> Map Tag (FieldDescriptor HasResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor HasResponse
result__field_descriptor)]
  unknownFields :: LensLike' f HasResponse FieldSet
unknownFields
    = (HasResponse -> FieldSet)
-> (HasResponse -> FieldSet -> HasResponse)
-> Lens' HasResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        HasResponse -> FieldSet
_HasResponse'_unknownFields
        (\ x__ :: HasResponse
x__ y__ :: FieldSet
y__ -> HasResponse
x__ {_HasResponse'_unknownFields :: FieldSet
_HasResponse'_unknownFields = FieldSet
y__})
  defMessage :: HasResponse
defMessage
    = $WHasResponse'_constructor :: Bool -> FieldSet -> HasResponse
HasResponse'_constructor
        {_HasResponse'result :: Bool
_HasResponse'result = Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _HasResponse'_unknownFields :: FieldSet
_HasResponse'_unknownFields = []}
  parseMessage :: Parser HasResponse
parseMessage
    = let
        loop ::
          HasResponse -> Data.ProtoLens.Encoding.Bytes.Parser HasResponse
        loop :: HasResponse -> Parser HasResponse
loop x :: HasResponse
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]))))
                      HasResponse -> Parser HasResponse
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter HasResponse HasResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> HasResponse -> HasResponse
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 HasResponse HasResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) HasResponse
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        8 -> do Bool
y <- Parser Bool -> String -> Parser Bool
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Word64 -> Bool) -> Parser Word64 -> Parser Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          (Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude./=) 0) Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "result"
                                HasResponse -> Parser HasResponse
loop (Setter HasResponse HasResponse Bool Bool
-> Bool -> HasResponse -> HasResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "result" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"result") Bool
y HasResponse
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                HasResponse -> Parser HasResponse
loop
                                  (Setter HasResponse HasResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> HasResponse -> HasResponse
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 HasResponse HasResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) HasResponse
x)
      in
        Parser HasResponse -> String -> Parser HasResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do HasResponse -> Parser HasResponse
loop HasResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "HasResponse"
  buildMessage :: HasResponse -> Builder
buildMessage
    = \ _x :: HasResponse
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Bool
_v = FoldLike Bool HasResponse HasResponse Bool Bool
-> HasResponse -> Bool
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "result" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"result") HasResponse
_x
              in
                if Bool -> Bool -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Bool
_v Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Word64 -> Builder) -> (Bool -> Word64) -> Bool -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                         Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                         (\ b :: Bool
b -> if Bool
b then 1 else 0)
                         Bool
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet HasResponse HasResponse FieldSet FieldSet
-> HasResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet HasResponse HasResponse FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields HasResponse
_x))
instance Control.DeepSeq.NFData HasResponse where
  rnf :: HasResponse -> ()
rnf
    = \ x__ :: HasResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (HasResponse -> FieldSet
_HasResponse'_unknownFields HasResponse
x__)
             (Bool -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (HasResponse -> Bool
_HasResponse'result HasResponse
x__) ())
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.rootHash' @:: Lens' HashResponse Data.ByteString.ByteString@ -}
data HashResponse
  = HashResponse'_constructor {HashResponse -> ByteString
_HashResponse'rootHash :: !Data.ByteString.ByteString,
                               HashResponse -> FieldSet
_HashResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (HashResponse -> HashResponse -> Bool
(HashResponse -> HashResponse -> Bool)
-> (HashResponse -> HashResponse -> Bool) -> Eq HashResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HashResponse -> HashResponse -> Bool
$c/= :: HashResponse -> HashResponse -> Bool
== :: HashResponse -> HashResponse -> Bool
$c== :: HashResponse -> HashResponse -> Bool
Prelude.Eq, Eq HashResponse
Eq HashResponse =>
(HashResponse -> HashResponse -> Ordering)
-> (HashResponse -> HashResponse -> Bool)
-> (HashResponse -> HashResponse -> Bool)
-> (HashResponse -> HashResponse -> Bool)
-> (HashResponse -> HashResponse -> Bool)
-> (HashResponse -> HashResponse -> HashResponse)
-> (HashResponse -> HashResponse -> HashResponse)
-> Ord HashResponse
HashResponse -> HashResponse -> Bool
HashResponse -> HashResponse -> Ordering
HashResponse -> HashResponse -> HashResponse
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 :: HashResponse -> HashResponse -> HashResponse
$cmin :: HashResponse -> HashResponse -> HashResponse
max :: HashResponse -> HashResponse -> HashResponse
$cmax :: HashResponse -> HashResponse -> HashResponse
>= :: HashResponse -> HashResponse -> Bool
$c>= :: HashResponse -> HashResponse -> Bool
> :: HashResponse -> HashResponse -> Bool
$c> :: HashResponse -> HashResponse -> Bool
<= :: HashResponse -> HashResponse -> Bool
$c<= :: HashResponse -> HashResponse -> Bool
< :: HashResponse -> HashResponse -> Bool
$c< :: HashResponse -> HashResponse -> Bool
compare :: HashResponse -> HashResponse -> Ordering
$ccompare :: HashResponse -> HashResponse -> Ordering
$cp1Ord :: Eq HashResponse
Prelude.Ord)
instance Prelude.Show HashResponse where
  showsPrec :: Int -> HashResponse -> ShowS
showsPrec _ __x :: HashResponse
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (HashResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort HashResponse
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField HashResponse "rootHash" Data.ByteString.ByteString where
  fieldOf :: Proxy# "rootHash"
-> (ByteString -> f ByteString) -> HashResponse -> f HashResponse
fieldOf _
    = ((ByteString -> f ByteString) -> HashResponse -> f HashResponse)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> HashResponse
-> f HashResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((HashResponse -> ByteString)
-> (HashResponse -> ByteString -> HashResponse)
-> Lens HashResponse HashResponse ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           HashResponse -> ByteString
_HashResponse'rootHash
           (\ x__ :: HashResponse
x__ y__ :: ByteString
y__ -> HashResponse
x__ {_HashResponse'rootHash :: ByteString
_HashResponse'rootHash = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message HashResponse where
  messageName :: Proxy HashResponse -> Text
messageName _ = String -> Text
Data.Text.pack "proto.HashResponse"
  fieldsByTag :: Map Tag (FieldDescriptor HashResponse)
fieldsByTag
    = let
        rootHash__field_descriptor :: FieldDescriptor HashResponse
rootHash__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor HashResponse ByteString
-> FieldDescriptor HashResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "root_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 HashResponse HashResponse ByteString ByteString
-> FieldAccessor HashResponse 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 "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash")) ::
              Data.ProtoLens.FieldDescriptor HashResponse
      in
        [(Tag, FieldDescriptor HashResponse)]
-> Map Tag (FieldDescriptor HashResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor HashResponse
rootHash__field_descriptor)]
  unknownFields :: LensLike' f HashResponse FieldSet
unknownFields
    = (HashResponse -> FieldSet)
-> (HashResponse -> FieldSet -> HashResponse)
-> Lens' HashResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        HashResponse -> FieldSet
_HashResponse'_unknownFields
        (\ x__ :: HashResponse
x__ y__ :: FieldSet
y__ -> HashResponse
x__ {_HashResponse'_unknownFields :: FieldSet
_HashResponse'_unknownFields = FieldSet
y__})
  defMessage :: HashResponse
defMessage
    = $WHashResponse'_constructor :: ByteString -> FieldSet -> HashResponse
HashResponse'_constructor
        {_HashResponse'rootHash :: ByteString
_HashResponse'rootHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _HashResponse'_unknownFields :: FieldSet
_HashResponse'_unknownFields = []}
  parseMessage :: Parser HashResponse
parseMessage
    = let
        loop ::
          HashResponse -> Data.ProtoLens.Encoding.Bytes.Parser HashResponse
        loop :: HashResponse -> Parser HashResponse
loop x :: HashResponse
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]))))
                      HashResponse -> Parser HashResponse
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter HashResponse HashResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> HashResponse -> HashResponse
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 HashResponse HashResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) HashResponse
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))
                                       "root_hash"
                                HashResponse -> Parser HashResponse
loop
                                  (Setter HashResponse HashResponse ByteString ByteString
-> ByteString -> HashResponse -> HashResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") ByteString
y HashResponse
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                HashResponse -> Parser HashResponse
loop
                                  (Setter HashResponse HashResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> HashResponse -> HashResponse
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 HashResponse HashResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) HashResponse
x)
      in
        Parser HashResponse -> String -> Parser HashResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do HashResponse -> Parser HashResponse
loop HashResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "HashResponse"
  buildMessage :: HashResponse -> Builder
buildMessage
    = \ _x :: HashResponse
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: ByteString
_v = FoldLike ByteString HashResponse HashResponse ByteString ByteString
-> HashResponse -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") HashResponse
_x
              in
                if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs :: ByteString
bs
                          -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                               (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         ByteString
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet HashResponse HashResponse FieldSet FieldSet
-> HashResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet HashResponse HashResponse FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields HashResponse
_x))
instance Control.DeepSeq.NFData HashResponse where
  rnf :: HashResponse -> ()
rnf
    = \ x__ :: HashResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (HashResponse -> FieldSet
_HashResponse'_unknownFields HashResponse
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (HashResponse -> ByteString
_HashResponse'rootHash HashResponse
x__) ())
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.nodes' @:: Lens' PathToLeaf [ProofInnerNode]@
         * 'Proto.Iavl.Api_Fields.vec'nodes' @:: Lens' PathToLeaf (Data.Vector.Vector ProofInnerNode)@ -}
data PathToLeaf
  = PathToLeaf'_constructor {PathToLeaf -> Vector ProofInnerNode
_PathToLeaf'nodes :: !(Data.Vector.Vector ProofInnerNode),
                             PathToLeaf -> FieldSet
_PathToLeaf'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (PathToLeaf -> PathToLeaf -> Bool
(PathToLeaf -> PathToLeaf -> Bool)
-> (PathToLeaf -> PathToLeaf -> Bool) -> Eq PathToLeaf
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PathToLeaf -> PathToLeaf -> Bool
$c/= :: PathToLeaf -> PathToLeaf -> Bool
== :: PathToLeaf -> PathToLeaf -> Bool
$c== :: PathToLeaf -> PathToLeaf -> Bool
Prelude.Eq, Eq PathToLeaf
Eq PathToLeaf =>
(PathToLeaf -> PathToLeaf -> Ordering)
-> (PathToLeaf -> PathToLeaf -> Bool)
-> (PathToLeaf -> PathToLeaf -> Bool)
-> (PathToLeaf -> PathToLeaf -> Bool)
-> (PathToLeaf -> PathToLeaf -> Bool)
-> (PathToLeaf -> PathToLeaf -> PathToLeaf)
-> (PathToLeaf -> PathToLeaf -> PathToLeaf)
-> Ord PathToLeaf
PathToLeaf -> PathToLeaf -> Bool
PathToLeaf -> PathToLeaf -> Ordering
PathToLeaf -> PathToLeaf -> PathToLeaf
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 :: PathToLeaf -> PathToLeaf -> PathToLeaf
$cmin :: PathToLeaf -> PathToLeaf -> PathToLeaf
max :: PathToLeaf -> PathToLeaf -> PathToLeaf
$cmax :: PathToLeaf -> PathToLeaf -> PathToLeaf
>= :: PathToLeaf -> PathToLeaf -> Bool
$c>= :: PathToLeaf -> PathToLeaf -> Bool
> :: PathToLeaf -> PathToLeaf -> Bool
$c> :: PathToLeaf -> PathToLeaf -> Bool
<= :: PathToLeaf -> PathToLeaf -> Bool
$c<= :: PathToLeaf -> PathToLeaf -> Bool
< :: PathToLeaf -> PathToLeaf -> Bool
$c< :: PathToLeaf -> PathToLeaf -> Bool
compare :: PathToLeaf -> PathToLeaf -> Ordering
$ccompare :: PathToLeaf -> PathToLeaf -> Ordering
$cp1Ord :: Eq PathToLeaf
Prelude.Ord)
instance Prelude.Show PathToLeaf where
  showsPrec :: Int -> PathToLeaf -> ShowS
showsPrec _ __x :: PathToLeaf
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (PathToLeaf -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort PathToLeaf
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField PathToLeaf "nodes" [ProofInnerNode] where
  fieldOf :: Proxy# "nodes"
-> ([ProofInnerNode] -> f [ProofInnerNode])
-> PathToLeaf
-> f PathToLeaf
fieldOf _
    = ((Vector ProofInnerNode -> f (Vector ProofInnerNode))
 -> PathToLeaf -> f PathToLeaf)
-> (([ProofInnerNode] -> f [ProofInnerNode])
    -> Vector ProofInnerNode -> f (Vector ProofInnerNode))
-> ([ProofInnerNode] -> f [ProofInnerNode])
-> PathToLeaf
-> f PathToLeaf
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((PathToLeaf -> Vector ProofInnerNode)
-> (PathToLeaf -> Vector ProofInnerNode -> PathToLeaf)
-> Lens
     PathToLeaf
     PathToLeaf
     (Vector ProofInnerNode)
     (Vector ProofInnerNode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           PathToLeaf -> Vector ProofInnerNode
_PathToLeaf'nodes (\ x__ :: PathToLeaf
x__ y__ :: Vector ProofInnerNode
y__ -> PathToLeaf
x__ {_PathToLeaf'nodes :: Vector ProofInnerNode
_PathToLeaf'nodes = Vector ProofInnerNode
y__}))
        ((Vector ProofInnerNode -> [ProofInnerNode])
-> (Vector ProofInnerNode
    -> [ProofInnerNode] -> Vector ProofInnerNode)
-> Lens
     (Vector ProofInnerNode)
     (Vector ProofInnerNode)
     [ProofInnerNode]
     [ProofInnerNode]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector ProofInnerNode -> [ProofInnerNode]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ _ y__ :: [ProofInnerNode]
y__ -> [ProofInnerNode] -> Vector ProofInnerNode
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [ProofInnerNode]
y__))
instance Data.ProtoLens.Field.HasField PathToLeaf "vec'nodes" (Data.Vector.Vector ProofInnerNode) where
  fieldOf :: Proxy# "vec'nodes"
-> (Vector ProofInnerNode -> f (Vector ProofInnerNode))
-> PathToLeaf
-> f PathToLeaf
fieldOf _
    = ((Vector ProofInnerNode -> f (Vector ProofInnerNode))
 -> PathToLeaf -> f PathToLeaf)
-> ((Vector ProofInnerNode -> f (Vector ProofInnerNode))
    -> Vector ProofInnerNode -> f (Vector ProofInnerNode))
-> (Vector ProofInnerNode -> f (Vector ProofInnerNode))
-> PathToLeaf
-> f PathToLeaf
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((PathToLeaf -> Vector ProofInnerNode)
-> (PathToLeaf -> Vector ProofInnerNode -> PathToLeaf)
-> Lens
     PathToLeaf
     PathToLeaf
     (Vector ProofInnerNode)
     (Vector ProofInnerNode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           PathToLeaf -> Vector ProofInnerNode
_PathToLeaf'nodes (\ x__ :: PathToLeaf
x__ y__ :: Vector ProofInnerNode
y__ -> PathToLeaf
x__ {_PathToLeaf'nodes :: Vector ProofInnerNode
_PathToLeaf'nodes = Vector ProofInnerNode
y__}))
        (Vector ProofInnerNode -> f (Vector ProofInnerNode))
-> Vector ProofInnerNode -> f (Vector ProofInnerNode)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message PathToLeaf where
  messageName :: Proxy PathToLeaf -> Text
messageName _ = String -> Text
Data.Text.pack "proto.PathToLeaf"
  fieldsByTag :: Map Tag (FieldDescriptor PathToLeaf)
fieldsByTag
    = let
        nodes__field_descriptor :: FieldDescriptor PathToLeaf
nodes__field_descriptor
          = String
-> FieldTypeDescriptor ProofInnerNode
-> FieldAccessor PathToLeaf ProofInnerNode
-> FieldDescriptor PathToLeaf
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "nodes"
              (MessageOrGroup -> FieldTypeDescriptor ProofInnerNode
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor ProofInnerNode)
              (Packing
-> Lens' PathToLeaf [ProofInnerNode]
-> FieldAccessor PathToLeaf ProofInnerNode
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "nodes" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"nodes")) ::
              Data.ProtoLens.FieldDescriptor PathToLeaf
      in
        [(Tag, FieldDescriptor PathToLeaf)]
-> Map Tag (FieldDescriptor PathToLeaf)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor PathToLeaf
nodes__field_descriptor)]
  unknownFields :: LensLike' f PathToLeaf FieldSet
unknownFields
    = (PathToLeaf -> FieldSet)
-> (PathToLeaf -> FieldSet -> PathToLeaf)
-> Lens' PathToLeaf FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        PathToLeaf -> FieldSet
_PathToLeaf'_unknownFields
        (\ x__ :: PathToLeaf
x__ y__ :: FieldSet
y__ -> PathToLeaf
x__ {_PathToLeaf'_unknownFields :: FieldSet
_PathToLeaf'_unknownFields = FieldSet
y__})
  defMessage :: PathToLeaf
defMessage
    = $WPathToLeaf'_constructor :: Vector ProofInnerNode -> FieldSet -> PathToLeaf
PathToLeaf'_constructor
        {_PathToLeaf'nodes :: Vector ProofInnerNode
_PathToLeaf'nodes = Vector ProofInnerNode
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _PathToLeaf'_unknownFields :: FieldSet
_PathToLeaf'_unknownFields = []}
  parseMessage :: Parser PathToLeaf
parseMessage
    = let
        loop ::
          PathToLeaf
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ProofInnerNode
             -> Data.ProtoLens.Encoding.Bytes.Parser PathToLeaf
        loop :: PathToLeaf
-> Growing Vector RealWorld ProofInnerNode -> Parser PathToLeaf
loop x :: PathToLeaf
x mutable'nodes :: Growing Vector RealWorld ProofInnerNode
mutable'nodes
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector ProofInnerNode
frozen'nodes <- IO (Vector ProofInnerNode) -> Parser (Vector ProofInnerNode)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                        (Growing Vector (PrimState IO) ProofInnerNode
-> IO (Vector ProofInnerNode)
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 ProofInnerNode
Growing Vector (PrimState IO) ProofInnerNode
mutable'nodes)
                      (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]))))
                      PathToLeaf -> Parser PathToLeaf
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter PathToLeaf PathToLeaf FieldSet FieldSet
-> (FieldSet -> FieldSet) -> PathToLeaf -> PathToLeaf
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 PathToLeaf PathToLeaf FieldSet FieldSet
Data.ProtoLens.unknownFields
                           (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter
  PathToLeaf
  PathToLeaf
  (Vector ProofInnerNode)
  (Vector ProofInnerNode)
-> Vector ProofInnerNode -> PathToLeaf -> PathToLeaf
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'nodes" a, Functor f) =>
(a -> f a) -> s -> 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'nodes") Vector ProofInnerNode
frozen'nodes PathToLeaf
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do !ProofInnerNode
y <- Parser ProofInnerNode -> String -> Parser ProofInnerNode
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser ProofInnerNode -> Parser ProofInnerNode
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 ProofInnerNode
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        "nodes"
                                Growing Vector RealWorld ProofInnerNode
v <- IO (Growing Vector RealWorld ProofInnerNode)
-> Parser (Growing Vector RealWorld ProofInnerNode)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) ProofInnerNode
-> ProofInnerNode
-> IO (Growing Vector (PrimState IO) ProofInnerNode)
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 ProofInnerNode
Growing Vector (PrimState IO) ProofInnerNode
mutable'nodes ProofInnerNode
y)
                                PathToLeaf
-> Growing Vector RealWorld ProofInnerNode -> Parser PathToLeaf
loop PathToLeaf
x Growing Vector RealWorld ProofInnerNode
v
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                PathToLeaf
-> Growing Vector RealWorld ProofInnerNode -> Parser PathToLeaf
loop
                                  (Setter PathToLeaf PathToLeaf FieldSet FieldSet
-> (FieldSet -> FieldSet) -> PathToLeaf -> PathToLeaf
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 PathToLeaf PathToLeaf FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) PathToLeaf
x)
                                  Growing Vector RealWorld ProofInnerNode
mutable'nodes
      in
        Parser PathToLeaf -> String -> Parser PathToLeaf
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld ProofInnerNode
mutable'nodes <- IO (Growing Vector RealWorld ProofInnerNode)
-> Parser (Growing Vector RealWorld ProofInnerNode)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                 IO (Growing Vector RealWorld ProofInnerNode)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              PathToLeaf
-> Growing Vector RealWorld ProofInnerNode -> Parser PathToLeaf
loop PathToLeaf
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld ProofInnerNode
mutable'nodes)
          "PathToLeaf"
  buildMessage :: PathToLeaf -> Builder
buildMessage
    = \ _x :: PathToLeaf
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             ((ProofInnerNode -> Builder) -> Vector ProofInnerNode -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v :: ProofInnerNode
_v
                   -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                        (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((ByteString -> Builder)
-> (ProofInnerNode -> ByteString) -> ProofInnerNode -> 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))
                           ProofInnerNode -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                           ProofInnerNode
_v))
                (FoldLike
  (Vector ProofInnerNode)
  PathToLeaf
  PathToLeaf
  (Vector ProofInnerNode)
  (Vector ProofInnerNode)
-> PathToLeaf -> Vector ProofInnerNode
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'nodes" a, Functor f) =>
(a -> f a) -> s -> 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'nodes") PathToLeaf
_x))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet PathToLeaf PathToLeaf FieldSet FieldSet
-> PathToLeaf -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet PathToLeaf PathToLeaf FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields PathToLeaf
_x))
instance Control.DeepSeq.NFData PathToLeaf where
  rnf :: PathToLeaf -> ()
rnf
    = \ x__ :: PathToLeaf
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (PathToLeaf -> FieldSet
_PathToLeaf'_unknownFields PathToLeaf
x__)
             (Vector ProofInnerNode -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (PathToLeaf -> Vector ProofInnerNode
_PathToLeaf'nodes PathToLeaf
x__) ())
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.height' @:: Lens' ProofInnerNode Data.Int.Int32@
         * 'Proto.Iavl.Api_Fields.size' @:: Lens' ProofInnerNode Data.Int.Int64@
         * 'Proto.Iavl.Api_Fields.version' @:: Lens' ProofInnerNode Data.Int.Int64@
         * 'Proto.Iavl.Api_Fields.left' @:: Lens' ProofInnerNode Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.right' @:: Lens' ProofInnerNode Data.ByteString.ByteString@ -}
data ProofInnerNode
  = ProofInnerNode'_constructor {ProofInnerNode -> Int32
_ProofInnerNode'height :: !Data.Int.Int32,
                                 ProofInnerNode -> Int64
_ProofInnerNode'size :: !Data.Int.Int64,
                                 ProofInnerNode -> Int64
_ProofInnerNode'version :: !Data.Int.Int64,
                                 ProofInnerNode -> ByteString
_ProofInnerNode'left :: !Data.ByteString.ByteString,
                                 ProofInnerNode -> ByteString
_ProofInnerNode'right :: !Data.ByteString.ByteString,
                                 ProofInnerNode -> FieldSet
_ProofInnerNode'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (ProofInnerNode -> ProofInnerNode -> Bool
(ProofInnerNode -> ProofInnerNode -> Bool)
-> (ProofInnerNode -> ProofInnerNode -> Bool) -> Eq ProofInnerNode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProofInnerNode -> ProofInnerNode -> Bool
$c/= :: ProofInnerNode -> ProofInnerNode -> Bool
== :: ProofInnerNode -> ProofInnerNode -> Bool
$c== :: ProofInnerNode -> ProofInnerNode -> Bool
Prelude.Eq, Eq ProofInnerNode
Eq ProofInnerNode =>
(ProofInnerNode -> ProofInnerNode -> Ordering)
-> (ProofInnerNode -> ProofInnerNode -> Bool)
-> (ProofInnerNode -> ProofInnerNode -> Bool)
-> (ProofInnerNode -> ProofInnerNode -> Bool)
-> (ProofInnerNode -> ProofInnerNode -> Bool)
-> (ProofInnerNode -> ProofInnerNode -> ProofInnerNode)
-> (ProofInnerNode -> ProofInnerNode -> ProofInnerNode)
-> Ord ProofInnerNode
ProofInnerNode -> ProofInnerNode -> Bool
ProofInnerNode -> ProofInnerNode -> Ordering
ProofInnerNode -> ProofInnerNode -> ProofInnerNode
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 :: ProofInnerNode -> ProofInnerNode -> ProofInnerNode
$cmin :: ProofInnerNode -> ProofInnerNode -> ProofInnerNode
max :: ProofInnerNode -> ProofInnerNode -> ProofInnerNode
$cmax :: ProofInnerNode -> ProofInnerNode -> ProofInnerNode
>= :: ProofInnerNode -> ProofInnerNode -> Bool
$c>= :: ProofInnerNode -> ProofInnerNode -> Bool
> :: ProofInnerNode -> ProofInnerNode -> Bool
$c> :: ProofInnerNode -> ProofInnerNode -> Bool
<= :: ProofInnerNode -> ProofInnerNode -> Bool
$c<= :: ProofInnerNode -> ProofInnerNode -> Bool
< :: ProofInnerNode -> ProofInnerNode -> Bool
$c< :: ProofInnerNode -> ProofInnerNode -> Bool
compare :: ProofInnerNode -> ProofInnerNode -> Ordering
$ccompare :: ProofInnerNode -> ProofInnerNode -> Ordering
$cp1Ord :: Eq ProofInnerNode
Prelude.Ord)
instance Prelude.Show ProofInnerNode where
  showsPrec :: Int -> ProofInnerNode -> ShowS
showsPrec _ __x :: ProofInnerNode
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (ProofInnerNode -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ProofInnerNode
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ProofInnerNode "height" Data.Int.Int32 where
  fieldOf :: Proxy# "height"
-> (Int32 -> f Int32) -> ProofInnerNode -> f ProofInnerNode
fieldOf _
    = ((Int32 -> f Int32) -> ProofInnerNode -> f ProofInnerNode)
-> ((Int32 -> f Int32) -> Int32 -> f Int32)
-> (Int32 -> f Int32)
-> ProofInnerNode
-> f ProofInnerNode
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ProofInnerNode -> Int32)
-> (ProofInnerNode -> Int32 -> ProofInnerNode)
-> Lens ProofInnerNode ProofInnerNode Int32 Int32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ProofInnerNode -> Int32
_ProofInnerNode'height
           (\ x__ :: ProofInnerNode
x__ y__ :: Int32
y__ -> ProofInnerNode
x__ {_ProofInnerNode'height :: Int32
_ProofInnerNode'height = Int32
y__}))
        (Int32 -> f Int32) -> Int32 -> f Int32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ProofInnerNode "size" Data.Int.Int64 where
  fieldOf :: Proxy# "size"
-> (Int64 -> f Int64) -> ProofInnerNode -> f ProofInnerNode
fieldOf _
    = ((Int64 -> f Int64) -> ProofInnerNode -> f ProofInnerNode)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ProofInnerNode
-> f ProofInnerNode
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ProofInnerNode -> Int64)
-> (ProofInnerNode -> Int64 -> ProofInnerNode)
-> Lens ProofInnerNode ProofInnerNode Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ProofInnerNode -> Int64
_ProofInnerNode'size
           (\ x__ :: ProofInnerNode
x__ y__ :: Int64
y__ -> ProofInnerNode
x__ {_ProofInnerNode'size :: Int64
_ProofInnerNode'size = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ProofInnerNode "version" Data.Int.Int64 where
  fieldOf :: Proxy# "version"
-> (Int64 -> f Int64) -> ProofInnerNode -> f ProofInnerNode
fieldOf _
    = ((Int64 -> f Int64) -> ProofInnerNode -> f ProofInnerNode)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ProofInnerNode
-> f ProofInnerNode
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ProofInnerNode -> Int64)
-> (ProofInnerNode -> Int64 -> ProofInnerNode)
-> Lens ProofInnerNode ProofInnerNode Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ProofInnerNode -> Int64
_ProofInnerNode'version
           (\ x__ :: ProofInnerNode
x__ y__ :: Int64
y__ -> ProofInnerNode
x__ {_ProofInnerNode'version :: Int64
_ProofInnerNode'version = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ProofInnerNode "left" Data.ByteString.ByteString where
  fieldOf :: Proxy# "left"
-> (ByteString -> f ByteString)
-> ProofInnerNode
-> f ProofInnerNode
fieldOf _
    = ((ByteString -> f ByteString)
 -> ProofInnerNode -> f ProofInnerNode)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> ProofInnerNode
-> f ProofInnerNode
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ProofInnerNode -> ByteString)
-> (ProofInnerNode -> ByteString -> ProofInnerNode)
-> Lens ProofInnerNode ProofInnerNode ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ProofInnerNode -> ByteString
_ProofInnerNode'left
           (\ x__ :: ProofInnerNode
x__ y__ :: ByteString
y__ -> ProofInnerNode
x__ {_ProofInnerNode'left :: ByteString
_ProofInnerNode'left = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ProofInnerNode "right" Data.ByteString.ByteString where
  fieldOf :: Proxy# "right"
-> (ByteString -> f ByteString)
-> ProofInnerNode
-> f ProofInnerNode
fieldOf _
    = ((ByteString -> f ByteString)
 -> ProofInnerNode -> f ProofInnerNode)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> ProofInnerNode
-> f ProofInnerNode
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ProofInnerNode -> ByteString)
-> (ProofInnerNode -> ByteString -> ProofInnerNode)
-> Lens ProofInnerNode ProofInnerNode ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ProofInnerNode -> ByteString
_ProofInnerNode'right
           (\ x__ :: ProofInnerNode
x__ y__ :: ByteString
y__ -> ProofInnerNode
x__ {_ProofInnerNode'right :: ByteString
_ProofInnerNode'right = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ProofInnerNode where
  messageName :: Proxy ProofInnerNode -> Text
messageName _ = String -> Text
Data.Text.pack "proto.ProofInnerNode"
  fieldsByTag :: Map Tag (FieldDescriptor ProofInnerNode)
fieldsByTag
    = let
        height__field_descriptor :: FieldDescriptor ProofInnerNode
height__field_descriptor
          = String
-> FieldTypeDescriptor Int32
-> FieldAccessor ProofInnerNode Int32
-> FieldDescriptor ProofInnerNode
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "height"
              (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 ProofInnerNode ProofInnerNode Int32 Int32
-> FieldAccessor ProofInnerNode 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 "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 ProofInnerNode
        size__field_descriptor :: FieldDescriptor ProofInnerNode
size__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor ProofInnerNode Int64
-> FieldDescriptor ProofInnerNode
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "size"
              (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 ProofInnerNode ProofInnerNode Int64 Int64
-> FieldAccessor ProofInnerNode 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 "size" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"size")) ::
              Data.ProtoLens.FieldDescriptor ProofInnerNode
        version__field_descriptor :: FieldDescriptor ProofInnerNode
version__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor ProofInnerNode Int64
-> FieldDescriptor ProofInnerNode
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "version"
              (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 ProofInnerNode ProofInnerNode Int64 Int64
-> FieldAccessor ProofInnerNode 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 "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version")) ::
              Data.ProtoLens.FieldDescriptor ProofInnerNode
        left__field_descriptor :: FieldDescriptor ProofInnerNode
left__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor ProofInnerNode ByteString
-> FieldDescriptor ProofInnerNode
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "left"
              (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 ProofInnerNode ProofInnerNode ByteString ByteString
-> FieldAccessor ProofInnerNode 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 "left" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"left")) ::
              Data.ProtoLens.FieldDescriptor ProofInnerNode
        right__field_descriptor :: FieldDescriptor ProofInnerNode
right__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor ProofInnerNode ByteString
-> FieldDescriptor ProofInnerNode
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "right"
              (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 ProofInnerNode ProofInnerNode ByteString ByteString
-> FieldAccessor ProofInnerNode 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 "right" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"right")) ::
              Data.ProtoLens.FieldDescriptor ProofInnerNode
      in
        [(Tag, FieldDescriptor ProofInnerNode)]
-> Map Tag (FieldDescriptor ProofInnerNode)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ProofInnerNode
height__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ProofInnerNode
size__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor ProofInnerNode
version__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor ProofInnerNode
left__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor ProofInnerNode
right__field_descriptor)]
  unknownFields :: LensLike' f ProofInnerNode FieldSet
unknownFields
    = (ProofInnerNode -> FieldSet)
-> (ProofInnerNode -> FieldSet -> ProofInnerNode)
-> Lens' ProofInnerNode FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        ProofInnerNode -> FieldSet
_ProofInnerNode'_unknownFields
        (\ x__ :: ProofInnerNode
x__ y__ :: FieldSet
y__ -> ProofInnerNode
x__ {_ProofInnerNode'_unknownFields :: FieldSet
_ProofInnerNode'_unknownFields = FieldSet
y__})
  defMessage :: ProofInnerNode
defMessage
    = $WProofInnerNode'_constructor :: Int32
-> Int64
-> Int64
-> ByteString
-> ByteString
-> FieldSet
-> ProofInnerNode
ProofInnerNode'_constructor
        {_ProofInnerNode'height :: Int32
_ProofInnerNode'height = Int32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ProofInnerNode'size :: Int64
_ProofInnerNode'size = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ProofInnerNode'version :: Int64
_ProofInnerNode'version = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ProofInnerNode'left :: ByteString
_ProofInnerNode'left = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ProofInnerNode'right :: ByteString
_ProofInnerNode'right = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ProofInnerNode'_unknownFields :: FieldSet
_ProofInnerNode'_unknownFields = []}
  parseMessage :: Parser ProofInnerNode
parseMessage
    = let
        loop ::
          ProofInnerNode
          -> Data.ProtoLens.Encoding.Bytes.Parser ProofInnerNode
        loop :: ProofInnerNode -> Parser ProofInnerNode
loop x :: ProofInnerNode
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]))))
                      ProofInnerNode -> Parser ProofInnerNode
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter ProofInnerNode ProofInnerNode FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ProofInnerNode -> ProofInnerNode
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 ProofInnerNode ProofInnerNode FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ProofInnerNode
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)
                                       "height"
                                ProofInnerNode -> Parser ProofInnerNode
loop (Setter ProofInnerNode ProofInnerNode Int32 Int32
-> Int32 -> ProofInnerNode -> ProofInnerNode
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") Int32
y ProofInnerNode
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)
                                       "size"
                                ProofInnerNode -> Parser ProofInnerNode
loop (Setter ProofInnerNode ProofInnerNode Int64 Int64
-> Int64 -> ProofInnerNode -> ProofInnerNode
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "size" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"size") Int64
y ProofInnerNode
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)
                                       "version"
                                ProofInnerNode -> Parser ProofInnerNode
loop (Setter ProofInnerNode ProofInnerNode Int64 Int64
-> Int64 -> ProofInnerNode -> ProofInnerNode
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") Int64
y ProofInnerNode
x)
                        34
                          -> 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))
                                       "left"
                                ProofInnerNode -> Parser ProofInnerNode
loop (Setter ProofInnerNode ProofInnerNode ByteString ByteString
-> ByteString -> ProofInnerNode -> ProofInnerNode
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "left" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"left") ByteString
y ProofInnerNode
x)
                        42
                          -> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len))
                                       "right"
                                ProofInnerNode -> Parser ProofInnerNode
loop (Setter ProofInnerNode ProofInnerNode ByteString ByteString
-> ByteString -> ProofInnerNode -> ProofInnerNode
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "right" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"right") ByteString
y ProofInnerNode
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                ProofInnerNode -> Parser ProofInnerNode
loop
                                  (Setter ProofInnerNode ProofInnerNode FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ProofInnerNode -> ProofInnerNode
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 ProofInnerNode ProofInnerNode FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ProofInnerNode
x)
      in
        Parser ProofInnerNode -> String -> Parser ProofInnerNode
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do ProofInnerNode -> Parser ProofInnerNode
loop ProofInnerNode
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ProofInnerNode"
  buildMessage :: ProofInnerNode -> Builder
buildMessage
    = \ _x :: ProofInnerNode
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Int32
_v = FoldLike Int32 ProofInnerNode ProofInnerNode Int32 Int32
-> ProofInnerNode -> Int32
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") ProofInnerNode
_x
              in
                if Int32 -> Int32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int32
_v Int32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Word64 -> Builder) -> (Int32 -> Word64) -> Int32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                         Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int32
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let _v :: Int64
_v = FoldLike Int64 ProofInnerNode ProofInnerNode Int64 Int64
-> ProofInnerNode -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "size" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"size") ProofInnerNode
_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))
                (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                   (let
                      _v :: Int64
_v = FoldLike Int64 ProofInnerNode ProofInnerNode Int64 Int64
-> ProofInnerNode -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version") ProofInnerNode
_x
                    in
                      if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                          Builder
forall a. Monoid a => a
Data.Monoid.mempty
                      else
                          Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                            (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            ((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                               Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
                   (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (let _v :: ByteString
_v = FoldLike
  ByteString ProofInnerNode ProofInnerNode ByteString ByteString
-> ProofInnerNode -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "left" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"left") ProofInnerNode
_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 34)
                               ((\ 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 ProofInnerNode ProofInnerNode ByteString ByteString
-> ProofInnerNode -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "right" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"right") ProofInnerNode
_x
                          in
                            if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                                Builder
forall a. Monoid a => a
Data.Monoid.mempty
                            else
                                Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                  (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 42)
                                  ((\ bs :: ByteString
bs
                                      -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                           (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                              (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                           (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                                     ByteString
_v))
                         (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                            (FoldLike FieldSet ProofInnerNode ProofInnerNode FieldSet FieldSet
-> ProofInnerNode -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ProofInnerNode ProofInnerNode FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ProofInnerNode
_x))))))
instance Control.DeepSeq.NFData ProofInnerNode where
  rnf :: ProofInnerNode -> ()
rnf
    = \ x__ :: ProofInnerNode
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (ProofInnerNode -> FieldSet
_ProofInnerNode'_unknownFields ProofInnerNode
x__)
             (Int32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (ProofInnerNode -> Int32
_ProofInnerNode'height ProofInnerNode
x__)
                (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (ProofInnerNode -> Int64
_ProofInnerNode'size ProofInnerNode
x__)
                   (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                      (ProofInnerNode -> Int64
_ProofInnerNode'version ProofInnerNode
x__)
                      (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                         (ProofInnerNode -> ByteString
_ProofInnerNode'left ProofInnerNode
x__)
                         (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ProofInnerNode -> ByteString
_ProofInnerNode'right ProofInnerNode
x__) ())))))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.key' @:: Lens' ProofLeafNode Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.valueHash' @:: Lens' ProofLeafNode Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.version' @:: Lens' ProofLeafNode Data.Int.Int64@ -}
data ProofLeafNode
  = ProofLeafNode'_constructor {ProofLeafNode -> ByteString
_ProofLeafNode'key :: !Data.ByteString.ByteString,
                                ProofLeafNode -> ByteString
_ProofLeafNode'valueHash :: !Data.ByteString.ByteString,
                                ProofLeafNode -> Int64
_ProofLeafNode'version :: !Data.Int.Int64,
                                ProofLeafNode -> FieldSet
_ProofLeafNode'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (ProofLeafNode -> ProofLeafNode -> Bool
(ProofLeafNode -> ProofLeafNode -> Bool)
-> (ProofLeafNode -> ProofLeafNode -> Bool) -> Eq ProofLeafNode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProofLeafNode -> ProofLeafNode -> Bool
$c/= :: ProofLeafNode -> ProofLeafNode -> Bool
== :: ProofLeafNode -> ProofLeafNode -> Bool
$c== :: ProofLeafNode -> ProofLeafNode -> Bool
Prelude.Eq, Eq ProofLeafNode
Eq ProofLeafNode =>
(ProofLeafNode -> ProofLeafNode -> Ordering)
-> (ProofLeafNode -> ProofLeafNode -> Bool)
-> (ProofLeafNode -> ProofLeafNode -> Bool)
-> (ProofLeafNode -> ProofLeafNode -> Bool)
-> (ProofLeafNode -> ProofLeafNode -> Bool)
-> (ProofLeafNode -> ProofLeafNode -> ProofLeafNode)
-> (ProofLeafNode -> ProofLeafNode -> ProofLeafNode)
-> Ord ProofLeafNode
ProofLeafNode -> ProofLeafNode -> Bool
ProofLeafNode -> ProofLeafNode -> Ordering
ProofLeafNode -> ProofLeafNode -> ProofLeafNode
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 :: ProofLeafNode -> ProofLeafNode -> ProofLeafNode
$cmin :: ProofLeafNode -> ProofLeafNode -> ProofLeafNode
max :: ProofLeafNode -> ProofLeafNode -> ProofLeafNode
$cmax :: ProofLeafNode -> ProofLeafNode -> ProofLeafNode
>= :: ProofLeafNode -> ProofLeafNode -> Bool
$c>= :: ProofLeafNode -> ProofLeafNode -> Bool
> :: ProofLeafNode -> ProofLeafNode -> Bool
$c> :: ProofLeafNode -> ProofLeafNode -> Bool
<= :: ProofLeafNode -> ProofLeafNode -> Bool
$c<= :: ProofLeafNode -> ProofLeafNode -> Bool
< :: ProofLeafNode -> ProofLeafNode -> Bool
$c< :: ProofLeafNode -> ProofLeafNode -> Bool
compare :: ProofLeafNode -> ProofLeafNode -> Ordering
$ccompare :: ProofLeafNode -> ProofLeafNode -> Ordering
$cp1Ord :: Eq ProofLeafNode
Prelude.Ord)
instance Prelude.Show ProofLeafNode where
  showsPrec :: Int -> ProofLeafNode -> ShowS
showsPrec _ __x :: ProofLeafNode
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (ProofLeafNode -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ProofLeafNode
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ProofLeafNode "key" Data.ByteString.ByteString where
  fieldOf :: Proxy# "key"
-> (ByteString -> f ByteString) -> ProofLeafNode -> f ProofLeafNode
fieldOf _
    = ((ByteString -> f ByteString) -> ProofLeafNode -> f ProofLeafNode)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> ProofLeafNode
-> f ProofLeafNode
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ProofLeafNode -> ByteString)
-> (ProofLeafNode -> ByteString -> ProofLeafNode)
-> Lens ProofLeafNode ProofLeafNode ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ProofLeafNode -> ByteString
_ProofLeafNode'key (\ x__ :: ProofLeafNode
x__ y__ :: ByteString
y__ -> ProofLeafNode
x__ {_ProofLeafNode'key :: ByteString
_ProofLeafNode'key = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ProofLeafNode "valueHash" Data.ByteString.ByteString where
  fieldOf :: Proxy# "valueHash"
-> (ByteString -> f ByteString) -> ProofLeafNode -> f ProofLeafNode
fieldOf _
    = ((ByteString -> f ByteString) -> ProofLeafNode -> f ProofLeafNode)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> ProofLeafNode
-> f ProofLeafNode
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ProofLeafNode -> ByteString)
-> (ProofLeafNode -> ByteString -> ProofLeafNode)
-> Lens ProofLeafNode ProofLeafNode ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ProofLeafNode -> ByteString
_ProofLeafNode'valueHash
           (\ x__ :: ProofLeafNode
x__ y__ :: ByteString
y__ -> ProofLeafNode
x__ {_ProofLeafNode'valueHash :: ByteString
_ProofLeafNode'valueHash = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ProofLeafNode "version" Data.Int.Int64 where
  fieldOf :: Proxy# "version"
-> (Int64 -> f Int64) -> ProofLeafNode -> f ProofLeafNode
fieldOf _
    = ((Int64 -> f Int64) -> ProofLeafNode -> f ProofLeafNode)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> ProofLeafNode
-> f ProofLeafNode
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ProofLeafNode -> Int64)
-> (ProofLeafNode -> Int64 -> ProofLeafNode)
-> Lens ProofLeafNode ProofLeafNode Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ProofLeafNode -> Int64
_ProofLeafNode'version
           (\ x__ :: ProofLeafNode
x__ y__ :: Int64
y__ -> ProofLeafNode
x__ {_ProofLeafNode'version :: Int64
_ProofLeafNode'version = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ProofLeafNode where
  messageName :: Proxy ProofLeafNode -> Text
messageName _ = String -> Text
Data.Text.pack "proto.ProofLeafNode"
  fieldsByTag :: Map Tag (FieldDescriptor ProofLeafNode)
fieldsByTag
    = let
        key__field_descriptor :: FieldDescriptor ProofLeafNode
key__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor ProofLeafNode ByteString
-> FieldDescriptor ProofLeafNode
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "key"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens ProofLeafNode ProofLeafNode ByteString ByteString
-> FieldAccessor ProofLeafNode ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor ProofLeafNode
        valueHash__field_descriptor :: FieldDescriptor ProofLeafNode
valueHash__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor ProofLeafNode ByteString
-> FieldDescriptor ProofLeafNode
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "value_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 ProofLeafNode ProofLeafNode ByteString ByteString
-> FieldAccessor ProofLeafNode 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 "valueHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"valueHash")) ::
              Data.ProtoLens.FieldDescriptor ProofLeafNode
        version__field_descriptor :: FieldDescriptor ProofLeafNode
version__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor ProofLeafNode Int64
-> FieldDescriptor ProofLeafNode
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "version"
              (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 ProofLeafNode ProofLeafNode Int64 Int64
-> FieldAccessor ProofLeafNode 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 "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version")) ::
              Data.ProtoLens.FieldDescriptor ProofLeafNode
      in
        [(Tag, FieldDescriptor ProofLeafNode)]
-> Map Tag (FieldDescriptor ProofLeafNode)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ProofLeafNode
key__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ProofLeafNode
valueHash__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor ProofLeafNode
version__field_descriptor)]
  unknownFields :: LensLike' f ProofLeafNode FieldSet
unknownFields
    = (ProofLeafNode -> FieldSet)
-> (ProofLeafNode -> FieldSet -> ProofLeafNode)
-> Lens' ProofLeafNode FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        ProofLeafNode -> FieldSet
_ProofLeafNode'_unknownFields
        (\ x__ :: ProofLeafNode
x__ y__ :: FieldSet
y__ -> ProofLeafNode
x__ {_ProofLeafNode'_unknownFields :: FieldSet
_ProofLeafNode'_unknownFields = FieldSet
y__})
  defMessage :: ProofLeafNode
defMessage
    = $WProofLeafNode'_constructor :: ByteString -> ByteString -> Int64 -> FieldSet -> ProofLeafNode
ProofLeafNode'_constructor
        {_ProofLeafNode'key :: ByteString
_ProofLeafNode'key = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ProofLeafNode'valueHash :: ByteString
_ProofLeafNode'valueHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ProofLeafNode'version :: Int64
_ProofLeafNode'version = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ProofLeafNode'_unknownFields :: FieldSet
_ProofLeafNode'_unknownFields = []}
  parseMessage :: Parser ProofLeafNode
parseMessage
    = let
        loop ::
          ProofLeafNode -> Data.ProtoLens.Encoding.Bytes.Parser ProofLeafNode
        loop :: ProofLeafNode -> Parser ProofLeafNode
loop x :: ProofLeafNode
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]))))
                      ProofLeafNode -> Parser ProofLeafNode
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter ProofLeafNode ProofLeafNode FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ProofLeafNode -> ProofLeafNode
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 ProofLeafNode ProofLeafNode FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ProofLeafNode
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))
                                       "key"
                                ProofLeafNode -> Parser ProofLeafNode
loop (Setter ProofLeafNode ProofLeafNode ByteString ByteString
-> ByteString -> ProofLeafNode -> ProofLeafNode
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") ByteString
y ProofLeafNode
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))
                                       "value_hash"
                                ProofLeafNode -> Parser ProofLeafNode
loop
                                  (Setter ProofLeafNode ProofLeafNode ByteString ByteString
-> ByteString -> ProofLeafNode -> ProofLeafNode
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "valueHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"valueHash") ByteString
y ProofLeafNode
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)
                                       "version"
                                ProofLeafNode -> Parser ProofLeafNode
loop (Setter ProofLeafNode ProofLeafNode Int64 Int64
-> Int64 -> ProofLeafNode -> ProofLeafNode
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") Int64
y ProofLeafNode
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                ProofLeafNode -> Parser ProofLeafNode
loop
                                  (Setter ProofLeafNode ProofLeafNode FieldSet FieldSet
-> (FieldSet -> FieldSet) -> ProofLeafNode -> ProofLeafNode
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 ProofLeafNode ProofLeafNode FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ProofLeafNode
x)
      in
        Parser ProofLeafNode -> String -> Parser ProofLeafNode
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do ProofLeafNode -> Parser ProofLeafNode
loop ProofLeafNode
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ProofLeafNode"
  buildMessage :: ProofLeafNode -> Builder
buildMessage
    = \ _x :: ProofLeafNode
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: ByteString
_v = FoldLike
  ByteString ProofLeafNode ProofLeafNode ByteString ByteString
-> ProofLeafNode -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") ProofLeafNode
_x
              in
                if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs :: ByteString
bs
                          -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                               (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         ByteString
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   _v :: ByteString
_v = FoldLike
  ByteString ProofLeafNode ProofLeafNode ByteString ByteString
-> ProofLeafNode -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "valueHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"valueHash") ProofLeafNode
_x
                 in
                   if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                       Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   else
                       Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs :: ByteString
bs
                             -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                  (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                  (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                            ByteString
_v))
                (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                   (let
                      _v :: Int64
_v = FoldLike Int64 ProofLeafNode ProofLeafNode Int64 Int64
-> ProofLeafNode -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version") ProofLeafNode
_x
                    in
                      if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                          Builder
forall a. Monoid a => a
Data.Monoid.mempty
                      else
                          Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                            (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            ((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                               Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
                   (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (FoldLike FieldSet ProofLeafNode ProofLeafNode FieldSet FieldSet
-> ProofLeafNode -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ProofLeafNode ProofLeafNode FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ProofLeafNode
_x))))
instance Control.DeepSeq.NFData ProofLeafNode where
  rnf :: ProofLeafNode -> ()
rnf
    = \ x__ :: ProofLeafNode
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (ProofLeafNode -> FieldSet
_ProofLeafNode'_unknownFields ProofLeafNode
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (ProofLeafNode -> ByteString
_ProofLeafNode'key ProofLeafNode
x__)
                (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (ProofLeafNode -> ByteString
_ProofLeafNode'valueHash ProofLeafNode
x__)
                   (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ProofLeafNode -> Int64
_ProofLeafNode'version ProofLeafNode
x__) ())))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.key' @:: Lens' RangeProof Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.leftPath' @:: Lens' RangeProof PathToLeaf@
         * 'Proto.Iavl.Api_Fields.maybe'leftPath' @:: Lens' RangeProof (Prelude.Maybe PathToLeaf)@
         * 'Proto.Iavl.Api_Fields.innerNodes' @:: Lens' RangeProof [PathToLeaf]@
         * 'Proto.Iavl.Api_Fields.vec'innerNodes' @:: Lens' RangeProof (Data.Vector.Vector PathToLeaf)@
         * 'Proto.Iavl.Api_Fields.leaves' @:: Lens' RangeProof [ProofLeafNode]@
         * 'Proto.Iavl.Api_Fields.vec'leaves' @:: Lens' RangeProof (Data.Vector.Vector ProofLeafNode)@ -}
data RangeProof
  = RangeProof'_constructor {RangeProof -> ByteString
_RangeProof'key :: !Data.ByteString.ByteString,
                             RangeProof -> Maybe PathToLeaf
_RangeProof'leftPath :: !(Prelude.Maybe PathToLeaf),
                             RangeProof -> Vector PathToLeaf
_RangeProof'innerNodes :: !(Data.Vector.Vector PathToLeaf),
                             RangeProof -> Vector ProofLeafNode
_RangeProof'leaves :: !(Data.Vector.Vector ProofLeafNode),
                             RangeProof -> FieldSet
_RangeProof'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (RangeProof -> RangeProof -> Bool
(RangeProof -> RangeProof -> Bool)
-> (RangeProof -> RangeProof -> Bool) -> Eq RangeProof
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RangeProof -> RangeProof -> Bool
$c/= :: RangeProof -> RangeProof -> Bool
== :: RangeProof -> RangeProof -> Bool
$c== :: RangeProof -> RangeProof -> Bool
Prelude.Eq, Eq RangeProof
Eq RangeProof =>
(RangeProof -> RangeProof -> Ordering)
-> (RangeProof -> RangeProof -> Bool)
-> (RangeProof -> RangeProof -> Bool)
-> (RangeProof -> RangeProof -> Bool)
-> (RangeProof -> RangeProof -> Bool)
-> (RangeProof -> RangeProof -> RangeProof)
-> (RangeProof -> RangeProof -> RangeProof)
-> Ord RangeProof
RangeProof -> RangeProof -> Bool
RangeProof -> RangeProof -> Ordering
RangeProof -> RangeProof -> RangeProof
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 :: RangeProof -> RangeProof -> RangeProof
$cmin :: RangeProof -> RangeProof -> RangeProof
max :: RangeProof -> RangeProof -> RangeProof
$cmax :: RangeProof -> RangeProof -> RangeProof
>= :: RangeProof -> RangeProof -> Bool
$c>= :: RangeProof -> RangeProof -> Bool
> :: RangeProof -> RangeProof -> Bool
$c> :: RangeProof -> RangeProof -> Bool
<= :: RangeProof -> RangeProof -> Bool
$c<= :: RangeProof -> RangeProof -> Bool
< :: RangeProof -> RangeProof -> Bool
$c< :: RangeProof -> RangeProof -> Bool
compare :: RangeProof -> RangeProof -> Ordering
$ccompare :: RangeProof -> RangeProof -> Ordering
$cp1Ord :: Eq RangeProof
Prelude.Ord)
instance Prelude.Show RangeProof where
  showsPrec :: Int -> RangeProof -> ShowS
showsPrec _ __x :: RangeProof
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (RangeProof -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RangeProof
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RangeProof "key" Data.ByteString.ByteString where
  fieldOf :: Proxy# "key"
-> (ByteString -> f ByteString) -> RangeProof -> f RangeProof
fieldOf _
    = ((ByteString -> f ByteString) -> RangeProof -> f RangeProof)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> RangeProof
-> f RangeProof
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((RangeProof -> ByteString)
-> (RangeProof -> ByteString -> RangeProof)
-> Lens RangeProof RangeProof ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           RangeProof -> ByteString
_RangeProof'key (\ x__ :: RangeProof
x__ y__ :: ByteString
y__ -> RangeProof
x__ {_RangeProof'key :: ByteString
_RangeProof'key = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RangeProof "leftPath" PathToLeaf where
  fieldOf :: Proxy# "leftPath"
-> (PathToLeaf -> f PathToLeaf) -> RangeProof -> f RangeProof
fieldOf _
    = ((Maybe PathToLeaf -> f (Maybe PathToLeaf))
 -> RangeProof -> f RangeProof)
-> ((PathToLeaf -> f PathToLeaf)
    -> Maybe PathToLeaf -> f (Maybe PathToLeaf))
-> (PathToLeaf -> f PathToLeaf)
-> RangeProof
-> f RangeProof
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((RangeProof -> Maybe PathToLeaf)
-> (RangeProof -> Maybe PathToLeaf -> RangeProof)
-> Lens RangeProof RangeProof (Maybe PathToLeaf) (Maybe PathToLeaf)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           RangeProof -> Maybe PathToLeaf
_RangeProof'leftPath
           (\ x__ :: RangeProof
x__ y__ :: Maybe PathToLeaf
y__ -> RangeProof
x__ {_RangeProof'leftPath :: Maybe PathToLeaf
_RangeProof'leftPath = Maybe PathToLeaf
y__}))
        (PathToLeaf -> Lens' (Maybe PathToLeaf) PathToLeaf
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens PathToLeaf
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField RangeProof "maybe'leftPath" (Prelude.Maybe PathToLeaf) where
  fieldOf :: Proxy# "maybe'leftPath"
-> (Maybe PathToLeaf -> f (Maybe PathToLeaf))
-> RangeProof
-> f RangeProof
fieldOf _
    = ((Maybe PathToLeaf -> f (Maybe PathToLeaf))
 -> RangeProof -> f RangeProof)
-> ((Maybe PathToLeaf -> f (Maybe PathToLeaf))
    -> Maybe PathToLeaf -> f (Maybe PathToLeaf))
-> (Maybe PathToLeaf -> f (Maybe PathToLeaf))
-> RangeProof
-> f RangeProof
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((RangeProof -> Maybe PathToLeaf)
-> (RangeProof -> Maybe PathToLeaf -> RangeProof)
-> Lens RangeProof RangeProof (Maybe PathToLeaf) (Maybe PathToLeaf)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           RangeProof -> Maybe PathToLeaf
_RangeProof'leftPath
           (\ x__ :: RangeProof
x__ y__ :: Maybe PathToLeaf
y__ -> RangeProof
x__ {_RangeProof'leftPath :: Maybe PathToLeaf
_RangeProof'leftPath = Maybe PathToLeaf
y__}))
        (Maybe PathToLeaf -> f (Maybe PathToLeaf))
-> Maybe PathToLeaf -> f (Maybe PathToLeaf)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RangeProof "innerNodes" [PathToLeaf] where
  fieldOf :: Proxy# "innerNodes"
-> ([PathToLeaf] -> f [PathToLeaf]) -> RangeProof -> f RangeProof
fieldOf _
    = ((Vector PathToLeaf -> f (Vector PathToLeaf))
 -> RangeProof -> f RangeProof)
-> (([PathToLeaf] -> f [PathToLeaf])
    -> Vector PathToLeaf -> f (Vector PathToLeaf))
-> ([PathToLeaf] -> f [PathToLeaf])
-> RangeProof
-> f RangeProof
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((RangeProof -> Vector PathToLeaf)
-> (RangeProof -> Vector PathToLeaf -> RangeProof)
-> Lens
     RangeProof RangeProof (Vector PathToLeaf) (Vector PathToLeaf)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           RangeProof -> Vector PathToLeaf
_RangeProof'innerNodes
           (\ x__ :: RangeProof
x__ y__ :: Vector PathToLeaf
y__ -> RangeProof
x__ {_RangeProof'innerNodes :: Vector PathToLeaf
_RangeProof'innerNodes = Vector PathToLeaf
y__}))
        ((Vector PathToLeaf -> [PathToLeaf])
-> (Vector PathToLeaf -> [PathToLeaf] -> Vector PathToLeaf)
-> Lens
     (Vector PathToLeaf) (Vector PathToLeaf) [PathToLeaf] [PathToLeaf]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector PathToLeaf -> [PathToLeaf]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ _ y__ :: [PathToLeaf]
y__ -> [PathToLeaf] -> Vector PathToLeaf
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [PathToLeaf]
y__))
instance Data.ProtoLens.Field.HasField RangeProof "vec'innerNodes" (Data.Vector.Vector PathToLeaf) where
  fieldOf :: Proxy# "vec'innerNodes"
-> (Vector PathToLeaf -> f (Vector PathToLeaf))
-> RangeProof
-> f RangeProof
fieldOf _
    = ((Vector PathToLeaf -> f (Vector PathToLeaf))
 -> RangeProof -> f RangeProof)
-> ((Vector PathToLeaf -> f (Vector PathToLeaf))
    -> Vector PathToLeaf -> f (Vector PathToLeaf))
-> (Vector PathToLeaf -> f (Vector PathToLeaf))
-> RangeProof
-> f RangeProof
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((RangeProof -> Vector PathToLeaf)
-> (RangeProof -> Vector PathToLeaf -> RangeProof)
-> Lens
     RangeProof RangeProof (Vector PathToLeaf) (Vector PathToLeaf)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           RangeProof -> Vector PathToLeaf
_RangeProof'innerNodes
           (\ x__ :: RangeProof
x__ y__ :: Vector PathToLeaf
y__ -> RangeProof
x__ {_RangeProof'innerNodes :: Vector PathToLeaf
_RangeProof'innerNodes = Vector PathToLeaf
y__}))
        (Vector PathToLeaf -> f (Vector PathToLeaf))
-> Vector PathToLeaf -> f (Vector PathToLeaf)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RangeProof "leaves" [ProofLeafNode] where
  fieldOf :: Proxy# "leaves"
-> ([ProofLeafNode] -> f [ProofLeafNode])
-> RangeProof
-> f RangeProof
fieldOf _
    = ((Vector ProofLeafNode -> f (Vector ProofLeafNode))
 -> RangeProof -> f RangeProof)
-> (([ProofLeafNode] -> f [ProofLeafNode])
    -> Vector ProofLeafNode -> f (Vector ProofLeafNode))
-> ([ProofLeafNode] -> f [ProofLeafNode])
-> RangeProof
-> f RangeProof
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((RangeProof -> Vector ProofLeafNode)
-> (RangeProof -> Vector ProofLeafNode -> RangeProof)
-> Lens
     RangeProof RangeProof (Vector ProofLeafNode) (Vector ProofLeafNode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           RangeProof -> Vector ProofLeafNode
_RangeProof'leaves (\ x__ :: RangeProof
x__ y__ :: Vector ProofLeafNode
y__ -> RangeProof
x__ {_RangeProof'leaves :: Vector ProofLeafNode
_RangeProof'leaves = Vector ProofLeafNode
y__}))
        ((Vector ProofLeafNode -> [ProofLeafNode])
-> (Vector ProofLeafNode
    -> [ProofLeafNode] -> Vector ProofLeafNode)
-> Lens
     (Vector ProofLeafNode)
     (Vector ProofLeafNode)
     [ProofLeafNode]
     [ProofLeafNode]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector ProofLeafNode -> [ProofLeafNode]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ _ y__ :: [ProofLeafNode]
y__ -> [ProofLeafNode] -> Vector ProofLeafNode
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [ProofLeafNode]
y__))
instance Data.ProtoLens.Field.HasField RangeProof "vec'leaves" (Data.Vector.Vector ProofLeafNode) where
  fieldOf :: Proxy# "vec'leaves"
-> (Vector ProofLeafNode -> f (Vector ProofLeafNode))
-> RangeProof
-> f RangeProof
fieldOf _
    = ((Vector ProofLeafNode -> f (Vector ProofLeafNode))
 -> RangeProof -> f RangeProof)
-> ((Vector ProofLeafNode -> f (Vector ProofLeafNode))
    -> Vector ProofLeafNode -> f (Vector ProofLeafNode))
-> (Vector ProofLeafNode -> f (Vector ProofLeafNode))
-> RangeProof
-> f RangeProof
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((RangeProof -> Vector ProofLeafNode)
-> (RangeProof -> Vector ProofLeafNode -> RangeProof)
-> Lens
     RangeProof RangeProof (Vector ProofLeafNode) (Vector ProofLeafNode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           RangeProof -> Vector ProofLeafNode
_RangeProof'leaves (\ x__ :: RangeProof
x__ y__ :: Vector ProofLeafNode
y__ -> RangeProof
x__ {_RangeProof'leaves :: Vector ProofLeafNode
_RangeProof'leaves = Vector ProofLeafNode
y__}))
        (Vector ProofLeafNode -> f (Vector ProofLeafNode))
-> Vector ProofLeafNode -> f (Vector ProofLeafNode)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RangeProof where
  messageName :: Proxy RangeProof -> Text
messageName _ = String -> Text
Data.Text.pack "proto.RangeProof"
  fieldsByTag :: Map Tag (FieldDescriptor RangeProof)
fieldsByTag
    = let
        key__field_descriptor :: FieldDescriptor RangeProof
key__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor RangeProof ByteString
-> FieldDescriptor RangeProof
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "key"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens RangeProof RangeProof ByteString ByteString
-> FieldAccessor RangeProof ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor RangeProof
        leftPath__field_descriptor :: FieldDescriptor RangeProof
leftPath__field_descriptor
          = String
-> FieldTypeDescriptor PathToLeaf
-> FieldAccessor RangeProof PathToLeaf
-> FieldDescriptor RangeProof
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "left_path"
              (MessageOrGroup -> FieldTypeDescriptor PathToLeaf
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor PathToLeaf)
              (Lens RangeProof RangeProof (Maybe PathToLeaf) (Maybe PathToLeaf)
-> FieldAccessor RangeProof PathToLeaf
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall s a (f :: * -> *).
(HasField s "maybe'leftPath" a, Functor f) =>
(a -> f a) -> s -> 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'leftPath")) ::
              Data.ProtoLens.FieldDescriptor RangeProof
        innerNodes__field_descriptor :: FieldDescriptor RangeProof
innerNodes__field_descriptor
          = String
-> FieldTypeDescriptor PathToLeaf
-> FieldAccessor RangeProof PathToLeaf
-> FieldDescriptor RangeProof
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "inner_nodes"
              (MessageOrGroup -> FieldTypeDescriptor PathToLeaf
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor PathToLeaf)
              (Packing
-> Lens' RangeProof [PathToLeaf]
-> FieldAccessor RangeProof PathToLeaf
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Unpacked
                 (forall s a (f :: * -> *).
(HasField s "innerNodes" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"innerNodes")) ::
              Data.ProtoLens.FieldDescriptor RangeProof
        leaves__field_descriptor :: FieldDescriptor RangeProof
leaves__field_descriptor
          = String
-> FieldTypeDescriptor ProofLeafNode
-> FieldAccessor RangeProof ProofLeafNode
-> FieldDescriptor RangeProof
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "leaves"
              (MessageOrGroup -> FieldTypeDescriptor ProofLeafNode
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor ProofLeafNode)
              (Packing
-> Lens' RangeProof [ProofLeafNode]
-> FieldAccessor RangeProof ProofLeafNode
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "leaves" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"leaves")) ::
              Data.ProtoLens.FieldDescriptor RangeProof
      in
        [(Tag, FieldDescriptor RangeProof)]
-> Map Tag (FieldDescriptor RangeProof)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RangeProof
key__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor RangeProof
leftPath__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor RangeProof
innerNodes__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor RangeProof
leaves__field_descriptor)]
  unknownFields :: LensLike' f RangeProof FieldSet
unknownFields
    = (RangeProof -> FieldSet)
-> (RangeProof -> FieldSet -> RangeProof)
-> Lens' RangeProof FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        RangeProof -> FieldSet
_RangeProof'_unknownFields
        (\ x__ :: RangeProof
x__ y__ :: FieldSet
y__ -> RangeProof
x__ {_RangeProof'_unknownFields :: FieldSet
_RangeProof'_unknownFields = FieldSet
y__})
  defMessage :: RangeProof
defMessage
    = $WRangeProof'_constructor :: ByteString
-> Maybe PathToLeaf
-> Vector PathToLeaf
-> Vector ProofLeafNode
-> FieldSet
-> RangeProof
RangeProof'_constructor
        {_RangeProof'key :: ByteString
_RangeProof'key = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _RangeProof'leftPath :: Maybe PathToLeaf
_RangeProof'leftPath = Maybe PathToLeaf
forall a. Maybe a
Prelude.Nothing,
         _RangeProof'innerNodes :: Vector PathToLeaf
_RangeProof'innerNodes = Vector PathToLeaf
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _RangeProof'leaves :: Vector ProofLeafNode
_RangeProof'leaves = Vector ProofLeafNode
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _RangeProof'_unknownFields :: FieldSet
_RangeProof'_unknownFields = []}
  parseMessage :: Parser RangeProof
parseMessage
    = let
        loop ::
          RangeProof
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld PathToLeaf
             -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ProofLeafNode
                -> Data.ProtoLens.Encoding.Bytes.Parser RangeProof
        loop :: RangeProof
-> Growing Vector RealWorld PathToLeaf
-> Growing Vector RealWorld ProofLeafNode
-> Parser RangeProof
loop x :: RangeProof
x mutable'innerNodes :: Growing Vector RealWorld PathToLeaf
mutable'innerNodes mutable'leaves :: Growing Vector RealWorld ProofLeafNode
mutable'leaves
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector PathToLeaf
frozen'innerNodes <- IO (Vector PathToLeaf) -> Parser (Vector PathToLeaf)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                             (Growing Vector (PrimState IO) PathToLeaf -> IO (Vector PathToLeaf)
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 PathToLeaf
Growing Vector (PrimState IO) PathToLeaf
mutable'innerNodes)
                      Vector ProofLeafNode
frozen'leaves <- IO (Vector ProofLeafNode) -> Parser (Vector ProofLeafNode)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                         (Growing Vector (PrimState IO) ProofLeafNode
-> IO (Vector ProofLeafNode)
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 ProofLeafNode
Growing Vector (PrimState IO) ProofLeafNode
mutable'leaves)
                      (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]))))
                      RangeProof -> Parser RangeProof
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter RangeProof RangeProof FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RangeProof -> RangeProof
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 RangeProof RangeProof FieldSet FieldSet
Data.ProtoLens.unknownFields
                           (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter
  RangeProof RangeProof (Vector PathToLeaf) (Vector PathToLeaf)
-> Vector PathToLeaf -> RangeProof -> RangeProof
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'innerNodes" a, Functor f) =>
(a -> f a) -> s -> 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'innerNodes")
                              Vector PathToLeaf
frozen'innerNodes
                              (Setter
  RangeProof RangeProof (Vector ProofLeafNode) (Vector ProofLeafNode)
-> Vector ProofLeafNode -> RangeProof -> RangeProof
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                 (forall s a (f :: * -> *).
(HasField s "vec'leaves" a, Functor f) =>
(a -> f a) -> s -> 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'leaves") Vector ProofLeafNode
frozen'leaves RangeProof
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))
                                       "key"
                                RangeProof
-> Growing Vector RealWorld PathToLeaf
-> Growing Vector RealWorld ProofLeafNode
-> Parser RangeProof
loop
                                  (Setter RangeProof RangeProof ByteString ByteString
-> ByteString -> RangeProof -> RangeProof
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") ByteString
y RangeProof
x)
                                  Growing Vector RealWorld PathToLeaf
mutable'innerNodes
                                  Growing Vector RealWorld ProofLeafNode
mutable'leaves
                        18
                          -> do PathToLeaf
y <- Parser PathToLeaf -> String -> Parser PathToLeaf
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser PathToLeaf -> Parser PathToLeaf
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 PathToLeaf
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "left_path"
                                RangeProof
-> Growing Vector RealWorld PathToLeaf
-> Growing Vector RealWorld ProofLeafNode
-> Parser RangeProof
loop
                                  (Setter RangeProof RangeProof PathToLeaf PathToLeaf
-> PathToLeaf -> RangeProof -> RangeProof
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "leftPath" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"leftPath") PathToLeaf
y RangeProof
x)
                                  Growing Vector RealWorld PathToLeaf
mutable'innerNodes
                                  Growing Vector RealWorld ProofLeafNode
mutable'leaves
                        26
                          -> do !PathToLeaf
y <- Parser PathToLeaf -> String -> Parser PathToLeaf
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser PathToLeaf -> Parser PathToLeaf
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 PathToLeaf
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        "inner_nodes"
                                Growing Vector RealWorld PathToLeaf
v <- IO (Growing Vector RealWorld PathToLeaf)
-> Parser (Growing Vector RealWorld PathToLeaf)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) PathToLeaf
-> PathToLeaf -> IO (Growing Vector (PrimState IO) PathToLeaf)
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 PathToLeaf
Growing Vector (PrimState IO) PathToLeaf
mutable'innerNodes PathToLeaf
y)
                                RangeProof
-> Growing Vector RealWorld PathToLeaf
-> Growing Vector RealWorld ProofLeafNode
-> Parser RangeProof
loop RangeProof
x Growing Vector RealWorld PathToLeaf
v Growing Vector RealWorld ProofLeafNode
mutable'leaves
                        34
                          -> do !ProofLeafNode
y <- Parser ProofLeafNode -> String -> Parser ProofLeafNode
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser ProofLeafNode -> Parser ProofLeafNode
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 ProofLeafNode
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        "leaves"
                                Growing Vector RealWorld ProofLeafNode
v <- IO (Growing Vector RealWorld ProofLeafNode)
-> Parser (Growing Vector RealWorld ProofLeafNode)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) ProofLeafNode
-> ProofLeafNode
-> IO (Growing Vector (PrimState IO) ProofLeafNode)
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 ProofLeafNode
Growing Vector (PrimState IO) ProofLeafNode
mutable'leaves ProofLeafNode
y)
                                RangeProof
-> Growing Vector RealWorld PathToLeaf
-> Growing Vector RealWorld ProofLeafNode
-> Parser RangeProof
loop RangeProof
x Growing Vector RealWorld PathToLeaf
mutable'innerNodes Growing Vector RealWorld ProofLeafNode
v
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                RangeProof
-> Growing Vector RealWorld PathToLeaf
-> Growing Vector RealWorld ProofLeafNode
-> Parser RangeProof
loop
                                  (Setter RangeProof RangeProof FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RangeProof -> RangeProof
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 RangeProof RangeProof FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RangeProof
x)
                                  Growing Vector RealWorld PathToLeaf
mutable'innerNodes
                                  Growing Vector RealWorld ProofLeafNode
mutable'leaves
      in
        Parser RangeProof -> String -> Parser RangeProof
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld PathToLeaf
mutable'innerNodes <- IO (Growing Vector RealWorld PathToLeaf)
-> Parser (Growing Vector RealWorld PathToLeaf)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                      IO (Growing Vector RealWorld PathToLeaf)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              Growing Vector RealWorld ProofLeafNode
mutable'leaves <- IO (Growing Vector RealWorld ProofLeafNode)
-> Parser (Growing Vector RealWorld ProofLeafNode)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                  IO (Growing Vector RealWorld ProofLeafNode)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              RangeProof
-> Growing Vector RealWorld PathToLeaf
-> Growing Vector RealWorld ProofLeafNode
-> Parser RangeProof
loop RangeProof
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld PathToLeaf
mutable'innerNodes Growing Vector RealWorld ProofLeafNode
mutable'leaves)
          "RangeProof"
  buildMessage :: RangeProof -> Builder
buildMessage
    = \ _x :: RangeProof
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: ByteString
_v = FoldLike ByteString RangeProof RangeProof ByteString ByteString
-> RangeProof -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") RangeProof
_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 PathToLeaf)
  RangeProof
  RangeProof
  (Maybe PathToLeaf)
  (Maybe PathToLeaf)
-> RangeProof -> Maybe PathToLeaf
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'leftPath" a, Functor f) =>
(a -> f a) -> s -> 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'leftPath") RangeProof
_x
                 of
                   Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   (Prelude.Just _v :: PathToLeaf
_v)
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((ByteString -> Builder)
-> (PathToLeaf -> ByteString) -> PathToLeaf -> 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))
                             PathToLeaf -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                             PathToLeaf
_v))
                (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                   ((PathToLeaf -> Builder) -> Vector PathToLeaf -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                      (\ _v :: PathToLeaf
_v
                         -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                              (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                              ((ByteString -> Builder)
-> (PathToLeaf -> ByteString) -> PathToLeaf -> 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))
                                 PathToLeaf -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                                 PathToLeaf
_v))
                      (FoldLike
  (Vector PathToLeaf)
  RangeProof
  RangeProof
  (Vector PathToLeaf)
  (Vector PathToLeaf)
-> RangeProof -> Vector PathToLeaf
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                         (forall s a (f :: * -> *).
(HasField s "vec'innerNodes" a, Functor f) =>
(a -> f a) -> s -> 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'innerNodes") RangeProof
_x))
                   (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      ((ProofLeafNode -> Builder) -> Vector ProofLeafNode -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                         (\ _v :: ProofLeafNode
_v
                            -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                 (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 34)
                                 ((ByteString -> Builder)
-> (ProofLeafNode -> ByteString) -> ProofLeafNode -> 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))
                                    ProofLeafNode -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                                    ProofLeafNode
_v))
                         (FoldLike
  (Vector ProofLeafNode)
  RangeProof
  RangeProof
  (Vector ProofLeafNode)
  (Vector ProofLeafNode)
-> RangeProof -> Vector ProofLeafNode
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'leaves" a, Functor f) =>
(a -> f a) -> s -> 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'leaves") RangeProof
_x))
                      (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                         (FoldLike FieldSet RangeProof RangeProof FieldSet FieldSet
-> RangeProof -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet RangeProof RangeProof FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RangeProof
_x)))))
instance Control.DeepSeq.NFData RangeProof where
  rnf :: RangeProof -> ()
rnf
    = \ x__ :: RangeProof
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (RangeProof -> FieldSet
_RangeProof'_unknownFields RangeProof
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (RangeProof -> ByteString
_RangeProof'key RangeProof
x__)
                (Maybe PathToLeaf -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (RangeProof -> Maybe PathToLeaf
_RangeProof'leftPath RangeProof
x__)
                   (Vector PathToLeaf -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                      (RangeProof -> Vector PathToLeaf
_RangeProof'innerNodes RangeProof
x__)
                      (Vector ProofLeafNode -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RangeProof -> Vector ProofLeafNode
_RangeProof'leaves RangeProof
x__) ()))))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.key' @:: Lens' RemoveRequest Data.ByteString.ByteString@ -}
data RemoveRequest
  = RemoveRequest'_constructor {RemoveRequest -> ByteString
_RemoveRequest'key :: !Data.ByteString.ByteString,
                                RemoveRequest -> FieldSet
_RemoveRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (RemoveRequest -> RemoveRequest -> Bool
(RemoveRequest -> RemoveRequest -> Bool)
-> (RemoveRequest -> RemoveRequest -> Bool) -> Eq RemoveRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveRequest -> RemoveRequest -> Bool
$c/= :: RemoveRequest -> RemoveRequest -> Bool
== :: RemoveRequest -> RemoveRequest -> Bool
$c== :: RemoveRequest -> RemoveRequest -> Bool
Prelude.Eq, Eq RemoveRequest
Eq RemoveRequest =>
(RemoveRequest -> RemoveRequest -> Ordering)
-> (RemoveRequest -> RemoveRequest -> Bool)
-> (RemoveRequest -> RemoveRequest -> Bool)
-> (RemoveRequest -> RemoveRequest -> Bool)
-> (RemoveRequest -> RemoveRequest -> Bool)
-> (RemoveRequest -> RemoveRequest -> RemoveRequest)
-> (RemoveRequest -> RemoveRequest -> RemoveRequest)
-> Ord RemoveRequest
RemoveRequest -> RemoveRequest -> Bool
RemoveRequest -> RemoveRequest -> Ordering
RemoveRequest -> RemoveRequest -> RemoveRequest
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 :: RemoveRequest -> RemoveRequest -> RemoveRequest
$cmin :: RemoveRequest -> RemoveRequest -> RemoveRequest
max :: RemoveRequest -> RemoveRequest -> RemoveRequest
$cmax :: RemoveRequest -> RemoveRequest -> RemoveRequest
>= :: RemoveRequest -> RemoveRequest -> Bool
$c>= :: RemoveRequest -> RemoveRequest -> Bool
> :: RemoveRequest -> RemoveRequest -> Bool
$c> :: RemoveRequest -> RemoveRequest -> Bool
<= :: RemoveRequest -> RemoveRequest -> Bool
$c<= :: RemoveRequest -> RemoveRequest -> Bool
< :: RemoveRequest -> RemoveRequest -> Bool
$c< :: RemoveRequest -> RemoveRequest -> Bool
compare :: RemoveRequest -> RemoveRequest -> Ordering
$ccompare :: RemoveRequest -> RemoveRequest -> Ordering
$cp1Ord :: Eq RemoveRequest
Prelude.Ord)
instance Prelude.Show RemoveRequest where
  showsPrec :: Int -> RemoveRequest -> ShowS
showsPrec _ __x :: RemoveRequest
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (RemoveRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RemoveRequest
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RemoveRequest "key" Data.ByteString.ByteString where
  fieldOf :: Proxy# "key"
-> (ByteString -> f ByteString) -> RemoveRequest -> f RemoveRequest
fieldOf _
    = ((ByteString -> f ByteString) -> RemoveRequest -> f RemoveRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> RemoveRequest
-> f RemoveRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((RemoveRequest -> ByteString)
-> (RemoveRequest -> ByteString -> RemoveRequest)
-> Lens RemoveRequest RemoveRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           RemoveRequest -> ByteString
_RemoveRequest'key (\ x__ :: RemoveRequest
x__ y__ :: ByteString
y__ -> RemoveRequest
x__ {_RemoveRequest'key :: ByteString
_RemoveRequest'key = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RemoveRequest where
  messageName :: Proxy RemoveRequest -> Text
messageName _ = String -> Text
Data.Text.pack "proto.RemoveRequest"
  fieldsByTag :: Map Tag (FieldDescriptor RemoveRequest)
fieldsByTag
    = let
        key__field_descriptor :: FieldDescriptor RemoveRequest
key__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor RemoveRequest ByteString
-> FieldDescriptor RemoveRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "key"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens RemoveRequest RemoveRequest ByteString ByteString
-> FieldAccessor RemoveRequest ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor RemoveRequest
      in
        [(Tag, FieldDescriptor RemoveRequest)]
-> Map Tag (FieldDescriptor RemoveRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RemoveRequest
key__field_descriptor)]
  unknownFields :: LensLike' f RemoveRequest FieldSet
unknownFields
    = (RemoveRequest -> FieldSet)
-> (RemoveRequest -> FieldSet -> RemoveRequest)
-> Lens' RemoveRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        RemoveRequest -> FieldSet
_RemoveRequest'_unknownFields
        (\ x__ :: RemoveRequest
x__ y__ :: FieldSet
y__ -> RemoveRequest
x__ {_RemoveRequest'_unknownFields :: FieldSet
_RemoveRequest'_unknownFields = FieldSet
y__})
  defMessage :: RemoveRequest
defMessage
    = $WRemoveRequest'_constructor :: ByteString -> FieldSet -> RemoveRequest
RemoveRequest'_constructor
        {_RemoveRequest'key :: ByteString
_RemoveRequest'key = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _RemoveRequest'_unknownFields :: FieldSet
_RemoveRequest'_unknownFields = []}
  parseMessage :: Parser RemoveRequest
parseMessage
    = let
        loop ::
          RemoveRequest -> Data.ProtoLens.Encoding.Bytes.Parser RemoveRequest
        loop :: RemoveRequest -> Parser RemoveRequest
loop x :: RemoveRequest
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]))))
                      RemoveRequest -> Parser RemoveRequest
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter RemoveRequest RemoveRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RemoveRequest -> RemoveRequest
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 RemoveRequest RemoveRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) RemoveRequest
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))
                                       "key"
                                RemoveRequest -> Parser RemoveRequest
loop (Setter RemoveRequest RemoveRequest ByteString ByteString
-> ByteString -> RemoveRequest -> RemoveRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") ByteString
y RemoveRequest
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                RemoveRequest -> Parser RemoveRequest
loop
                                  (Setter RemoveRequest RemoveRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RemoveRequest -> RemoveRequest
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 RemoveRequest RemoveRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RemoveRequest
x)
      in
        Parser RemoveRequest -> String -> Parser RemoveRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do RemoveRequest -> Parser RemoveRequest
loop RemoveRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RemoveRequest"
  buildMessage :: RemoveRequest -> Builder
buildMessage
    = \ _x :: RemoveRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: ByteString
_v = FoldLike
  ByteString RemoveRequest RemoveRequest ByteString ByteString
-> RemoveRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") RemoveRequest
_x
              in
                if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs :: ByteString
bs
                          -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                               (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         ByteString
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet RemoveRequest RemoveRequest FieldSet FieldSet
-> RemoveRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet RemoveRequest RemoveRequest FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RemoveRequest
_x))
instance Control.DeepSeq.NFData RemoveRequest where
  rnf :: RemoveRequest -> ()
rnf
    = \ x__ :: RemoveRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (RemoveRequest -> FieldSet
_RemoveRequest'_unknownFields RemoveRequest
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RemoveRequest -> ByteString
_RemoveRequest'key RemoveRequest
x__) ())
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.value' @:: Lens' RemoveResponse Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.removed' @:: Lens' RemoveResponse Prelude.Bool@ -}
data RemoveResponse
  = RemoveResponse'_constructor {RemoveResponse -> ByteString
_RemoveResponse'value :: !Data.ByteString.ByteString,
                                 RemoveResponse -> Bool
_RemoveResponse'removed :: !Prelude.Bool,
                                 RemoveResponse -> FieldSet
_RemoveResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (RemoveResponse -> RemoveResponse -> Bool
(RemoveResponse -> RemoveResponse -> Bool)
-> (RemoveResponse -> RemoveResponse -> Bool) -> Eq RemoveResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveResponse -> RemoveResponse -> Bool
$c/= :: RemoveResponse -> RemoveResponse -> Bool
== :: RemoveResponse -> RemoveResponse -> Bool
$c== :: RemoveResponse -> RemoveResponse -> Bool
Prelude.Eq, Eq RemoveResponse
Eq RemoveResponse =>
(RemoveResponse -> RemoveResponse -> Ordering)
-> (RemoveResponse -> RemoveResponse -> Bool)
-> (RemoveResponse -> RemoveResponse -> Bool)
-> (RemoveResponse -> RemoveResponse -> Bool)
-> (RemoveResponse -> RemoveResponse -> Bool)
-> (RemoveResponse -> RemoveResponse -> RemoveResponse)
-> (RemoveResponse -> RemoveResponse -> RemoveResponse)
-> Ord RemoveResponse
RemoveResponse -> RemoveResponse -> Bool
RemoveResponse -> RemoveResponse -> Ordering
RemoveResponse -> RemoveResponse -> RemoveResponse
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 :: RemoveResponse -> RemoveResponse -> RemoveResponse
$cmin :: RemoveResponse -> RemoveResponse -> RemoveResponse
max :: RemoveResponse -> RemoveResponse -> RemoveResponse
$cmax :: RemoveResponse -> RemoveResponse -> RemoveResponse
>= :: RemoveResponse -> RemoveResponse -> Bool
$c>= :: RemoveResponse -> RemoveResponse -> Bool
> :: RemoveResponse -> RemoveResponse -> Bool
$c> :: RemoveResponse -> RemoveResponse -> Bool
<= :: RemoveResponse -> RemoveResponse -> Bool
$c<= :: RemoveResponse -> RemoveResponse -> Bool
< :: RemoveResponse -> RemoveResponse -> Bool
$c< :: RemoveResponse -> RemoveResponse -> Bool
compare :: RemoveResponse -> RemoveResponse -> Ordering
$ccompare :: RemoveResponse -> RemoveResponse -> Ordering
$cp1Ord :: Eq RemoveResponse
Prelude.Ord)
instance Prelude.Show RemoveResponse where
  showsPrec :: Int -> RemoveResponse -> ShowS
showsPrec _ __x :: RemoveResponse
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (RemoveResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort RemoveResponse
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField RemoveResponse "value" Data.ByteString.ByteString where
  fieldOf :: Proxy# "value"
-> (ByteString -> f ByteString)
-> RemoveResponse
-> f RemoveResponse
fieldOf _
    = ((ByteString -> f ByteString)
 -> RemoveResponse -> f RemoveResponse)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> RemoveResponse
-> f RemoveResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((RemoveResponse -> ByteString)
-> (RemoveResponse -> ByteString -> RemoveResponse)
-> Lens RemoveResponse RemoveResponse ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           RemoveResponse -> ByteString
_RemoveResponse'value
           (\ x__ :: RemoveResponse
x__ y__ :: ByteString
y__ -> RemoveResponse
x__ {_RemoveResponse'value :: ByteString
_RemoveResponse'value = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField RemoveResponse "removed" Prelude.Bool where
  fieldOf :: Proxy# "removed"
-> (Bool -> f Bool) -> RemoveResponse -> f RemoveResponse
fieldOf _
    = ((Bool -> f Bool) -> RemoveResponse -> f RemoveResponse)
-> ((Bool -> f Bool) -> Bool -> f Bool)
-> (Bool -> f Bool)
-> RemoveResponse
-> f RemoveResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((RemoveResponse -> Bool)
-> (RemoveResponse -> Bool -> RemoveResponse)
-> Lens RemoveResponse RemoveResponse Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           RemoveResponse -> Bool
_RemoveResponse'removed
           (\ x__ :: RemoveResponse
x__ y__ :: Bool
y__ -> RemoveResponse
x__ {_RemoveResponse'removed :: Bool
_RemoveResponse'removed = Bool
y__}))
        (Bool -> f Bool) -> Bool -> f Bool
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message RemoveResponse where
  messageName :: Proxy RemoveResponse -> Text
messageName _ = String -> Text
Data.Text.pack "proto.RemoveResponse"
  fieldsByTag :: Map Tag (FieldDescriptor RemoveResponse)
fieldsByTag
    = let
        value__field_descriptor :: FieldDescriptor RemoveResponse
value__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor RemoveResponse ByteString
-> FieldDescriptor RemoveResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "value"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens RemoveResponse RemoveResponse ByteString ByteString
-> FieldAccessor RemoveResponse ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value")) ::
              Data.ProtoLens.FieldDescriptor RemoveResponse
        removed__field_descriptor :: FieldDescriptor RemoveResponse
removed__field_descriptor
          = String
-> FieldTypeDescriptor Bool
-> FieldAccessor RemoveResponse Bool
-> FieldDescriptor RemoveResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "removed"
              (ScalarField Bool -> FieldTypeDescriptor Bool
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Bool
Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (WireDefault Bool
-> Lens RemoveResponse RemoveResponse Bool Bool
-> FieldAccessor RemoveResponse Bool
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Bool
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "removed" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"removed")) ::
              Data.ProtoLens.FieldDescriptor RemoveResponse
      in
        [(Tag, FieldDescriptor RemoveResponse)]
-> Map Tag (FieldDescriptor RemoveResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor RemoveResponse
value__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor RemoveResponse
removed__field_descriptor)]
  unknownFields :: LensLike' f RemoveResponse FieldSet
unknownFields
    = (RemoveResponse -> FieldSet)
-> (RemoveResponse -> FieldSet -> RemoveResponse)
-> Lens' RemoveResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        RemoveResponse -> FieldSet
_RemoveResponse'_unknownFields
        (\ x__ :: RemoveResponse
x__ y__ :: FieldSet
y__ -> RemoveResponse
x__ {_RemoveResponse'_unknownFields :: FieldSet
_RemoveResponse'_unknownFields = FieldSet
y__})
  defMessage :: RemoveResponse
defMessage
    = $WRemoveResponse'_constructor :: ByteString -> Bool -> FieldSet -> RemoveResponse
RemoveResponse'_constructor
        {_RemoveResponse'value :: ByteString
_RemoveResponse'value = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _RemoveResponse'removed :: Bool
_RemoveResponse'removed = Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _RemoveResponse'_unknownFields :: FieldSet
_RemoveResponse'_unknownFields = []}
  parseMessage :: Parser RemoveResponse
parseMessage
    = let
        loop ::
          RemoveResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser RemoveResponse
        loop :: RemoveResponse -> Parser RemoveResponse
loop x :: RemoveResponse
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]))))
                      RemoveResponse -> Parser RemoveResponse
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter RemoveResponse RemoveResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RemoveResponse -> RemoveResponse
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 RemoveResponse RemoveResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) RemoveResponse
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))
                                       "value"
                                RemoveResponse -> Parser RemoveResponse
loop (Setter RemoveResponse RemoveResponse ByteString ByteString
-> ByteString -> RemoveResponse -> RemoveResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value") ByteString
y RemoveResponse
x)
                        16
                          -> do Bool
y <- Parser Bool -> String -> Parser Bool
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Word64 -> Bool) -> Parser Word64 -> Parser Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          (Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude./=) 0) Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "removed"
                                RemoveResponse -> Parser RemoveResponse
loop (Setter RemoveResponse RemoveResponse Bool Bool
-> Bool -> RemoveResponse -> RemoveResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "removed" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"removed") Bool
y RemoveResponse
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                RemoveResponse -> Parser RemoveResponse
loop
                                  (Setter RemoveResponse RemoveResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> RemoveResponse -> RemoveResponse
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 RemoveResponse RemoveResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) RemoveResponse
x)
      in
        Parser RemoveResponse -> String -> Parser RemoveResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do RemoveResponse -> Parser RemoveResponse
loop RemoveResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RemoveResponse"
  buildMessage :: RemoveResponse -> Builder
buildMessage
    = \ _x :: RemoveResponse
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: ByteString
_v = FoldLike
  ByteString RemoveResponse RemoveResponse ByteString ByteString
-> RemoveResponse -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value") RemoveResponse
_x
              in
                if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs :: ByteString
bs
                          -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                               (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         ByteString
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   _v :: Bool
_v = FoldLike Bool RemoveResponse RemoveResponse Bool Bool
-> RemoveResponse -> Bool
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "removed" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"removed") RemoveResponse
_x
                 in
                   if Bool -> Bool -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Bool
_v Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                       Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   else
                       Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         ((Word64 -> Builder) -> (Bool -> Word64) -> Bool -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                            Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                            (\ b :: Bool
b -> if Bool
b then 1 else 0)
                            Bool
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet RemoveResponse RemoveResponse FieldSet FieldSet
-> RemoveResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet RemoveResponse RemoveResponse FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields RemoveResponse
_x)))
instance Control.DeepSeq.NFData RemoveResponse where
  rnf :: RemoveResponse -> ()
rnf
    = \ x__ :: RemoveResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (RemoveResponse -> FieldSet
_RemoveResponse'_unknownFields RemoveResponse
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (RemoveResponse -> ByteString
_RemoveResponse'value RemoveResponse
x__)
                (Bool -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (RemoveResponse -> Bool
_RemoveResponse'removed RemoveResponse
x__) ()))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.rootHash' @:: Lens' SaveVersionResponse Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.version' @:: Lens' SaveVersionResponse Data.Int.Int64@ -}
data SaveVersionResponse
  = SaveVersionResponse'_constructor {SaveVersionResponse -> ByteString
_SaveVersionResponse'rootHash :: !Data.ByteString.ByteString,
                                      SaveVersionResponse -> Int64
_SaveVersionResponse'version :: !Data.Int.Int64,
                                      SaveVersionResponse -> FieldSet
_SaveVersionResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (SaveVersionResponse -> SaveVersionResponse -> Bool
(SaveVersionResponse -> SaveVersionResponse -> Bool)
-> (SaveVersionResponse -> SaveVersionResponse -> Bool)
-> Eq SaveVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SaveVersionResponse -> SaveVersionResponse -> Bool
$c/= :: SaveVersionResponse -> SaveVersionResponse -> Bool
== :: SaveVersionResponse -> SaveVersionResponse -> Bool
$c== :: SaveVersionResponse -> SaveVersionResponse -> Bool
Prelude.Eq, Eq SaveVersionResponse
Eq SaveVersionResponse =>
(SaveVersionResponse -> SaveVersionResponse -> Ordering)
-> (SaveVersionResponse -> SaveVersionResponse -> Bool)
-> (SaveVersionResponse -> SaveVersionResponse -> Bool)
-> (SaveVersionResponse -> SaveVersionResponse -> Bool)
-> (SaveVersionResponse -> SaveVersionResponse -> Bool)
-> (SaveVersionResponse
    -> SaveVersionResponse -> SaveVersionResponse)
-> (SaveVersionResponse
    -> SaveVersionResponse -> SaveVersionResponse)
-> Ord SaveVersionResponse
SaveVersionResponse -> SaveVersionResponse -> Bool
SaveVersionResponse -> SaveVersionResponse -> Ordering
SaveVersionResponse -> SaveVersionResponse -> SaveVersionResponse
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 :: SaveVersionResponse -> SaveVersionResponse -> SaveVersionResponse
$cmin :: SaveVersionResponse -> SaveVersionResponse -> SaveVersionResponse
max :: SaveVersionResponse -> SaveVersionResponse -> SaveVersionResponse
$cmax :: SaveVersionResponse -> SaveVersionResponse -> SaveVersionResponse
>= :: SaveVersionResponse -> SaveVersionResponse -> Bool
$c>= :: SaveVersionResponse -> SaveVersionResponse -> Bool
> :: SaveVersionResponse -> SaveVersionResponse -> Bool
$c> :: SaveVersionResponse -> SaveVersionResponse -> Bool
<= :: SaveVersionResponse -> SaveVersionResponse -> Bool
$c<= :: SaveVersionResponse -> SaveVersionResponse -> Bool
< :: SaveVersionResponse -> SaveVersionResponse -> Bool
$c< :: SaveVersionResponse -> SaveVersionResponse -> Bool
compare :: SaveVersionResponse -> SaveVersionResponse -> Ordering
$ccompare :: SaveVersionResponse -> SaveVersionResponse -> Ordering
$cp1Ord :: Eq SaveVersionResponse
Prelude.Ord)
instance Prelude.Show SaveVersionResponse where
  showsPrec :: Int -> SaveVersionResponse -> ShowS
showsPrec _ __x :: SaveVersionResponse
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (SaveVersionResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort SaveVersionResponse
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField SaveVersionResponse "rootHash" Data.ByteString.ByteString where
  fieldOf :: Proxy# "rootHash"
-> (ByteString -> f ByteString)
-> SaveVersionResponse
-> f SaveVersionResponse
fieldOf _
    = ((ByteString -> f ByteString)
 -> SaveVersionResponse -> f SaveVersionResponse)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> SaveVersionResponse
-> f SaveVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SaveVersionResponse -> ByteString)
-> (SaveVersionResponse -> ByteString -> SaveVersionResponse)
-> Lens
     SaveVersionResponse SaveVersionResponse ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SaveVersionResponse -> ByteString
_SaveVersionResponse'rootHash
           (\ x__ :: SaveVersionResponse
x__ y__ :: ByteString
y__ -> SaveVersionResponse
x__ {_SaveVersionResponse'rootHash :: ByteString
_SaveVersionResponse'rootHash = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SaveVersionResponse "version" Data.Int.Int64 where
  fieldOf :: Proxy# "version"
-> (Int64 -> f Int64)
-> SaveVersionResponse
-> f SaveVersionResponse
fieldOf _
    = ((Int64 -> f Int64)
 -> SaveVersionResponse -> f SaveVersionResponse)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> SaveVersionResponse
-> f SaveVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SaveVersionResponse -> Int64)
-> (SaveVersionResponse -> Int64 -> SaveVersionResponse)
-> Lens SaveVersionResponse SaveVersionResponse Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SaveVersionResponse -> Int64
_SaveVersionResponse'version
           (\ x__ :: SaveVersionResponse
x__ y__ :: Int64
y__ -> SaveVersionResponse
x__ {_SaveVersionResponse'version :: Int64
_SaveVersionResponse'version = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message SaveVersionResponse where
  messageName :: Proxy SaveVersionResponse -> Text
messageName _ = String -> Text
Data.Text.pack "proto.SaveVersionResponse"
  fieldsByTag :: Map Tag (FieldDescriptor SaveVersionResponse)
fieldsByTag
    = let
        rootHash__field_descriptor :: FieldDescriptor SaveVersionResponse
rootHash__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor SaveVersionResponse ByteString
-> FieldDescriptor SaveVersionResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "root_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
     SaveVersionResponse SaveVersionResponse ByteString ByteString
-> FieldAccessor SaveVersionResponse 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 "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash")) ::
              Data.ProtoLens.FieldDescriptor SaveVersionResponse
        version__field_descriptor :: FieldDescriptor SaveVersionResponse
version__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor SaveVersionResponse Int64
-> FieldDescriptor SaveVersionResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "version"
              (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 SaveVersionResponse SaveVersionResponse Int64 Int64
-> FieldAccessor SaveVersionResponse 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 "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version")) ::
              Data.ProtoLens.FieldDescriptor SaveVersionResponse
      in
        [(Tag, FieldDescriptor SaveVersionResponse)]
-> Map Tag (FieldDescriptor SaveVersionResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor SaveVersionResponse
rootHash__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor SaveVersionResponse
version__field_descriptor)]
  unknownFields :: LensLike' f SaveVersionResponse FieldSet
unknownFields
    = (SaveVersionResponse -> FieldSet)
-> (SaveVersionResponse -> FieldSet -> SaveVersionResponse)
-> Lens' SaveVersionResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        SaveVersionResponse -> FieldSet
_SaveVersionResponse'_unknownFields
        (\ x__ :: SaveVersionResponse
x__ y__ :: FieldSet
y__ -> SaveVersionResponse
x__ {_SaveVersionResponse'_unknownFields :: FieldSet
_SaveVersionResponse'_unknownFields = FieldSet
y__})
  defMessage :: SaveVersionResponse
defMessage
    = $WSaveVersionResponse'_constructor :: ByteString -> Int64 -> FieldSet -> SaveVersionResponse
SaveVersionResponse'_constructor
        {_SaveVersionResponse'rootHash :: ByteString
_SaveVersionResponse'rootHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SaveVersionResponse'version :: Int64
_SaveVersionResponse'version = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SaveVersionResponse'_unknownFields :: FieldSet
_SaveVersionResponse'_unknownFields = []}
  parseMessage :: Parser SaveVersionResponse
parseMessage
    = let
        loop ::
          SaveVersionResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser SaveVersionResponse
        loop :: SaveVersionResponse -> Parser SaveVersionResponse
loop x :: SaveVersionResponse
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]))))
                      SaveVersionResponse -> Parser SaveVersionResponse
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter SaveVersionResponse SaveVersionResponse FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> SaveVersionResponse
-> SaveVersionResponse
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 SaveVersionResponse SaveVersionResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) SaveVersionResponse
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))
                                       "root_hash"
                                SaveVersionResponse -> Parser SaveVersionResponse
loop
                                  (Setter
  SaveVersionResponse SaveVersionResponse ByteString ByteString
-> ByteString -> SaveVersionResponse -> SaveVersionResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") ByteString
y SaveVersionResponse
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)
                                       "version"
                                SaveVersionResponse -> Parser SaveVersionResponse
loop (Setter SaveVersionResponse SaveVersionResponse Int64 Int64
-> Int64 -> SaveVersionResponse -> SaveVersionResponse
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") Int64
y SaveVersionResponse
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                SaveVersionResponse -> Parser SaveVersionResponse
loop
                                  (Setter SaveVersionResponse SaveVersionResponse FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> SaveVersionResponse
-> SaveVersionResponse
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 SaveVersionResponse SaveVersionResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) SaveVersionResponse
x)
      in
        Parser SaveVersionResponse -> String -> Parser SaveVersionResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do SaveVersionResponse -> Parser SaveVersionResponse
loop SaveVersionResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "SaveVersionResponse"
  buildMessage :: SaveVersionResponse -> Builder
buildMessage
    = \ _x :: SaveVersionResponse
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: ByteString
_v = FoldLike
  ByteString
  SaveVersionResponse
  SaveVersionResponse
  ByteString
  ByteString
-> SaveVersionResponse -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") SaveVersionResponse
_x
              in
                if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs :: ByteString
bs
                          -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                               (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         ByteString
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   _v :: Int64
_v = FoldLike Int64 SaveVersionResponse SaveVersionResponse Int64 Int64
-> SaveVersionResponse -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version") SaveVersionResponse
_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 SaveVersionResponse SaveVersionResponse FieldSet FieldSet
-> SaveVersionResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet SaveVersionResponse SaveVersionResponse FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields SaveVersionResponse
_x)))
instance Control.DeepSeq.NFData SaveVersionResponse where
  rnf :: SaveVersionResponse -> ()
rnf
    = \ x__ :: SaveVersionResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (SaveVersionResponse -> FieldSet
_SaveVersionResponse'_unknownFields SaveVersionResponse
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (SaveVersionResponse -> ByteString
_SaveVersionResponse'rootHash SaveVersionResponse
x__)
                (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (SaveVersionResponse -> Int64
_SaveVersionResponse'version SaveVersionResponse
x__) ()))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.key' @:: Lens' SetRequest Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.value' @:: Lens' SetRequest Data.ByteString.ByteString@ -}
data SetRequest
  = SetRequest'_constructor {SetRequest -> ByteString
_SetRequest'key :: !Data.ByteString.ByteString,
                             SetRequest -> ByteString
_SetRequest'value :: !Data.ByteString.ByteString,
                             SetRequest -> FieldSet
_SetRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (SetRequest -> SetRequest -> Bool
(SetRequest -> SetRequest -> Bool)
-> (SetRequest -> SetRequest -> Bool) -> Eq SetRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetRequest -> SetRequest -> Bool
$c/= :: SetRequest -> SetRequest -> Bool
== :: SetRequest -> SetRequest -> Bool
$c== :: SetRequest -> SetRequest -> Bool
Prelude.Eq, Eq SetRequest
Eq SetRequest =>
(SetRequest -> SetRequest -> Ordering)
-> (SetRequest -> SetRequest -> Bool)
-> (SetRequest -> SetRequest -> Bool)
-> (SetRequest -> SetRequest -> Bool)
-> (SetRequest -> SetRequest -> Bool)
-> (SetRequest -> SetRequest -> SetRequest)
-> (SetRequest -> SetRequest -> SetRequest)
-> Ord SetRequest
SetRequest -> SetRequest -> Bool
SetRequest -> SetRequest -> Ordering
SetRequest -> SetRequest -> SetRequest
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 :: SetRequest -> SetRequest -> SetRequest
$cmin :: SetRequest -> SetRequest -> SetRequest
max :: SetRequest -> SetRequest -> SetRequest
$cmax :: SetRequest -> SetRequest -> SetRequest
>= :: SetRequest -> SetRequest -> Bool
$c>= :: SetRequest -> SetRequest -> Bool
> :: SetRequest -> SetRequest -> Bool
$c> :: SetRequest -> SetRequest -> Bool
<= :: SetRequest -> SetRequest -> Bool
$c<= :: SetRequest -> SetRequest -> Bool
< :: SetRequest -> SetRequest -> Bool
$c< :: SetRequest -> SetRequest -> Bool
compare :: SetRequest -> SetRequest -> Ordering
$ccompare :: SetRequest -> SetRequest -> Ordering
$cp1Ord :: Eq SetRequest
Prelude.Ord)
instance Prelude.Show SetRequest where
  showsPrec :: Int -> SetRequest -> ShowS
showsPrec _ __x :: SetRequest
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (SetRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort SetRequest
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField SetRequest "key" Data.ByteString.ByteString where
  fieldOf :: Proxy# "key"
-> (ByteString -> f ByteString) -> SetRequest -> f SetRequest
fieldOf _
    = ((ByteString -> f ByteString) -> SetRequest -> f SetRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> SetRequest
-> f SetRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SetRequest -> ByteString)
-> (SetRequest -> ByteString -> SetRequest)
-> Lens SetRequest SetRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SetRequest -> ByteString
_SetRequest'key (\ x__ :: SetRequest
x__ y__ :: ByteString
y__ -> SetRequest
x__ {_SetRequest'key :: ByteString
_SetRequest'key = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SetRequest "value" Data.ByteString.ByteString where
  fieldOf :: Proxy# "value"
-> (ByteString -> f ByteString) -> SetRequest -> f SetRequest
fieldOf _
    = ((ByteString -> f ByteString) -> SetRequest -> f SetRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> SetRequest
-> f SetRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SetRequest -> ByteString)
-> (SetRequest -> ByteString -> SetRequest)
-> Lens SetRequest SetRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SetRequest -> ByteString
_SetRequest'value (\ x__ :: SetRequest
x__ y__ :: ByteString
y__ -> SetRequest
x__ {_SetRequest'value :: ByteString
_SetRequest'value = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message SetRequest where
  messageName :: Proxy SetRequest -> Text
messageName _ = String -> Text
Data.Text.pack "proto.SetRequest"
  fieldsByTag :: Map Tag (FieldDescriptor SetRequest)
fieldsByTag
    = let
        key__field_descriptor :: FieldDescriptor SetRequest
key__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor SetRequest ByteString
-> FieldDescriptor SetRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "key"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens SetRequest SetRequest ByteString ByteString
-> FieldAccessor SetRequest ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor SetRequest
        value__field_descriptor :: FieldDescriptor SetRequest
value__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor SetRequest ByteString
-> FieldDescriptor SetRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "value"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens SetRequest SetRequest ByteString ByteString
-> FieldAccessor SetRequest ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value")) ::
              Data.ProtoLens.FieldDescriptor SetRequest
      in
        [(Tag, FieldDescriptor SetRequest)]
-> Map Tag (FieldDescriptor SetRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor SetRequest
key__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor SetRequest
value__field_descriptor)]
  unknownFields :: LensLike' f SetRequest FieldSet
unknownFields
    = (SetRequest -> FieldSet)
-> (SetRequest -> FieldSet -> SetRequest)
-> Lens' SetRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        SetRequest -> FieldSet
_SetRequest'_unknownFields
        (\ x__ :: SetRequest
x__ y__ :: FieldSet
y__ -> SetRequest
x__ {_SetRequest'_unknownFields :: FieldSet
_SetRequest'_unknownFields = FieldSet
y__})
  defMessage :: SetRequest
defMessage
    = $WSetRequest'_constructor :: ByteString -> ByteString -> FieldSet -> SetRequest
SetRequest'_constructor
        {_SetRequest'key :: ByteString
_SetRequest'key = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SetRequest'value :: ByteString
_SetRequest'value = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SetRequest'_unknownFields :: FieldSet
_SetRequest'_unknownFields = []}
  parseMessage :: Parser SetRequest
parseMessage
    = let
        loop ::
          SetRequest -> Data.ProtoLens.Encoding.Bytes.Parser SetRequest
        loop :: SetRequest -> Parser SetRequest
loop x :: SetRequest
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]))))
                      SetRequest -> Parser SetRequest
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter SetRequest SetRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SetRequest -> SetRequest
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 SetRequest SetRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) SetRequest
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))
                                       "key"
                                SetRequest -> Parser SetRequest
loop (Setter SetRequest SetRequest ByteString ByteString
-> ByteString -> SetRequest -> SetRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") ByteString
y SetRequest
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))
                                       "value"
                                SetRequest -> Parser SetRequest
loop (Setter SetRequest SetRequest ByteString ByteString
-> ByteString -> SetRequest -> SetRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value") ByteString
y SetRequest
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                SetRequest -> Parser SetRequest
loop
                                  (Setter SetRequest SetRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SetRequest -> SetRequest
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 SetRequest SetRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) SetRequest
x)
      in
        Parser SetRequest -> String -> Parser SetRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do SetRequest -> Parser SetRequest
loop SetRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "SetRequest"
  buildMessage :: SetRequest -> Builder
buildMessage
    = \ _x :: SetRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: ByteString
_v = FoldLike ByteString SetRequest SetRequest ByteString ByteString
-> SetRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") SetRequest
_x
              in
                if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs :: ByteString
bs
                          -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                               (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         ByteString
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   _v :: ByteString
_v = FoldLike ByteString SetRequest SetRequest ByteString ByteString
-> SetRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value") SetRequest
_x
                 in
                   if ByteString -> ByteString -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) ByteString
_v ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                       Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   else
                       Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs :: ByteString
bs
                             -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                  (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                  (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                            ByteString
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet SetRequest SetRequest FieldSet FieldSet
-> SetRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet SetRequest SetRequest FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields SetRequest
_x)))
instance Control.DeepSeq.NFData SetRequest where
  rnf :: SetRequest -> ()
rnf
    = \ x__ :: SetRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (SetRequest -> FieldSet
_SetRequest'_unknownFields SetRequest
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (SetRequest -> ByteString
_SetRequest'key SetRequest
x__)
                (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (SetRequest -> ByteString
_SetRequest'value SetRequest
x__) ()))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.result' @:: Lens' SetResponse Prelude.Bool@ -}
data SetResponse
  = SetResponse'_constructor {SetResponse -> Bool
_SetResponse'result :: !Prelude.Bool,
                              SetResponse -> FieldSet
_SetResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (SetResponse -> SetResponse -> Bool
(SetResponse -> SetResponse -> Bool)
-> (SetResponse -> SetResponse -> Bool) -> Eq SetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetResponse -> SetResponse -> Bool
$c/= :: SetResponse -> SetResponse -> Bool
== :: SetResponse -> SetResponse -> Bool
$c== :: SetResponse -> SetResponse -> Bool
Prelude.Eq, Eq SetResponse
Eq SetResponse =>
(SetResponse -> SetResponse -> Ordering)
-> (SetResponse -> SetResponse -> Bool)
-> (SetResponse -> SetResponse -> Bool)
-> (SetResponse -> SetResponse -> Bool)
-> (SetResponse -> SetResponse -> Bool)
-> (SetResponse -> SetResponse -> SetResponse)
-> (SetResponse -> SetResponse -> SetResponse)
-> Ord SetResponse
SetResponse -> SetResponse -> Bool
SetResponse -> SetResponse -> Ordering
SetResponse -> SetResponse -> SetResponse
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 :: SetResponse -> SetResponse -> SetResponse
$cmin :: SetResponse -> SetResponse -> SetResponse
max :: SetResponse -> SetResponse -> SetResponse
$cmax :: SetResponse -> SetResponse -> SetResponse
>= :: SetResponse -> SetResponse -> Bool
$c>= :: SetResponse -> SetResponse -> Bool
> :: SetResponse -> SetResponse -> Bool
$c> :: SetResponse -> SetResponse -> Bool
<= :: SetResponse -> SetResponse -> Bool
$c<= :: SetResponse -> SetResponse -> Bool
< :: SetResponse -> SetResponse -> Bool
$c< :: SetResponse -> SetResponse -> Bool
compare :: SetResponse -> SetResponse -> Ordering
$ccompare :: SetResponse -> SetResponse -> Ordering
$cp1Ord :: Eq SetResponse
Prelude.Ord)
instance Prelude.Show SetResponse where
  showsPrec :: Int -> SetResponse -> ShowS
showsPrec _ __x :: SetResponse
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (SetResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort SetResponse
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField SetResponse "result" Prelude.Bool where
  fieldOf :: Proxy# "result" -> (Bool -> f Bool) -> SetResponse -> f SetResponse
fieldOf _
    = ((Bool -> f Bool) -> SetResponse -> f SetResponse)
-> ((Bool -> f Bool) -> Bool -> f Bool)
-> (Bool -> f Bool)
-> SetResponse
-> f SetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SetResponse -> Bool)
-> (SetResponse -> Bool -> SetResponse)
-> Lens SetResponse SetResponse Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SetResponse -> Bool
_SetResponse'result (\ x__ :: SetResponse
x__ y__ :: Bool
y__ -> SetResponse
x__ {_SetResponse'result :: Bool
_SetResponse'result = Bool
y__}))
        (Bool -> f Bool) -> Bool -> f Bool
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message SetResponse where
  messageName :: Proxy SetResponse -> Text
messageName _ = String -> Text
Data.Text.pack "proto.SetResponse"
  fieldsByTag :: Map Tag (FieldDescriptor SetResponse)
fieldsByTag
    = let
        result__field_descriptor :: FieldDescriptor SetResponse
result__field_descriptor
          = String
-> FieldTypeDescriptor Bool
-> FieldAccessor SetResponse Bool
-> FieldDescriptor SetResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "result"
              (ScalarField Bool -> FieldTypeDescriptor Bool
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Bool
Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (WireDefault Bool
-> Lens SetResponse SetResponse Bool Bool
-> FieldAccessor SetResponse Bool
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Bool
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "result" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"result")) ::
              Data.ProtoLens.FieldDescriptor SetResponse
      in
        [(Tag, FieldDescriptor SetResponse)]
-> Map Tag (FieldDescriptor SetResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor SetResponse
result__field_descriptor)]
  unknownFields :: LensLike' f SetResponse FieldSet
unknownFields
    = (SetResponse -> FieldSet)
-> (SetResponse -> FieldSet -> SetResponse)
-> Lens' SetResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        SetResponse -> FieldSet
_SetResponse'_unknownFields
        (\ x__ :: SetResponse
x__ y__ :: FieldSet
y__ -> SetResponse
x__ {_SetResponse'_unknownFields :: FieldSet
_SetResponse'_unknownFields = FieldSet
y__})
  defMessage :: SetResponse
defMessage
    = $WSetResponse'_constructor :: Bool -> FieldSet -> SetResponse
SetResponse'_constructor
        {_SetResponse'result :: Bool
_SetResponse'result = Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SetResponse'_unknownFields :: FieldSet
_SetResponse'_unknownFields = []}
  parseMessage :: Parser SetResponse
parseMessage
    = let
        loop ::
          SetResponse -> Data.ProtoLens.Encoding.Bytes.Parser SetResponse
        loop :: SetResponse -> Parser SetResponse
loop x :: SetResponse
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]))))
                      SetResponse -> Parser SetResponse
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter SetResponse SetResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SetResponse -> SetResponse
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 SetResponse SetResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) SetResponse
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        8 -> do Bool
y <- Parser Bool -> String -> Parser Bool
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Word64 -> Bool) -> Parser Word64 -> Parser Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          (Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude./=) 0) Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "result"
                                SetResponse -> Parser SetResponse
loop (Setter SetResponse SetResponse Bool Bool
-> Bool -> SetResponse -> SetResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "result" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"result") Bool
y SetResponse
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                SetResponse -> Parser SetResponse
loop
                                  (Setter SetResponse SetResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SetResponse -> SetResponse
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 SetResponse SetResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) SetResponse
x)
      in
        Parser SetResponse -> String -> Parser SetResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do SetResponse -> Parser SetResponse
loop SetResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "SetResponse"
  buildMessage :: SetResponse -> Builder
buildMessage
    = \ _x :: SetResponse
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Bool
_v = FoldLike Bool SetResponse SetResponse Bool Bool
-> SetResponse -> Bool
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "result" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"result") SetResponse
_x
              in
                if Bool -> Bool -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Bool
_v Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Word64 -> Builder) -> (Bool -> Word64) -> Bool -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                         Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                         (\ b :: Bool
b -> if Bool
b then 1 else 0)
                         Bool
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet SetResponse SetResponse FieldSet FieldSet
-> SetResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet SetResponse SetResponse FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields SetResponse
_x))
instance Control.DeepSeq.NFData SetResponse where
  rnf :: SetResponse -> ()
rnf
    = \ x__ :: SetResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (SetResponse -> FieldSet
_SetResponse'_unknownFields SetResponse
x__)
             (Bool -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (SetResponse -> Bool
_SetResponse'result SetResponse
x__) ())
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.rootHash' @:: Lens' VerifyAbsenceRequest Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.proof' @:: Lens' VerifyAbsenceRequest RangeProof@
         * 'Proto.Iavl.Api_Fields.maybe'proof' @:: Lens' VerifyAbsenceRequest (Prelude.Maybe RangeProof)@
         * 'Proto.Iavl.Api_Fields.key' @:: Lens' VerifyAbsenceRequest Data.ByteString.ByteString@ -}
data VerifyAbsenceRequest
  = VerifyAbsenceRequest'_constructor {VerifyAbsenceRequest -> ByteString
_VerifyAbsenceRequest'rootHash :: !Data.ByteString.ByteString,
                                       VerifyAbsenceRequest -> Maybe RangeProof
_VerifyAbsenceRequest'proof :: !(Prelude.Maybe RangeProof),
                                       VerifyAbsenceRequest -> ByteString
_VerifyAbsenceRequest'key :: !Data.ByteString.ByteString,
                                       VerifyAbsenceRequest -> FieldSet
_VerifyAbsenceRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
(VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool)
-> (VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool)
-> Eq VerifyAbsenceRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
$c/= :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
== :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
$c== :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
Prelude.Eq, Eq VerifyAbsenceRequest
Eq VerifyAbsenceRequest =>
(VerifyAbsenceRequest -> VerifyAbsenceRequest -> Ordering)
-> (VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool)
-> (VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool)
-> (VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool)
-> (VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool)
-> (VerifyAbsenceRequest
    -> VerifyAbsenceRequest -> VerifyAbsenceRequest)
-> (VerifyAbsenceRequest
    -> VerifyAbsenceRequest -> VerifyAbsenceRequest)
-> Ord VerifyAbsenceRequest
VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
VerifyAbsenceRequest -> VerifyAbsenceRequest -> Ordering
VerifyAbsenceRequest
-> VerifyAbsenceRequest -> VerifyAbsenceRequest
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 :: VerifyAbsenceRequest
-> VerifyAbsenceRequest -> VerifyAbsenceRequest
$cmin :: VerifyAbsenceRequest
-> VerifyAbsenceRequest -> VerifyAbsenceRequest
max :: VerifyAbsenceRequest
-> VerifyAbsenceRequest -> VerifyAbsenceRequest
$cmax :: VerifyAbsenceRequest
-> VerifyAbsenceRequest -> VerifyAbsenceRequest
>= :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
$c>= :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
> :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
$c> :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
<= :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
$c<= :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
< :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
$c< :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Bool
compare :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Ordering
$ccompare :: VerifyAbsenceRequest -> VerifyAbsenceRequest -> Ordering
$cp1Ord :: Eq VerifyAbsenceRequest
Prelude.Ord)
instance Prelude.Show VerifyAbsenceRequest where
  showsPrec :: Int -> VerifyAbsenceRequest -> ShowS
showsPrec _ __x :: VerifyAbsenceRequest
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (VerifyAbsenceRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort VerifyAbsenceRequest
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField VerifyAbsenceRequest "rootHash" Data.ByteString.ByteString where
  fieldOf :: Proxy# "rootHash"
-> (ByteString -> f ByteString)
-> VerifyAbsenceRequest
-> f VerifyAbsenceRequest
fieldOf _
    = ((ByteString -> f ByteString)
 -> VerifyAbsenceRequest -> f VerifyAbsenceRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> VerifyAbsenceRequest
-> f VerifyAbsenceRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyAbsenceRequest -> ByteString)
-> (VerifyAbsenceRequest -> ByteString -> VerifyAbsenceRequest)
-> Lens
     VerifyAbsenceRequest VerifyAbsenceRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyAbsenceRequest -> ByteString
_VerifyAbsenceRequest'rootHash
           (\ x__ :: VerifyAbsenceRequest
x__ y__ :: ByteString
y__ -> VerifyAbsenceRequest
x__ {_VerifyAbsenceRequest'rootHash :: ByteString
_VerifyAbsenceRequest'rootHash = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField VerifyAbsenceRequest "proof" RangeProof where
  fieldOf :: Proxy# "proof"
-> (RangeProof -> f RangeProof)
-> VerifyAbsenceRequest
-> f VerifyAbsenceRequest
fieldOf _
    = ((Maybe RangeProof -> f (Maybe RangeProof))
 -> VerifyAbsenceRequest -> f VerifyAbsenceRequest)
-> ((RangeProof -> f RangeProof)
    -> Maybe RangeProof -> f (Maybe RangeProof))
-> (RangeProof -> f RangeProof)
-> VerifyAbsenceRequest
-> f VerifyAbsenceRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyAbsenceRequest -> Maybe RangeProof)
-> (VerifyAbsenceRequest
    -> Maybe RangeProof -> VerifyAbsenceRequest)
-> Lens
     VerifyAbsenceRequest
     VerifyAbsenceRequest
     (Maybe RangeProof)
     (Maybe RangeProof)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyAbsenceRequest -> Maybe RangeProof
_VerifyAbsenceRequest'proof
           (\ x__ :: VerifyAbsenceRequest
x__ y__ :: Maybe RangeProof
y__ -> VerifyAbsenceRequest
x__ {_VerifyAbsenceRequest'proof :: Maybe RangeProof
_VerifyAbsenceRequest'proof = Maybe RangeProof
y__}))
        (RangeProof -> Lens' (Maybe RangeProof) RangeProof
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RangeProof
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField VerifyAbsenceRequest "maybe'proof" (Prelude.Maybe RangeProof) where
  fieldOf :: Proxy# "maybe'proof"
-> (Maybe RangeProof -> f (Maybe RangeProof))
-> VerifyAbsenceRequest
-> f VerifyAbsenceRequest
fieldOf _
    = ((Maybe RangeProof -> f (Maybe RangeProof))
 -> VerifyAbsenceRequest -> f VerifyAbsenceRequest)
-> ((Maybe RangeProof -> f (Maybe RangeProof))
    -> Maybe RangeProof -> f (Maybe RangeProof))
-> (Maybe RangeProof -> f (Maybe RangeProof))
-> VerifyAbsenceRequest
-> f VerifyAbsenceRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyAbsenceRequest -> Maybe RangeProof)
-> (VerifyAbsenceRequest
    -> Maybe RangeProof -> VerifyAbsenceRequest)
-> Lens
     VerifyAbsenceRequest
     VerifyAbsenceRequest
     (Maybe RangeProof)
     (Maybe RangeProof)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyAbsenceRequest -> Maybe RangeProof
_VerifyAbsenceRequest'proof
           (\ x__ :: VerifyAbsenceRequest
x__ y__ :: Maybe RangeProof
y__ -> VerifyAbsenceRequest
x__ {_VerifyAbsenceRequest'proof :: Maybe RangeProof
_VerifyAbsenceRequest'proof = Maybe RangeProof
y__}))
        (Maybe RangeProof -> f (Maybe RangeProof))
-> Maybe RangeProof -> f (Maybe RangeProof)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField VerifyAbsenceRequest "key" Data.ByteString.ByteString where
  fieldOf :: Proxy# "key"
-> (ByteString -> f ByteString)
-> VerifyAbsenceRequest
-> f VerifyAbsenceRequest
fieldOf _
    = ((ByteString -> f ByteString)
 -> VerifyAbsenceRequest -> f VerifyAbsenceRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> VerifyAbsenceRequest
-> f VerifyAbsenceRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyAbsenceRequest -> ByteString)
-> (VerifyAbsenceRequest -> ByteString -> VerifyAbsenceRequest)
-> Lens
     VerifyAbsenceRequest VerifyAbsenceRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyAbsenceRequest -> ByteString
_VerifyAbsenceRequest'key
           (\ x__ :: VerifyAbsenceRequest
x__ y__ :: ByteString
y__ -> VerifyAbsenceRequest
x__ {_VerifyAbsenceRequest'key :: ByteString
_VerifyAbsenceRequest'key = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message VerifyAbsenceRequest where
  messageName :: Proxy VerifyAbsenceRequest -> Text
messageName _ = String -> Text
Data.Text.pack "proto.VerifyAbsenceRequest"
  fieldsByTag :: Map Tag (FieldDescriptor VerifyAbsenceRequest)
fieldsByTag
    = let
        rootHash__field_descriptor :: FieldDescriptor VerifyAbsenceRequest
rootHash__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor VerifyAbsenceRequest ByteString
-> FieldDescriptor VerifyAbsenceRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "root_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
     VerifyAbsenceRequest VerifyAbsenceRequest ByteString ByteString
-> FieldAccessor VerifyAbsenceRequest 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 "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash")) ::
              Data.ProtoLens.FieldDescriptor VerifyAbsenceRequest
        proof__field_descriptor :: FieldDescriptor VerifyAbsenceRequest
proof__field_descriptor
          = String
-> FieldTypeDescriptor RangeProof
-> FieldAccessor VerifyAbsenceRequest RangeProof
-> FieldDescriptor VerifyAbsenceRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "proof"
              (MessageOrGroup -> FieldTypeDescriptor RangeProof
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor RangeProof)
              (Lens
  VerifyAbsenceRequest
  VerifyAbsenceRequest
  (Maybe RangeProof)
  (Maybe RangeProof)
-> FieldAccessor VerifyAbsenceRequest RangeProof
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall s a (f :: * -> *).
(HasField s "maybe'proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'proof")) ::
              Data.ProtoLens.FieldDescriptor VerifyAbsenceRequest
        key__field_descriptor :: FieldDescriptor VerifyAbsenceRequest
key__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor VerifyAbsenceRequest ByteString
-> FieldDescriptor VerifyAbsenceRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "key"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens
     VerifyAbsenceRequest VerifyAbsenceRequest ByteString ByteString
-> FieldAccessor VerifyAbsenceRequest ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor VerifyAbsenceRequest
      in
        [(Tag, FieldDescriptor VerifyAbsenceRequest)]
-> Map Tag (FieldDescriptor VerifyAbsenceRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor VerifyAbsenceRequest
rootHash__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor VerifyAbsenceRequest
proof__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor VerifyAbsenceRequest
key__field_descriptor)]
  unknownFields :: LensLike' f VerifyAbsenceRequest FieldSet
unknownFields
    = (VerifyAbsenceRequest -> FieldSet)
-> (VerifyAbsenceRequest -> FieldSet -> VerifyAbsenceRequest)
-> Lens' VerifyAbsenceRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        VerifyAbsenceRequest -> FieldSet
_VerifyAbsenceRequest'_unknownFields
        (\ x__ :: VerifyAbsenceRequest
x__ y__ :: FieldSet
y__ -> VerifyAbsenceRequest
x__ {_VerifyAbsenceRequest'_unknownFields :: FieldSet
_VerifyAbsenceRequest'_unknownFields = FieldSet
y__})
  defMessage :: VerifyAbsenceRequest
defMessage
    = $WVerifyAbsenceRequest'_constructor :: ByteString
-> Maybe RangeProof
-> ByteString
-> FieldSet
-> VerifyAbsenceRequest
VerifyAbsenceRequest'_constructor
        {_VerifyAbsenceRequest'rootHash :: ByteString
_VerifyAbsenceRequest'rootHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _VerifyAbsenceRequest'proof :: Maybe RangeProof
_VerifyAbsenceRequest'proof = Maybe RangeProof
forall a. Maybe a
Prelude.Nothing,
         _VerifyAbsenceRequest'key :: ByteString
_VerifyAbsenceRequest'key = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _VerifyAbsenceRequest'_unknownFields :: FieldSet
_VerifyAbsenceRequest'_unknownFields = []}
  parseMessage :: Parser VerifyAbsenceRequest
parseMessage
    = let
        loop ::
          VerifyAbsenceRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser VerifyAbsenceRequest
        loop :: VerifyAbsenceRequest -> Parser VerifyAbsenceRequest
loop x :: VerifyAbsenceRequest
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]))))
                      VerifyAbsenceRequest -> Parser VerifyAbsenceRequest
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter VerifyAbsenceRequest VerifyAbsenceRequest FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> VerifyAbsenceRequest
-> VerifyAbsenceRequest
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 VerifyAbsenceRequest VerifyAbsenceRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) VerifyAbsenceRequest
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))
                                       "root_hash"
                                VerifyAbsenceRequest -> Parser VerifyAbsenceRequest
loop
                                  (Setter
  VerifyAbsenceRequest VerifyAbsenceRequest ByteString ByteString
-> ByteString -> VerifyAbsenceRequest -> VerifyAbsenceRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") ByteString
y VerifyAbsenceRequest
x)
                        18
                          -> do RangeProof
y <- Parser RangeProof -> String -> Parser RangeProof
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser RangeProof -> Parser RangeProof
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 RangeProof
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "proof"
                                VerifyAbsenceRequest -> Parser VerifyAbsenceRequest
loop (Setter
  VerifyAbsenceRequest VerifyAbsenceRequest RangeProof RangeProof
-> RangeProof -> VerifyAbsenceRequest -> VerifyAbsenceRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"proof") RangeProof
y VerifyAbsenceRequest
x)
                        26
                          -> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len))
                                       "key"
                                VerifyAbsenceRequest -> Parser VerifyAbsenceRequest
loop (Setter
  VerifyAbsenceRequest VerifyAbsenceRequest ByteString ByteString
-> ByteString -> VerifyAbsenceRequest -> VerifyAbsenceRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") ByteString
y VerifyAbsenceRequest
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                VerifyAbsenceRequest -> Parser VerifyAbsenceRequest
loop
                                  (Setter VerifyAbsenceRequest VerifyAbsenceRequest FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> VerifyAbsenceRequest
-> VerifyAbsenceRequest
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 VerifyAbsenceRequest VerifyAbsenceRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) VerifyAbsenceRequest
x)
      in
        Parser VerifyAbsenceRequest
-> String -> Parser VerifyAbsenceRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do VerifyAbsenceRequest -> Parser VerifyAbsenceRequest
loop VerifyAbsenceRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "VerifyAbsenceRequest"
  buildMessage :: VerifyAbsenceRequest -> Builder
buildMessage
    = \ _x :: VerifyAbsenceRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: ByteString
_v = FoldLike
  ByteString
  VerifyAbsenceRequest
  VerifyAbsenceRequest
  ByteString
  ByteString
-> VerifyAbsenceRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") VerifyAbsenceRequest
_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 RangeProof)
  VerifyAbsenceRequest
  VerifyAbsenceRequest
  (Maybe RangeProof)
  (Maybe RangeProof)
-> VerifyAbsenceRequest -> Maybe RangeProof
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'proof") VerifyAbsenceRequest
_x
                 of
                   Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   (Prelude.Just _v :: RangeProof
_v)
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((ByteString -> Builder)
-> (RangeProof -> ByteString) -> RangeProof -> 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))
                             RangeProof -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                             RangeProof
_v))
                (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                   (let _v :: ByteString
_v = FoldLike
  ByteString
  VerifyAbsenceRequest
  VerifyAbsenceRequest
  ByteString
  ByteString
-> VerifyAbsenceRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") VerifyAbsenceRequest
_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 26)
                            ((\ 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
  VerifyAbsenceRequest
  VerifyAbsenceRequest
  FieldSet
  FieldSet
-> VerifyAbsenceRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  VerifyAbsenceRequest
  VerifyAbsenceRequest
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields VerifyAbsenceRequest
_x))))
instance Control.DeepSeq.NFData VerifyAbsenceRequest where
  rnf :: VerifyAbsenceRequest -> ()
rnf
    = \ x__ :: VerifyAbsenceRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (VerifyAbsenceRequest -> FieldSet
_VerifyAbsenceRequest'_unknownFields VerifyAbsenceRequest
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (VerifyAbsenceRequest -> ByteString
_VerifyAbsenceRequest'rootHash VerifyAbsenceRequest
x__)
                (Maybe RangeProof -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (VerifyAbsenceRequest -> Maybe RangeProof
_VerifyAbsenceRequest'proof VerifyAbsenceRequest
x__)
                   (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (VerifyAbsenceRequest -> ByteString
_VerifyAbsenceRequest'key VerifyAbsenceRequest
x__) ())))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.rootHash' @:: Lens' VerifyItemRequest Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.proof' @:: Lens' VerifyItemRequest RangeProof@
         * 'Proto.Iavl.Api_Fields.maybe'proof' @:: Lens' VerifyItemRequest (Prelude.Maybe RangeProof)@
         * 'Proto.Iavl.Api_Fields.key' @:: Lens' VerifyItemRequest Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.value' @:: Lens' VerifyItemRequest Data.ByteString.ByteString@ -}
data VerifyItemRequest
  = VerifyItemRequest'_constructor {VerifyItemRequest -> ByteString
_VerifyItemRequest'rootHash :: !Data.ByteString.ByteString,
                                    VerifyItemRequest -> Maybe RangeProof
_VerifyItemRequest'proof :: !(Prelude.Maybe RangeProof),
                                    VerifyItemRequest -> ByteString
_VerifyItemRequest'key :: !Data.ByteString.ByteString,
                                    VerifyItemRequest -> ByteString
_VerifyItemRequest'value :: !Data.ByteString.ByteString,
                                    VerifyItemRequest -> FieldSet
_VerifyItemRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (VerifyItemRequest -> VerifyItemRequest -> Bool
(VerifyItemRequest -> VerifyItemRequest -> Bool)
-> (VerifyItemRequest -> VerifyItemRequest -> Bool)
-> Eq VerifyItemRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VerifyItemRequest -> VerifyItemRequest -> Bool
$c/= :: VerifyItemRequest -> VerifyItemRequest -> Bool
== :: VerifyItemRequest -> VerifyItemRequest -> Bool
$c== :: VerifyItemRequest -> VerifyItemRequest -> Bool
Prelude.Eq, Eq VerifyItemRequest
Eq VerifyItemRequest =>
(VerifyItemRequest -> VerifyItemRequest -> Ordering)
-> (VerifyItemRequest -> VerifyItemRequest -> Bool)
-> (VerifyItemRequest -> VerifyItemRequest -> Bool)
-> (VerifyItemRequest -> VerifyItemRequest -> Bool)
-> (VerifyItemRequest -> VerifyItemRequest -> Bool)
-> (VerifyItemRequest -> VerifyItemRequest -> VerifyItemRequest)
-> (VerifyItemRequest -> VerifyItemRequest -> VerifyItemRequest)
-> Ord VerifyItemRequest
VerifyItemRequest -> VerifyItemRequest -> Bool
VerifyItemRequest -> VerifyItemRequest -> Ordering
VerifyItemRequest -> VerifyItemRequest -> VerifyItemRequest
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 :: VerifyItemRequest -> VerifyItemRequest -> VerifyItemRequest
$cmin :: VerifyItemRequest -> VerifyItemRequest -> VerifyItemRequest
max :: VerifyItemRequest -> VerifyItemRequest -> VerifyItemRequest
$cmax :: VerifyItemRequest -> VerifyItemRequest -> VerifyItemRequest
>= :: VerifyItemRequest -> VerifyItemRequest -> Bool
$c>= :: VerifyItemRequest -> VerifyItemRequest -> Bool
> :: VerifyItemRequest -> VerifyItemRequest -> Bool
$c> :: VerifyItemRequest -> VerifyItemRequest -> Bool
<= :: VerifyItemRequest -> VerifyItemRequest -> Bool
$c<= :: VerifyItemRequest -> VerifyItemRequest -> Bool
< :: VerifyItemRequest -> VerifyItemRequest -> Bool
$c< :: VerifyItemRequest -> VerifyItemRequest -> Bool
compare :: VerifyItemRequest -> VerifyItemRequest -> Ordering
$ccompare :: VerifyItemRequest -> VerifyItemRequest -> Ordering
$cp1Ord :: Eq VerifyItemRequest
Prelude.Ord)
instance Prelude.Show VerifyItemRequest where
  showsPrec :: Int -> VerifyItemRequest -> ShowS
showsPrec _ __x :: VerifyItemRequest
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (VerifyItemRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort VerifyItemRequest
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField VerifyItemRequest "rootHash" Data.ByteString.ByteString where
  fieldOf :: Proxy# "rootHash"
-> (ByteString -> f ByteString)
-> VerifyItemRequest
-> f VerifyItemRequest
fieldOf _
    = ((ByteString -> f ByteString)
 -> VerifyItemRequest -> f VerifyItemRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> VerifyItemRequest
-> f VerifyItemRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyItemRequest -> ByteString)
-> (VerifyItemRequest -> ByteString -> VerifyItemRequest)
-> Lens VerifyItemRequest VerifyItemRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyItemRequest -> ByteString
_VerifyItemRequest'rootHash
           (\ x__ :: VerifyItemRequest
x__ y__ :: ByteString
y__ -> VerifyItemRequest
x__ {_VerifyItemRequest'rootHash :: ByteString
_VerifyItemRequest'rootHash = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField VerifyItemRequest "proof" RangeProof where
  fieldOf :: Proxy# "proof"
-> (RangeProof -> f RangeProof)
-> VerifyItemRequest
-> f VerifyItemRequest
fieldOf _
    = ((Maybe RangeProof -> f (Maybe RangeProof))
 -> VerifyItemRequest -> f VerifyItemRequest)
-> ((RangeProof -> f RangeProof)
    -> Maybe RangeProof -> f (Maybe RangeProof))
-> (RangeProof -> f RangeProof)
-> VerifyItemRequest
-> f VerifyItemRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyItemRequest -> Maybe RangeProof)
-> (VerifyItemRequest -> Maybe RangeProof -> VerifyItemRequest)
-> Lens
     VerifyItemRequest
     VerifyItemRequest
     (Maybe RangeProof)
     (Maybe RangeProof)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyItemRequest -> Maybe RangeProof
_VerifyItemRequest'proof
           (\ x__ :: VerifyItemRequest
x__ y__ :: Maybe RangeProof
y__ -> VerifyItemRequest
x__ {_VerifyItemRequest'proof :: Maybe RangeProof
_VerifyItemRequest'proof = Maybe RangeProof
y__}))
        (RangeProof -> Lens' (Maybe RangeProof) RangeProof
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RangeProof
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField VerifyItemRequest "maybe'proof" (Prelude.Maybe RangeProof) where
  fieldOf :: Proxy# "maybe'proof"
-> (Maybe RangeProof -> f (Maybe RangeProof))
-> VerifyItemRequest
-> f VerifyItemRequest
fieldOf _
    = ((Maybe RangeProof -> f (Maybe RangeProof))
 -> VerifyItemRequest -> f VerifyItemRequest)
-> ((Maybe RangeProof -> f (Maybe RangeProof))
    -> Maybe RangeProof -> f (Maybe RangeProof))
-> (Maybe RangeProof -> f (Maybe RangeProof))
-> VerifyItemRequest
-> f VerifyItemRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyItemRequest -> Maybe RangeProof)
-> (VerifyItemRequest -> Maybe RangeProof -> VerifyItemRequest)
-> Lens
     VerifyItemRequest
     VerifyItemRequest
     (Maybe RangeProof)
     (Maybe RangeProof)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyItemRequest -> Maybe RangeProof
_VerifyItemRequest'proof
           (\ x__ :: VerifyItemRequest
x__ y__ :: Maybe RangeProof
y__ -> VerifyItemRequest
x__ {_VerifyItemRequest'proof :: Maybe RangeProof
_VerifyItemRequest'proof = Maybe RangeProof
y__}))
        (Maybe RangeProof -> f (Maybe RangeProof))
-> Maybe RangeProof -> f (Maybe RangeProof)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField VerifyItemRequest "key" Data.ByteString.ByteString where
  fieldOf :: Proxy# "key"
-> (ByteString -> f ByteString)
-> VerifyItemRequest
-> f VerifyItemRequest
fieldOf _
    = ((ByteString -> f ByteString)
 -> VerifyItemRequest -> f VerifyItemRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> VerifyItemRequest
-> f VerifyItemRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyItemRequest -> ByteString)
-> (VerifyItemRequest -> ByteString -> VerifyItemRequest)
-> Lens VerifyItemRequest VerifyItemRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyItemRequest -> ByteString
_VerifyItemRequest'key
           (\ x__ :: VerifyItemRequest
x__ y__ :: ByteString
y__ -> VerifyItemRequest
x__ {_VerifyItemRequest'key :: ByteString
_VerifyItemRequest'key = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField VerifyItemRequest "value" Data.ByteString.ByteString where
  fieldOf :: Proxy# "value"
-> (ByteString -> f ByteString)
-> VerifyItemRequest
-> f VerifyItemRequest
fieldOf _
    = ((ByteString -> f ByteString)
 -> VerifyItemRequest -> f VerifyItemRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> VerifyItemRequest
-> f VerifyItemRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyItemRequest -> ByteString)
-> (VerifyItemRequest -> ByteString -> VerifyItemRequest)
-> Lens VerifyItemRequest VerifyItemRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyItemRequest -> ByteString
_VerifyItemRequest'value
           (\ x__ :: VerifyItemRequest
x__ y__ :: ByteString
y__ -> VerifyItemRequest
x__ {_VerifyItemRequest'value :: ByteString
_VerifyItemRequest'value = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message VerifyItemRequest where
  messageName :: Proxy VerifyItemRequest -> Text
messageName _ = String -> Text
Data.Text.pack "proto.VerifyItemRequest"
  fieldsByTag :: Map Tag (FieldDescriptor VerifyItemRequest)
fieldsByTag
    = let
        rootHash__field_descriptor :: FieldDescriptor VerifyItemRequest
rootHash__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor VerifyItemRequest ByteString
-> FieldDescriptor VerifyItemRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "root_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 VerifyItemRequest VerifyItemRequest ByteString ByteString
-> FieldAccessor VerifyItemRequest 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 "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash")) ::
              Data.ProtoLens.FieldDescriptor VerifyItemRequest
        proof__field_descriptor :: FieldDescriptor VerifyItemRequest
proof__field_descriptor
          = String
-> FieldTypeDescriptor RangeProof
-> FieldAccessor VerifyItemRequest RangeProof
-> FieldDescriptor VerifyItemRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "proof"
              (MessageOrGroup -> FieldTypeDescriptor RangeProof
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor RangeProof)
              (Lens
  VerifyItemRequest
  VerifyItemRequest
  (Maybe RangeProof)
  (Maybe RangeProof)
-> FieldAccessor VerifyItemRequest RangeProof
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall s a (f :: * -> *).
(HasField s "maybe'proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'proof")) ::
              Data.ProtoLens.FieldDescriptor VerifyItemRequest
        key__field_descriptor :: FieldDescriptor VerifyItemRequest
key__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor VerifyItemRequest ByteString
-> FieldDescriptor VerifyItemRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "key"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens VerifyItemRequest VerifyItemRequest ByteString ByteString
-> FieldAccessor VerifyItemRequest ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor VerifyItemRequest
        value__field_descriptor :: FieldDescriptor VerifyItemRequest
value__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor VerifyItemRequest ByteString
-> FieldDescriptor VerifyItemRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "value"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (WireDefault ByteString
-> Lens VerifyItemRequest VerifyItemRequest ByteString ByteString
-> FieldAccessor VerifyItemRequest ByteString
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault ByteString
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value")) ::
              Data.ProtoLens.FieldDescriptor VerifyItemRequest
      in
        [(Tag, FieldDescriptor VerifyItemRequest)]
-> Map Tag (FieldDescriptor VerifyItemRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor VerifyItemRequest
rootHash__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor VerifyItemRequest
proof__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor VerifyItemRequest
key__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor VerifyItemRequest
value__field_descriptor)]
  unknownFields :: LensLike' f VerifyItemRequest FieldSet
unknownFields
    = (VerifyItemRequest -> FieldSet)
-> (VerifyItemRequest -> FieldSet -> VerifyItemRequest)
-> Lens' VerifyItemRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        VerifyItemRequest -> FieldSet
_VerifyItemRequest'_unknownFields
        (\ x__ :: VerifyItemRequest
x__ y__ :: FieldSet
y__ -> VerifyItemRequest
x__ {_VerifyItemRequest'_unknownFields :: FieldSet
_VerifyItemRequest'_unknownFields = FieldSet
y__})
  defMessage :: VerifyItemRequest
defMessage
    = $WVerifyItemRequest'_constructor :: ByteString
-> Maybe RangeProof
-> ByteString
-> ByteString
-> FieldSet
-> VerifyItemRequest
VerifyItemRequest'_constructor
        {_VerifyItemRequest'rootHash :: ByteString
_VerifyItemRequest'rootHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _VerifyItemRequest'proof :: Maybe RangeProof
_VerifyItemRequest'proof = Maybe RangeProof
forall a. Maybe a
Prelude.Nothing,
         _VerifyItemRequest'key :: ByteString
_VerifyItemRequest'key = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _VerifyItemRequest'value :: ByteString
_VerifyItemRequest'value = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _VerifyItemRequest'_unknownFields :: FieldSet
_VerifyItemRequest'_unknownFields = []}
  parseMessage :: Parser VerifyItemRequest
parseMessage
    = let
        loop ::
          VerifyItemRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser VerifyItemRequest
        loop :: VerifyItemRequest -> Parser VerifyItemRequest
loop x :: VerifyItemRequest
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]))))
                      VerifyItemRequest -> Parser VerifyItemRequest
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter VerifyItemRequest VerifyItemRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> VerifyItemRequest -> VerifyItemRequest
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 VerifyItemRequest VerifyItemRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) VerifyItemRequest
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))
                                       "root_hash"
                                VerifyItemRequest -> Parser VerifyItemRequest
loop
                                  (Setter VerifyItemRequest VerifyItemRequest ByteString ByteString
-> ByteString -> VerifyItemRequest -> VerifyItemRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") ByteString
y VerifyItemRequest
x)
                        18
                          -> do RangeProof
y <- Parser RangeProof -> String -> Parser RangeProof
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser RangeProof -> Parser RangeProof
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 RangeProof
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "proof"
                                VerifyItemRequest -> Parser VerifyItemRequest
loop (Setter VerifyItemRequest VerifyItemRequest RangeProof RangeProof
-> RangeProof -> VerifyItemRequest -> VerifyItemRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"proof") RangeProof
y VerifyItemRequest
x)
                        26
                          -> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len))
                                       "key"
                                VerifyItemRequest -> Parser VerifyItemRequest
loop (Setter VerifyItemRequest VerifyItemRequest ByteString ByteString
-> ByteString -> VerifyItemRequest -> VerifyItemRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") ByteString
y VerifyItemRequest
x)
                        34
                          -> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len))
                                       "value"
                                VerifyItemRequest -> Parser VerifyItemRequest
loop (Setter VerifyItemRequest VerifyItemRequest ByteString ByteString
-> ByteString -> VerifyItemRequest -> VerifyItemRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value") ByteString
y VerifyItemRequest
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                VerifyItemRequest -> Parser VerifyItemRequest
loop
                                  (Setter VerifyItemRequest VerifyItemRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> VerifyItemRequest -> VerifyItemRequest
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 VerifyItemRequest VerifyItemRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) VerifyItemRequest
x)
      in
        Parser VerifyItemRequest -> String -> Parser VerifyItemRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do VerifyItemRequest -> Parser VerifyItemRequest
loop VerifyItemRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "VerifyItemRequest"
  buildMessage :: VerifyItemRequest -> Builder
buildMessage
    = \ _x :: VerifyItemRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: ByteString
_v = FoldLike
  ByteString
  VerifyItemRequest
  VerifyItemRequest
  ByteString
  ByteString
-> VerifyItemRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") VerifyItemRequest
_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 RangeProof)
  VerifyItemRequest
  VerifyItemRequest
  (Maybe RangeProof)
  (Maybe RangeProof)
-> VerifyItemRequest -> Maybe RangeProof
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'proof") VerifyItemRequest
_x
                 of
                   Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   (Prelude.Just _v :: RangeProof
_v)
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((ByteString -> Builder)
-> (RangeProof -> ByteString) -> RangeProof -> 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))
                             RangeProof -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                             RangeProof
_v))
                (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                   (let _v :: ByteString
_v = FoldLike
  ByteString
  VerifyItemRequest
  VerifyItemRequest
  ByteString
  ByteString
-> VerifyItemRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"key") VerifyItemRequest
_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 26)
                            ((\ 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
  VerifyItemRequest
  VerifyItemRequest
  ByteString
  ByteString
-> VerifyItemRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"value") VerifyItemRequest
_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 34)
                               ((\ 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 VerifyItemRequest VerifyItemRequest FieldSet FieldSet
-> VerifyItemRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet VerifyItemRequest VerifyItemRequest FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields VerifyItemRequest
_x)))))
instance Control.DeepSeq.NFData VerifyItemRequest where
  rnf :: VerifyItemRequest -> ()
rnf
    = \ x__ :: VerifyItemRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (VerifyItemRequest -> FieldSet
_VerifyItemRequest'_unknownFields VerifyItemRequest
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (VerifyItemRequest -> ByteString
_VerifyItemRequest'rootHash VerifyItemRequest
x__)
                (Maybe RangeProof -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (VerifyItemRequest -> Maybe RangeProof
_VerifyItemRequest'proof VerifyItemRequest
x__)
                   (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                      (VerifyItemRequest -> ByteString
_VerifyItemRequest'key VerifyItemRequest
x__)
                      (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (VerifyItemRequest -> ByteString
_VerifyItemRequest'value VerifyItemRequest
x__) ()))))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.rootHash' @:: Lens' VerifyRequest Data.ByteString.ByteString@
         * 'Proto.Iavl.Api_Fields.proof' @:: Lens' VerifyRequest RangeProof@
         * 'Proto.Iavl.Api_Fields.maybe'proof' @:: Lens' VerifyRequest (Prelude.Maybe RangeProof)@ -}
data VerifyRequest
  = VerifyRequest'_constructor {VerifyRequest -> ByteString
_VerifyRequest'rootHash :: !Data.ByteString.ByteString,
                                VerifyRequest -> Maybe RangeProof
_VerifyRequest'proof :: !(Prelude.Maybe RangeProof),
                                VerifyRequest -> FieldSet
_VerifyRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (VerifyRequest -> VerifyRequest -> Bool
(VerifyRequest -> VerifyRequest -> Bool)
-> (VerifyRequest -> VerifyRequest -> Bool) -> Eq VerifyRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VerifyRequest -> VerifyRequest -> Bool
$c/= :: VerifyRequest -> VerifyRequest -> Bool
== :: VerifyRequest -> VerifyRequest -> Bool
$c== :: VerifyRequest -> VerifyRequest -> Bool
Prelude.Eq, Eq VerifyRequest
Eq VerifyRequest =>
(VerifyRequest -> VerifyRequest -> Ordering)
-> (VerifyRequest -> VerifyRequest -> Bool)
-> (VerifyRequest -> VerifyRequest -> Bool)
-> (VerifyRequest -> VerifyRequest -> Bool)
-> (VerifyRequest -> VerifyRequest -> Bool)
-> (VerifyRequest -> VerifyRequest -> VerifyRequest)
-> (VerifyRequest -> VerifyRequest -> VerifyRequest)
-> Ord VerifyRequest
VerifyRequest -> VerifyRequest -> Bool
VerifyRequest -> VerifyRequest -> Ordering
VerifyRequest -> VerifyRequest -> VerifyRequest
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 :: VerifyRequest -> VerifyRequest -> VerifyRequest
$cmin :: VerifyRequest -> VerifyRequest -> VerifyRequest
max :: VerifyRequest -> VerifyRequest -> VerifyRequest
$cmax :: VerifyRequest -> VerifyRequest -> VerifyRequest
>= :: VerifyRequest -> VerifyRequest -> Bool
$c>= :: VerifyRequest -> VerifyRequest -> Bool
> :: VerifyRequest -> VerifyRequest -> Bool
$c> :: VerifyRequest -> VerifyRequest -> Bool
<= :: VerifyRequest -> VerifyRequest -> Bool
$c<= :: VerifyRequest -> VerifyRequest -> Bool
< :: VerifyRequest -> VerifyRequest -> Bool
$c< :: VerifyRequest -> VerifyRequest -> Bool
compare :: VerifyRequest -> VerifyRequest -> Ordering
$ccompare :: VerifyRequest -> VerifyRequest -> Ordering
$cp1Ord :: Eq VerifyRequest
Prelude.Ord)
instance Prelude.Show VerifyRequest where
  showsPrec :: Int -> VerifyRequest -> ShowS
showsPrec _ __x :: VerifyRequest
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (VerifyRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort VerifyRequest
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField VerifyRequest "rootHash" Data.ByteString.ByteString where
  fieldOf :: Proxy# "rootHash"
-> (ByteString -> f ByteString) -> VerifyRequest -> f VerifyRequest
fieldOf _
    = ((ByteString -> f ByteString) -> VerifyRequest -> f VerifyRequest)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> VerifyRequest
-> f VerifyRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyRequest -> ByteString)
-> (VerifyRequest -> ByteString -> VerifyRequest)
-> Lens VerifyRequest VerifyRequest ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyRequest -> ByteString
_VerifyRequest'rootHash
           (\ x__ :: VerifyRequest
x__ y__ :: ByteString
y__ -> VerifyRequest
x__ {_VerifyRequest'rootHash :: ByteString
_VerifyRequest'rootHash = ByteString
y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField VerifyRequest "proof" RangeProof where
  fieldOf :: Proxy# "proof"
-> (RangeProof -> f RangeProof) -> VerifyRequest -> f VerifyRequest
fieldOf _
    = ((Maybe RangeProof -> f (Maybe RangeProof))
 -> VerifyRequest -> f VerifyRequest)
-> ((RangeProof -> f RangeProof)
    -> Maybe RangeProof -> f (Maybe RangeProof))
-> (RangeProof -> f RangeProof)
-> VerifyRequest
-> f VerifyRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyRequest -> Maybe RangeProof)
-> (VerifyRequest -> Maybe RangeProof -> VerifyRequest)
-> Lens
     VerifyRequest VerifyRequest (Maybe RangeProof) (Maybe RangeProof)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyRequest -> Maybe RangeProof
_VerifyRequest'proof
           (\ x__ :: VerifyRequest
x__ y__ :: Maybe RangeProof
y__ -> VerifyRequest
x__ {_VerifyRequest'proof :: Maybe RangeProof
_VerifyRequest'proof = Maybe RangeProof
y__}))
        (RangeProof -> Lens' (Maybe RangeProof) RangeProof
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens RangeProof
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField VerifyRequest "maybe'proof" (Prelude.Maybe RangeProof) where
  fieldOf :: Proxy# "maybe'proof"
-> (Maybe RangeProof -> f (Maybe RangeProof))
-> VerifyRequest
-> f VerifyRequest
fieldOf _
    = ((Maybe RangeProof -> f (Maybe RangeProof))
 -> VerifyRequest -> f VerifyRequest)
-> ((Maybe RangeProof -> f (Maybe RangeProof))
    -> Maybe RangeProof -> f (Maybe RangeProof))
-> (Maybe RangeProof -> f (Maybe RangeProof))
-> VerifyRequest
-> f VerifyRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VerifyRequest -> Maybe RangeProof)
-> (VerifyRequest -> Maybe RangeProof -> VerifyRequest)
-> Lens
     VerifyRequest VerifyRequest (Maybe RangeProof) (Maybe RangeProof)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VerifyRequest -> Maybe RangeProof
_VerifyRequest'proof
           (\ x__ :: VerifyRequest
x__ y__ :: Maybe RangeProof
y__ -> VerifyRequest
x__ {_VerifyRequest'proof :: Maybe RangeProof
_VerifyRequest'proof = Maybe RangeProof
y__}))
        (Maybe RangeProof -> f (Maybe RangeProof))
-> Maybe RangeProof -> f (Maybe RangeProof)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message VerifyRequest where
  messageName :: Proxy VerifyRequest -> Text
messageName _ = String -> Text
Data.Text.pack "proto.VerifyRequest"
  fieldsByTag :: Map Tag (FieldDescriptor VerifyRequest)
fieldsByTag
    = let
        rootHash__field_descriptor :: FieldDescriptor VerifyRequest
rootHash__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor VerifyRequest ByteString
-> FieldDescriptor VerifyRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "root_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 VerifyRequest VerifyRequest ByteString ByteString
-> FieldAccessor VerifyRequest 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 "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash")) ::
              Data.ProtoLens.FieldDescriptor VerifyRequest
        proof__field_descriptor :: FieldDescriptor VerifyRequest
proof__field_descriptor
          = String
-> FieldTypeDescriptor RangeProof
-> FieldAccessor VerifyRequest RangeProof
-> FieldDescriptor VerifyRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "proof"
              (MessageOrGroup -> FieldTypeDescriptor RangeProof
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor RangeProof)
              (Lens
  VerifyRequest VerifyRequest (Maybe RangeProof) (Maybe RangeProof)
-> FieldAccessor VerifyRequest RangeProof
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall s a (f :: * -> *).
(HasField s "maybe'proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'proof")) ::
              Data.ProtoLens.FieldDescriptor VerifyRequest
      in
        [(Tag, FieldDescriptor VerifyRequest)]
-> Map Tag (FieldDescriptor VerifyRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor VerifyRequest
rootHash__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor VerifyRequest
proof__field_descriptor)]
  unknownFields :: LensLike' f VerifyRequest FieldSet
unknownFields
    = (VerifyRequest -> FieldSet)
-> (VerifyRequest -> FieldSet -> VerifyRequest)
-> Lens' VerifyRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        VerifyRequest -> FieldSet
_VerifyRequest'_unknownFields
        (\ x__ :: VerifyRequest
x__ y__ :: FieldSet
y__ -> VerifyRequest
x__ {_VerifyRequest'_unknownFields :: FieldSet
_VerifyRequest'_unknownFields = FieldSet
y__})
  defMessage :: VerifyRequest
defMessage
    = $WVerifyRequest'_constructor :: ByteString -> Maybe RangeProof -> FieldSet -> VerifyRequest
VerifyRequest'_constructor
        {_VerifyRequest'rootHash :: ByteString
_VerifyRequest'rootHash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _VerifyRequest'proof :: Maybe RangeProof
_VerifyRequest'proof = Maybe RangeProof
forall a. Maybe a
Prelude.Nothing,
         _VerifyRequest'_unknownFields :: FieldSet
_VerifyRequest'_unknownFields = []}
  parseMessage :: Parser VerifyRequest
parseMessage
    = let
        loop ::
          VerifyRequest -> Data.ProtoLens.Encoding.Bytes.Parser VerifyRequest
        loop :: VerifyRequest -> Parser VerifyRequest
loop x :: VerifyRequest
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]))))
                      VerifyRequest -> Parser VerifyRequest
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter VerifyRequest VerifyRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> VerifyRequest -> VerifyRequest
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 VerifyRequest VerifyRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) VerifyRequest
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))
                                       "root_hash"
                                VerifyRequest -> Parser VerifyRequest
loop
                                  (Setter VerifyRequest VerifyRequest ByteString ByteString
-> ByteString -> VerifyRequest -> VerifyRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") ByteString
y VerifyRequest
x)
                        18
                          -> do RangeProof
y <- Parser RangeProof -> String -> Parser RangeProof
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser RangeProof -> Parser RangeProof
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 RangeProof
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "proof"
                                VerifyRequest -> Parser VerifyRequest
loop (Setter VerifyRequest VerifyRequest RangeProof RangeProof
-> RangeProof -> VerifyRequest -> VerifyRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"proof") RangeProof
y VerifyRequest
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                VerifyRequest -> Parser VerifyRequest
loop
                                  (Setter VerifyRequest VerifyRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> VerifyRequest -> VerifyRequest
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 VerifyRequest VerifyRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) VerifyRequest
x)
      in
        Parser VerifyRequest -> String -> Parser VerifyRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do VerifyRequest -> Parser VerifyRequest
loop VerifyRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "VerifyRequest"
  buildMessage :: VerifyRequest -> Builder
buildMessage
    = \ _x :: VerifyRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: ByteString
_v = FoldLike
  ByteString VerifyRequest VerifyRequest ByteString ByteString
-> VerifyRequest -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "rootHash" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"rootHash") VerifyRequest
_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 RangeProof)
  VerifyRequest
  VerifyRequest
  (Maybe RangeProof)
  (Maybe RangeProof)
-> VerifyRequest -> Maybe RangeProof
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'proof" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'proof") VerifyRequest
_x
                 of
                   Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   (Prelude.Just _v :: RangeProof
_v)
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((ByteString -> Builder)
-> (RangeProof -> ByteString) -> RangeProof -> 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))
                             RangeProof -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                             RangeProof
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet VerifyRequest VerifyRequest FieldSet FieldSet
-> VerifyRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet VerifyRequest VerifyRequest FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields VerifyRequest
_x)))
instance Control.DeepSeq.NFData VerifyRequest where
  rnf :: VerifyRequest -> ()
rnf
    = \ x__ :: VerifyRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (VerifyRequest -> FieldSet
_VerifyRequest'_unknownFields VerifyRequest
x__)
             (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (VerifyRequest -> ByteString
_VerifyRequest'rootHash VerifyRequest
x__)
                (Maybe RangeProof -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (VerifyRequest -> Maybe RangeProof
_VerifyRequest'proof VerifyRequest
x__) ()))
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.version' @:: Lens' VersionExistsRequest Data.Int.Int64@ -}
data VersionExistsRequest
  = VersionExistsRequest'_constructor {VersionExistsRequest -> Int64
_VersionExistsRequest'version :: !Data.Int.Int64,
                                       VersionExistsRequest -> FieldSet
_VersionExistsRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (VersionExistsRequest -> VersionExistsRequest -> Bool
(VersionExistsRequest -> VersionExistsRequest -> Bool)
-> (VersionExistsRequest -> VersionExistsRequest -> Bool)
-> Eq VersionExistsRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VersionExistsRequest -> VersionExistsRequest -> Bool
$c/= :: VersionExistsRequest -> VersionExistsRequest -> Bool
== :: VersionExistsRequest -> VersionExistsRequest -> Bool
$c== :: VersionExistsRequest -> VersionExistsRequest -> Bool
Prelude.Eq, Eq VersionExistsRequest
Eq VersionExistsRequest =>
(VersionExistsRequest -> VersionExistsRequest -> Ordering)
-> (VersionExistsRequest -> VersionExistsRequest -> Bool)
-> (VersionExistsRequest -> VersionExistsRequest -> Bool)
-> (VersionExistsRequest -> VersionExistsRequest -> Bool)
-> (VersionExistsRequest -> VersionExistsRequest -> Bool)
-> (VersionExistsRequest
    -> VersionExistsRequest -> VersionExistsRequest)
-> (VersionExistsRequest
    -> VersionExistsRequest -> VersionExistsRequest)
-> Ord VersionExistsRequest
VersionExistsRequest -> VersionExistsRequest -> Bool
VersionExistsRequest -> VersionExistsRequest -> Ordering
VersionExistsRequest
-> VersionExistsRequest -> VersionExistsRequest
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 :: VersionExistsRequest
-> VersionExistsRequest -> VersionExistsRequest
$cmin :: VersionExistsRequest
-> VersionExistsRequest -> VersionExistsRequest
max :: VersionExistsRequest
-> VersionExistsRequest -> VersionExistsRequest
$cmax :: VersionExistsRequest
-> VersionExistsRequest -> VersionExistsRequest
>= :: VersionExistsRequest -> VersionExistsRequest -> Bool
$c>= :: VersionExistsRequest -> VersionExistsRequest -> Bool
> :: VersionExistsRequest -> VersionExistsRequest -> Bool
$c> :: VersionExistsRequest -> VersionExistsRequest -> Bool
<= :: VersionExistsRequest -> VersionExistsRequest -> Bool
$c<= :: VersionExistsRequest -> VersionExistsRequest -> Bool
< :: VersionExistsRequest -> VersionExistsRequest -> Bool
$c< :: VersionExistsRequest -> VersionExistsRequest -> Bool
compare :: VersionExistsRequest -> VersionExistsRequest -> Ordering
$ccompare :: VersionExistsRequest -> VersionExistsRequest -> Ordering
$cp1Ord :: Eq VersionExistsRequest
Prelude.Ord)
instance Prelude.Show VersionExistsRequest where
  showsPrec :: Int -> VersionExistsRequest -> ShowS
showsPrec _ __x :: VersionExistsRequest
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (VersionExistsRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort VersionExistsRequest
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField VersionExistsRequest "version" Data.Int.Int64 where
  fieldOf :: Proxy# "version"
-> (Int64 -> f Int64)
-> VersionExistsRequest
-> f VersionExistsRequest
fieldOf _
    = ((Int64 -> f Int64)
 -> VersionExistsRequest -> f VersionExistsRequest)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> VersionExistsRequest
-> f VersionExistsRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VersionExistsRequest -> Int64)
-> (VersionExistsRequest -> Int64 -> VersionExistsRequest)
-> Lens VersionExistsRequest VersionExistsRequest Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VersionExistsRequest -> Int64
_VersionExistsRequest'version
           (\ x__ :: VersionExistsRequest
x__ y__ :: Int64
y__ -> VersionExistsRequest
x__ {_VersionExistsRequest'version :: Int64
_VersionExistsRequest'version = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message VersionExistsRequest where
  messageName :: Proxy VersionExistsRequest -> Text
messageName _ = String -> Text
Data.Text.pack "proto.VersionExistsRequest"
  fieldsByTag :: Map Tag (FieldDescriptor VersionExistsRequest)
fieldsByTag
    = let
        version__field_descriptor :: FieldDescriptor VersionExistsRequest
version__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor VersionExistsRequest Int64
-> FieldDescriptor VersionExistsRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "version"
              (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 VersionExistsRequest VersionExistsRequest Int64 Int64
-> FieldAccessor VersionExistsRequest 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 "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version")) ::
              Data.ProtoLens.FieldDescriptor VersionExistsRequest
      in
        [(Tag, FieldDescriptor VersionExistsRequest)]
-> Map Tag (FieldDescriptor VersionExistsRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor VersionExistsRequest
version__field_descriptor)]
  unknownFields :: LensLike' f VersionExistsRequest FieldSet
unknownFields
    = (VersionExistsRequest -> FieldSet)
-> (VersionExistsRequest -> FieldSet -> VersionExistsRequest)
-> Lens' VersionExistsRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        VersionExistsRequest -> FieldSet
_VersionExistsRequest'_unknownFields
        (\ x__ :: VersionExistsRequest
x__ y__ :: FieldSet
y__ -> VersionExistsRequest
x__ {_VersionExistsRequest'_unknownFields :: FieldSet
_VersionExistsRequest'_unknownFields = FieldSet
y__})
  defMessage :: VersionExistsRequest
defMessage
    = $WVersionExistsRequest'_constructor :: Int64 -> FieldSet -> VersionExistsRequest
VersionExistsRequest'_constructor
        {_VersionExistsRequest'version :: Int64
_VersionExistsRequest'version = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _VersionExistsRequest'_unknownFields :: FieldSet
_VersionExistsRequest'_unknownFields = []}
  parseMessage :: Parser VersionExistsRequest
parseMessage
    = let
        loop ::
          VersionExistsRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser VersionExistsRequest
        loop :: VersionExistsRequest -> Parser VersionExistsRequest
loop x :: VersionExistsRequest
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]))))
                      VersionExistsRequest -> Parser VersionExistsRequest
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter VersionExistsRequest VersionExistsRequest FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> VersionExistsRequest
-> VersionExistsRequest
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 VersionExistsRequest VersionExistsRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) VersionExistsRequest
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)
                                       "version"
                                VersionExistsRequest -> Parser VersionExistsRequest
loop (Setter VersionExistsRequest VersionExistsRequest Int64 Int64
-> Int64 -> VersionExistsRequest -> VersionExistsRequest
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") Int64
y VersionExistsRequest
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                VersionExistsRequest -> Parser VersionExistsRequest
loop
                                  (Setter VersionExistsRequest VersionExistsRequest FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> VersionExistsRequest
-> VersionExistsRequest
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 VersionExistsRequest VersionExistsRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) VersionExistsRequest
x)
      in
        Parser VersionExistsRequest
-> String -> Parser VersionExistsRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do VersionExistsRequest -> Parser VersionExistsRequest
loop VersionExistsRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "VersionExistsRequest"
  buildMessage :: VersionExistsRequest -> Builder
buildMessage
    = \ _x :: VersionExistsRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Int64
_v = FoldLike
  Int64 VersionExistsRequest VersionExistsRequest Int64 Int64
-> VersionExistsRequest -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version") VersionExistsRequest
_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
  VersionExistsRequest
  VersionExistsRequest
  FieldSet
  FieldSet
-> VersionExistsRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  VersionExistsRequest
  VersionExistsRequest
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields VersionExistsRequest
_x))
instance Control.DeepSeq.NFData VersionExistsRequest where
  rnf :: VersionExistsRequest -> ()
rnf
    = \ x__ :: VersionExistsRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (VersionExistsRequest -> FieldSet
_VersionExistsRequest'_unknownFields VersionExistsRequest
x__)
             (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (VersionExistsRequest -> Int64
_VersionExistsRequest'version VersionExistsRequest
x__) ())
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.result' @:: Lens' VersionExistsResponse Prelude.Bool@ -}
data VersionExistsResponse
  = VersionExistsResponse'_constructor {VersionExistsResponse -> Bool
_VersionExistsResponse'result :: !Prelude.Bool,
                                        VersionExistsResponse -> FieldSet
_VersionExistsResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (VersionExistsResponse -> VersionExistsResponse -> Bool
(VersionExistsResponse -> VersionExistsResponse -> Bool)
-> (VersionExistsResponse -> VersionExistsResponse -> Bool)
-> Eq VersionExistsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VersionExistsResponse -> VersionExistsResponse -> Bool
$c/= :: VersionExistsResponse -> VersionExistsResponse -> Bool
== :: VersionExistsResponse -> VersionExistsResponse -> Bool
$c== :: VersionExistsResponse -> VersionExistsResponse -> Bool
Prelude.Eq, Eq VersionExistsResponse
Eq VersionExistsResponse =>
(VersionExistsResponse -> VersionExistsResponse -> Ordering)
-> (VersionExistsResponse -> VersionExistsResponse -> Bool)
-> (VersionExistsResponse -> VersionExistsResponse -> Bool)
-> (VersionExistsResponse -> VersionExistsResponse -> Bool)
-> (VersionExistsResponse -> VersionExistsResponse -> Bool)
-> (VersionExistsResponse
    -> VersionExistsResponse -> VersionExistsResponse)
-> (VersionExistsResponse
    -> VersionExistsResponse -> VersionExistsResponse)
-> Ord VersionExistsResponse
VersionExistsResponse -> VersionExistsResponse -> Bool
VersionExistsResponse -> VersionExistsResponse -> Ordering
VersionExistsResponse
-> VersionExistsResponse -> VersionExistsResponse
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 :: VersionExistsResponse
-> VersionExistsResponse -> VersionExistsResponse
$cmin :: VersionExistsResponse
-> VersionExistsResponse -> VersionExistsResponse
max :: VersionExistsResponse
-> VersionExistsResponse -> VersionExistsResponse
$cmax :: VersionExistsResponse
-> VersionExistsResponse -> VersionExistsResponse
>= :: VersionExistsResponse -> VersionExistsResponse -> Bool
$c>= :: VersionExistsResponse -> VersionExistsResponse -> Bool
> :: VersionExistsResponse -> VersionExistsResponse -> Bool
$c> :: VersionExistsResponse -> VersionExistsResponse -> Bool
<= :: VersionExistsResponse -> VersionExistsResponse -> Bool
$c<= :: VersionExistsResponse -> VersionExistsResponse -> Bool
< :: VersionExistsResponse -> VersionExistsResponse -> Bool
$c< :: VersionExistsResponse -> VersionExistsResponse -> Bool
compare :: VersionExistsResponse -> VersionExistsResponse -> Ordering
$ccompare :: VersionExistsResponse -> VersionExistsResponse -> Ordering
$cp1Ord :: Eq VersionExistsResponse
Prelude.Ord)
instance Prelude.Show VersionExistsResponse where
  showsPrec :: Int -> VersionExistsResponse -> ShowS
showsPrec _ __x :: VersionExistsResponse
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (VersionExistsResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort VersionExistsResponse
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField VersionExistsResponse "result" Prelude.Bool where
  fieldOf :: Proxy# "result"
-> (Bool -> f Bool)
-> VersionExistsResponse
-> f VersionExistsResponse
fieldOf _
    = ((Bool -> f Bool)
 -> VersionExistsResponse -> f VersionExistsResponse)
-> ((Bool -> f Bool) -> Bool -> f Bool)
-> (Bool -> f Bool)
-> VersionExistsResponse
-> f VersionExistsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VersionExistsResponse -> Bool)
-> (VersionExistsResponse -> Bool -> VersionExistsResponse)
-> Lens VersionExistsResponse VersionExistsResponse Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VersionExistsResponse -> Bool
_VersionExistsResponse'result
           (\ x__ :: VersionExistsResponse
x__ y__ :: Bool
y__ -> VersionExistsResponse
x__ {_VersionExistsResponse'result :: Bool
_VersionExistsResponse'result = Bool
y__}))
        (Bool -> f Bool) -> Bool -> f Bool
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message VersionExistsResponse where
  messageName :: Proxy VersionExistsResponse -> Text
messageName _ = String -> Text
Data.Text.pack "proto.VersionExistsResponse"
  fieldsByTag :: Map Tag (FieldDescriptor VersionExistsResponse)
fieldsByTag
    = let
        result__field_descriptor :: FieldDescriptor VersionExistsResponse
result__field_descriptor
          = String
-> FieldTypeDescriptor Bool
-> FieldAccessor VersionExistsResponse Bool
-> FieldDescriptor VersionExistsResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "result"
              (ScalarField Bool -> FieldTypeDescriptor Bool
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Bool
Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (WireDefault Bool
-> Lens VersionExistsResponse VersionExistsResponse Bool Bool
-> FieldAccessor VersionExistsResponse Bool
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Bool
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "result" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"result")) ::
              Data.ProtoLens.FieldDescriptor VersionExistsResponse
      in
        [(Tag, FieldDescriptor VersionExistsResponse)]
-> Map Tag (FieldDescriptor VersionExistsResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor VersionExistsResponse
result__field_descriptor)]
  unknownFields :: LensLike' f VersionExistsResponse FieldSet
unknownFields
    = (VersionExistsResponse -> FieldSet)
-> (VersionExistsResponse -> FieldSet -> VersionExistsResponse)
-> Lens' VersionExistsResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        VersionExistsResponse -> FieldSet
_VersionExistsResponse'_unknownFields
        (\ x__ :: VersionExistsResponse
x__ y__ :: FieldSet
y__ -> VersionExistsResponse
x__ {_VersionExistsResponse'_unknownFields :: FieldSet
_VersionExistsResponse'_unknownFields = FieldSet
y__})
  defMessage :: VersionExistsResponse
defMessage
    = $WVersionExistsResponse'_constructor :: Bool -> FieldSet -> VersionExistsResponse
VersionExistsResponse'_constructor
        {_VersionExistsResponse'result :: Bool
_VersionExistsResponse'result = Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _VersionExistsResponse'_unknownFields :: FieldSet
_VersionExistsResponse'_unknownFields = []}
  parseMessage :: Parser VersionExistsResponse
parseMessage
    = let
        loop ::
          VersionExistsResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser VersionExistsResponse
        loop :: VersionExistsResponse -> Parser VersionExistsResponse
loop x :: VersionExistsResponse
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]))))
                      VersionExistsResponse -> Parser VersionExistsResponse
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter
  VersionExistsResponse VersionExistsResponse FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> VersionExistsResponse
-> VersionExistsResponse
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
  VersionExistsResponse VersionExistsResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) VersionExistsResponse
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        8 -> do Bool
y <- Parser Bool -> String -> Parser Bool
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Word64 -> Bool) -> Parser Word64 -> Parser Bool
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          (Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude./=) 0) Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "result"
                                VersionExistsResponse -> Parser VersionExistsResponse
loop (Setter VersionExistsResponse VersionExistsResponse Bool Bool
-> Bool -> VersionExistsResponse -> VersionExistsResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "result" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"result") Bool
y VersionExistsResponse
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                VersionExistsResponse -> Parser VersionExistsResponse
loop
                                  (Setter
  VersionExistsResponse VersionExistsResponse FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> VersionExistsResponse
-> VersionExistsResponse
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
  VersionExistsResponse VersionExistsResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) VersionExistsResponse
x)
      in
        Parser VersionExistsResponse
-> String -> Parser VersionExistsResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do VersionExistsResponse -> Parser VersionExistsResponse
loop VersionExistsResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "VersionExistsResponse"
  buildMessage :: VersionExistsResponse -> Builder
buildMessage
    = \ _x :: VersionExistsResponse
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Bool
_v = FoldLike Bool VersionExistsResponse VersionExistsResponse Bool Bool
-> VersionExistsResponse -> Bool
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "result" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"result") VersionExistsResponse
_x
              in
                if Bool -> Bool -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Bool
_v Bool
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Word64 -> Builder) -> (Bool -> Word64) -> Bool -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                         Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                         (\ b :: Bool
b -> if Bool
b then 1 else 0)
                         Bool
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike
  FieldSet
  VersionExistsResponse
  VersionExistsResponse
  FieldSet
  FieldSet
-> VersionExistsResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  VersionExistsResponse
  VersionExistsResponse
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields VersionExistsResponse
_x))
instance Control.DeepSeq.NFData VersionExistsResponse where
  rnf :: VersionExistsResponse -> ()
rnf
    = \ x__ :: VersionExistsResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (VersionExistsResponse -> FieldSet
_VersionExistsResponse'_unknownFields VersionExistsResponse
x__)
             (Bool -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (VersionExistsResponse -> Bool
_VersionExistsResponse'result VersionExistsResponse
x__) ())
{- | Fields :
     
         * 'Proto.Iavl.Api_Fields.version' @:: Lens' VersionResponse Data.Int.Int64@ -}
data VersionResponse
  = VersionResponse'_constructor {VersionResponse -> Int64
_VersionResponse'version :: !Data.Int.Int64,
                                  VersionResponse -> FieldSet
_VersionResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving (VersionResponse -> VersionResponse -> Bool
(VersionResponse -> VersionResponse -> Bool)
-> (VersionResponse -> VersionResponse -> Bool)
-> Eq VersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VersionResponse -> VersionResponse -> Bool
$c/= :: VersionResponse -> VersionResponse -> Bool
== :: VersionResponse -> VersionResponse -> Bool
$c== :: VersionResponse -> VersionResponse -> Bool
Prelude.Eq, Eq VersionResponse
Eq VersionResponse =>
(VersionResponse -> VersionResponse -> Ordering)
-> (VersionResponse -> VersionResponse -> Bool)
-> (VersionResponse -> VersionResponse -> Bool)
-> (VersionResponse -> VersionResponse -> Bool)
-> (VersionResponse -> VersionResponse -> Bool)
-> (VersionResponse -> VersionResponse -> VersionResponse)
-> (VersionResponse -> VersionResponse -> VersionResponse)
-> Ord VersionResponse
VersionResponse -> VersionResponse -> Bool
VersionResponse -> VersionResponse -> Ordering
VersionResponse -> VersionResponse -> VersionResponse
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 :: VersionResponse -> VersionResponse -> VersionResponse
$cmin :: VersionResponse -> VersionResponse -> VersionResponse
max :: VersionResponse -> VersionResponse -> VersionResponse
$cmax :: VersionResponse -> VersionResponse -> VersionResponse
>= :: VersionResponse -> VersionResponse -> Bool
$c>= :: VersionResponse -> VersionResponse -> Bool
> :: VersionResponse -> VersionResponse -> Bool
$c> :: VersionResponse -> VersionResponse -> Bool
<= :: VersionResponse -> VersionResponse -> Bool
$c<= :: VersionResponse -> VersionResponse -> Bool
< :: VersionResponse -> VersionResponse -> Bool
$c< :: VersionResponse -> VersionResponse -> Bool
compare :: VersionResponse -> VersionResponse -> Ordering
$ccompare :: VersionResponse -> VersionResponse -> Ordering
$cp1Ord :: Eq VersionResponse
Prelude.Ord)
instance Prelude.Show VersionResponse where
  showsPrec :: Int -> VersionResponse -> ShowS
showsPrec _ __x :: VersionResponse
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (VersionResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort VersionResponse
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField VersionResponse "version" Data.Int.Int64 where
  fieldOf :: Proxy# "version"
-> (Int64 -> f Int64) -> VersionResponse -> f VersionResponse
fieldOf _
    = ((Int64 -> f Int64) -> VersionResponse -> f VersionResponse)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> VersionResponse
-> f VersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((VersionResponse -> Int64)
-> (VersionResponse -> Int64 -> VersionResponse)
-> Lens VersionResponse VersionResponse Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           VersionResponse -> Int64
_VersionResponse'version
           (\ x__ :: VersionResponse
x__ y__ :: Int64
y__ -> VersionResponse
x__ {_VersionResponse'version :: Int64
_VersionResponse'version = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message VersionResponse where
  messageName :: Proxy VersionResponse -> Text
messageName _ = String -> Text
Data.Text.pack "proto.VersionResponse"
  fieldsByTag :: Map Tag (FieldDescriptor VersionResponse)
fieldsByTag
    = let
        version__field_descriptor :: FieldDescriptor VersionResponse
version__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor VersionResponse Int64
-> FieldDescriptor VersionResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "version"
              (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 VersionResponse VersionResponse Int64 Int64
-> FieldAccessor VersionResponse 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 "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version")) ::
              Data.ProtoLens.FieldDescriptor VersionResponse
      in
        [(Tag, FieldDescriptor VersionResponse)]
-> Map Tag (FieldDescriptor VersionResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor VersionResponse
version__field_descriptor)]
  unknownFields :: LensLike' f VersionResponse FieldSet
unknownFields
    = (VersionResponse -> FieldSet)
-> (VersionResponse -> FieldSet -> VersionResponse)
-> Lens' VersionResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        VersionResponse -> FieldSet
_VersionResponse'_unknownFields
        (\ x__ :: VersionResponse
x__ y__ :: FieldSet
y__ -> VersionResponse
x__ {_VersionResponse'_unknownFields :: FieldSet
_VersionResponse'_unknownFields = FieldSet
y__})
  defMessage :: VersionResponse
defMessage
    = $WVersionResponse'_constructor :: Int64 -> FieldSet -> VersionResponse
VersionResponse'_constructor
        {_VersionResponse'version :: Int64
_VersionResponse'version = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _VersionResponse'_unknownFields :: FieldSet
_VersionResponse'_unknownFields = []}
  parseMessage :: Parser VersionResponse
parseMessage
    = let
        loop ::
          VersionResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser VersionResponse
        loop :: VersionResponse -> Parser VersionResponse
loop x :: VersionResponse
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]))))
                      VersionResponse -> Parser VersionResponse
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter VersionResponse VersionResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> VersionResponse -> VersionResponse
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 VersionResponse VersionResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) VersionResponse
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)
                                       "version"
                                VersionResponse -> Parser VersionResponse
loop (Setter VersionResponse VersionResponse Int64 Int64
-> Int64 -> VersionResponse -> VersionResponse
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") Int64
y VersionResponse
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                VersionResponse -> Parser VersionResponse
loop
                                  (Setter VersionResponse VersionResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> VersionResponse -> VersionResponse
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 VersionResponse VersionResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) VersionResponse
x)
      in
        Parser VersionResponse -> String -> Parser VersionResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do VersionResponse -> Parser VersionResponse
loop VersionResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "VersionResponse"
  buildMessage :: VersionResponse -> Builder
buildMessage
    = \ _x :: VersionResponse
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Int64
_v = FoldLike Int64 VersionResponse VersionResponse Int64 Int64
-> VersionResponse -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "version" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"version") VersionResponse
_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 VersionResponse VersionResponse FieldSet FieldSet
-> VersionResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet VersionResponse VersionResponse FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields VersionResponse
_x))
instance Control.DeepSeq.NFData VersionResponse where
  rnf :: VersionResponse -> ()
rnf
    = \ x__ :: VersionResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (VersionResponse -> FieldSet
_VersionResponse'_unknownFields VersionResponse
x__)
             (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (VersionResponse -> Int64
_VersionResponse'version VersionResponse
x__) ())
data IAVLService = IAVLService {}
instance Data.ProtoLens.Service.Types.Service IAVLService where
  type ServiceName IAVLService = "IAVLService"
  type ServicePackage IAVLService = "proto"
  type ServiceMethods IAVLService = '["deleteVersion",
                                      "get",
                                      "getVersioned",
                                      "getVersionedWithProof",
                                      "getWithProof",
                                      "has",
                                      "hash",
                                      "remove",
                                      "rollback",
                                      "saveVersion",
                                      "set",
                                      "verify",
                                      "verifyAbsence",
                                      "verifyItem",
                                      "version",
                                      "versionExists"]
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "has" where
  type MethodName IAVLService "has" = "Has"
  type MethodInput IAVLService "has" = HasRequest
  type MethodOutput IAVLService "has" = HasResponse
  type MethodStreamingType IAVLService "has" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "get" where
  type MethodName IAVLService "get" = "Get"
  type MethodInput IAVLService "get" = GetRequest
  type MethodOutput IAVLService "get" = GetResponse
  type MethodStreamingType IAVLService "get" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "getWithProof" where
  type MethodName IAVLService "getWithProof" = "GetWithProof"
  type MethodInput IAVLService "getWithProof" = GetRequest
  type MethodOutput IAVLService "getWithProof" = GetWithProofResponse
  type MethodStreamingType IAVLService "getWithProof" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "getVersioned" where
  type MethodName IAVLService "getVersioned" = "GetVersioned"
  type MethodInput IAVLService "getVersioned" = GetVersionedRequest
  type MethodOutput IAVLService "getVersioned" = GetResponse
  type MethodStreamingType IAVLService "getVersioned" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "getVersionedWithProof" where
  type MethodName IAVLService "getVersionedWithProof" = "GetVersionedWithProof"
  type MethodInput IAVLService "getVersionedWithProof" = GetVersionedRequest
  type MethodOutput IAVLService "getVersionedWithProof" = GetWithProofResponse
  type MethodStreamingType IAVLService "getVersionedWithProof" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "set" where
  type MethodName IAVLService "set" = "Set"
  type MethodInput IAVLService "set" = SetRequest
  type MethodOutput IAVLService "set" = SetResponse
  type MethodStreamingType IAVLService "set" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "remove" where
  type MethodName IAVLService "remove" = "Remove"
  type MethodInput IAVLService "remove" = RemoveRequest
  type MethodOutput IAVLService "remove" = RemoveResponse
  type MethodStreamingType IAVLService "remove" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "saveVersion" where
  type MethodName IAVLService "saveVersion" = "SaveVersion"
  type MethodInput IAVLService "saveVersion" = Proto.Google.Protobuf.Empty.Empty
  type MethodOutput IAVLService "saveVersion" = SaveVersionResponse
  type MethodStreamingType IAVLService "saveVersion" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "deleteVersion" where
  type MethodName IAVLService "deleteVersion" = "DeleteVersion"
  type MethodInput IAVLService "deleteVersion" = DeleteVersionRequest
  type MethodOutput IAVLService "deleteVersion" = DeleteVersionResponse
  type MethodStreamingType IAVLService "deleteVersion" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "version" where
  type MethodName IAVLService "version" = "Version"
  type MethodInput IAVLService "version" = Proto.Google.Protobuf.Empty.Empty
  type MethodOutput IAVLService "version" = VersionResponse
  type MethodStreamingType IAVLService "version" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "hash" where
  type MethodName IAVLService "hash" = "Hash"
  type MethodInput IAVLService "hash" = Proto.Google.Protobuf.Empty.Empty
  type MethodOutput IAVLService "hash" = HashResponse
  type MethodStreamingType IAVLService "hash" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "versionExists" where
  type MethodName IAVLService "versionExists" = "VersionExists"
  type MethodInput IAVLService "versionExists" = VersionExistsRequest
  type MethodOutput IAVLService "versionExists" = VersionExistsResponse
  type MethodStreamingType IAVLService "versionExists" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "verify" where
  type MethodName IAVLService "verify" = "Verify"
  type MethodInput IAVLService "verify" = VerifyRequest
  type MethodOutput IAVLService "verify" = Proto.Google.Protobuf.Empty.Empty
  type MethodStreamingType IAVLService "verify" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "verifyItem" where
  type MethodName IAVLService "verifyItem" = "VerifyItem"
  type MethodInput IAVLService "verifyItem" = VerifyItemRequest
  type MethodOutput IAVLService "verifyItem" = Proto.Google.Protobuf.Empty.Empty
  type MethodStreamingType IAVLService "verifyItem" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "verifyAbsence" where
  type MethodName IAVLService "verifyAbsence" = "VerifyAbsence"
  type MethodInput IAVLService "verifyAbsence" = VerifyAbsenceRequest
  type MethodOutput IAVLService "verifyAbsence" = Proto.Google.Protobuf.Empty.Empty
  type MethodStreamingType IAVLService "verifyAbsence" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl IAVLService "rollback" where
  type MethodName IAVLService "rollback" = "Rollback"
  type MethodInput IAVLService "rollback" = Proto.Google.Protobuf.Empty.Empty
  type MethodOutput IAVLService "rollback" = Proto.Google.Protobuf.Empty.Empty
  type MethodStreamingType IAVLService "rollback" = 'Data.ProtoLens.Service.Types.NonStreaming