{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}
{-# OPTIONS_GHC -Wno-unused-imports#-}
{-# OPTIONS_GHC -Wno-duplicate-exports#-}
{-# OPTIONS_GHC -Wno-dodgy-exports#-}
module Proto.Utxorpc.V1alpha.Query.Query (
QueryService(..), AddressArray(), AnyChainParams(),
AnyChainParams'Params(..), _AnyChainParams'Cardano, AnyUtxoData(),
AnyUtxoData'ParsedState(..), _AnyUtxoData'Cardano, ChainPoint(),
ReadParamsRequest(), ReadParamsResponse(), ReadUtxosRequest(),
ReadUtxosRequest'QueryArgs(..), _ReadUtxosRequest'TxoRefs,
_ReadUtxosRequest'Addresses, ReadUtxosResponse(), TxoRef(),
TxoRefArray()
) 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.Protobuf.FieldMask
import qualified Proto.Utxorpc.V1alpha.Cardano.Cardano
data AddressArray
= AddressArray'_constructor {AddressArray -> Vector ByteString
_AddressArray'items :: !(Data.Vector.Vector Data.ByteString.ByteString),
AddressArray -> FieldSet
_AddressArray'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (AddressArray -> AddressArray -> Bool
(AddressArray -> AddressArray -> Bool)
-> (AddressArray -> AddressArray -> Bool) -> Eq AddressArray
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AddressArray -> AddressArray -> Bool
== :: AddressArray -> AddressArray -> Bool
$c/= :: AddressArray -> AddressArray -> Bool
/= :: AddressArray -> AddressArray -> Bool
Prelude.Eq, Eq AddressArray
Eq AddressArray =>
(AddressArray -> AddressArray -> Ordering)
-> (AddressArray -> AddressArray -> Bool)
-> (AddressArray -> AddressArray -> Bool)
-> (AddressArray -> AddressArray -> Bool)
-> (AddressArray -> AddressArray -> Bool)
-> (AddressArray -> AddressArray -> AddressArray)
-> (AddressArray -> AddressArray -> AddressArray)
-> Ord AddressArray
AddressArray -> AddressArray -> Bool
AddressArray -> AddressArray -> Ordering
AddressArray -> AddressArray -> AddressArray
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
$ccompare :: AddressArray -> AddressArray -> Ordering
compare :: AddressArray -> AddressArray -> Ordering
$c< :: AddressArray -> AddressArray -> Bool
< :: AddressArray -> AddressArray -> Bool
$c<= :: AddressArray -> AddressArray -> Bool
<= :: AddressArray -> AddressArray -> Bool
$c> :: AddressArray -> AddressArray -> Bool
> :: AddressArray -> AddressArray -> Bool
$c>= :: AddressArray -> AddressArray -> Bool
>= :: AddressArray -> AddressArray -> Bool
$cmax :: AddressArray -> AddressArray -> AddressArray
max :: AddressArray -> AddressArray -> AddressArray
$cmin :: AddressArray -> AddressArray -> AddressArray
min :: AddressArray -> AddressArray -> AddressArray
Prelude.Ord)
instance Prelude.Show AddressArray where
showsPrec :: Int -> AddressArray -> ShowS
showsPrec Int
_ AddressArray
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(AddressArray -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort AddressArray
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField AddressArray "items" [Data.ByteString.ByteString] where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "items"
-> ([ByteString] -> f [ByteString])
-> AddressArray
-> f AddressArray
fieldOf Proxy# "items"
_
= ((Vector ByteString -> f (Vector ByteString))
-> AddressArray -> f AddressArray)
-> (([ByteString] -> f [ByteString])
-> Vector ByteString -> f (Vector ByteString))
-> ([ByteString] -> f [ByteString])
-> AddressArray
-> f AddressArray
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((AddressArray -> Vector ByteString)
-> (AddressArray -> Vector ByteString -> AddressArray)
-> Lens
AddressArray AddressArray (Vector ByteString) (Vector ByteString)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AddressArray -> Vector ByteString
_AddressArray'items (\ AddressArray
x__ Vector ByteString
y__ -> AddressArray
x__ {_AddressArray'items = y__}))
((Vector ByteString -> [ByteString])
-> (Vector ByteString -> [ByteString] -> Vector ByteString)
-> Lens
(Vector ByteString) (Vector ByteString) [ByteString] [ByteString]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector ByteString -> [ByteString]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ Vector ByteString
_ [ByteString]
y__ -> [ByteString] -> Vector ByteString
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [ByteString]
y__))
instance Data.ProtoLens.Field.HasField AddressArray "vec'items" (Data.Vector.Vector Data.ByteString.ByteString) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "vec'items"
-> (Vector ByteString -> f (Vector ByteString))
-> AddressArray
-> f AddressArray
fieldOf Proxy# "vec'items"
_
= ((Vector ByteString -> f (Vector ByteString))
-> AddressArray -> f AddressArray)
-> ((Vector ByteString -> f (Vector ByteString))
-> Vector ByteString -> f (Vector ByteString))
-> (Vector ByteString -> f (Vector ByteString))
-> AddressArray
-> f AddressArray
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((AddressArray -> Vector ByteString)
-> (AddressArray -> Vector ByteString -> AddressArray)
-> Lens
AddressArray AddressArray (Vector ByteString) (Vector ByteString)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AddressArray -> Vector ByteString
_AddressArray'items (\ AddressArray
x__ Vector ByteString
y__ -> AddressArray
x__ {_AddressArray'items = y__}))
(Vector ByteString -> f (Vector ByteString))
-> Vector ByteString -> f (Vector ByteString)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message AddressArray where
messageName :: Proxy AddressArray -> Text
messageName Proxy AddressArray
_ = String -> Text
Data.Text.pack String
"utxorpc.v1alpha.query.AddressArray"
packedMessageDescriptor :: Proxy AddressArray -> ByteString
packedMessageDescriptor Proxy AddressArray
_
= ByteString
"\n\
\\fAddressArray\DC2\DC4\n\
\\ENQitems\CAN\SOH \ETX(\fR\ENQitems"
packedFileDescriptor :: Proxy AddressArray -> ByteString
packedFileDescriptor Proxy AddressArray
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor AddressArray)
fieldsByTag
= let
items__field_descriptor :: FieldDescriptor AddressArray
items__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor AddressArray ByteString
-> FieldDescriptor AddressArray
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"items"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(Packing
-> Lens' AddressArray [ByteString]
-> FieldAccessor AddressArray ByteString
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"items")) ::
Data.ProtoLens.FieldDescriptor AddressArray
in
[(Tag, FieldDescriptor AddressArray)]
-> Map Tag (FieldDescriptor AddressArray)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor AddressArray
items__field_descriptor)]
unknownFields :: Lens' AddressArray FieldSet
unknownFields
= (AddressArray -> FieldSet)
-> (AddressArray -> FieldSet -> AddressArray)
-> Lens' AddressArray FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AddressArray -> FieldSet
_AddressArray'_unknownFields
(\ AddressArray
x__ FieldSet
y__ -> AddressArray
x__ {_AddressArray'_unknownFields = y__})
defMessage :: AddressArray
defMessage
= AddressArray'_constructor
{_AddressArray'items :: Vector ByteString
_AddressArray'items = Vector ByteString
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_AddressArray'_unknownFields :: FieldSet
_AddressArray'_unknownFields = []}
parseMessage :: Parser AddressArray
parseMessage
= let
loop ::
AddressArray
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.ByteString.ByteString
-> Data.ProtoLens.Encoding.Bytes.Parser AddressArray
loop :: AddressArray
-> Growing Vector RealWorld ByteString -> Parser AddressArray
loop AddressArray
x Growing Vector RealWorld ByteString
mutable'items
= do end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if end then
do frozen'items <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Data.ProtoLens.Encoding.Growing.unsafeFreeze mutable'items)
(let missing = []
in
if Prelude.null missing then
Prelude.return ()
else
Prelude.fail
((Prelude.++)
"Missing required fields: "
(Prelude.show (missing :: [Prelude.String]))))
Prelude.return
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Lens.Family2.set
(Data.ProtoLens.Field.field @"vec'items") frozen'items x))
else
do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
case tag of
Word64
10
-> do !y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.getBytes
(Prelude.fromIntegral len))
String
"items"
v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Data.ProtoLens.Encoding.Growing.append mutable'items y)
loop x v
Word64
wire
-> do !y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
loop
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) x)
mutable'items
in
Parser AddressArray -> String -> Parser AddressArray
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do mutable'items <- IO (Growing Vector RealWorld ByteString)
-> Parser (Growing Vector RealWorld ByteString)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld ByteString)
IO (Growing Vector (PrimState IO) ByteString)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
loop Data.ProtoLens.defMessage mutable'items)
String
"AddressArray"
buildMessage :: AddressArray -> Builder
buildMessage
= \ AddressArray
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((ByteString -> Builder) -> Vector ByteString -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ ByteString
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
((\ 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))
(FoldLike
(Vector ByteString)
AddressArray
AddressArray
(Vector ByteString)
(Vector ByteString)
-> AddressArray -> Vector ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'items") AddressArray
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet AddressArray AddressArray FieldSet FieldSet
-> AddressArray -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet AddressArray AddressArray FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' AddressArray FieldSet
Data.ProtoLens.unknownFields AddressArray
_x))
instance Control.DeepSeq.NFData AddressArray where
rnf :: AddressArray -> ()
rnf
= \ AddressArray
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(AddressArray -> FieldSet
_AddressArray'_unknownFields AddressArray
x__)
(Vector ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (AddressArray -> Vector ByteString
_AddressArray'items AddressArray
x__) ())
data AnyChainParams
= AnyChainParams'_constructor {AnyChainParams -> Maybe AnyChainParams'Params
_AnyChainParams'params :: !(Prelude.Maybe AnyChainParams'Params),
AnyChainParams -> FieldSet
_AnyChainParams'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (AnyChainParams -> AnyChainParams -> Bool
(AnyChainParams -> AnyChainParams -> Bool)
-> (AnyChainParams -> AnyChainParams -> Bool) -> Eq AnyChainParams
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnyChainParams -> AnyChainParams -> Bool
== :: AnyChainParams -> AnyChainParams -> Bool
$c/= :: AnyChainParams -> AnyChainParams -> Bool
/= :: AnyChainParams -> AnyChainParams -> Bool
Prelude.Eq, Eq AnyChainParams
Eq AnyChainParams =>
(AnyChainParams -> AnyChainParams -> Ordering)
-> (AnyChainParams -> AnyChainParams -> Bool)
-> (AnyChainParams -> AnyChainParams -> Bool)
-> (AnyChainParams -> AnyChainParams -> Bool)
-> (AnyChainParams -> AnyChainParams -> Bool)
-> (AnyChainParams -> AnyChainParams -> AnyChainParams)
-> (AnyChainParams -> AnyChainParams -> AnyChainParams)
-> Ord AnyChainParams
AnyChainParams -> AnyChainParams -> Bool
AnyChainParams -> AnyChainParams -> Ordering
AnyChainParams -> AnyChainParams -> AnyChainParams
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
$ccompare :: AnyChainParams -> AnyChainParams -> Ordering
compare :: AnyChainParams -> AnyChainParams -> Ordering
$c< :: AnyChainParams -> AnyChainParams -> Bool
< :: AnyChainParams -> AnyChainParams -> Bool
$c<= :: AnyChainParams -> AnyChainParams -> Bool
<= :: AnyChainParams -> AnyChainParams -> Bool
$c> :: AnyChainParams -> AnyChainParams -> Bool
> :: AnyChainParams -> AnyChainParams -> Bool
$c>= :: AnyChainParams -> AnyChainParams -> Bool
>= :: AnyChainParams -> AnyChainParams -> Bool
$cmax :: AnyChainParams -> AnyChainParams -> AnyChainParams
max :: AnyChainParams -> AnyChainParams -> AnyChainParams
$cmin :: AnyChainParams -> AnyChainParams -> AnyChainParams
min :: AnyChainParams -> AnyChainParams -> AnyChainParams
Prelude.Ord)
instance Prelude.Show AnyChainParams where
showsPrec :: Int -> AnyChainParams -> ShowS
showsPrec Int
_ AnyChainParams
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(AnyChainParams -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort AnyChainParams
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
data AnyChainParams'Params
= AnyChainParams'Cardano !Proto.Utxorpc.V1alpha.Cardano.Cardano.PParams
deriving stock (Int -> AnyChainParams'Params -> ShowS
[AnyChainParams'Params] -> ShowS
AnyChainParams'Params -> String
(Int -> AnyChainParams'Params -> ShowS)
-> (AnyChainParams'Params -> String)
-> ([AnyChainParams'Params] -> ShowS)
-> Show AnyChainParams'Params
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AnyChainParams'Params -> ShowS
showsPrec :: Int -> AnyChainParams'Params -> ShowS
$cshow :: AnyChainParams'Params -> String
show :: AnyChainParams'Params -> String
$cshowList :: [AnyChainParams'Params] -> ShowS
showList :: [AnyChainParams'Params] -> ShowS
Prelude.Show, AnyChainParams'Params -> AnyChainParams'Params -> Bool
(AnyChainParams'Params -> AnyChainParams'Params -> Bool)
-> (AnyChainParams'Params -> AnyChainParams'Params -> Bool)
-> Eq AnyChainParams'Params
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
== :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
$c/= :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
/= :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
Prelude.Eq, Eq AnyChainParams'Params
Eq AnyChainParams'Params =>
(AnyChainParams'Params -> AnyChainParams'Params -> Ordering)
-> (AnyChainParams'Params -> AnyChainParams'Params -> Bool)
-> (AnyChainParams'Params -> AnyChainParams'Params -> Bool)
-> (AnyChainParams'Params -> AnyChainParams'Params -> Bool)
-> (AnyChainParams'Params -> AnyChainParams'Params -> Bool)
-> (AnyChainParams'Params
-> AnyChainParams'Params -> AnyChainParams'Params)
-> (AnyChainParams'Params
-> AnyChainParams'Params -> AnyChainParams'Params)
-> Ord AnyChainParams'Params
AnyChainParams'Params -> AnyChainParams'Params -> Bool
AnyChainParams'Params -> AnyChainParams'Params -> Ordering
AnyChainParams'Params
-> AnyChainParams'Params -> AnyChainParams'Params
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
$ccompare :: AnyChainParams'Params -> AnyChainParams'Params -> Ordering
compare :: AnyChainParams'Params -> AnyChainParams'Params -> Ordering
$c< :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
< :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
$c<= :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
<= :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
$c> :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
> :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
$c>= :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
>= :: AnyChainParams'Params -> AnyChainParams'Params -> Bool
$cmax :: AnyChainParams'Params
-> AnyChainParams'Params -> AnyChainParams'Params
max :: AnyChainParams'Params
-> AnyChainParams'Params -> AnyChainParams'Params
$cmin :: AnyChainParams'Params
-> AnyChainParams'Params -> AnyChainParams'Params
min :: AnyChainParams'Params
-> AnyChainParams'Params -> AnyChainParams'Params
Prelude.Ord)
instance Data.ProtoLens.Field.HasField AnyChainParams "maybe'params" (Prelude.Maybe AnyChainParams'Params) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'params"
-> (Maybe AnyChainParams'Params -> f (Maybe AnyChainParams'Params))
-> AnyChainParams
-> f AnyChainParams
fieldOf Proxy# "maybe'params"
_
= ((Maybe AnyChainParams'Params -> f (Maybe AnyChainParams'Params))
-> AnyChainParams -> f AnyChainParams)
-> ((Maybe AnyChainParams'Params
-> f (Maybe AnyChainParams'Params))
-> Maybe AnyChainParams'Params -> f (Maybe AnyChainParams'Params))
-> (Maybe AnyChainParams'Params -> f (Maybe AnyChainParams'Params))
-> AnyChainParams
-> f AnyChainParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((AnyChainParams -> Maybe AnyChainParams'Params)
-> (AnyChainParams
-> Maybe AnyChainParams'Params -> AnyChainParams)
-> Lens
AnyChainParams
AnyChainParams
(Maybe AnyChainParams'Params)
(Maybe AnyChainParams'Params)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AnyChainParams -> Maybe AnyChainParams'Params
_AnyChainParams'params
(\ AnyChainParams
x__ Maybe AnyChainParams'Params
y__ -> AnyChainParams
x__ {_AnyChainParams'params = y__}))
(Maybe AnyChainParams'Params -> f (Maybe AnyChainParams'Params))
-> Maybe AnyChainParams'Params -> f (Maybe AnyChainParams'Params)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField AnyChainParams "maybe'cardano" (Prelude.Maybe Proto.Utxorpc.V1alpha.Cardano.Cardano.PParams) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'cardano"
-> (Maybe PParams -> f (Maybe PParams))
-> AnyChainParams
-> f AnyChainParams
fieldOf Proxy# "maybe'cardano"
_
= ((Maybe AnyChainParams'Params -> f (Maybe AnyChainParams'Params))
-> AnyChainParams -> f AnyChainParams)
-> ((Maybe PParams -> f (Maybe PParams))
-> Maybe AnyChainParams'Params -> f (Maybe AnyChainParams'Params))
-> (Maybe PParams -> f (Maybe PParams))
-> AnyChainParams
-> f AnyChainParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((AnyChainParams -> Maybe AnyChainParams'Params)
-> (AnyChainParams
-> Maybe AnyChainParams'Params -> AnyChainParams)
-> Lens
AnyChainParams
AnyChainParams
(Maybe AnyChainParams'Params)
(Maybe AnyChainParams'Params)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AnyChainParams -> Maybe AnyChainParams'Params
_AnyChainParams'params
(\ AnyChainParams
x__ Maybe AnyChainParams'Params
y__ -> AnyChainParams
x__ {_AnyChainParams'params = y__}))
((Maybe AnyChainParams'Params -> Maybe PParams)
-> (Maybe AnyChainParams'Params
-> Maybe PParams -> Maybe AnyChainParams'Params)
-> Lens
(Maybe AnyChainParams'Params)
(Maybe AnyChainParams'Params)
(Maybe PParams)
(Maybe PParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ Maybe AnyChainParams'Params
x__
-> case Maybe AnyChainParams'Params
x__ of
(Prelude.Just (AnyChainParams'Cardano PParams
x__val))
-> PParams -> Maybe PParams
forall a. a -> Maybe a
Prelude.Just PParams
x__val
Maybe AnyChainParams'Params
_otherwise -> Maybe PParams
forall a. Maybe a
Prelude.Nothing)
(\ Maybe AnyChainParams'Params
_ Maybe PParams
y__ -> (PParams -> AnyChainParams'Params)
-> Maybe PParams -> Maybe AnyChainParams'Params
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap PParams -> AnyChainParams'Params
AnyChainParams'Cardano Maybe PParams
y__))
instance Data.ProtoLens.Field.HasField AnyChainParams "cardano" Proto.Utxorpc.V1alpha.Cardano.Cardano.PParams where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "cardano"
-> (PParams -> f PParams) -> AnyChainParams -> f AnyChainParams
fieldOf Proxy# "cardano"
_
= ((Maybe AnyChainParams'Params -> f (Maybe AnyChainParams'Params))
-> AnyChainParams -> f AnyChainParams)
-> ((PParams -> f PParams)
-> Maybe AnyChainParams'Params -> f (Maybe AnyChainParams'Params))
-> (PParams -> f PParams)
-> AnyChainParams
-> f AnyChainParams
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((AnyChainParams -> Maybe AnyChainParams'Params)
-> (AnyChainParams
-> Maybe AnyChainParams'Params -> AnyChainParams)
-> Lens
AnyChainParams
AnyChainParams
(Maybe AnyChainParams'Params)
(Maybe AnyChainParams'Params)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AnyChainParams -> Maybe AnyChainParams'Params
_AnyChainParams'params
(\ AnyChainParams
x__ Maybe AnyChainParams'Params
y__ -> AnyChainParams
x__ {_AnyChainParams'params = y__}))
(((Maybe PParams -> f (Maybe PParams))
-> Maybe AnyChainParams'Params -> f (Maybe AnyChainParams'Params))
-> ((PParams -> f PParams) -> Maybe PParams -> f (Maybe PParams))
-> (PParams -> f PParams)
-> Maybe AnyChainParams'Params
-> f (Maybe AnyChainParams'Params)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe AnyChainParams'Params -> Maybe PParams)
-> (Maybe AnyChainParams'Params
-> Maybe PParams -> Maybe AnyChainParams'Params)
-> Lens
(Maybe AnyChainParams'Params)
(Maybe AnyChainParams'Params)
(Maybe PParams)
(Maybe PParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ Maybe AnyChainParams'Params
x__
-> case Maybe AnyChainParams'Params
x__ of
(Prelude.Just (AnyChainParams'Cardano PParams
x__val))
-> PParams -> Maybe PParams
forall a. a -> Maybe a
Prelude.Just PParams
x__val
Maybe AnyChainParams'Params
_otherwise -> Maybe PParams
forall a. Maybe a
Prelude.Nothing)
(\ Maybe AnyChainParams'Params
_ Maybe PParams
y__ -> (PParams -> AnyChainParams'Params)
-> Maybe PParams -> Maybe AnyChainParams'Params
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap PParams -> AnyChainParams'Params
AnyChainParams'Cardano Maybe PParams
y__))
(PParams -> Lens' (Maybe PParams) PParams
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens PParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message AnyChainParams where
messageName :: Proxy AnyChainParams -> Text
messageName Proxy AnyChainParams
_
= String -> Text
Data.Text.pack String
"utxorpc.v1alpha.query.AnyChainParams"
packedMessageDescriptor :: Proxy AnyChainParams -> ByteString
packedMessageDescriptor Proxy AnyChainParams
_
= ByteString
"\n\
\\SOAnyChainParams\DC2<\n\
\\acardano\CAN\SOH \SOH(\v2 .utxorpc.v1alpha.cardano.PParamsH\NULR\acardanoB\b\n\
\\ACKparams"
packedFileDescriptor :: Proxy AnyChainParams -> ByteString
packedFileDescriptor Proxy AnyChainParams
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor AnyChainParams)
fieldsByTag
= let
cardano__field_descriptor :: FieldDescriptor AnyChainParams
cardano__field_descriptor
= String
-> FieldTypeDescriptor PParams
-> FieldAccessor AnyChainParams PParams
-> FieldDescriptor AnyChainParams
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"cardano"
(MessageOrGroup -> FieldTypeDescriptor PParams
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Utxorpc.V1alpha.Cardano.Cardano.PParams)
(Lens' AnyChainParams (Maybe PParams)
-> FieldAccessor AnyChainParams PParams
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'cardano")) ::
Data.ProtoLens.FieldDescriptor AnyChainParams
in
[(Tag, FieldDescriptor AnyChainParams)]
-> Map Tag (FieldDescriptor AnyChainParams)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor AnyChainParams
cardano__field_descriptor)]
unknownFields :: Lens' AnyChainParams FieldSet
unknownFields
= (AnyChainParams -> FieldSet)
-> (AnyChainParams -> FieldSet -> AnyChainParams)
-> Lens' AnyChainParams FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AnyChainParams -> FieldSet
_AnyChainParams'_unknownFields
(\ AnyChainParams
x__ FieldSet
y__ -> AnyChainParams
x__ {_AnyChainParams'_unknownFields = y__})
defMessage :: AnyChainParams
defMessage
= AnyChainParams'_constructor
{_AnyChainParams'params :: Maybe AnyChainParams'Params
_AnyChainParams'params = Maybe AnyChainParams'Params
forall a. Maybe a
Prelude.Nothing,
_AnyChainParams'_unknownFields :: FieldSet
_AnyChainParams'_unknownFields = []}
parseMessage :: Parser AnyChainParams
parseMessage
= let
loop ::
AnyChainParams
-> Data.ProtoLens.Encoding.Bytes.Parser AnyChainParams
loop :: AnyChainParams -> Parser AnyChainParams
loop AnyChainParams
x
= do end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if end then
do (let missing = []
in
if Prelude.null missing then
Prelude.return ()
else
Prelude.fail
((Prelude.++)
"Missing required fields: "
(Prelude.show (missing :: [Prelude.String]))))
Prelude.return
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) x)
else
do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
case tag of
Word64
10
-> do y <- Parser PParams -> String -> Parser PParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
String
"cardano"
loop (Lens.Family2.set (Data.ProtoLens.Field.field @"cardano") y x)
Word64
wire
-> do !y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
loop
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) x)
in
Parser AnyChainParams -> String -> Parser AnyChainParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do AnyChainParams -> Parser AnyChainParams
loop AnyChainParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"AnyChainParams"
buildMessage :: AnyChainParams -> Builder
buildMessage
= \ AnyChainParams
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe AnyChainParams'Params)
AnyChainParams
AnyChainParams
(Maybe AnyChainParams'Params)
(Maybe AnyChainParams'Params)
-> AnyChainParams -> Maybe AnyChainParams'Params
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'params") AnyChainParams
_x
of
Maybe AnyChainParams'Params
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just (AnyChainParams'Cardano PParams
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
((ByteString -> Builder)
-> (PParams -> ByteString) -> PParams -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
PParams -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage PParams
v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet AnyChainParams AnyChainParams FieldSet FieldSet
-> AnyChainParams -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet AnyChainParams AnyChainParams FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' AnyChainParams FieldSet
Data.ProtoLens.unknownFields AnyChainParams
_x))
instance Control.DeepSeq.NFData AnyChainParams where
rnf :: AnyChainParams -> ()
rnf
= \ AnyChainParams
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(AnyChainParams -> FieldSet
_AnyChainParams'_unknownFields AnyChainParams
x__)
(Maybe AnyChainParams'Params -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (AnyChainParams -> Maybe AnyChainParams'Params
_AnyChainParams'params AnyChainParams
x__) ())
instance Control.DeepSeq.NFData AnyChainParams'Params where
rnf :: AnyChainParams'Params -> ()
rnf (AnyChainParams'Cardano PParams
x__) = PParams -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf PParams
x__
_AnyChainParams'Cardano ::
Data.ProtoLens.Prism.Prism' AnyChainParams'Params Proto.Utxorpc.V1alpha.Cardano.Cardano.PParams
_AnyChainParams'Cardano :: Prism' AnyChainParams'Params PParams
_AnyChainParams'Cardano
= (PParams -> AnyChainParams'Params)
-> (AnyChainParams'Params -> Maybe PParams)
-> Prism' AnyChainParams'Params PParams
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
PParams -> AnyChainParams'Params
AnyChainParams'Cardano
(\ AnyChainParams'Params
p__
-> case AnyChainParams'Params
p__ of
(AnyChainParams'Cardano PParams
p__val) -> PParams -> Maybe PParams
forall a. a -> Maybe a
Prelude.Just PParams
p__val)
data AnyUtxoData
= AnyUtxoData'_constructor {AnyUtxoData -> ByteString
_AnyUtxoData'nativeBytes :: !Data.ByteString.ByteString,
AnyUtxoData -> Maybe TxoRef
_AnyUtxoData'txoRef :: !(Prelude.Maybe TxoRef),
AnyUtxoData -> Maybe AnyUtxoData'ParsedState
_AnyUtxoData'parsedState :: !(Prelude.Maybe AnyUtxoData'ParsedState),
AnyUtxoData -> FieldSet
_AnyUtxoData'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (AnyUtxoData -> AnyUtxoData -> Bool
(AnyUtxoData -> AnyUtxoData -> Bool)
-> (AnyUtxoData -> AnyUtxoData -> Bool) -> Eq AnyUtxoData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnyUtxoData -> AnyUtxoData -> Bool
== :: AnyUtxoData -> AnyUtxoData -> Bool
$c/= :: AnyUtxoData -> AnyUtxoData -> Bool
/= :: AnyUtxoData -> AnyUtxoData -> Bool
Prelude.Eq, Eq AnyUtxoData
Eq AnyUtxoData =>
(AnyUtxoData -> AnyUtxoData -> Ordering)
-> (AnyUtxoData -> AnyUtxoData -> Bool)
-> (AnyUtxoData -> AnyUtxoData -> Bool)
-> (AnyUtxoData -> AnyUtxoData -> Bool)
-> (AnyUtxoData -> AnyUtxoData -> Bool)
-> (AnyUtxoData -> AnyUtxoData -> AnyUtxoData)
-> (AnyUtxoData -> AnyUtxoData -> AnyUtxoData)
-> Ord AnyUtxoData
AnyUtxoData -> AnyUtxoData -> Bool
AnyUtxoData -> AnyUtxoData -> Ordering
AnyUtxoData -> AnyUtxoData -> AnyUtxoData
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
$ccompare :: AnyUtxoData -> AnyUtxoData -> Ordering
compare :: AnyUtxoData -> AnyUtxoData -> Ordering
$c< :: AnyUtxoData -> AnyUtxoData -> Bool
< :: AnyUtxoData -> AnyUtxoData -> Bool
$c<= :: AnyUtxoData -> AnyUtxoData -> Bool
<= :: AnyUtxoData -> AnyUtxoData -> Bool
$c> :: AnyUtxoData -> AnyUtxoData -> Bool
> :: AnyUtxoData -> AnyUtxoData -> Bool
$c>= :: AnyUtxoData -> AnyUtxoData -> Bool
>= :: AnyUtxoData -> AnyUtxoData -> Bool
$cmax :: AnyUtxoData -> AnyUtxoData -> AnyUtxoData
max :: AnyUtxoData -> AnyUtxoData -> AnyUtxoData
$cmin :: AnyUtxoData -> AnyUtxoData -> AnyUtxoData
min :: AnyUtxoData -> AnyUtxoData -> AnyUtxoData
Prelude.Ord)
instance Prelude.Show AnyUtxoData where
showsPrec :: Int -> AnyUtxoData -> ShowS
showsPrec Int
_ AnyUtxoData
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(AnyUtxoData -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort AnyUtxoData
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
data AnyUtxoData'ParsedState
= AnyUtxoData'Cardano !Proto.Utxorpc.V1alpha.Cardano.Cardano.TxOutput
deriving stock (Int -> AnyUtxoData'ParsedState -> ShowS
[AnyUtxoData'ParsedState] -> ShowS
AnyUtxoData'ParsedState -> String
(Int -> AnyUtxoData'ParsedState -> ShowS)
-> (AnyUtxoData'ParsedState -> String)
-> ([AnyUtxoData'ParsedState] -> ShowS)
-> Show AnyUtxoData'ParsedState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AnyUtxoData'ParsedState -> ShowS
showsPrec :: Int -> AnyUtxoData'ParsedState -> ShowS
$cshow :: AnyUtxoData'ParsedState -> String
show :: AnyUtxoData'ParsedState -> String
$cshowList :: [AnyUtxoData'ParsedState] -> ShowS
showList :: [AnyUtxoData'ParsedState] -> ShowS
Prelude.Show, AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
(AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool)
-> (AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool)
-> Eq AnyUtxoData'ParsedState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
== :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
$c/= :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
/= :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
Prelude.Eq, Eq AnyUtxoData'ParsedState
Eq AnyUtxoData'ParsedState =>
(AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Ordering)
-> (AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool)
-> (AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool)
-> (AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool)
-> (AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool)
-> (AnyUtxoData'ParsedState
-> AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState)
-> (AnyUtxoData'ParsedState
-> AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState)
-> Ord AnyUtxoData'ParsedState
AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Ordering
AnyUtxoData'ParsedState
-> AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState
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
$ccompare :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Ordering
compare :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Ordering
$c< :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
< :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
$c<= :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
<= :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
$c> :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
> :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
$c>= :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
>= :: AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState -> Bool
$cmax :: AnyUtxoData'ParsedState
-> AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState
max :: AnyUtxoData'ParsedState
-> AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState
$cmin :: AnyUtxoData'ParsedState
-> AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState
min :: AnyUtxoData'ParsedState
-> AnyUtxoData'ParsedState -> AnyUtxoData'ParsedState
Prelude.Ord)
instance Data.ProtoLens.Field.HasField AnyUtxoData "nativeBytes" Data.ByteString.ByteString where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "nativeBytes"
-> (ByteString -> f ByteString) -> AnyUtxoData -> f AnyUtxoData
fieldOf Proxy# "nativeBytes"
_
= ((ByteString -> f ByteString) -> AnyUtxoData -> f AnyUtxoData)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> AnyUtxoData
-> f AnyUtxoData
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((AnyUtxoData -> ByteString)
-> (AnyUtxoData -> ByteString -> AnyUtxoData)
-> Lens AnyUtxoData AnyUtxoData ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AnyUtxoData -> ByteString
_AnyUtxoData'nativeBytes
(\ AnyUtxoData
x__ ByteString
y__ -> AnyUtxoData
x__ {_AnyUtxoData'nativeBytes = y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField AnyUtxoData "txoRef" TxoRef where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "txoRef"
-> (TxoRef -> f TxoRef) -> AnyUtxoData -> f AnyUtxoData
fieldOf Proxy# "txoRef"
_
= ((Maybe TxoRef -> f (Maybe TxoRef))
-> AnyUtxoData -> f AnyUtxoData)
-> ((TxoRef -> f TxoRef) -> Maybe TxoRef -> f (Maybe TxoRef))
-> (TxoRef -> f TxoRef)
-> AnyUtxoData
-> f AnyUtxoData
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((AnyUtxoData -> Maybe TxoRef)
-> (AnyUtxoData -> Maybe TxoRef -> AnyUtxoData)
-> Lens AnyUtxoData AnyUtxoData (Maybe TxoRef) (Maybe TxoRef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AnyUtxoData -> Maybe TxoRef
_AnyUtxoData'txoRef (\ AnyUtxoData
x__ Maybe TxoRef
y__ -> AnyUtxoData
x__ {_AnyUtxoData'txoRef = y__}))
(TxoRef -> Lens' (Maybe TxoRef) TxoRef
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens TxoRef
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField AnyUtxoData "maybe'txoRef" (Prelude.Maybe TxoRef) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'txoRef"
-> (Maybe TxoRef -> f (Maybe TxoRef))
-> AnyUtxoData
-> f AnyUtxoData
fieldOf Proxy# "maybe'txoRef"
_
= ((Maybe TxoRef -> f (Maybe TxoRef))
-> AnyUtxoData -> f AnyUtxoData)
-> ((Maybe TxoRef -> f (Maybe TxoRef))
-> Maybe TxoRef -> f (Maybe TxoRef))
-> (Maybe TxoRef -> f (Maybe TxoRef))
-> AnyUtxoData
-> f AnyUtxoData
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((AnyUtxoData -> Maybe TxoRef)
-> (AnyUtxoData -> Maybe TxoRef -> AnyUtxoData)
-> Lens AnyUtxoData AnyUtxoData (Maybe TxoRef) (Maybe TxoRef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AnyUtxoData -> Maybe TxoRef
_AnyUtxoData'txoRef (\ AnyUtxoData
x__ Maybe TxoRef
y__ -> AnyUtxoData
x__ {_AnyUtxoData'txoRef = y__}))
(Maybe TxoRef -> f (Maybe TxoRef))
-> Maybe TxoRef -> f (Maybe TxoRef)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField AnyUtxoData "maybe'parsedState" (Prelude.Maybe AnyUtxoData'ParsedState) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'parsedState"
-> (Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState))
-> AnyUtxoData
-> f AnyUtxoData
fieldOf Proxy# "maybe'parsedState"
_
= ((Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState))
-> AnyUtxoData -> f AnyUtxoData)
-> ((Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState))
-> Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState))
-> (Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState))
-> AnyUtxoData
-> f AnyUtxoData
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((AnyUtxoData -> Maybe AnyUtxoData'ParsedState)
-> (AnyUtxoData -> Maybe AnyUtxoData'ParsedState -> AnyUtxoData)
-> Lens
AnyUtxoData
AnyUtxoData
(Maybe AnyUtxoData'ParsedState)
(Maybe AnyUtxoData'ParsedState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AnyUtxoData -> Maybe AnyUtxoData'ParsedState
_AnyUtxoData'parsedState
(\ AnyUtxoData
x__ Maybe AnyUtxoData'ParsedState
y__ -> AnyUtxoData
x__ {_AnyUtxoData'parsedState = y__}))
(Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState))
-> Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField AnyUtxoData "maybe'cardano" (Prelude.Maybe Proto.Utxorpc.V1alpha.Cardano.Cardano.TxOutput) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'cardano"
-> (Maybe TxOutput -> f (Maybe TxOutput))
-> AnyUtxoData
-> f AnyUtxoData
fieldOf Proxy# "maybe'cardano"
_
= ((Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState))
-> AnyUtxoData -> f AnyUtxoData)
-> ((Maybe TxOutput -> f (Maybe TxOutput))
-> Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState))
-> (Maybe TxOutput -> f (Maybe TxOutput))
-> AnyUtxoData
-> f AnyUtxoData
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((AnyUtxoData -> Maybe AnyUtxoData'ParsedState)
-> (AnyUtxoData -> Maybe AnyUtxoData'ParsedState -> AnyUtxoData)
-> Lens
AnyUtxoData
AnyUtxoData
(Maybe AnyUtxoData'ParsedState)
(Maybe AnyUtxoData'ParsedState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AnyUtxoData -> Maybe AnyUtxoData'ParsedState
_AnyUtxoData'parsedState
(\ AnyUtxoData
x__ Maybe AnyUtxoData'ParsedState
y__ -> AnyUtxoData
x__ {_AnyUtxoData'parsedState = y__}))
((Maybe AnyUtxoData'ParsedState -> Maybe TxOutput)
-> (Maybe AnyUtxoData'ParsedState
-> Maybe TxOutput -> Maybe AnyUtxoData'ParsedState)
-> Lens
(Maybe AnyUtxoData'ParsedState)
(Maybe AnyUtxoData'ParsedState)
(Maybe TxOutput)
(Maybe TxOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ Maybe AnyUtxoData'ParsedState
x__
-> case Maybe AnyUtxoData'ParsedState
x__ of
(Prelude.Just (AnyUtxoData'Cardano TxOutput
x__val)) -> TxOutput -> Maybe TxOutput
forall a. a -> Maybe a
Prelude.Just TxOutput
x__val
Maybe AnyUtxoData'ParsedState
_otherwise -> Maybe TxOutput
forall a. Maybe a
Prelude.Nothing)
(\ Maybe AnyUtxoData'ParsedState
_ Maybe TxOutput
y__ -> (TxOutput -> AnyUtxoData'ParsedState)
-> Maybe TxOutput -> Maybe AnyUtxoData'ParsedState
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap TxOutput -> AnyUtxoData'ParsedState
AnyUtxoData'Cardano Maybe TxOutput
y__))
instance Data.ProtoLens.Field.HasField AnyUtxoData "cardano" Proto.Utxorpc.V1alpha.Cardano.Cardano.TxOutput where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "cardano"
-> (TxOutput -> f TxOutput) -> AnyUtxoData -> f AnyUtxoData
fieldOf Proxy# "cardano"
_
= ((Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState))
-> AnyUtxoData -> f AnyUtxoData)
-> ((TxOutput -> f TxOutput)
-> Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState))
-> (TxOutput -> f TxOutput)
-> AnyUtxoData
-> f AnyUtxoData
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((AnyUtxoData -> Maybe AnyUtxoData'ParsedState)
-> (AnyUtxoData -> Maybe AnyUtxoData'ParsedState -> AnyUtxoData)
-> Lens
AnyUtxoData
AnyUtxoData
(Maybe AnyUtxoData'ParsedState)
(Maybe AnyUtxoData'ParsedState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AnyUtxoData -> Maybe AnyUtxoData'ParsedState
_AnyUtxoData'parsedState
(\ AnyUtxoData
x__ Maybe AnyUtxoData'ParsedState
y__ -> AnyUtxoData
x__ {_AnyUtxoData'parsedState = y__}))
(((Maybe TxOutput -> f (Maybe TxOutput))
-> Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState))
-> ((TxOutput -> f TxOutput)
-> Maybe TxOutput -> f (Maybe TxOutput))
-> (TxOutput -> f TxOutput)
-> Maybe AnyUtxoData'ParsedState
-> f (Maybe AnyUtxoData'ParsedState)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe AnyUtxoData'ParsedState -> Maybe TxOutput)
-> (Maybe AnyUtxoData'ParsedState
-> Maybe TxOutput -> Maybe AnyUtxoData'ParsedState)
-> Lens
(Maybe AnyUtxoData'ParsedState)
(Maybe AnyUtxoData'ParsedState)
(Maybe TxOutput)
(Maybe TxOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ Maybe AnyUtxoData'ParsedState
x__
-> case Maybe AnyUtxoData'ParsedState
x__ of
(Prelude.Just (AnyUtxoData'Cardano TxOutput
x__val)) -> TxOutput -> Maybe TxOutput
forall a. a -> Maybe a
Prelude.Just TxOutput
x__val
Maybe AnyUtxoData'ParsedState
_otherwise -> Maybe TxOutput
forall a. Maybe a
Prelude.Nothing)
(\ Maybe AnyUtxoData'ParsedState
_ Maybe TxOutput
y__ -> (TxOutput -> AnyUtxoData'ParsedState)
-> Maybe TxOutput -> Maybe AnyUtxoData'ParsedState
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap TxOutput -> AnyUtxoData'ParsedState
AnyUtxoData'Cardano Maybe TxOutput
y__))
(TxOutput -> Lens' (Maybe TxOutput) TxOutput
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens TxOutput
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message AnyUtxoData where
messageName :: Proxy AnyUtxoData -> Text
messageName Proxy AnyUtxoData
_ = String -> Text
Data.Text.pack String
"utxorpc.v1alpha.query.AnyUtxoData"
packedMessageDescriptor :: Proxy AnyUtxoData -> ByteString
packedMessageDescriptor Proxy AnyUtxoData
_
= ByteString
"\n\
\\vAnyUtxoData\DC2!\n\
\\fnative_bytes\CAN\SOH \SOH(\fR\vnativeBytes\DC26\n\
\\atxo_ref\CAN\STX \SOH(\v2\GS.utxorpc.v1alpha.query.TxoRefR\ACKtxoRef\DC2=\n\
\\acardano\CAN\ETX \SOH(\v2!.utxorpc.v1alpha.cardano.TxOutputH\NULR\acardanoB\SO\n\
\\fparsed_state"
packedFileDescriptor :: Proxy AnyUtxoData -> ByteString
packedFileDescriptor Proxy AnyUtxoData
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor AnyUtxoData)
fieldsByTag
= let
nativeBytes__field_descriptor :: FieldDescriptor AnyUtxoData
nativeBytes__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor AnyUtxoData ByteString
-> FieldDescriptor AnyUtxoData
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"native_bytes"
(ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
(WireDefault ByteString
-> Lens AnyUtxoData AnyUtxoData ByteString ByteString
-> FieldAccessor AnyUtxoData 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 (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"nativeBytes")) ::
Data.ProtoLens.FieldDescriptor AnyUtxoData
txoRef__field_descriptor :: FieldDescriptor AnyUtxoData
txoRef__field_descriptor
= String
-> FieldTypeDescriptor TxoRef
-> FieldAccessor AnyUtxoData TxoRef
-> FieldDescriptor AnyUtxoData
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"txo_ref"
(MessageOrGroup -> FieldTypeDescriptor TxoRef
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor TxoRef)
(Lens AnyUtxoData AnyUtxoData (Maybe TxoRef) (Maybe TxoRef)
-> FieldAccessor AnyUtxoData TxoRef
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'txoRef")) ::
Data.ProtoLens.FieldDescriptor AnyUtxoData
cardano__field_descriptor :: FieldDescriptor AnyUtxoData
cardano__field_descriptor
= String
-> FieldTypeDescriptor TxOutput
-> FieldAccessor AnyUtxoData TxOutput
-> FieldDescriptor AnyUtxoData
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"cardano"
(MessageOrGroup -> FieldTypeDescriptor TxOutput
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Utxorpc.V1alpha.Cardano.Cardano.TxOutput)
(Lens' AnyUtxoData (Maybe TxOutput)
-> FieldAccessor AnyUtxoData TxOutput
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'cardano")) ::
Data.ProtoLens.FieldDescriptor AnyUtxoData
in
[(Tag, FieldDescriptor AnyUtxoData)]
-> Map Tag (FieldDescriptor AnyUtxoData)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor AnyUtxoData
nativeBytes__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor AnyUtxoData
txoRef__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
3, FieldDescriptor AnyUtxoData
cardano__field_descriptor)]
unknownFields :: Lens' AnyUtxoData FieldSet
unknownFields
= (AnyUtxoData -> FieldSet)
-> (AnyUtxoData -> FieldSet -> AnyUtxoData)
-> Lens' AnyUtxoData FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
AnyUtxoData -> FieldSet
_AnyUtxoData'_unknownFields
(\ AnyUtxoData
x__ FieldSet
y__ -> AnyUtxoData
x__ {_AnyUtxoData'_unknownFields = y__})
defMessage :: AnyUtxoData
defMessage
= AnyUtxoData'_constructor
{_AnyUtxoData'nativeBytes :: ByteString
_AnyUtxoData'nativeBytes = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_AnyUtxoData'txoRef :: Maybe TxoRef
_AnyUtxoData'txoRef = Maybe TxoRef
forall a. Maybe a
Prelude.Nothing,
_AnyUtxoData'parsedState :: Maybe AnyUtxoData'ParsedState
_AnyUtxoData'parsedState = Maybe AnyUtxoData'ParsedState
forall a. Maybe a
Prelude.Nothing,
_AnyUtxoData'_unknownFields :: FieldSet
_AnyUtxoData'_unknownFields = []}
parseMessage :: Parser AnyUtxoData
parseMessage
= let
loop ::
AnyUtxoData -> Data.ProtoLens.Encoding.Bytes.Parser AnyUtxoData
loop :: AnyUtxoData -> Parser AnyUtxoData
loop AnyUtxoData
x
= do end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if end then
do (let missing = []
in
if Prelude.null missing then
Prelude.return ()
else
Prelude.fail
((Prelude.++)
"Missing required fields: "
(Prelude.show (missing :: [Prelude.String]))))
Prelude.return
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) x)
else
do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
case tag of
Word64
10
-> do y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.getBytes
(Prelude.fromIntegral len))
String
"native_bytes"
loop
(Lens.Family2.set (Data.ProtoLens.Field.field @"nativeBytes") y x)
Word64
18
-> do y <- Parser TxoRef -> String -> Parser TxoRef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
String
"txo_ref"
loop (Lens.Family2.set (Data.ProtoLens.Field.field @"txoRef") y x)
Word64
26
-> do y <- Parser TxOutput -> String -> Parser TxOutput
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
String
"cardano"
loop (Lens.Family2.set (Data.ProtoLens.Field.field @"cardano") y x)
Word64
wire
-> do !y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
loop
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) x)
in
Parser AnyUtxoData -> String -> Parser AnyUtxoData
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do AnyUtxoData -> Parser AnyUtxoData
loop AnyUtxoData
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"AnyUtxoData"
buildMessage :: AnyUtxoData -> Builder
buildMessage
= \ AnyUtxoData
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: ByteString
_v
= FoldLike ByteString AnyUtxoData AnyUtxoData ByteString ByteString
-> AnyUtxoData -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"nativeBytes") AnyUtxoData
_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 Word64
10)
((\ 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 TxoRef)
AnyUtxoData
AnyUtxoData
(Maybe TxoRef)
(Maybe TxoRef)
-> AnyUtxoData -> Maybe TxoRef
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'txoRef") AnyUtxoData
_x
of
Maybe TxoRef
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just TxoRef
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
18)
((ByteString -> Builder)
-> (TxoRef -> ByteString) -> TxoRef -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
TxoRef -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage TxoRef
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe AnyUtxoData'ParsedState)
AnyUtxoData
AnyUtxoData
(Maybe AnyUtxoData'ParsedState)
(Maybe AnyUtxoData'ParsedState)
-> AnyUtxoData -> Maybe AnyUtxoData'ParsedState
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'parsedState") AnyUtxoData
_x
of
Maybe AnyUtxoData'ParsedState
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just (AnyUtxoData'Cardano TxOutput
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
26)
((ByteString -> Builder)
-> (TxOutput -> ByteString) -> TxOutput -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
TxOutput -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage TxOutput
v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet AnyUtxoData AnyUtxoData FieldSet FieldSet
-> AnyUtxoData -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet AnyUtxoData AnyUtxoData FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' AnyUtxoData FieldSet
Data.ProtoLens.unknownFields AnyUtxoData
_x))))
instance Control.DeepSeq.NFData AnyUtxoData where
rnf :: AnyUtxoData -> ()
rnf
= \ AnyUtxoData
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(AnyUtxoData -> FieldSet
_AnyUtxoData'_unknownFields AnyUtxoData
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(AnyUtxoData -> ByteString
_AnyUtxoData'nativeBytes AnyUtxoData
x__)
(Maybe TxoRef -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(AnyUtxoData -> Maybe TxoRef
_AnyUtxoData'txoRef AnyUtxoData
x__)
(Maybe AnyUtxoData'ParsedState -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (AnyUtxoData -> Maybe AnyUtxoData'ParsedState
_AnyUtxoData'parsedState AnyUtxoData
x__) ())))
instance Control.DeepSeq.NFData AnyUtxoData'ParsedState where
rnf :: AnyUtxoData'ParsedState -> ()
rnf (AnyUtxoData'Cardano TxOutput
x__) = TxOutput -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf TxOutput
x__
_AnyUtxoData'Cardano ::
Data.ProtoLens.Prism.Prism' AnyUtxoData'ParsedState Proto.Utxorpc.V1alpha.Cardano.Cardano.TxOutput
_AnyUtxoData'Cardano :: Prism' AnyUtxoData'ParsedState TxOutput
_AnyUtxoData'Cardano
= (TxOutput -> AnyUtxoData'ParsedState)
-> (AnyUtxoData'ParsedState -> Maybe TxOutput)
-> Prism' AnyUtxoData'ParsedState TxOutput
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
TxOutput -> AnyUtxoData'ParsedState
AnyUtxoData'Cardano
(\ AnyUtxoData'ParsedState
p__
-> case AnyUtxoData'ParsedState
p__ of (AnyUtxoData'Cardano TxOutput
p__val) -> TxOutput -> Maybe TxOutput
forall a. a -> Maybe a
Prelude.Just TxOutput
p__val)
data ChainPoint
= ChainPoint'_constructor {ChainPoint -> Word64
_ChainPoint'slot :: !Data.Word.Word64,
ChainPoint -> ByteString
_ChainPoint'hash :: !Data.ByteString.ByteString,
ChainPoint -> Word64
_ChainPoint'height :: !Data.Word.Word64,
ChainPoint -> Word64
_ChainPoint'timestamp :: !Data.Word.Word64,
ChainPoint -> FieldSet
_ChainPoint'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (ChainPoint -> ChainPoint -> Bool
(ChainPoint -> ChainPoint -> Bool)
-> (ChainPoint -> ChainPoint -> Bool) -> Eq ChainPoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ChainPoint -> ChainPoint -> Bool
== :: ChainPoint -> ChainPoint -> Bool
$c/= :: ChainPoint -> ChainPoint -> Bool
/= :: ChainPoint -> ChainPoint -> Bool
Prelude.Eq, Eq ChainPoint
Eq ChainPoint =>
(ChainPoint -> ChainPoint -> Ordering)
-> (ChainPoint -> ChainPoint -> Bool)
-> (ChainPoint -> ChainPoint -> Bool)
-> (ChainPoint -> ChainPoint -> Bool)
-> (ChainPoint -> ChainPoint -> Bool)
-> (ChainPoint -> ChainPoint -> ChainPoint)
-> (ChainPoint -> ChainPoint -> ChainPoint)
-> Ord ChainPoint
ChainPoint -> ChainPoint -> Bool
ChainPoint -> ChainPoint -> Ordering
ChainPoint -> ChainPoint -> ChainPoint
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
$ccompare :: ChainPoint -> ChainPoint -> Ordering
compare :: ChainPoint -> ChainPoint -> Ordering
$c< :: ChainPoint -> ChainPoint -> Bool
< :: ChainPoint -> ChainPoint -> Bool
$c<= :: ChainPoint -> ChainPoint -> Bool
<= :: ChainPoint -> ChainPoint -> Bool
$c> :: ChainPoint -> ChainPoint -> Bool
> :: ChainPoint -> ChainPoint -> Bool
$c>= :: ChainPoint -> ChainPoint -> Bool
>= :: ChainPoint -> ChainPoint -> Bool
$cmax :: ChainPoint -> ChainPoint -> ChainPoint
max :: ChainPoint -> ChainPoint -> ChainPoint
$cmin :: ChainPoint -> ChainPoint -> ChainPoint
min :: ChainPoint -> ChainPoint -> ChainPoint
Prelude.Ord)
instance Prelude.Show ChainPoint where
showsPrec :: Int -> ChainPoint -> ShowS
showsPrec Int
_ ChainPoint
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(ChainPoint -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ChainPoint
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField ChainPoint "slot" Data.Word.Word64 where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "slot" -> (Word64 -> f Word64) -> ChainPoint -> f ChainPoint
fieldOf Proxy# "slot"
_
= ((Word64 -> f Word64) -> ChainPoint -> f ChainPoint)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> ChainPoint
-> f ChainPoint
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ChainPoint -> Word64)
-> (ChainPoint -> Word64 -> ChainPoint)
-> Lens ChainPoint ChainPoint Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ChainPoint -> Word64
_ChainPoint'slot (\ ChainPoint
x__ Word64
y__ -> ChainPoint
x__ {_ChainPoint'slot = y__}))
(Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ChainPoint "hash" Data.ByteString.ByteString where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "hash"
-> (ByteString -> f ByteString) -> ChainPoint -> f ChainPoint
fieldOf Proxy# "hash"
_
= ((ByteString -> f ByteString) -> ChainPoint -> f ChainPoint)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> ChainPoint
-> f ChainPoint
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ChainPoint -> ByteString)
-> (ChainPoint -> ByteString -> ChainPoint)
-> Lens ChainPoint ChainPoint ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ChainPoint -> ByteString
_ChainPoint'hash (\ ChainPoint
x__ ByteString
y__ -> ChainPoint
x__ {_ChainPoint'hash = y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ChainPoint "height" Data.Word.Word64 where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "height"
-> (Word64 -> f Word64) -> ChainPoint -> f ChainPoint
fieldOf Proxy# "height"
_
= ((Word64 -> f Word64) -> ChainPoint -> f ChainPoint)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> ChainPoint
-> f ChainPoint
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ChainPoint -> Word64)
-> (ChainPoint -> Word64 -> ChainPoint)
-> Lens ChainPoint ChainPoint Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ChainPoint -> Word64
_ChainPoint'height (\ ChainPoint
x__ Word64
y__ -> ChainPoint
x__ {_ChainPoint'height = y__}))
(Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ChainPoint "timestamp" Data.Word.Word64 where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "timestamp"
-> (Word64 -> f Word64) -> ChainPoint -> f ChainPoint
fieldOf Proxy# "timestamp"
_
= ((Word64 -> f Word64) -> ChainPoint -> f ChainPoint)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> ChainPoint
-> f ChainPoint
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ChainPoint -> Word64)
-> (ChainPoint -> Word64 -> ChainPoint)
-> Lens ChainPoint ChainPoint Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ChainPoint -> Word64
_ChainPoint'timestamp
(\ ChainPoint
x__ Word64
y__ -> ChainPoint
x__ {_ChainPoint'timestamp = y__}))
(Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ChainPoint where
messageName :: Proxy ChainPoint -> Text
messageName Proxy ChainPoint
_ = String -> Text
Data.Text.pack String
"utxorpc.v1alpha.query.ChainPoint"
packedMessageDescriptor :: Proxy ChainPoint -> ByteString
packedMessageDescriptor Proxy ChainPoint
_
= ByteString
"\n\
\\n\
\ChainPoint\DC2\DC2\n\
\\EOTslot\CAN\SOH \SOH(\EOTR\EOTslot\DC2\DC2\n\
\\EOThash\CAN\STX \SOH(\fR\EOThash\DC2\SYN\n\
\\ACKheight\CAN\ETX \SOH(\EOTR\ACKheight\DC2\FS\n\
\\ttimestamp\CAN\EOT \SOH(\EOTR\ttimestamp"
packedFileDescriptor :: Proxy ChainPoint -> ByteString
packedFileDescriptor Proxy ChainPoint
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor ChainPoint)
fieldsByTag
= let
slot__field_descriptor :: FieldDescriptor ChainPoint
slot__field_descriptor
= String
-> FieldTypeDescriptor Word64
-> FieldAccessor ChainPoint Word64
-> FieldDescriptor ChainPoint
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"slot"
(ScalarField Word64 -> FieldTypeDescriptor Word64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word64
Data.ProtoLens.UInt64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
(WireDefault Word64
-> Lens ChainPoint ChainPoint Word64 Word64
-> FieldAccessor ChainPoint Word64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Word64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"slot")) ::
Data.ProtoLens.FieldDescriptor ChainPoint
hash__field_descriptor :: FieldDescriptor ChainPoint
hash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor ChainPoint ByteString
-> FieldDescriptor ChainPoint
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"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 ChainPoint ChainPoint ByteString ByteString
-> FieldAccessor ChainPoint 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 (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"hash")) ::
Data.ProtoLens.FieldDescriptor ChainPoint
height__field_descriptor :: FieldDescriptor ChainPoint
height__field_descriptor
= String
-> FieldTypeDescriptor Word64
-> FieldAccessor ChainPoint Word64
-> FieldDescriptor ChainPoint
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"height"
(ScalarField Word64 -> FieldTypeDescriptor Word64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word64
Data.ProtoLens.UInt64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
(WireDefault Word64
-> Lens ChainPoint ChainPoint Word64 Word64
-> FieldAccessor ChainPoint Word64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Word64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall (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 ChainPoint
timestamp__field_descriptor :: FieldDescriptor ChainPoint
timestamp__field_descriptor
= String
-> FieldTypeDescriptor Word64
-> FieldAccessor ChainPoint Word64
-> FieldDescriptor ChainPoint
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"timestamp"
(ScalarField Word64 -> FieldTypeDescriptor Word64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word64
Data.ProtoLens.UInt64Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
(WireDefault Word64
-> Lens ChainPoint ChainPoint Word64 Word64
-> FieldAccessor ChainPoint Word64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Word64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"timestamp")) ::
Data.ProtoLens.FieldDescriptor ChainPoint
in
[(Tag, FieldDescriptor ChainPoint)]
-> Map Tag (FieldDescriptor ChainPoint)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor ChainPoint
slot__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor ChainPoint
hash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
3, FieldDescriptor ChainPoint
height__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
4, FieldDescriptor ChainPoint
timestamp__field_descriptor)]
unknownFields :: Lens' ChainPoint FieldSet
unknownFields
= (ChainPoint -> FieldSet)
-> (ChainPoint -> FieldSet -> ChainPoint)
-> Lens' ChainPoint FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ChainPoint -> FieldSet
_ChainPoint'_unknownFields
(\ ChainPoint
x__ FieldSet
y__ -> ChainPoint
x__ {_ChainPoint'_unknownFields = y__})
defMessage :: ChainPoint
defMessage
= ChainPoint'_constructor
{_ChainPoint'slot :: Word64
_ChainPoint'slot = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ChainPoint'hash :: ByteString
_ChainPoint'hash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ChainPoint'height :: Word64
_ChainPoint'height = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ChainPoint'timestamp :: Word64
_ChainPoint'timestamp = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_ChainPoint'_unknownFields :: FieldSet
_ChainPoint'_unknownFields = []}
parseMessage :: Parser ChainPoint
parseMessage
= let
loop ::
ChainPoint -> Data.ProtoLens.Encoding.Bytes.Parser ChainPoint
loop :: ChainPoint -> Parser ChainPoint
loop ChainPoint
x
= do end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if end then
do (let missing = []
in
if Prelude.null missing then
Prelude.return ()
else
Prelude.fail
((Prelude.++)
"Missing required fields: "
(Prelude.show (missing :: [Prelude.String]))))
Prelude.return
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) x)
else
do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
case tag of
Word64
8 -> do y <- Parser Word64 -> String -> Parser Word64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt String
"slot"
loop (Lens.Family2.set (Data.ProtoLens.Field.field @"slot") y x)
Word64
18
-> do y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.getBytes
(Prelude.fromIntegral len))
String
"hash"
loop (Lens.Family2.set (Data.ProtoLens.Field.field @"hash") y x)
Word64
24
-> do y <- Parser Word64 -> String -> Parser Word64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt String
"height"
loop (Lens.Family2.set (Data.ProtoLens.Field.field @"height") y x)
Word64
32
-> do y <- Parser Word64 -> String -> Parser Word64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt String
"timestamp"
loop
(Lens.Family2.set (Data.ProtoLens.Field.field @"timestamp") y x)
Word64
wire
-> do !y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
loop
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) x)
in
Parser ChainPoint -> String -> Parser ChainPoint
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ChainPoint -> Parser ChainPoint
loop ChainPoint
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"ChainPoint"
buildMessage :: ChainPoint -> Builder
buildMessage
= \ ChainPoint
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Word64
_v = FoldLike Word64 ChainPoint ChainPoint Word64 Word64
-> ChainPoint -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"slot") ChainPoint
_x
in
if Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word64
_v Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
8)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: ByteString
_v = FoldLike ByteString ChainPoint ChainPoint ByteString ByteString
-> ChainPoint -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"hash") ChainPoint
_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 Word64
18)
((\ 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 :: Word64
_v = FoldLike Word64 ChainPoint ChainPoint Word64 Word64
-> ChainPoint -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"height") ChainPoint
_x
in
if Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word64
_v Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
24)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Word64
_v = FoldLike Word64 ChainPoint ChainPoint Word64 Word64
-> ChainPoint -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"timestamp") ChainPoint
_x
in
if Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word64
_v Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
32)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet ChainPoint ChainPoint FieldSet FieldSet
-> ChainPoint -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet ChainPoint ChainPoint FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ChainPoint FieldSet
Data.ProtoLens.unknownFields ChainPoint
_x)))))
instance Control.DeepSeq.NFData ChainPoint where
rnf :: ChainPoint -> ()
rnf
= \ ChainPoint
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ChainPoint -> FieldSet
_ChainPoint'_unknownFields ChainPoint
x__)
(Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ChainPoint -> Word64
_ChainPoint'slot ChainPoint
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ChainPoint -> ByteString
_ChainPoint'hash ChainPoint
x__)
(Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ChainPoint -> Word64
_ChainPoint'height ChainPoint
x__)
(Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ChainPoint -> Word64
_ChainPoint'timestamp ChainPoint
x__) ()))))
data ReadParamsRequest
= ReadParamsRequest'_constructor {ReadParamsRequest -> Maybe FieldMask
_ReadParamsRequest'fieldMask :: !(Prelude.Maybe Proto.Google.Protobuf.FieldMask.FieldMask),
ReadParamsRequest -> FieldSet
_ReadParamsRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (ReadParamsRequest -> ReadParamsRequest -> Bool
(ReadParamsRequest -> ReadParamsRequest -> Bool)
-> (ReadParamsRequest -> ReadParamsRequest -> Bool)
-> Eq ReadParamsRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadParamsRequest -> ReadParamsRequest -> Bool
== :: ReadParamsRequest -> ReadParamsRequest -> Bool
$c/= :: ReadParamsRequest -> ReadParamsRequest -> Bool
/= :: ReadParamsRequest -> ReadParamsRequest -> Bool
Prelude.Eq, Eq ReadParamsRequest
Eq ReadParamsRequest =>
(ReadParamsRequest -> ReadParamsRequest -> Ordering)
-> (ReadParamsRequest -> ReadParamsRequest -> Bool)
-> (ReadParamsRequest -> ReadParamsRequest -> Bool)
-> (ReadParamsRequest -> ReadParamsRequest -> Bool)
-> (ReadParamsRequest -> ReadParamsRequest -> Bool)
-> (ReadParamsRequest -> ReadParamsRequest -> ReadParamsRequest)
-> (ReadParamsRequest -> ReadParamsRequest -> ReadParamsRequest)
-> Ord ReadParamsRequest
ReadParamsRequest -> ReadParamsRequest -> Bool
ReadParamsRequest -> ReadParamsRequest -> Ordering
ReadParamsRequest -> ReadParamsRequest -> ReadParamsRequest
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
$ccompare :: ReadParamsRequest -> ReadParamsRequest -> Ordering
compare :: ReadParamsRequest -> ReadParamsRequest -> Ordering
$c< :: ReadParamsRequest -> ReadParamsRequest -> Bool
< :: ReadParamsRequest -> ReadParamsRequest -> Bool
$c<= :: ReadParamsRequest -> ReadParamsRequest -> Bool
<= :: ReadParamsRequest -> ReadParamsRequest -> Bool
$c> :: ReadParamsRequest -> ReadParamsRequest -> Bool
> :: ReadParamsRequest -> ReadParamsRequest -> Bool
$c>= :: ReadParamsRequest -> ReadParamsRequest -> Bool
>= :: ReadParamsRequest -> ReadParamsRequest -> Bool
$cmax :: ReadParamsRequest -> ReadParamsRequest -> ReadParamsRequest
max :: ReadParamsRequest -> ReadParamsRequest -> ReadParamsRequest
$cmin :: ReadParamsRequest -> ReadParamsRequest -> ReadParamsRequest
min :: ReadParamsRequest -> ReadParamsRequest -> ReadParamsRequest
Prelude.Ord)
instance Prelude.Show ReadParamsRequest where
showsPrec :: Int -> ReadParamsRequest -> ShowS
showsPrec Int
_ ReadParamsRequest
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(ReadParamsRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ReadParamsRequest
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField ReadParamsRequest "fieldMask" Proto.Google.Protobuf.FieldMask.FieldMask where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "fieldMask"
-> (FieldMask -> f FieldMask)
-> ReadParamsRequest
-> f ReadParamsRequest
fieldOf Proxy# "fieldMask"
_
= ((Maybe FieldMask -> f (Maybe FieldMask))
-> ReadParamsRequest -> f ReadParamsRequest)
-> ((FieldMask -> f FieldMask)
-> Maybe FieldMask -> f (Maybe FieldMask))
-> (FieldMask -> f FieldMask)
-> ReadParamsRequest
-> f ReadParamsRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadParamsRequest -> Maybe FieldMask)
-> (ReadParamsRequest -> Maybe FieldMask -> ReadParamsRequest)
-> Lens
ReadParamsRequest
ReadParamsRequest
(Maybe FieldMask)
(Maybe FieldMask)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadParamsRequest -> Maybe FieldMask
_ReadParamsRequest'fieldMask
(\ ReadParamsRequest
x__ Maybe FieldMask
y__ -> ReadParamsRequest
x__ {_ReadParamsRequest'fieldMask = y__}))
(FieldMask -> Lens' (Maybe FieldMask) FieldMask
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens FieldMask
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ReadParamsRequest "maybe'fieldMask" (Prelude.Maybe Proto.Google.Protobuf.FieldMask.FieldMask) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'fieldMask"
-> (Maybe FieldMask -> f (Maybe FieldMask))
-> ReadParamsRequest
-> f ReadParamsRequest
fieldOf Proxy# "maybe'fieldMask"
_
= ((Maybe FieldMask -> f (Maybe FieldMask))
-> ReadParamsRequest -> f ReadParamsRequest)
-> ((Maybe FieldMask -> f (Maybe FieldMask))
-> Maybe FieldMask -> f (Maybe FieldMask))
-> (Maybe FieldMask -> f (Maybe FieldMask))
-> ReadParamsRequest
-> f ReadParamsRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadParamsRequest -> Maybe FieldMask)
-> (ReadParamsRequest -> Maybe FieldMask -> ReadParamsRequest)
-> Lens
ReadParamsRequest
ReadParamsRequest
(Maybe FieldMask)
(Maybe FieldMask)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadParamsRequest -> Maybe FieldMask
_ReadParamsRequest'fieldMask
(\ ReadParamsRequest
x__ Maybe FieldMask
y__ -> ReadParamsRequest
x__ {_ReadParamsRequest'fieldMask = y__}))
(Maybe FieldMask -> f (Maybe FieldMask))
-> Maybe FieldMask -> f (Maybe FieldMask)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ReadParamsRequest where
messageName :: Proxy ReadParamsRequest -> Text
messageName Proxy ReadParamsRequest
_
= String -> Text
Data.Text.pack String
"utxorpc.v1alpha.query.ReadParamsRequest"
packedMessageDescriptor :: Proxy ReadParamsRequest -> ByteString
packedMessageDescriptor Proxy ReadParamsRequest
_
= ByteString
"\n\
\\DC1ReadParamsRequest\DC29\n\
\\n\
\field_mask\CAN\SOH \SOH(\v2\SUB.google.protobuf.FieldMaskR\tfieldMask"
packedFileDescriptor :: Proxy ReadParamsRequest -> ByteString
packedFileDescriptor Proxy ReadParamsRequest
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor ReadParamsRequest)
fieldsByTag
= let
fieldMask__field_descriptor :: FieldDescriptor ReadParamsRequest
fieldMask__field_descriptor
= String
-> FieldTypeDescriptor FieldMask
-> FieldAccessor ReadParamsRequest FieldMask
-> FieldDescriptor ReadParamsRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"field_mask"
(MessageOrGroup -> FieldTypeDescriptor FieldMask
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Google.Protobuf.FieldMask.FieldMask)
(Lens
ReadParamsRequest
ReadParamsRequest
(Maybe FieldMask)
(Maybe FieldMask)
-> FieldAccessor ReadParamsRequest FieldMask
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'fieldMask")) ::
Data.ProtoLens.FieldDescriptor ReadParamsRequest
in
[(Tag, FieldDescriptor ReadParamsRequest)]
-> Map Tag (FieldDescriptor ReadParamsRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor ReadParamsRequest
fieldMask__field_descriptor)]
unknownFields :: Lens' ReadParamsRequest FieldSet
unknownFields
= (ReadParamsRequest -> FieldSet)
-> (ReadParamsRequest -> FieldSet -> ReadParamsRequest)
-> Lens' ReadParamsRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadParamsRequest -> FieldSet
_ReadParamsRequest'_unknownFields
(\ ReadParamsRequest
x__ FieldSet
y__ -> ReadParamsRequest
x__ {_ReadParamsRequest'_unknownFields = y__})
defMessage :: ReadParamsRequest
defMessage
= ReadParamsRequest'_constructor
{_ReadParamsRequest'fieldMask :: Maybe FieldMask
_ReadParamsRequest'fieldMask = Maybe FieldMask
forall a. Maybe a
Prelude.Nothing,
_ReadParamsRequest'_unknownFields :: FieldSet
_ReadParamsRequest'_unknownFields = []}
parseMessage :: Parser ReadParamsRequest
parseMessage
= let
loop ::
ReadParamsRequest
-> Data.ProtoLens.Encoding.Bytes.Parser ReadParamsRequest
loop :: ReadParamsRequest -> Parser ReadParamsRequest
loop ReadParamsRequest
x
= do end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if end then
do (let missing = []
in
if Prelude.null missing then
Prelude.return ()
else
Prelude.fail
((Prelude.++)
"Missing required fields: "
(Prelude.show (missing :: [Prelude.String]))))
Prelude.return
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) x)
else
do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
case tag of
Word64
10
-> do y <- Parser FieldMask -> String -> Parser FieldMask
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
String
"field_mask"
loop
(Lens.Family2.set (Data.ProtoLens.Field.field @"fieldMask") y x)
Word64
wire
-> do !y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
loop
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) x)
in
Parser ReadParamsRequest -> String -> Parser ReadParamsRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ReadParamsRequest -> Parser ReadParamsRequest
loop ReadParamsRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"ReadParamsRequest"
buildMessage :: ReadParamsRequest -> Builder
buildMessage
= \ ReadParamsRequest
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe FieldMask)
ReadParamsRequest
ReadParamsRequest
(Maybe FieldMask)
(Maybe FieldMask)
-> ReadParamsRequest -> Maybe FieldMask
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'fieldMask") ReadParamsRequest
_x
of
Maybe FieldMask
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just FieldMask
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
((ByteString -> Builder)
-> (FieldMask -> ByteString) -> FieldMask -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
FieldMask -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage FieldMask
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet ReadParamsRequest ReadParamsRequest FieldSet FieldSet
-> ReadParamsRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet ReadParamsRequest ReadParamsRequest FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ReadParamsRequest FieldSet
Data.ProtoLens.unknownFields ReadParamsRequest
_x))
instance Control.DeepSeq.NFData ReadParamsRequest where
rnf :: ReadParamsRequest -> ()
rnf
= \ ReadParamsRequest
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ReadParamsRequest -> FieldSet
_ReadParamsRequest'_unknownFields ReadParamsRequest
x__)
(Maybe FieldMask -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ReadParamsRequest -> Maybe FieldMask
_ReadParamsRequest'fieldMask ReadParamsRequest
x__) ())
data ReadParamsResponse
= ReadParamsResponse'_constructor {ReadParamsResponse -> Maybe AnyChainParams
_ReadParamsResponse'values :: !(Prelude.Maybe AnyChainParams),
ReadParamsResponse -> Maybe ChainPoint
_ReadParamsResponse'ledgerTip :: !(Prelude.Maybe ChainPoint),
ReadParamsResponse -> FieldSet
_ReadParamsResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (ReadParamsResponse -> ReadParamsResponse -> Bool
(ReadParamsResponse -> ReadParamsResponse -> Bool)
-> (ReadParamsResponse -> ReadParamsResponse -> Bool)
-> Eq ReadParamsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadParamsResponse -> ReadParamsResponse -> Bool
== :: ReadParamsResponse -> ReadParamsResponse -> Bool
$c/= :: ReadParamsResponse -> ReadParamsResponse -> Bool
/= :: ReadParamsResponse -> ReadParamsResponse -> Bool
Prelude.Eq, Eq ReadParamsResponse
Eq ReadParamsResponse =>
(ReadParamsResponse -> ReadParamsResponse -> Ordering)
-> (ReadParamsResponse -> ReadParamsResponse -> Bool)
-> (ReadParamsResponse -> ReadParamsResponse -> Bool)
-> (ReadParamsResponse -> ReadParamsResponse -> Bool)
-> (ReadParamsResponse -> ReadParamsResponse -> Bool)
-> (ReadParamsResponse -> ReadParamsResponse -> ReadParamsResponse)
-> (ReadParamsResponse -> ReadParamsResponse -> ReadParamsResponse)
-> Ord ReadParamsResponse
ReadParamsResponse -> ReadParamsResponse -> Bool
ReadParamsResponse -> ReadParamsResponse -> Ordering
ReadParamsResponse -> ReadParamsResponse -> ReadParamsResponse
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
$ccompare :: ReadParamsResponse -> ReadParamsResponse -> Ordering
compare :: ReadParamsResponse -> ReadParamsResponse -> Ordering
$c< :: ReadParamsResponse -> ReadParamsResponse -> Bool
< :: ReadParamsResponse -> ReadParamsResponse -> Bool
$c<= :: ReadParamsResponse -> ReadParamsResponse -> Bool
<= :: ReadParamsResponse -> ReadParamsResponse -> Bool
$c> :: ReadParamsResponse -> ReadParamsResponse -> Bool
> :: ReadParamsResponse -> ReadParamsResponse -> Bool
$c>= :: ReadParamsResponse -> ReadParamsResponse -> Bool
>= :: ReadParamsResponse -> ReadParamsResponse -> Bool
$cmax :: ReadParamsResponse -> ReadParamsResponse -> ReadParamsResponse
max :: ReadParamsResponse -> ReadParamsResponse -> ReadParamsResponse
$cmin :: ReadParamsResponse -> ReadParamsResponse -> ReadParamsResponse
min :: ReadParamsResponse -> ReadParamsResponse -> ReadParamsResponse
Prelude.Ord)
instance Prelude.Show ReadParamsResponse where
showsPrec :: Int -> ReadParamsResponse -> ShowS
showsPrec Int
_ ReadParamsResponse
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(ReadParamsResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ReadParamsResponse
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField ReadParamsResponse "values" AnyChainParams where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "values"
-> (AnyChainParams -> f AnyChainParams)
-> ReadParamsResponse
-> f ReadParamsResponse
fieldOf Proxy# "values"
_
= ((Maybe AnyChainParams -> f (Maybe AnyChainParams))
-> ReadParamsResponse -> f ReadParamsResponse)
-> ((AnyChainParams -> f AnyChainParams)
-> Maybe AnyChainParams -> f (Maybe AnyChainParams))
-> (AnyChainParams -> f AnyChainParams)
-> ReadParamsResponse
-> f ReadParamsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadParamsResponse -> Maybe AnyChainParams)
-> (ReadParamsResponse
-> Maybe AnyChainParams -> ReadParamsResponse)
-> Lens
ReadParamsResponse
ReadParamsResponse
(Maybe AnyChainParams)
(Maybe AnyChainParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadParamsResponse -> Maybe AnyChainParams
_ReadParamsResponse'values
(\ ReadParamsResponse
x__ Maybe AnyChainParams
y__ -> ReadParamsResponse
x__ {_ReadParamsResponse'values = y__}))
(AnyChainParams -> Lens' (Maybe AnyChainParams) AnyChainParams
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens AnyChainParams
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ReadParamsResponse "maybe'values" (Prelude.Maybe AnyChainParams) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'values"
-> (Maybe AnyChainParams -> f (Maybe AnyChainParams))
-> ReadParamsResponse
-> f ReadParamsResponse
fieldOf Proxy# "maybe'values"
_
= ((Maybe AnyChainParams -> f (Maybe AnyChainParams))
-> ReadParamsResponse -> f ReadParamsResponse)
-> ((Maybe AnyChainParams -> f (Maybe AnyChainParams))
-> Maybe AnyChainParams -> f (Maybe AnyChainParams))
-> (Maybe AnyChainParams -> f (Maybe AnyChainParams))
-> ReadParamsResponse
-> f ReadParamsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadParamsResponse -> Maybe AnyChainParams)
-> (ReadParamsResponse
-> Maybe AnyChainParams -> ReadParamsResponse)
-> Lens
ReadParamsResponse
ReadParamsResponse
(Maybe AnyChainParams)
(Maybe AnyChainParams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadParamsResponse -> Maybe AnyChainParams
_ReadParamsResponse'values
(\ ReadParamsResponse
x__ Maybe AnyChainParams
y__ -> ReadParamsResponse
x__ {_ReadParamsResponse'values = y__}))
(Maybe AnyChainParams -> f (Maybe AnyChainParams))
-> Maybe AnyChainParams -> f (Maybe AnyChainParams)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ReadParamsResponse "ledgerTip" ChainPoint where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "ledgerTip"
-> (ChainPoint -> f ChainPoint)
-> ReadParamsResponse
-> f ReadParamsResponse
fieldOf Proxy# "ledgerTip"
_
= ((Maybe ChainPoint -> f (Maybe ChainPoint))
-> ReadParamsResponse -> f ReadParamsResponse)
-> ((ChainPoint -> f ChainPoint)
-> Maybe ChainPoint -> f (Maybe ChainPoint))
-> (ChainPoint -> f ChainPoint)
-> ReadParamsResponse
-> f ReadParamsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadParamsResponse -> Maybe ChainPoint)
-> (ReadParamsResponse -> Maybe ChainPoint -> ReadParamsResponse)
-> Lens
ReadParamsResponse
ReadParamsResponse
(Maybe ChainPoint)
(Maybe ChainPoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadParamsResponse -> Maybe ChainPoint
_ReadParamsResponse'ledgerTip
(\ ReadParamsResponse
x__ Maybe ChainPoint
y__ -> ReadParamsResponse
x__ {_ReadParamsResponse'ledgerTip = y__}))
(ChainPoint -> Lens' (Maybe ChainPoint) ChainPoint
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ChainPoint
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ReadParamsResponse "maybe'ledgerTip" (Prelude.Maybe ChainPoint) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'ledgerTip"
-> (Maybe ChainPoint -> f (Maybe ChainPoint))
-> ReadParamsResponse
-> f ReadParamsResponse
fieldOf Proxy# "maybe'ledgerTip"
_
= ((Maybe ChainPoint -> f (Maybe ChainPoint))
-> ReadParamsResponse -> f ReadParamsResponse)
-> ((Maybe ChainPoint -> f (Maybe ChainPoint))
-> Maybe ChainPoint -> f (Maybe ChainPoint))
-> (Maybe ChainPoint -> f (Maybe ChainPoint))
-> ReadParamsResponse
-> f ReadParamsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadParamsResponse -> Maybe ChainPoint)
-> (ReadParamsResponse -> Maybe ChainPoint -> ReadParamsResponse)
-> Lens
ReadParamsResponse
ReadParamsResponse
(Maybe ChainPoint)
(Maybe ChainPoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadParamsResponse -> Maybe ChainPoint
_ReadParamsResponse'ledgerTip
(\ ReadParamsResponse
x__ Maybe ChainPoint
y__ -> ReadParamsResponse
x__ {_ReadParamsResponse'ledgerTip = y__}))
(Maybe ChainPoint -> f (Maybe ChainPoint))
-> Maybe ChainPoint -> f (Maybe ChainPoint)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ReadParamsResponse where
messageName :: Proxy ReadParamsResponse -> Text
messageName Proxy ReadParamsResponse
_
= String -> Text
Data.Text.pack String
"utxorpc.v1alpha.query.ReadParamsResponse"
packedMessageDescriptor :: Proxy ReadParamsResponse -> ByteString
packedMessageDescriptor Proxy ReadParamsResponse
_
= ByteString
"\n\
\\DC2ReadParamsResponse\DC2=\n\
\\ACKvalues\CAN\SOH \SOH(\v2%.utxorpc.v1alpha.query.AnyChainParamsR\ACKvalues\DC2@\n\
\\n\
\ledger_tip\CAN\STX \SOH(\v2!.utxorpc.v1alpha.query.ChainPointR\tledgerTip"
packedFileDescriptor :: Proxy ReadParamsResponse -> ByteString
packedFileDescriptor Proxy ReadParamsResponse
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor ReadParamsResponse)
fieldsByTag
= let
values__field_descriptor :: FieldDescriptor ReadParamsResponse
values__field_descriptor
= String
-> FieldTypeDescriptor AnyChainParams
-> FieldAccessor ReadParamsResponse AnyChainParams
-> FieldDescriptor ReadParamsResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"values"
(MessageOrGroup -> FieldTypeDescriptor AnyChainParams
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor AnyChainParams)
(Lens
ReadParamsResponse
ReadParamsResponse
(Maybe AnyChainParams)
(Maybe AnyChainParams)
-> FieldAccessor ReadParamsResponse AnyChainParams
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'values")) ::
Data.ProtoLens.FieldDescriptor ReadParamsResponse
ledgerTip__field_descriptor :: FieldDescriptor ReadParamsResponse
ledgerTip__field_descriptor
= String
-> FieldTypeDescriptor ChainPoint
-> FieldAccessor ReadParamsResponse ChainPoint
-> FieldDescriptor ReadParamsResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"ledger_tip"
(MessageOrGroup -> FieldTypeDescriptor ChainPoint
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ChainPoint)
(Lens
ReadParamsResponse
ReadParamsResponse
(Maybe ChainPoint)
(Maybe ChainPoint)
-> FieldAccessor ReadParamsResponse ChainPoint
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'ledgerTip")) ::
Data.ProtoLens.FieldDescriptor ReadParamsResponse
in
[(Tag, FieldDescriptor ReadParamsResponse)]
-> Map Tag (FieldDescriptor ReadParamsResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor ReadParamsResponse
values__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor ReadParamsResponse
ledgerTip__field_descriptor)]
unknownFields :: Lens' ReadParamsResponse FieldSet
unknownFields
= (ReadParamsResponse -> FieldSet)
-> (ReadParamsResponse -> FieldSet -> ReadParamsResponse)
-> Lens' ReadParamsResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadParamsResponse -> FieldSet
_ReadParamsResponse'_unknownFields
(\ ReadParamsResponse
x__ FieldSet
y__ -> ReadParamsResponse
x__ {_ReadParamsResponse'_unknownFields = y__})
defMessage :: ReadParamsResponse
defMessage
= ReadParamsResponse'_constructor
{_ReadParamsResponse'values :: Maybe AnyChainParams
_ReadParamsResponse'values = Maybe AnyChainParams
forall a. Maybe a
Prelude.Nothing,
_ReadParamsResponse'ledgerTip :: Maybe ChainPoint
_ReadParamsResponse'ledgerTip = Maybe ChainPoint
forall a. Maybe a
Prelude.Nothing,
_ReadParamsResponse'_unknownFields :: FieldSet
_ReadParamsResponse'_unknownFields = []}
parseMessage :: Parser ReadParamsResponse
parseMessage
= let
loop ::
ReadParamsResponse
-> Data.ProtoLens.Encoding.Bytes.Parser ReadParamsResponse
loop :: ReadParamsResponse -> Parser ReadParamsResponse
loop ReadParamsResponse
x
= do end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if end then
do (let missing = []
in
if Prelude.null missing then
Prelude.return ()
else
Prelude.fail
((Prelude.++)
"Missing required fields: "
(Prelude.show (missing :: [Prelude.String]))))
Prelude.return
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) x)
else
do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
case tag of
Word64
10
-> do y <- Parser AnyChainParams -> String -> Parser AnyChainParams
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
String
"values"
loop (Lens.Family2.set (Data.ProtoLens.Field.field @"values") y x)
Word64
18
-> do y <- Parser ChainPoint -> String -> Parser ChainPoint
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
String
"ledger_tip"
loop
(Lens.Family2.set (Data.ProtoLens.Field.field @"ledgerTip") y x)
Word64
wire
-> do !y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
loop
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) x)
in
Parser ReadParamsResponse -> String -> Parser ReadParamsResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ReadParamsResponse -> Parser ReadParamsResponse
loop ReadParamsResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"ReadParamsResponse"
buildMessage :: ReadParamsResponse -> Builder
buildMessage
= \ ReadParamsResponse
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe AnyChainParams)
ReadParamsResponse
ReadParamsResponse
(Maybe AnyChainParams)
(Maybe AnyChainParams)
-> ReadParamsResponse -> Maybe AnyChainParams
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'values") ReadParamsResponse
_x
of
Maybe AnyChainParams
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just AnyChainParams
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
((ByteString -> Builder)
-> (AnyChainParams -> ByteString) -> AnyChainParams -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
AnyChainParams -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage AnyChainParams
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe ChainPoint)
ReadParamsResponse
ReadParamsResponse
(Maybe ChainPoint)
(Maybe ChainPoint)
-> ReadParamsResponse -> Maybe ChainPoint
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'ledgerTip") ReadParamsResponse
_x
of
Maybe ChainPoint
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just ChainPoint
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
18)
((ByteString -> Builder)
-> (ChainPoint -> ByteString) -> ChainPoint -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
ChainPoint -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage ChainPoint
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet ReadParamsResponse ReadParamsResponse FieldSet FieldSet
-> ReadParamsResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet ReadParamsResponse ReadParamsResponse FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ReadParamsResponse FieldSet
Data.ProtoLens.unknownFields ReadParamsResponse
_x)))
instance Control.DeepSeq.NFData ReadParamsResponse where
rnf :: ReadParamsResponse -> ()
rnf
= \ ReadParamsResponse
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ReadParamsResponse -> FieldSet
_ReadParamsResponse'_unknownFields ReadParamsResponse
x__)
(Maybe AnyChainParams -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ReadParamsResponse -> Maybe AnyChainParams
_ReadParamsResponse'values ReadParamsResponse
x__)
(Maybe ChainPoint -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ReadParamsResponse -> Maybe ChainPoint
_ReadParamsResponse'ledgerTip ReadParamsResponse
x__) ()))
data ReadUtxosRequest
= ReadUtxosRequest'_constructor {ReadUtxosRequest -> Maybe FieldMask
_ReadUtxosRequest'fieldMask :: !(Prelude.Maybe Proto.Google.Protobuf.FieldMask.FieldMask),
ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs
_ReadUtxosRequest'queryArgs :: !(Prelude.Maybe ReadUtxosRequest'QueryArgs),
ReadUtxosRequest -> FieldSet
_ReadUtxosRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (ReadUtxosRequest -> ReadUtxosRequest -> Bool
(ReadUtxosRequest -> ReadUtxosRequest -> Bool)
-> (ReadUtxosRequest -> ReadUtxosRequest -> Bool)
-> Eq ReadUtxosRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
== :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
$c/= :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
/= :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
Prelude.Eq, Eq ReadUtxosRequest
Eq ReadUtxosRequest =>
(ReadUtxosRequest -> ReadUtxosRequest -> Ordering)
-> (ReadUtxosRequest -> ReadUtxosRequest -> Bool)
-> (ReadUtxosRequest -> ReadUtxosRequest -> Bool)
-> (ReadUtxosRequest -> ReadUtxosRequest -> Bool)
-> (ReadUtxosRequest -> ReadUtxosRequest -> Bool)
-> (ReadUtxosRequest -> ReadUtxosRequest -> ReadUtxosRequest)
-> (ReadUtxosRequest -> ReadUtxosRequest -> ReadUtxosRequest)
-> Ord ReadUtxosRequest
ReadUtxosRequest -> ReadUtxosRequest -> Bool
ReadUtxosRequest -> ReadUtxosRequest -> Ordering
ReadUtxosRequest -> ReadUtxosRequest -> ReadUtxosRequest
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
$ccompare :: ReadUtxosRequest -> ReadUtxosRequest -> Ordering
compare :: ReadUtxosRequest -> ReadUtxosRequest -> Ordering
$c< :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
< :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
$c<= :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
<= :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
$c> :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
> :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
$c>= :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
>= :: ReadUtxosRequest -> ReadUtxosRequest -> Bool
$cmax :: ReadUtxosRequest -> ReadUtxosRequest -> ReadUtxosRequest
max :: ReadUtxosRequest -> ReadUtxosRequest -> ReadUtxosRequest
$cmin :: ReadUtxosRequest -> ReadUtxosRequest -> ReadUtxosRequest
min :: ReadUtxosRequest -> ReadUtxosRequest -> ReadUtxosRequest
Prelude.Ord)
instance Prelude.Show ReadUtxosRequest where
showsPrec :: Int -> ReadUtxosRequest -> ShowS
showsPrec Int
_ ReadUtxosRequest
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(ReadUtxosRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ReadUtxosRequest
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
data ReadUtxosRequest'QueryArgs
= ReadUtxosRequest'TxoRefs !TxoRefArray |
ReadUtxosRequest'Addresses !AddressArray
deriving stock (Int -> ReadUtxosRequest'QueryArgs -> ShowS
[ReadUtxosRequest'QueryArgs] -> ShowS
ReadUtxosRequest'QueryArgs -> String
(Int -> ReadUtxosRequest'QueryArgs -> ShowS)
-> (ReadUtxosRequest'QueryArgs -> String)
-> ([ReadUtxosRequest'QueryArgs] -> ShowS)
-> Show ReadUtxosRequest'QueryArgs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReadUtxosRequest'QueryArgs -> ShowS
showsPrec :: Int -> ReadUtxosRequest'QueryArgs -> ShowS
$cshow :: ReadUtxosRequest'QueryArgs -> String
show :: ReadUtxosRequest'QueryArgs -> String
$cshowList :: [ReadUtxosRequest'QueryArgs] -> ShowS
showList :: [ReadUtxosRequest'QueryArgs] -> ShowS
Prelude.Show, ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
(ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool)
-> (ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> Bool)
-> Eq ReadUtxosRequest'QueryArgs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
== :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
$c/= :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
/= :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
Prelude.Eq, Eq ReadUtxosRequest'QueryArgs
Eq ReadUtxosRequest'QueryArgs =>
(ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> Ordering)
-> (ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> Bool)
-> (ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> Bool)
-> (ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> Bool)
-> (ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> Bool)
-> (ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs)
-> (ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs)
-> Ord ReadUtxosRequest'QueryArgs
ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> Ordering
ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs
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
$ccompare :: ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> Ordering
compare :: ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> Ordering
$c< :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
< :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
$c<= :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
<= :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
$c> :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
> :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
$c>= :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
>= :: ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs -> Bool
$cmax :: ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs
max :: ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs
$cmin :: ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs
min :: ReadUtxosRequest'QueryArgs
-> ReadUtxosRequest'QueryArgs -> ReadUtxosRequest'QueryArgs
Prelude.Ord)
instance Data.ProtoLens.Field.HasField ReadUtxosRequest "fieldMask" Proto.Google.Protobuf.FieldMask.FieldMask where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "fieldMask"
-> (FieldMask -> f FieldMask)
-> ReadUtxosRequest
-> f ReadUtxosRequest
fieldOf Proxy# "fieldMask"
_
= ((Maybe FieldMask -> f (Maybe FieldMask))
-> ReadUtxosRequest -> f ReadUtxosRequest)
-> ((FieldMask -> f FieldMask)
-> Maybe FieldMask -> f (Maybe FieldMask))
-> (FieldMask -> f FieldMask)
-> ReadUtxosRequest
-> f ReadUtxosRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadUtxosRequest -> Maybe FieldMask)
-> (ReadUtxosRequest -> Maybe FieldMask -> ReadUtxosRequest)
-> Lens
ReadUtxosRequest
ReadUtxosRequest
(Maybe FieldMask)
(Maybe FieldMask)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosRequest -> Maybe FieldMask
_ReadUtxosRequest'fieldMask
(\ ReadUtxosRequest
x__ Maybe FieldMask
y__ -> ReadUtxosRequest
x__ {_ReadUtxosRequest'fieldMask = y__}))
(FieldMask -> Lens' (Maybe FieldMask) FieldMask
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens FieldMask
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ReadUtxosRequest "maybe'fieldMask" (Prelude.Maybe Proto.Google.Protobuf.FieldMask.FieldMask) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'fieldMask"
-> (Maybe FieldMask -> f (Maybe FieldMask))
-> ReadUtxosRequest
-> f ReadUtxosRequest
fieldOf Proxy# "maybe'fieldMask"
_
= ((Maybe FieldMask -> f (Maybe FieldMask))
-> ReadUtxosRequest -> f ReadUtxosRequest)
-> ((Maybe FieldMask -> f (Maybe FieldMask))
-> Maybe FieldMask -> f (Maybe FieldMask))
-> (Maybe FieldMask -> f (Maybe FieldMask))
-> ReadUtxosRequest
-> f ReadUtxosRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadUtxosRequest -> Maybe FieldMask)
-> (ReadUtxosRequest -> Maybe FieldMask -> ReadUtxosRequest)
-> Lens
ReadUtxosRequest
ReadUtxosRequest
(Maybe FieldMask)
(Maybe FieldMask)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosRequest -> Maybe FieldMask
_ReadUtxosRequest'fieldMask
(\ ReadUtxosRequest
x__ Maybe FieldMask
y__ -> ReadUtxosRequest
x__ {_ReadUtxosRequest'fieldMask = y__}))
(Maybe FieldMask -> f (Maybe FieldMask))
-> Maybe FieldMask -> f (Maybe FieldMask)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ReadUtxosRequest "maybe'queryArgs" (Prelude.Maybe ReadUtxosRequest'QueryArgs) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'queryArgs"
-> (Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> ReadUtxosRequest
-> f ReadUtxosRequest
fieldOf Proxy# "maybe'queryArgs"
_
= ((Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> ReadUtxosRequest -> f ReadUtxosRequest)
-> ((Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> (Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> ReadUtxosRequest
-> f ReadUtxosRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs)
-> (ReadUtxosRequest
-> Maybe ReadUtxosRequest'QueryArgs -> ReadUtxosRequest)
-> Lens
ReadUtxosRequest
ReadUtxosRequest
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe ReadUtxosRequest'QueryArgs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs
_ReadUtxosRequest'queryArgs
(\ ReadUtxosRequest
x__ Maybe ReadUtxosRequest'QueryArgs
y__ -> ReadUtxosRequest
x__ {_ReadUtxosRequest'queryArgs = y__}))
(Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ReadUtxosRequest "maybe'txoRefs" (Prelude.Maybe TxoRefArray) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'txoRefs"
-> (Maybe TxoRefArray -> f (Maybe TxoRefArray))
-> ReadUtxosRequest
-> f ReadUtxosRequest
fieldOf Proxy# "maybe'txoRefs"
_
= ((Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> ReadUtxosRequest -> f ReadUtxosRequest)
-> ((Maybe TxoRefArray -> f (Maybe TxoRefArray))
-> Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> (Maybe TxoRefArray -> f (Maybe TxoRefArray))
-> ReadUtxosRequest
-> f ReadUtxosRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs)
-> (ReadUtxosRequest
-> Maybe ReadUtxosRequest'QueryArgs -> ReadUtxosRequest)
-> Lens
ReadUtxosRequest
ReadUtxosRequest
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe ReadUtxosRequest'QueryArgs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs
_ReadUtxosRequest'queryArgs
(\ ReadUtxosRequest
x__ Maybe ReadUtxosRequest'QueryArgs
y__ -> ReadUtxosRequest
x__ {_ReadUtxosRequest'queryArgs = y__}))
((Maybe ReadUtxosRequest'QueryArgs -> Maybe TxoRefArray)
-> (Maybe ReadUtxosRequest'QueryArgs
-> Maybe TxoRefArray -> Maybe ReadUtxosRequest'QueryArgs)
-> Lens
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe TxoRefArray)
(Maybe TxoRefArray)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ Maybe ReadUtxosRequest'QueryArgs
x__
-> case Maybe ReadUtxosRequest'QueryArgs
x__ of
(Prelude.Just (ReadUtxosRequest'TxoRefs TxoRefArray
x__val))
-> TxoRefArray -> Maybe TxoRefArray
forall a. a -> Maybe a
Prelude.Just TxoRefArray
x__val
Maybe ReadUtxosRequest'QueryArgs
_otherwise -> Maybe TxoRefArray
forall a. Maybe a
Prelude.Nothing)
(\ Maybe ReadUtxosRequest'QueryArgs
_ Maybe TxoRefArray
y__ -> (TxoRefArray -> ReadUtxosRequest'QueryArgs)
-> Maybe TxoRefArray -> Maybe ReadUtxosRequest'QueryArgs
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap TxoRefArray -> ReadUtxosRequest'QueryArgs
ReadUtxosRequest'TxoRefs Maybe TxoRefArray
y__))
instance Data.ProtoLens.Field.HasField ReadUtxosRequest "txoRefs" TxoRefArray where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "txoRefs"
-> (TxoRefArray -> f TxoRefArray)
-> ReadUtxosRequest
-> f ReadUtxosRequest
fieldOf Proxy# "txoRefs"
_
= ((Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> ReadUtxosRequest -> f ReadUtxosRequest)
-> ((TxoRefArray -> f TxoRefArray)
-> Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> (TxoRefArray -> f TxoRefArray)
-> ReadUtxosRequest
-> f ReadUtxosRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs)
-> (ReadUtxosRequest
-> Maybe ReadUtxosRequest'QueryArgs -> ReadUtxosRequest)
-> Lens
ReadUtxosRequest
ReadUtxosRequest
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe ReadUtxosRequest'QueryArgs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs
_ReadUtxosRequest'queryArgs
(\ ReadUtxosRequest
x__ Maybe ReadUtxosRequest'QueryArgs
y__ -> ReadUtxosRequest
x__ {_ReadUtxosRequest'queryArgs = y__}))
(((Maybe TxoRefArray -> f (Maybe TxoRefArray))
-> Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> ((TxoRefArray -> f TxoRefArray)
-> Maybe TxoRefArray -> f (Maybe TxoRefArray))
-> (TxoRefArray -> f TxoRefArray)
-> Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe ReadUtxosRequest'QueryArgs -> Maybe TxoRefArray)
-> (Maybe ReadUtxosRequest'QueryArgs
-> Maybe TxoRefArray -> Maybe ReadUtxosRequest'QueryArgs)
-> Lens
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe TxoRefArray)
(Maybe TxoRefArray)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ Maybe ReadUtxosRequest'QueryArgs
x__
-> case Maybe ReadUtxosRequest'QueryArgs
x__ of
(Prelude.Just (ReadUtxosRequest'TxoRefs TxoRefArray
x__val))
-> TxoRefArray -> Maybe TxoRefArray
forall a. a -> Maybe a
Prelude.Just TxoRefArray
x__val
Maybe ReadUtxosRequest'QueryArgs
_otherwise -> Maybe TxoRefArray
forall a. Maybe a
Prelude.Nothing)
(\ Maybe ReadUtxosRequest'QueryArgs
_ Maybe TxoRefArray
y__ -> (TxoRefArray -> ReadUtxosRequest'QueryArgs)
-> Maybe TxoRefArray -> Maybe ReadUtxosRequest'QueryArgs
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap TxoRefArray -> ReadUtxosRequest'QueryArgs
ReadUtxosRequest'TxoRefs Maybe TxoRefArray
y__))
(TxoRefArray -> Lens' (Maybe TxoRefArray) TxoRefArray
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens TxoRefArray
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField ReadUtxosRequest "maybe'addresses" (Prelude.Maybe AddressArray) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'addresses"
-> (Maybe AddressArray -> f (Maybe AddressArray))
-> ReadUtxosRequest
-> f ReadUtxosRequest
fieldOf Proxy# "maybe'addresses"
_
= ((Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> ReadUtxosRequest -> f ReadUtxosRequest)
-> ((Maybe AddressArray -> f (Maybe AddressArray))
-> Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> (Maybe AddressArray -> f (Maybe AddressArray))
-> ReadUtxosRequest
-> f ReadUtxosRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs)
-> (ReadUtxosRequest
-> Maybe ReadUtxosRequest'QueryArgs -> ReadUtxosRequest)
-> Lens
ReadUtxosRequest
ReadUtxosRequest
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe ReadUtxosRequest'QueryArgs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs
_ReadUtxosRequest'queryArgs
(\ ReadUtxosRequest
x__ Maybe ReadUtxosRequest'QueryArgs
y__ -> ReadUtxosRequest
x__ {_ReadUtxosRequest'queryArgs = y__}))
((Maybe ReadUtxosRequest'QueryArgs -> Maybe AddressArray)
-> (Maybe ReadUtxosRequest'QueryArgs
-> Maybe AddressArray -> Maybe ReadUtxosRequest'QueryArgs)
-> Lens
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe AddressArray)
(Maybe AddressArray)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ Maybe ReadUtxosRequest'QueryArgs
x__
-> case Maybe ReadUtxosRequest'QueryArgs
x__ of
(Prelude.Just (ReadUtxosRequest'Addresses AddressArray
x__val))
-> AddressArray -> Maybe AddressArray
forall a. a -> Maybe a
Prelude.Just AddressArray
x__val
Maybe ReadUtxosRequest'QueryArgs
_otherwise -> Maybe AddressArray
forall a. Maybe a
Prelude.Nothing)
(\ Maybe ReadUtxosRequest'QueryArgs
_ Maybe AddressArray
y__ -> (AddressArray -> ReadUtxosRequest'QueryArgs)
-> Maybe AddressArray -> Maybe ReadUtxosRequest'QueryArgs
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap AddressArray -> ReadUtxosRequest'QueryArgs
ReadUtxosRequest'Addresses Maybe AddressArray
y__))
instance Data.ProtoLens.Field.HasField ReadUtxosRequest "addresses" AddressArray where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "addresses"
-> (AddressArray -> f AddressArray)
-> ReadUtxosRequest
-> f ReadUtxosRequest
fieldOf Proxy# "addresses"
_
= ((Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> ReadUtxosRequest -> f ReadUtxosRequest)
-> ((AddressArray -> f AddressArray)
-> Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> (AddressArray -> f AddressArray)
-> ReadUtxosRequest
-> f ReadUtxosRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs)
-> (ReadUtxosRequest
-> Maybe ReadUtxosRequest'QueryArgs -> ReadUtxosRequest)
-> Lens
ReadUtxosRequest
ReadUtxosRequest
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe ReadUtxosRequest'QueryArgs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs
_ReadUtxosRequest'queryArgs
(\ ReadUtxosRequest
x__ Maybe ReadUtxosRequest'QueryArgs
y__ -> ReadUtxosRequest
x__ {_ReadUtxosRequest'queryArgs = y__}))
(((Maybe AddressArray -> f (Maybe AddressArray))
-> Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs))
-> ((AddressArray -> f AddressArray)
-> Maybe AddressArray -> f (Maybe AddressArray))
-> (AddressArray -> f AddressArray)
-> Maybe ReadUtxosRequest'QueryArgs
-> f (Maybe ReadUtxosRequest'QueryArgs)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((Maybe ReadUtxosRequest'QueryArgs -> Maybe AddressArray)
-> (Maybe ReadUtxosRequest'QueryArgs
-> Maybe AddressArray -> Maybe ReadUtxosRequest'QueryArgs)
-> Lens
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe AddressArray)
(Maybe AddressArray)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
(\ Maybe ReadUtxosRequest'QueryArgs
x__
-> case Maybe ReadUtxosRequest'QueryArgs
x__ of
(Prelude.Just (ReadUtxosRequest'Addresses AddressArray
x__val))
-> AddressArray -> Maybe AddressArray
forall a. a -> Maybe a
Prelude.Just AddressArray
x__val
Maybe ReadUtxosRequest'QueryArgs
_otherwise -> Maybe AddressArray
forall a. Maybe a
Prelude.Nothing)
(\ Maybe ReadUtxosRequest'QueryArgs
_ Maybe AddressArray
y__ -> (AddressArray -> ReadUtxosRequest'QueryArgs)
-> Maybe AddressArray -> Maybe ReadUtxosRequest'QueryArgs
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap AddressArray -> ReadUtxosRequest'QueryArgs
ReadUtxosRequest'Addresses Maybe AddressArray
y__))
(AddressArray -> Lens' (Maybe AddressArray) AddressArray
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens AddressArray
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message ReadUtxosRequest where
messageName :: Proxy ReadUtxosRequest -> Text
messageName Proxy ReadUtxosRequest
_
= String -> Text
Data.Text.pack String
"utxorpc.v1alpha.query.ReadUtxosRequest"
packedMessageDescriptor :: Proxy ReadUtxosRequest -> ByteString
packedMessageDescriptor Proxy ReadUtxosRequest
_
= ByteString
"\n\
\\DLEReadUtxosRequest\DC2>\n\
\\atxoRefs\CAN\SOH \SOH(\v2\".utxorpc.v1alpha.query.TxoRefArrayH\NULR\atxoRefs\DC2C\n\
\\taddresses\CAN\STX \SOH(\v2#.utxorpc.v1alpha.query.AddressArrayH\NULR\taddresses\DC29\n\
\\n\
\field_mask\CAN\ETX \SOH(\v2\SUB.google.protobuf.FieldMaskR\tfieldMaskB\f\n\
\\n\
\query_args"
packedFileDescriptor :: Proxy ReadUtxosRequest -> ByteString
packedFileDescriptor Proxy ReadUtxosRequest
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor ReadUtxosRequest)
fieldsByTag
= let
fieldMask__field_descriptor :: FieldDescriptor ReadUtxosRequest
fieldMask__field_descriptor
= String
-> FieldTypeDescriptor FieldMask
-> FieldAccessor ReadUtxosRequest FieldMask
-> FieldDescriptor ReadUtxosRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"field_mask"
(MessageOrGroup -> FieldTypeDescriptor FieldMask
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Google.Protobuf.FieldMask.FieldMask)
(Lens
ReadUtxosRequest
ReadUtxosRequest
(Maybe FieldMask)
(Maybe FieldMask)
-> FieldAccessor ReadUtxosRequest FieldMask
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'fieldMask")) ::
Data.ProtoLens.FieldDescriptor ReadUtxosRequest
txoRefs__field_descriptor :: FieldDescriptor ReadUtxosRequest
txoRefs__field_descriptor
= String
-> FieldTypeDescriptor TxoRefArray
-> FieldAccessor ReadUtxosRequest TxoRefArray
-> FieldDescriptor ReadUtxosRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"txoRefs"
(MessageOrGroup -> FieldTypeDescriptor TxoRefArray
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor TxoRefArray)
(Lens' ReadUtxosRequest (Maybe TxoRefArray)
-> FieldAccessor ReadUtxosRequest TxoRefArray
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'txoRefs")) ::
Data.ProtoLens.FieldDescriptor ReadUtxosRequest
addresses__field_descriptor :: FieldDescriptor ReadUtxosRequest
addresses__field_descriptor
= String
-> FieldTypeDescriptor AddressArray
-> FieldAccessor ReadUtxosRequest AddressArray
-> FieldDescriptor ReadUtxosRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"addresses"
(MessageOrGroup -> FieldTypeDescriptor AddressArray
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor AddressArray)
(Lens' ReadUtxosRequest (Maybe AddressArray)
-> FieldAccessor ReadUtxosRequest AddressArray
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'addresses")) ::
Data.ProtoLens.FieldDescriptor ReadUtxosRequest
in
[(Tag, FieldDescriptor ReadUtxosRequest)]
-> Map Tag (FieldDescriptor ReadUtxosRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag Int
3, FieldDescriptor ReadUtxosRequest
fieldMask__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor ReadUtxosRequest
txoRefs__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor ReadUtxosRequest
addresses__field_descriptor)]
unknownFields :: Lens' ReadUtxosRequest FieldSet
unknownFields
= (ReadUtxosRequest -> FieldSet)
-> (ReadUtxosRequest -> FieldSet -> ReadUtxosRequest)
-> Lens' ReadUtxosRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosRequest -> FieldSet
_ReadUtxosRequest'_unknownFields
(\ ReadUtxosRequest
x__ FieldSet
y__ -> ReadUtxosRequest
x__ {_ReadUtxosRequest'_unknownFields = y__})
defMessage :: ReadUtxosRequest
defMessage
= ReadUtxosRequest'_constructor
{_ReadUtxosRequest'fieldMask :: Maybe FieldMask
_ReadUtxosRequest'fieldMask = Maybe FieldMask
forall a. Maybe a
Prelude.Nothing,
_ReadUtxosRequest'queryArgs :: Maybe ReadUtxosRequest'QueryArgs
_ReadUtxosRequest'queryArgs = Maybe ReadUtxosRequest'QueryArgs
forall a. Maybe a
Prelude.Nothing,
_ReadUtxosRequest'_unknownFields :: FieldSet
_ReadUtxosRequest'_unknownFields = []}
parseMessage :: Parser ReadUtxosRequest
parseMessage
= let
loop ::
ReadUtxosRequest
-> Data.ProtoLens.Encoding.Bytes.Parser ReadUtxosRequest
loop :: ReadUtxosRequest -> Parser ReadUtxosRequest
loop ReadUtxosRequest
x
= do end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if end then
do (let missing = []
in
if Prelude.null missing then
Prelude.return ()
else
Prelude.fail
((Prelude.++)
"Missing required fields: "
(Prelude.show (missing :: [Prelude.String]))))
Prelude.return
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) x)
else
do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
case tag of
Word64
26
-> do y <- Parser FieldMask -> String -> Parser FieldMask
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
String
"field_mask"
loop
(Lens.Family2.set (Data.ProtoLens.Field.field @"fieldMask") y x)
Word64
10
-> do y <- Parser TxoRefArray -> String -> Parser TxoRefArray
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
String
"txoRefs"
loop (Lens.Family2.set (Data.ProtoLens.Field.field @"txoRefs") y x)
Word64
18
-> do y <- Parser AddressArray -> String -> Parser AddressArray
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
String
"addresses"
loop
(Lens.Family2.set (Data.ProtoLens.Field.field @"addresses") y x)
Word64
wire
-> do !y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
loop
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) x)
in
Parser ReadUtxosRequest -> String -> Parser ReadUtxosRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ReadUtxosRequest -> Parser ReadUtxosRequest
loop ReadUtxosRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"ReadUtxosRequest"
buildMessage :: ReadUtxosRequest -> Builder
buildMessage
= \ ReadUtxosRequest
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe FieldMask)
ReadUtxosRequest
ReadUtxosRequest
(Maybe FieldMask)
(Maybe FieldMask)
-> ReadUtxosRequest -> Maybe FieldMask
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'fieldMask") ReadUtxosRequest
_x
of
Maybe FieldMask
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just FieldMask
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
26)
((ByteString -> Builder)
-> (FieldMask -> ByteString) -> FieldMask -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
FieldMask -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage FieldMask
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe ReadUtxosRequest'QueryArgs)
ReadUtxosRequest
ReadUtxosRequest
(Maybe ReadUtxosRequest'QueryArgs)
(Maybe ReadUtxosRequest'QueryArgs)
-> ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'queryArgs") ReadUtxosRequest
_x
of
Maybe ReadUtxosRequest'QueryArgs
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just (ReadUtxosRequest'TxoRefs TxoRefArray
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
((ByteString -> Builder)
-> (TxoRefArray -> ByteString) -> TxoRefArray -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
TxoRefArray -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage TxoRefArray
v)
(Prelude.Just (ReadUtxosRequest'Addresses AddressArray
v))
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
18)
((ByteString -> Builder)
-> (AddressArray -> ByteString) -> AddressArray -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
AddressArray -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage AddressArray
v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet ReadUtxosRequest ReadUtxosRequest FieldSet FieldSet
-> ReadUtxosRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet ReadUtxosRequest ReadUtxosRequest FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ReadUtxosRequest FieldSet
Data.ProtoLens.unknownFields ReadUtxosRequest
_x)))
instance Control.DeepSeq.NFData ReadUtxosRequest where
rnf :: ReadUtxosRequest -> ()
rnf
= \ ReadUtxosRequest
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ReadUtxosRequest -> FieldSet
_ReadUtxosRequest'_unknownFields ReadUtxosRequest
x__)
(Maybe FieldMask -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ReadUtxosRequest -> Maybe FieldMask
_ReadUtxosRequest'fieldMask ReadUtxosRequest
x__)
(Maybe ReadUtxosRequest'QueryArgs -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ReadUtxosRequest -> Maybe ReadUtxosRequest'QueryArgs
_ReadUtxosRequest'queryArgs ReadUtxosRequest
x__) ()))
instance Control.DeepSeq.NFData ReadUtxosRequest'QueryArgs where
rnf :: ReadUtxosRequest'QueryArgs -> ()
rnf (ReadUtxosRequest'TxoRefs TxoRefArray
x__) = TxoRefArray -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf TxoRefArray
x__
rnf (ReadUtxosRequest'Addresses AddressArray
x__) = AddressArray -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf AddressArray
x__
_ReadUtxosRequest'TxoRefs ::
Data.ProtoLens.Prism.Prism' ReadUtxosRequest'QueryArgs TxoRefArray
_ReadUtxosRequest'TxoRefs :: Prism' ReadUtxosRequest'QueryArgs TxoRefArray
_ReadUtxosRequest'TxoRefs
= (TxoRefArray -> ReadUtxosRequest'QueryArgs)
-> (ReadUtxosRequest'QueryArgs -> Maybe TxoRefArray)
-> Prism' ReadUtxosRequest'QueryArgs TxoRefArray
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
TxoRefArray -> ReadUtxosRequest'QueryArgs
ReadUtxosRequest'TxoRefs
(\ ReadUtxosRequest'QueryArgs
p__
-> case ReadUtxosRequest'QueryArgs
p__ of
(ReadUtxosRequest'TxoRefs TxoRefArray
p__val) -> TxoRefArray -> Maybe TxoRefArray
forall a. a -> Maybe a
Prelude.Just TxoRefArray
p__val
ReadUtxosRequest'QueryArgs
_otherwise -> Maybe TxoRefArray
forall a. Maybe a
Prelude.Nothing)
_ReadUtxosRequest'Addresses ::
Data.ProtoLens.Prism.Prism' ReadUtxosRequest'QueryArgs AddressArray
_ReadUtxosRequest'Addresses :: Prism' ReadUtxosRequest'QueryArgs AddressArray
_ReadUtxosRequest'Addresses
= (AddressArray -> ReadUtxosRequest'QueryArgs)
-> (ReadUtxosRequest'QueryArgs -> Maybe AddressArray)
-> Prism' ReadUtxosRequest'QueryArgs AddressArray
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
AddressArray -> ReadUtxosRequest'QueryArgs
ReadUtxosRequest'Addresses
(\ ReadUtxosRequest'QueryArgs
p__
-> case ReadUtxosRequest'QueryArgs
p__ of
(ReadUtxosRequest'Addresses AddressArray
p__val) -> AddressArray -> Maybe AddressArray
forall a. a -> Maybe a
Prelude.Just AddressArray
p__val
ReadUtxosRequest'QueryArgs
_otherwise -> Maybe AddressArray
forall a. Maybe a
Prelude.Nothing)
data ReadUtxosResponse
= ReadUtxosResponse'_constructor {ReadUtxosResponse -> Vector AnyUtxoData
_ReadUtxosResponse'items :: !(Data.Vector.Vector AnyUtxoData),
ReadUtxosResponse -> Maybe ChainPoint
_ReadUtxosResponse'ledgerTip :: !(Prelude.Maybe ChainPoint),
ReadUtxosResponse -> FieldSet
_ReadUtxosResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (ReadUtxosResponse -> ReadUtxosResponse -> Bool
(ReadUtxosResponse -> ReadUtxosResponse -> Bool)
-> (ReadUtxosResponse -> ReadUtxosResponse -> Bool)
-> Eq ReadUtxosResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
== :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
$c/= :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
/= :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
Prelude.Eq, Eq ReadUtxosResponse
Eq ReadUtxosResponse =>
(ReadUtxosResponse -> ReadUtxosResponse -> Ordering)
-> (ReadUtxosResponse -> ReadUtxosResponse -> Bool)
-> (ReadUtxosResponse -> ReadUtxosResponse -> Bool)
-> (ReadUtxosResponse -> ReadUtxosResponse -> Bool)
-> (ReadUtxosResponse -> ReadUtxosResponse -> Bool)
-> (ReadUtxosResponse -> ReadUtxosResponse -> ReadUtxosResponse)
-> (ReadUtxosResponse -> ReadUtxosResponse -> ReadUtxosResponse)
-> Ord ReadUtxosResponse
ReadUtxosResponse -> ReadUtxosResponse -> Bool
ReadUtxosResponse -> ReadUtxosResponse -> Ordering
ReadUtxosResponse -> ReadUtxosResponse -> ReadUtxosResponse
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
$ccompare :: ReadUtxosResponse -> ReadUtxosResponse -> Ordering
compare :: ReadUtxosResponse -> ReadUtxosResponse -> Ordering
$c< :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
< :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
$c<= :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
<= :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
$c> :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
> :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
$c>= :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
>= :: ReadUtxosResponse -> ReadUtxosResponse -> Bool
$cmax :: ReadUtxosResponse -> ReadUtxosResponse -> ReadUtxosResponse
max :: ReadUtxosResponse -> ReadUtxosResponse -> ReadUtxosResponse
$cmin :: ReadUtxosResponse -> ReadUtxosResponse -> ReadUtxosResponse
min :: ReadUtxosResponse -> ReadUtxosResponse -> ReadUtxosResponse
Prelude.Ord)
instance Prelude.Show ReadUtxosResponse where
showsPrec :: Int -> ReadUtxosResponse -> ShowS
showsPrec Int
_ ReadUtxosResponse
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(ReadUtxosResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ReadUtxosResponse
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField ReadUtxosResponse "items" [AnyUtxoData] where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "items"
-> ([AnyUtxoData] -> f [AnyUtxoData])
-> ReadUtxosResponse
-> f ReadUtxosResponse
fieldOf Proxy# "items"
_
= ((Vector AnyUtxoData -> f (Vector AnyUtxoData))
-> ReadUtxosResponse -> f ReadUtxosResponse)
-> (([AnyUtxoData] -> f [AnyUtxoData])
-> Vector AnyUtxoData -> f (Vector AnyUtxoData))
-> ([AnyUtxoData] -> f [AnyUtxoData])
-> ReadUtxosResponse
-> f ReadUtxosResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadUtxosResponse -> Vector AnyUtxoData)
-> (ReadUtxosResponse -> Vector AnyUtxoData -> ReadUtxosResponse)
-> Lens
ReadUtxosResponse
ReadUtxosResponse
(Vector AnyUtxoData)
(Vector AnyUtxoData)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosResponse -> Vector AnyUtxoData
_ReadUtxosResponse'items
(\ ReadUtxosResponse
x__ Vector AnyUtxoData
y__ -> ReadUtxosResponse
x__ {_ReadUtxosResponse'items = y__}))
((Vector AnyUtxoData -> [AnyUtxoData])
-> (Vector AnyUtxoData -> [AnyUtxoData] -> Vector AnyUtxoData)
-> Lens
(Vector AnyUtxoData)
(Vector AnyUtxoData)
[AnyUtxoData]
[AnyUtxoData]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector AnyUtxoData -> [AnyUtxoData]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ Vector AnyUtxoData
_ [AnyUtxoData]
y__ -> [AnyUtxoData] -> Vector AnyUtxoData
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [AnyUtxoData]
y__))
instance Data.ProtoLens.Field.HasField ReadUtxosResponse "vec'items" (Data.Vector.Vector AnyUtxoData) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "vec'items"
-> (Vector AnyUtxoData -> f (Vector AnyUtxoData))
-> ReadUtxosResponse
-> f ReadUtxosResponse
fieldOf Proxy# "vec'items"
_
= ((Vector AnyUtxoData -> f (Vector AnyUtxoData))
-> ReadUtxosResponse -> f ReadUtxosResponse)
-> ((Vector AnyUtxoData -> f (Vector AnyUtxoData))
-> Vector AnyUtxoData -> f (Vector AnyUtxoData))
-> (Vector AnyUtxoData -> f (Vector AnyUtxoData))
-> ReadUtxosResponse
-> f ReadUtxosResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadUtxosResponse -> Vector AnyUtxoData)
-> (ReadUtxosResponse -> Vector AnyUtxoData -> ReadUtxosResponse)
-> Lens
ReadUtxosResponse
ReadUtxosResponse
(Vector AnyUtxoData)
(Vector AnyUtxoData)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosResponse -> Vector AnyUtxoData
_ReadUtxosResponse'items
(\ ReadUtxosResponse
x__ Vector AnyUtxoData
y__ -> ReadUtxosResponse
x__ {_ReadUtxosResponse'items = y__}))
(Vector AnyUtxoData -> f (Vector AnyUtxoData))
-> Vector AnyUtxoData -> f (Vector AnyUtxoData)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ReadUtxosResponse "ledgerTip" ChainPoint where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "ledgerTip"
-> (ChainPoint -> f ChainPoint)
-> ReadUtxosResponse
-> f ReadUtxosResponse
fieldOf Proxy# "ledgerTip"
_
= ((Maybe ChainPoint -> f (Maybe ChainPoint))
-> ReadUtxosResponse -> f ReadUtxosResponse)
-> ((ChainPoint -> f ChainPoint)
-> Maybe ChainPoint -> f (Maybe ChainPoint))
-> (ChainPoint -> f ChainPoint)
-> ReadUtxosResponse
-> f ReadUtxosResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadUtxosResponse -> Maybe ChainPoint)
-> (ReadUtxosResponse -> Maybe ChainPoint -> ReadUtxosResponse)
-> Lens
ReadUtxosResponse
ReadUtxosResponse
(Maybe ChainPoint)
(Maybe ChainPoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosResponse -> Maybe ChainPoint
_ReadUtxosResponse'ledgerTip
(\ ReadUtxosResponse
x__ Maybe ChainPoint
y__ -> ReadUtxosResponse
x__ {_ReadUtxosResponse'ledgerTip = y__}))
(ChainPoint -> Lens' (Maybe ChainPoint) ChainPoint
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens ChainPoint
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ReadUtxosResponse "maybe'ledgerTip" (Prelude.Maybe ChainPoint) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'ledgerTip"
-> (Maybe ChainPoint -> f (Maybe ChainPoint))
-> ReadUtxosResponse
-> f ReadUtxosResponse
fieldOf Proxy# "maybe'ledgerTip"
_
= ((Maybe ChainPoint -> f (Maybe ChainPoint))
-> ReadUtxosResponse -> f ReadUtxosResponse)
-> ((Maybe ChainPoint -> f (Maybe ChainPoint))
-> Maybe ChainPoint -> f (Maybe ChainPoint))
-> (Maybe ChainPoint -> f (Maybe ChainPoint))
-> ReadUtxosResponse
-> f ReadUtxosResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((ReadUtxosResponse -> Maybe ChainPoint)
-> (ReadUtxosResponse -> Maybe ChainPoint -> ReadUtxosResponse)
-> Lens
ReadUtxosResponse
ReadUtxosResponse
(Maybe ChainPoint)
(Maybe ChainPoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosResponse -> Maybe ChainPoint
_ReadUtxosResponse'ledgerTip
(\ ReadUtxosResponse
x__ Maybe ChainPoint
y__ -> ReadUtxosResponse
x__ {_ReadUtxosResponse'ledgerTip = y__}))
(Maybe ChainPoint -> f (Maybe ChainPoint))
-> Maybe ChainPoint -> f (Maybe ChainPoint)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ReadUtxosResponse where
messageName :: Proxy ReadUtxosResponse -> Text
messageName Proxy ReadUtxosResponse
_
= String -> Text
Data.Text.pack String
"utxorpc.v1alpha.query.ReadUtxosResponse"
packedMessageDescriptor :: Proxy ReadUtxosResponse -> ByteString
packedMessageDescriptor Proxy ReadUtxosResponse
_
= ByteString
"\n\
\\DC1ReadUtxosResponse\DC28\n\
\\ENQitems\CAN\SOH \ETX(\v2\".utxorpc.v1alpha.query.AnyUtxoDataR\ENQitems\DC2@\n\
\\n\
\ledger_tip\CAN\STX \SOH(\v2!.utxorpc.v1alpha.query.ChainPointR\tledgerTip"
packedFileDescriptor :: Proxy ReadUtxosResponse -> ByteString
packedFileDescriptor Proxy ReadUtxosResponse
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor ReadUtxosResponse)
fieldsByTag
= let
items__field_descriptor :: FieldDescriptor ReadUtxosResponse
items__field_descriptor
= String
-> FieldTypeDescriptor AnyUtxoData
-> FieldAccessor ReadUtxosResponse AnyUtxoData
-> FieldDescriptor ReadUtxosResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"items"
(MessageOrGroup -> FieldTypeDescriptor AnyUtxoData
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor AnyUtxoData)
(Packing
-> Lens' ReadUtxosResponse [AnyUtxoData]
-> FieldAccessor ReadUtxosResponse AnyUtxoData
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"items")) ::
Data.ProtoLens.FieldDescriptor ReadUtxosResponse
ledgerTip__field_descriptor :: FieldDescriptor ReadUtxosResponse
ledgerTip__field_descriptor
= String
-> FieldTypeDescriptor ChainPoint
-> FieldAccessor ReadUtxosResponse ChainPoint
-> FieldDescriptor ReadUtxosResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"ledger_tip"
(MessageOrGroup -> FieldTypeDescriptor ChainPoint
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor ChainPoint)
(Lens
ReadUtxosResponse
ReadUtxosResponse
(Maybe ChainPoint)
(Maybe ChainPoint)
-> FieldAccessor ReadUtxosResponse ChainPoint
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'ledgerTip")) ::
Data.ProtoLens.FieldDescriptor ReadUtxosResponse
in
[(Tag, FieldDescriptor ReadUtxosResponse)]
-> Map Tag (FieldDescriptor ReadUtxosResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor ReadUtxosResponse
items__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor ReadUtxosResponse
ledgerTip__field_descriptor)]
unknownFields :: Lens' ReadUtxosResponse FieldSet
unknownFields
= (ReadUtxosResponse -> FieldSet)
-> (ReadUtxosResponse -> FieldSet -> ReadUtxosResponse)
-> Lens' ReadUtxosResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
ReadUtxosResponse -> FieldSet
_ReadUtxosResponse'_unknownFields
(\ ReadUtxosResponse
x__ FieldSet
y__ -> ReadUtxosResponse
x__ {_ReadUtxosResponse'_unknownFields = y__})
defMessage :: ReadUtxosResponse
defMessage
= ReadUtxosResponse'_constructor
{_ReadUtxosResponse'items :: Vector AnyUtxoData
_ReadUtxosResponse'items = Vector AnyUtxoData
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_ReadUtxosResponse'ledgerTip :: Maybe ChainPoint
_ReadUtxosResponse'ledgerTip = Maybe ChainPoint
forall a. Maybe a
Prelude.Nothing,
_ReadUtxosResponse'_unknownFields :: FieldSet
_ReadUtxosResponse'_unknownFields = []}
parseMessage :: Parser ReadUtxosResponse
parseMessage
= let
loop ::
ReadUtxosResponse
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld AnyUtxoData
-> Data.ProtoLens.Encoding.Bytes.Parser ReadUtxosResponse
loop :: ReadUtxosResponse
-> Growing Vector RealWorld AnyUtxoData -> Parser ReadUtxosResponse
loop ReadUtxosResponse
x Growing Vector RealWorld AnyUtxoData
mutable'items
= do end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if end then
do frozen'items <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Data.ProtoLens.Encoding.Growing.unsafeFreeze mutable'items)
(let missing = []
in
if Prelude.null missing then
Prelude.return ()
else
Prelude.fail
((Prelude.++)
"Missing required fields: "
(Prelude.show (missing :: [Prelude.String]))))
Prelude.return
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Lens.Family2.set
(Data.ProtoLens.Field.field @"vec'items") frozen'items x))
else
do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
case tag of
Word64
10
-> do !y <- Parser AnyUtxoData -> String -> Parser AnyUtxoData
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len)
Data.ProtoLens.parseMessage)
String
"items"
v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Data.ProtoLens.Encoding.Growing.append mutable'items y)
loop x v
Word64
18
-> do y <- Parser ChainPoint -> String -> Parser ChainPoint
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
String
"ledger_tip"
loop
(Lens.Family2.set (Data.ProtoLens.Field.field @"ledgerTip") y x)
mutable'items
Word64
wire
-> do !y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
loop
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) x)
mutable'items
in
Parser ReadUtxosResponse -> String -> Parser ReadUtxosResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do mutable'items <- IO (Growing Vector RealWorld AnyUtxoData)
-> Parser (Growing Vector RealWorld AnyUtxoData)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld AnyUtxoData)
IO (Growing Vector (PrimState IO) AnyUtxoData)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
loop Data.ProtoLens.defMessage mutable'items)
String
"ReadUtxosResponse"
buildMessage :: ReadUtxosResponse -> Builder
buildMessage
= \ ReadUtxosResponse
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((AnyUtxoData -> Builder) -> Vector AnyUtxoData -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ AnyUtxoData
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
((ByteString -> Builder)
-> (AnyUtxoData -> ByteString) -> AnyUtxoData -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
AnyUtxoData -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage AnyUtxoData
_v))
(FoldLike
(Vector AnyUtxoData)
ReadUtxosResponse
ReadUtxosResponse
(Vector AnyUtxoData)
(Vector AnyUtxoData)
-> ReadUtxosResponse -> Vector AnyUtxoData
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'items") ReadUtxosResponse
_x))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe ChainPoint)
ReadUtxosResponse
ReadUtxosResponse
(Maybe ChainPoint)
(Maybe ChainPoint)
-> ReadUtxosResponse -> Maybe ChainPoint
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'ledgerTip") ReadUtxosResponse
_x
of
Maybe ChainPoint
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just ChainPoint
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
18)
((ByteString -> Builder)
-> (ChainPoint -> ByteString) -> ChainPoint -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
ChainPoint -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage ChainPoint
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet ReadUtxosResponse ReadUtxosResponse FieldSet FieldSet
-> ReadUtxosResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet ReadUtxosResponse ReadUtxosResponse FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' ReadUtxosResponse FieldSet
Data.ProtoLens.unknownFields ReadUtxosResponse
_x)))
instance Control.DeepSeq.NFData ReadUtxosResponse where
rnf :: ReadUtxosResponse -> ()
rnf
= \ ReadUtxosResponse
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ReadUtxosResponse -> FieldSet
_ReadUtxosResponse'_unknownFields ReadUtxosResponse
x__)
(Vector AnyUtxoData -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(ReadUtxosResponse -> Vector AnyUtxoData
_ReadUtxosResponse'items ReadUtxosResponse
x__)
(Maybe ChainPoint -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (ReadUtxosResponse -> Maybe ChainPoint
_ReadUtxosResponse'ledgerTip ReadUtxosResponse
x__) ()))
data TxoRef
= TxoRef'_constructor {TxoRef -> ByteString
_TxoRef'hash :: !Data.ByteString.ByteString,
TxoRef -> Word32
_TxoRef'index :: !Data.Word.Word32,
TxoRef -> FieldSet
_TxoRef'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (TxoRef -> TxoRef -> Bool
(TxoRef -> TxoRef -> Bool)
-> (TxoRef -> TxoRef -> Bool) -> Eq TxoRef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TxoRef -> TxoRef -> Bool
== :: TxoRef -> TxoRef -> Bool
$c/= :: TxoRef -> TxoRef -> Bool
/= :: TxoRef -> TxoRef -> Bool
Prelude.Eq, Eq TxoRef
Eq TxoRef =>
(TxoRef -> TxoRef -> Ordering)
-> (TxoRef -> TxoRef -> Bool)
-> (TxoRef -> TxoRef -> Bool)
-> (TxoRef -> TxoRef -> Bool)
-> (TxoRef -> TxoRef -> Bool)
-> (TxoRef -> TxoRef -> TxoRef)
-> (TxoRef -> TxoRef -> TxoRef)
-> Ord TxoRef
TxoRef -> TxoRef -> Bool
TxoRef -> TxoRef -> Ordering
TxoRef -> TxoRef -> TxoRef
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
$ccompare :: TxoRef -> TxoRef -> Ordering
compare :: TxoRef -> TxoRef -> Ordering
$c< :: TxoRef -> TxoRef -> Bool
< :: TxoRef -> TxoRef -> Bool
$c<= :: TxoRef -> TxoRef -> Bool
<= :: TxoRef -> TxoRef -> Bool
$c> :: TxoRef -> TxoRef -> Bool
> :: TxoRef -> TxoRef -> Bool
$c>= :: TxoRef -> TxoRef -> Bool
>= :: TxoRef -> TxoRef -> Bool
$cmax :: TxoRef -> TxoRef -> TxoRef
max :: TxoRef -> TxoRef -> TxoRef
$cmin :: TxoRef -> TxoRef -> TxoRef
min :: TxoRef -> TxoRef -> TxoRef
Prelude.Ord)
instance Prelude.Show TxoRef where
showsPrec :: Int -> TxoRef -> ShowS
showsPrec Int
_ TxoRef
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(TxoRef -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort TxoRef
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField TxoRef "hash" Data.ByteString.ByteString where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "hash" -> (ByteString -> f ByteString) -> TxoRef -> f TxoRef
fieldOf Proxy# "hash"
_
= ((ByteString -> f ByteString) -> TxoRef -> f TxoRef)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> TxoRef
-> f TxoRef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((TxoRef -> ByteString)
-> (TxoRef -> ByteString -> TxoRef)
-> Lens TxoRef TxoRef ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TxoRef -> ByteString
_TxoRef'hash (\ TxoRef
x__ ByteString
y__ -> TxoRef
x__ {_TxoRef'hash = y__}))
(ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField TxoRef "index" Data.Word.Word32 where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "index" -> (Word32 -> f Word32) -> TxoRef -> f TxoRef
fieldOf Proxy# "index"
_
= ((Word32 -> f Word32) -> TxoRef -> f TxoRef)
-> ((Word32 -> f Word32) -> Word32 -> f Word32)
-> (Word32 -> f Word32)
-> TxoRef
-> f TxoRef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((TxoRef -> Word32)
-> (TxoRef -> Word32 -> TxoRef) -> Lens TxoRef TxoRef Word32 Word32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TxoRef -> Word32
_TxoRef'index (\ TxoRef
x__ Word32
y__ -> TxoRef
x__ {_TxoRef'index = y__}))
(Word32 -> f Word32) -> Word32 -> f Word32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message TxoRef where
messageName :: Proxy TxoRef -> Text
messageName Proxy TxoRef
_ = String -> Text
Data.Text.pack String
"utxorpc.v1alpha.query.TxoRef"
packedMessageDescriptor :: Proxy TxoRef -> ByteString
packedMessageDescriptor Proxy TxoRef
_
= ByteString
"\n\
\\ACKTxoRef\DC2\DC2\n\
\\EOThash\CAN\SOH \SOH(\fR\EOThash\DC2\DC4\n\
\\ENQindex\CAN\STX \SOH(\rR\ENQindex"
packedFileDescriptor :: Proxy TxoRef -> ByteString
packedFileDescriptor Proxy TxoRef
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor TxoRef)
fieldsByTag
= let
hash__field_descriptor :: FieldDescriptor TxoRef
hash__field_descriptor
= String
-> FieldTypeDescriptor ByteString
-> FieldAccessor TxoRef ByteString
-> FieldDescriptor TxoRef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"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 TxoRef TxoRef ByteString ByteString
-> FieldAccessor TxoRef 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 (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"hash")) ::
Data.ProtoLens.FieldDescriptor TxoRef
index__field_descriptor :: FieldDescriptor TxoRef
index__field_descriptor
= String
-> FieldTypeDescriptor Word32
-> FieldAccessor TxoRef Word32
-> FieldDescriptor TxoRef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"index"
(ScalarField Word32 -> FieldTypeDescriptor Word32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word32
Data.ProtoLens.UInt32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
(WireDefault Word32
-> Lens TxoRef TxoRef Word32 Word32 -> FieldAccessor TxoRef Word32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Word32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall (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 TxoRef
in
[(Tag, FieldDescriptor TxoRef)] -> Map Tag (FieldDescriptor TxoRef)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor TxoRef
hash__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor TxoRef
index__field_descriptor)]
unknownFields :: Lens' TxoRef FieldSet
unknownFields
= (TxoRef -> FieldSet)
-> (TxoRef -> FieldSet -> TxoRef) -> Lens' TxoRef FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TxoRef -> FieldSet
_TxoRef'_unknownFields
(\ TxoRef
x__ FieldSet
y__ -> TxoRef
x__ {_TxoRef'_unknownFields = y__})
defMessage :: TxoRef
defMessage
= TxoRef'_constructor
{_TxoRef'hash :: ByteString
_TxoRef'hash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_TxoRef'index :: Word32
_TxoRef'index = Word32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_TxoRef'_unknownFields :: FieldSet
_TxoRef'_unknownFields = []}
parseMessage :: Parser TxoRef
parseMessage
= let
loop :: TxoRef -> Data.ProtoLens.Encoding.Bytes.Parser TxoRef
loop :: TxoRef -> Parser TxoRef
loop TxoRef
x
= do end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if end then
do (let missing = []
in
if Prelude.null missing then
Prelude.return ()
else
Prelude.fail
((Prelude.++)
"Missing required fields: "
(Prelude.show (missing :: [Prelude.String]))))
Prelude.return
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) x)
else
do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
case tag of
Word64
10
-> do y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.getBytes
(Prelude.fromIntegral len))
String
"hash"
loop (Lens.Family2.set (Data.ProtoLens.Field.field @"hash") y x)
Word64
16
-> do y <- Parser Word32 -> String -> Parser Word32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Word32) -> Parser Word64 -> Parser Word32
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
String
"index"
loop (Lens.Family2.set (Data.ProtoLens.Field.field @"index") y x)
Word64
wire
-> do !y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
loop
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) x)
in
Parser TxoRef -> String -> Parser TxoRef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do TxoRef -> Parser TxoRef
loop TxoRef
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"TxoRef"
buildMessage :: TxoRef -> Builder
buildMessage
= \ TxoRef
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: ByteString
_v = FoldLike ByteString TxoRef TxoRef ByteString ByteString
-> TxoRef -> ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"hash") TxoRef
_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 Word64
10)
((\ 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 :: Word32
_v = FoldLike Word32 TxoRef TxoRef Word32 Word32 -> TxoRef -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"index") TxoRef
_x
in
if Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word32
_v Word32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
16)
((Word64 -> Builder) -> (Word32 -> Word64) -> Word32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word32
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet TxoRef TxoRef FieldSet FieldSet
-> TxoRef -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet TxoRef TxoRef FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' TxoRef FieldSet
Data.ProtoLens.unknownFields TxoRef
_x)))
instance Control.DeepSeq.NFData TxoRef where
rnf :: TxoRef -> ()
rnf
= \ TxoRef
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(TxoRef -> FieldSet
_TxoRef'_unknownFields TxoRef
x__)
(ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(TxoRef -> ByteString
_TxoRef'hash TxoRef
x__)
(Word32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (TxoRef -> Word32
_TxoRef'index TxoRef
x__) ()))
data TxoRefArray
= TxoRefArray'_constructor {TxoRefArray -> Vector TxoRef
_TxoRefArray'items :: !(Data.Vector.Vector TxoRef),
TxoRefArray -> FieldSet
_TxoRefArray'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (TxoRefArray -> TxoRefArray -> Bool
(TxoRefArray -> TxoRefArray -> Bool)
-> (TxoRefArray -> TxoRefArray -> Bool) -> Eq TxoRefArray
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TxoRefArray -> TxoRefArray -> Bool
== :: TxoRefArray -> TxoRefArray -> Bool
$c/= :: TxoRefArray -> TxoRefArray -> Bool
/= :: TxoRefArray -> TxoRefArray -> Bool
Prelude.Eq, Eq TxoRefArray
Eq TxoRefArray =>
(TxoRefArray -> TxoRefArray -> Ordering)
-> (TxoRefArray -> TxoRefArray -> Bool)
-> (TxoRefArray -> TxoRefArray -> Bool)
-> (TxoRefArray -> TxoRefArray -> Bool)
-> (TxoRefArray -> TxoRefArray -> Bool)
-> (TxoRefArray -> TxoRefArray -> TxoRefArray)
-> (TxoRefArray -> TxoRefArray -> TxoRefArray)
-> Ord TxoRefArray
TxoRefArray -> TxoRefArray -> Bool
TxoRefArray -> TxoRefArray -> Ordering
TxoRefArray -> TxoRefArray -> TxoRefArray
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
$ccompare :: TxoRefArray -> TxoRefArray -> Ordering
compare :: TxoRefArray -> TxoRefArray -> Ordering
$c< :: TxoRefArray -> TxoRefArray -> Bool
< :: TxoRefArray -> TxoRefArray -> Bool
$c<= :: TxoRefArray -> TxoRefArray -> Bool
<= :: TxoRefArray -> TxoRefArray -> Bool
$c> :: TxoRefArray -> TxoRefArray -> Bool
> :: TxoRefArray -> TxoRefArray -> Bool
$c>= :: TxoRefArray -> TxoRefArray -> Bool
>= :: TxoRefArray -> TxoRefArray -> Bool
$cmax :: TxoRefArray -> TxoRefArray -> TxoRefArray
max :: TxoRefArray -> TxoRefArray -> TxoRefArray
$cmin :: TxoRefArray -> TxoRefArray -> TxoRefArray
min :: TxoRefArray -> TxoRefArray -> TxoRefArray
Prelude.Ord)
instance Prelude.Show TxoRefArray where
showsPrec :: Int -> TxoRefArray -> ShowS
showsPrec Int
_ TxoRefArray
__x String
__s
= Char -> ShowS
Prelude.showChar
Char
'{'
(String -> ShowS
Prelude.showString
(TxoRefArray -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort TxoRefArray
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField TxoRefArray "items" [TxoRef] where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "items"
-> ([TxoRef] -> f [TxoRef]) -> TxoRefArray -> f TxoRefArray
fieldOf Proxy# "items"
_
= ((Vector TxoRef -> f (Vector TxoRef))
-> TxoRefArray -> f TxoRefArray)
-> (([TxoRef] -> f [TxoRef]) -> Vector TxoRef -> f (Vector TxoRef))
-> ([TxoRef] -> f [TxoRef])
-> TxoRefArray
-> f TxoRefArray
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((TxoRefArray -> Vector TxoRef)
-> (TxoRefArray -> Vector TxoRef -> TxoRefArray)
-> Lens TxoRefArray TxoRefArray (Vector TxoRef) (Vector TxoRef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TxoRefArray -> Vector TxoRef
_TxoRefArray'items (\ TxoRefArray
x__ Vector TxoRef
y__ -> TxoRefArray
x__ {_TxoRefArray'items = y__}))
((Vector TxoRef -> [TxoRef])
-> (Vector TxoRef -> [TxoRef] -> Vector TxoRef)
-> Lens (Vector TxoRef) (Vector TxoRef) [TxoRef] [TxoRef]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector TxoRef -> [TxoRef]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ Vector TxoRef
_ [TxoRef]
y__ -> [TxoRef] -> Vector TxoRef
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [TxoRef]
y__))
instance Data.ProtoLens.Field.HasField TxoRefArray "vec'items" (Data.Vector.Vector TxoRef) where
fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "vec'items"
-> (Vector TxoRef -> f (Vector TxoRef))
-> TxoRefArray
-> f TxoRefArray
fieldOf Proxy# "vec'items"
_
= ((Vector TxoRef -> f (Vector TxoRef))
-> TxoRefArray -> f TxoRefArray)
-> ((Vector TxoRef -> f (Vector TxoRef))
-> Vector TxoRef -> f (Vector TxoRef))
-> (Vector TxoRef -> f (Vector TxoRef))
-> TxoRefArray
-> f TxoRefArray
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((TxoRefArray -> Vector TxoRef)
-> (TxoRefArray -> Vector TxoRef -> TxoRefArray)
-> Lens TxoRefArray TxoRefArray (Vector TxoRef) (Vector TxoRef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TxoRefArray -> Vector TxoRef
_TxoRefArray'items (\ TxoRefArray
x__ Vector TxoRef
y__ -> TxoRefArray
x__ {_TxoRefArray'items = y__}))
(Vector TxoRef -> f (Vector TxoRef))
-> Vector TxoRef -> f (Vector TxoRef)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message TxoRefArray where
messageName :: Proxy TxoRefArray -> Text
messageName Proxy TxoRefArray
_ = String -> Text
Data.Text.pack String
"utxorpc.v1alpha.query.TxoRefArray"
packedMessageDescriptor :: Proxy TxoRefArray -> ByteString
packedMessageDescriptor Proxy TxoRefArray
_
= ByteString
"\n\
\\vTxoRefArray\DC23\n\
\\ENQitems\CAN\SOH \ETX(\v2\GS.utxorpc.v1alpha.query.TxoRefR\ENQitems"
packedFileDescriptor :: Proxy TxoRefArray -> ByteString
packedFileDescriptor Proxy TxoRefArray
_ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor TxoRefArray)
fieldsByTag
= let
items__field_descriptor :: FieldDescriptor TxoRefArray
items__field_descriptor
= String
-> FieldTypeDescriptor TxoRef
-> FieldAccessor TxoRefArray TxoRef
-> FieldDescriptor TxoRefArray
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
String
"items"
(MessageOrGroup -> FieldTypeDescriptor TxoRef
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor TxoRef)
(Packing
-> Lens' TxoRefArray [TxoRef] -> FieldAccessor TxoRefArray TxoRef
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"items")) ::
Data.ProtoLens.FieldDescriptor TxoRefArray
in
[(Tag, FieldDescriptor TxoRefArray)]
-> Map Tag (FieldDescriptor TxoRefArray)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor TxoRefArray
items__field_descriptor)]
unknownFields :: Lens' TxoRefArray FieldSet
unknownFields
= (TxoRefArray -> FieldSet)
-> (TxoRefArray -> FieldSet -> TxoRefArray)
-> Lens' TxoRefArray FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
TxoRefArray -> FieldSet
_TxoRefArray'_unknownFields
(\ TxoRefArray
x__ FieldSet
y__ -> TxoRefArray
x__ {_TxoRefArray'_unknownFields = y__})
defMessage :: TxoRefArray
defMessage
= TxoRefArray'_constructor
{_TxoRefArray'items :: Vector TxoRef
_TxoRefArray'items = Vector TxoRef
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_TxoRefArray'_unknownFields :: FieldSet
_TxoRefArray'_unknownFields = []}
parseMessage :: Parser TxoRefArray
parseMessage
= let
loop ::
TxoRefArray
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld TxoRef
-> Data.ProtoLens.Encoding.Bytes.Parser TxoRefArray
loop :: TxoRefArray
-> Growing Vector RealWorld TxoRef -> Parser TxoRefArray
loop TxoRefArray
x Growing Vector RealWorld TxoRef
mutable'items
= do end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if end then
do frozen'items <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Data.ProtoLens.Encoding.Growing.unsafeFreeze mutable'items)
(let missing = []
in
if Prelude.null missing then
Prelude.return ()
else
Prelude.fail
((Prelude.++)
"Missing required fields: "
(Prelude.show (missing :: [Prelude.String]))))
Prelude.return
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Lens.Family2.set
(Data.ProtoLens.Field.field @"vec'items") frozen'items x))
else
do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
case tag of
Word64
10
-> do !y <- Parser TxoRef -> String -> Parser TxoRef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Data.ProtoLens.Encoding.Bytes.isolate
(Prelude.fromIntegral len)
Data.ProtoLens.parseMessage)
String
"items"
v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Data.ProtoLens.Encoding.Growing.append mutable'items y)
loop x v
Word64
wire
-> do !y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
loop
(Lens.Family2.over
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) x)
mutable'items
in
Parser TxoRefArray -> String -> Parser TxoRefArray
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do mutable'items <- IO (Growing Vector RealWorld TxoRef)
-> Parser (Growing Vector RealWorld TxoRef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld TxoRef)
IO (Growing Vector (PrimState IO) TxoRef)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
loop Data.ProtoLens.defMessage mutable'items)
String
"TxoRefArray"
buildMessage :: TxoRefArray -> Builder
buildMessage
= \ TxoRefArray
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((TxoRef -> Builder) -> Vector TxoRef -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ TxoRef
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
((ByteString -> Builder)
-> (TxoRef -> ByteString) -> TxoRef -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ 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))
TxoRef -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage TxoRef
_v))
(FoldLike
(Vector TxoRef)
TxoRefArray
TxoRefArray
(Vector TxoRef)
(Vector TxoRef)
-> TxoRefArray -> Vector TxoRef
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'items") TxoRefArray
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet TxoRefArray TxoRefArray FieldSet FieldSet
-> TxoRefArray -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet TxoRefArray TxoRefArray FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' TxoRefArray FieldSet
Data.ProtoLens.unknownFields TxoRefArray
_x))
instance Control.DeepSeq.NFData TxoRefArray where
rnf :: TxoRefArray -> ()
rnf
= \ TxoRefArray
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(TxoRefArray -> FieldSet
_TxoRefArray'_unknownFields TxoRefArray
x__)
(Vector TxoRef -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (TxoRefArray -> Vector TxoRef
_TxoRefArray'items TxoRefArray
x__) ())
data QueryService = QueryService {}
instance Data.ProtoLens.Service.Types.Service QueryService where
type ServiceName QueryService = "QueryService"
type ServicePackage QueryService = "utxorpc.v1alpha.query"
type ServiceMethods QueryService = '["readParams", "readUtxos"]
packedServiceDescriptor :: Proxy QueryService -> ByteString
packedServiceDescriptor Proxy QueryService
_
= ByteString
"\n\
\\fQueryService\DC2a\n\
\\n\
\ReadParams\DC2(.utxorpc.v1alpha.query.ReadParamsRequest\SUB).utxorpc.v1alpha.query.ReadParamsResponse\DC2^\n\
\\tReadUtxos\DC2'.utxorpc.v1alpha.query.ReadUtxosRequest\SUB(.utxorpc.v1alpha.query.ReadUtxosResponse"
instance Data.ProtoLens.Service.Types.HasMethodImpl QueryService "readParams" where
type MethodName QueryService "readParams" = "ReadParams"
type MethodInput QueryService "readParams" = ReadParamsRequest
type MethodOutput QueryService "readParams" = ReadParamsResponse
type MethodStreamingType QueryService "readParams" = 'Data.ProtoLens.Service.Types.NonStreaming
instance Data.ProtoLens.Service.Types.HasMethodImpl QueryService "readUtxos" where
type MethodName QueryService "readUtxos" = "ReadUtxos"
type MethodInput QueryService "readUtxos" = ReadUtxosRequest
type MethodOutput QueryService "readUtxos" = ReadUtxosResponse
type MethodStreamingType QueryService "readUtxos" = 'Data.ProtoLens.Service.Types.NonStreaming
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
= ByteString
"\n\
\!utxorpc/v1alpha/query/query.proto\DC2\NAKutxorpc.v1alpha.query\SUB google/protobuf/field_mask.proto\SUB%utxorpc/v1alpha/cardano/cardano.proto\"j\n\
\\n\
\ChainPoint\DC2\DC2\n\
\\EOTslot\CAN\SOH \SOH(\EOTR\EOTslot\DC2\DC2\n\
\\EOThash\CAN\STX \SOH(\fR\EOThash\DC2\SYN\n\
\\ACKheight\CAN\ETX \SOH(\EOTR\ACKheight\DC2\FS\n\
\\ttimestamp\CAN\EOT \SOH(\EOTR\ttimestamp\"2\n\
\\ACKTxoRef\DC2\DC2\n\
\\EOThash\CAN\SOH \SOH(\fR\EOThash\DC2\DC4\n\
\\ENQindex\CAN\STX \SOH(\rR\ENQindex\"B\n\
\\vTxoRefArray\DC23\n\
\\ENQitems\CAN\SOH \ETX(\v2\GS.utxorpc.v1alpha.query.TxoRefR\ENQitems\"N\n\
\\DC1ReadParamsRequest\DC29\n\
\\n\
\field_mask\CAN\SOH \SOH(\v2\SUB.google.protobuf.FieldMaskR\tfieldMask\"X\n\
\\SOAnyChainParams\DC2<\n\
\\acardano\CAN\SOH \SOH(\v2 .utxorpc.v1alpha.cardano.PParamsH\NULR\acardanoB\b\n\
\\ACKparams\"\149\SOH\n\
\\DC2ReadParamsResponse\DC2=\n\
\\ACKvalues\CAN\SOH \SOH(\v2%.utxorpc.v1alpha.query.AnyChainParamsR\ACKvalues\DC2@\n\
\\n\
\ledger_tip\CAN\STX \SOH(\v2!.utxorpc.v1alpha.query.ChainPointR\tledgerTip\"$\n\
\\fAddressArray\DC2\DC4\n\
\\ENQitems\CAN\SOH \ETX(\fR\ENQitems\"\183\SOH\n\
\\vAnyUtxoData\DC2!\n\
\\fnative_bytes\CAN\SOH \SOH(\fR\vnativeBytes\DC26\n\
\\atxo_ref\CAN\STX \SOH(\v2\GS.utxorpc.v1alpha.query.TxoRefR\ACKtxoRef\DC2=\n\
\\acardano\CAN\ETX \SOH(\v2!.utxorpc.v1alpha.cardano.TxOutputH\NULR\acardanoB\SO\n\
\\fparsed_state\"\224\SOH\n\
\\DLEReadUtxosRequest\DC2>\n\
\\atxoRefs\CAN\SOH \SOH(\v2\".utxorpc.v1alpha.query.TxoRefArrayH\NULR\atxoRefs\DC2C\n\
\\taddresses\CAN\STX \SOH(\v2#.utxorpc.v1alpha.query.AddressArrayH\NULR\taddresses\DC29\n\
\\n\
\field_mask\CAN\ETX \SOH(\v2\SUB.google.protobuf.FieldMaskR\tfieldMaskB\f\n\
\\n\
\query_args\"\143\SOH\n\
\\DC1ReadUtxosResponse\DC28\n\
\\ENQitems\CAN\SOH \ETX(\v2\".utxorpc.v1alpha.query.AnyUtxoDataR\ENQitems\DC2@\n\
\\n\
\ledger_tip\CAN\STX \SOH(\v2!.utxorpc.v1alpha.query.ChainPointR\tledgerTip2\209\SOH\n\
\\fQueryService\DC2a\n\
\\n\
\ReadParams\DC2(.utxorpc.v1alpha.query.ReadParamsRequest\SUB).utxorpc.v1alpha.query.ReadParamsResponse\DC2^\n\
\\tReadUtxos\DC2'.utxorpc.v1alpha.query.ReadUtxosRequest\SUB(.utxorpc.v1alpha.query.ReadUtxosResponseJ\202\SYN\n\
\\ACK\DC2\EOT\STX\NULP\SOH\n\
\9\n\
\\SOH\f\DC2\ETX\STX\NUL\DC22// A consistent view of the state of the ledger\n\
\\n\
\\b\n\
\\SOH\STX\DC2\ETX\EOT\NUL\RS\n\
\\t\n\
\\STX\ETX\NUL\DC2\ETX\ACK\NUL*\n\
\\t\n\
\\STX\ETX\SOH\DC2\ETX\a\NUL/\n\
\<\n\
\\STX\EOT\NUL\DC2\EOT\n\
\\NUL\SI\SOH\SUB0 Represents a specific point in the blockchain.\n\
\\n\
\\n\
\\n\
\\ETX\EOT\NUL\SOH\DC2\ETX\n\
\\b\DC2\n\
\\ESC\n\
\\EOT\EOT\NUL\STX\NUL\DC2\ETX\v\STX\DC2\"\SO Slot number.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\v\STX\b\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\v\t\r\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\v\DLE\DC1\n\
\\SUB\n\
\\EOT\EOT\NUL\STX\SOH\DC2\ETX\f\STX\DC1\"\r Block hash.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\f\STX\a\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\f\b\f\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\f\SI\DLE\n\
\\FS\n\
\\EOT\EOT\NUL\STX\STX\DC2\ETX\r\STX\DC4\"\SI Block height.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\ENQ\DC2\ETX\r\STX\b\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\SOH\DC2\ETX\r\t\SI\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX\r\DC2\DC3\n\
\!\n\
\\EOT\EOT\NUL\STX\ETX\DC2\ETX\SO\STX\ETB\"\DC4 Block ms timestamp\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ETX\ENQ\DC2\ETX\SO\STX\b\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ETX\SOH\DC2\ETX\SO\t\DC2\n\
\\f\n\
\\ENQ\EOT\NUL\STX\ETX\ETX\DC2\ETX\SO\NAK\SYN\n\
\<\n\
\\STX\EOT\SOH\DC2\EOT\DC2\NUL\NAK\SOH\SUB0 Represents a reference to a transaction output\n\
\\n\
\\n\
\\n\
\\ETX\EOT\SOH\SOH\DC2\ETX\DC2\b\SO\n\
\\ETB\n\
\\EOT\EOT\SOH\STX\NUL\DC2\ETX\DC3\STX\DC1\"\n\
\ Tx hash.\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\ENQ\DC2\ETX\DC3\STX\a\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\DC3\b\f\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\DC3\SI\DLE\n\
\\FS\n\
\\EOT\EOT\SOH\STX\SOH\DC2\ETX\DC4\STX\DC3\"\SI Output index.\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\ENQ\DC2\ETX\DC4\STX\b\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\SOH\DC2\ETX\DC4\t\SO\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\ETX\DC2\ETX\DC4\DC1\DC2\n\
\\n\
\\n\
\\STX\EOT\STX\DC2\EOT\ETB\NUL\SUB\SOH\n\
\\n\
\\n\
\\ETX\EOT\STX\SOH\DC2\ETX\ETB\b\DC3\n\
\,\n\
\\EOT\EOT\STX\STX\NUL\DC2\ETX\EM\STX\FS\SUB\US TODO u5c: changed to repeated\n\
\\n\
\\f\n\
\\ENQ\EOT\STX\STX\NUL\EOT\DC2\ETX\EM\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\STX\STX\NUL\ACK\DC2\ETX\EM\v\DC1\n\
\\f\n\
\\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX\EM\DC2\ETB\n\
\\f\n\
\\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX\EM\SUB\ESC\n\
\1\n\
\\STX\EOT\ETX\DC2\EOT\GS\NUL\US\SOH\SUB% Request to get the chain parameters\n\
\\n\
\\n\
\\n\
\\ETX\EOT\ETX\SOH\DC2\ETX\GS\b\EM\n\
\N\n\
\\EOT\EOT\ETX\STX\NUL\DC2\ETX\RS\STX+\"A Field mask to selectively return fields in the parsed response.\n\
\\n\
\\f\n\
\\ENQ\EOT\ETX\STX\NUL\ACK\DC2\ETX\RS\STX\ESC\n\
\\f\n\
\\ENQ\EOT\ETX\STX\NUL\SOH\DC2\ETX\RS\FS&\n\
\\f\n\
\\ENQ\EOT\ETX\STX\NUL\ETX\DC2\ETX\RS)*\n\
\U\n\
\\STX\EOT\EOT\DC2\EOT\"\NUL&\SOH\SUBI An evenlope that holds parameter data from any of the compatible chains\n\
\\n\
\\n\
\\n\
\\ETX\EOT\EOT\SOH\DC2\ETX\"\b\SYN\n\
\\f\n\
\\EOT\EOT\EOT\b\NUL\DC2\EOT#\STX%\ETX\n\
\\f\n\
\\ENQ\EOT\EOT\b\NUL\SOH\DC2\ETX#\b\SO\n\
\!\n\
\\EOT\EOT\EOT\STX\NUL\DC2\ETX$\EOT0\"\DC4 Cardano parameters\n\
\\n\
\\f\n\
\\ENQ\EOT\EOT\STX\NUL\ACK\DC2\ETX$\EOT#\n\
\\f\n\
\\ENQ\EOT\EOT\STX\NUL\SOH\DC2\ETX$$+\n\
\\f\n\
\\ENQ\EOT\EOT\STX\NUL\ETX\DC2\ETX$./\n\
\6\n\
\\STX\EOT\ENQ\DC2\EOT)\NUL,\SOH\SUB* Response containing the chain parameters\n\
\\n\
\\n\
\\n\
\\ETX\EOT\ENQ\SOH\DC2\ETX)\b\SUB\n\
\+\n\
\\EOT\EOT\ENQ\STX\NUL\DC2\ETX*\STX\FS\"\RS The value of the parameters.\n\
\\n\
\\f\n\
\\ENQ\EOT\ENQ\STX\NUL\ACK\DC2\ETX*\STX\DLE\n\
\\f\n\
\\ENQ\EOT\ENQ\STX\NUL\SOH\DC2\ETX*\DC1\ETB\n\
\\f\n\
\\ENQ\EOT\ENQ\STX\NUL\ETX\DC2\ETX*\SUB\ESC\n\
\J\n\
\\EOT\EOT\ENQ\STX\SOH\DC2\ETX+\STX\FS\"= The chain point that represent the ledger current position.\n\
\\n\
\\f\n\
\\ENQ\EOT\ENQ\STX\SOH\ACK\DC2\ETX+\STX\f\n\
\\f\n\
\\ENQ\EOT\ENQ\STX\SOH\SOH\DC2\ETX+\r\ETB\n\
\\f\n\
\\ENQ\EOT\ENQ\STX\SOH\ETX\DC2\ETX+\SUB\ESC\n\
\ \n\
\\STX\EOT\ACK\DC2\EOT/\NUL1\SOH\SUB\DC4 TODO u5c: new type\n\
\\n\
\\n\
\\n\
\\ETX\EOT\ACK\SOH\DC2\ETX/\b\DC4\n\
\\v\n\
\\EOT\EOT\ACK\STX\NUL\DC2\ETX0\STX\ESC\n\
\\f\n\
\\ENQ\EOT\ACK\STX\NUL\EOT\DC2\ETX0\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\ACK\STX\NUL\ENQ\DC2\ETX0\v\DLE\n\
\\f\n\
\\ENQ\EOT\ACK\STX\NUL\SOH\DC2\ETX0\DC1\SYN\n\
\\f\n\
\\ENQ\EOT\ACK\STX\NUL\ETX\DC2\ETX0\EM\SUB\n\
\J\n\
\\STX\EOT\a\DC2\EOT4\NUL:\SOH\SUB> An evenlope that holds an UTxO from any of compatible chains\n\
\\n\
\\n\
\\n\
\\ETX\EOT\a\SOH\DC2\ETX4\b\DC3\n\
\5\n\
\\EOT\EOT\a\STX\NUL\DC2\ETX5\STX\EM\"( Original bytes as defined by the chain\n\
\\n\
\\f\n\
\\ENQ\EOT\a\STX\NUL\ENQ\DC2\ETX5\STX\a\n\
\\f\n\
\\ENQ\EOT\a\STX\NUL\SOH\DC2\ETX5\b\DC4\n\
\\f\n\
\\ENQ\EOT\a\STX\NUL\ETX\DC2\ETX5\ETB\CAN\n\
\0\n\
\\EOT\EOT\a\STX\SOH\DC2\ETX6\STX\NAK\"# Hash of the previous transaction.\n\
\\n\
\\f\n\
\\ENQ\EOT\a\STX\SOH\ACK\DC2\ETX6\STX\b\n\
\\f\n\
\\ENQ\EOT\a\STX\SOH\SOH\DC2\ETX6\t\DLE\n\
\\f\n\
\\ENQ\EOT\a\STX\SOH\ETX\DC2\ETX6\DC3\DC4\n\
\\f\n\
\\EOT\EOT\a\b\NUL\DC2\EOT7\STX9\ETX\n\
\\f\n\
\\ENQ\EOT\a\b\NUL\SOH\DC2\ETX7\b\DC4\n\
\\GS\n\
\\EOT\EOT\a\STX\STX\DC2\ETX8\EOT1\"\DLE A cardano UTxO\n\
\\n\
\\f\n\
\\ENQ\EOT\a\STX\STX\ACK\DC2\ETX8\EOT$\n\
\\f\n\
\\ENQ\EOT\a\STX\STX\SOH\DC2\ETX8%,\n\
\\f\n\
\\ENQ\EOT\a\STX\STX\ETX\DC2\ETX8/0\n\
\+\n\
\\STX\EOT\b\DC2\EOT=\NULD\SOH\SUB\US Request to get specific UTxOs\n\
\\n\
\\n\
\\n\
\\ETX\EOT\b\SOH\DC2\ETX=\b\CAN\n\
\#\n\
\\EOT\EOT\b\b\NUL\DC2\EOT?\STXB\ETX\SUB\NAK TODO u5c: new oneof\n\
\\n\
\\f\n\
\\ENQ\EOT\b\b\NUL\SOH\DC2\ETX?\b\DC2\n\
\,\n\
\\EOT\EOT\b\STX\NUL\DC2\ETX@\EOT\FS\"\US Array of Tx Output references\n\
\\n\
\\f\n\
\\ENQ\EOT\b\STX\NUL\ACK\DC2\ETX@\EOT\SI\n\
\\f\n\
\\ENQ\EOT\b\STX\NUL\SOH\DC2\ETX@\DLE\ETB\n\
\\f\n\
\\ENQ\EOT\b\STX\NUL\ETX\DC2\ETX@\SUB\ESC\n\
\!\n\
\\EOT\EOT\b\STX\SOH\DC2\ETXA\EOT\US\"\DC4 Array of addresses\n\
\\n\
\\f\n\
\\ENQ\EOT\b\STX\SOH\ACK\DC2\ETXA\EOT\DLE\n\
\\f\n\
\\ENQ\EOT\b\STX\SOH\SOH\DC2\ETXA\DC1\SUB\n\
\\f\n\
\\ENQ\EOT\b\STX\SOH\ETX\DC2\ETXA\GS\RS\n\
\7\n\
\\EOT\EOT\b\STX\STX\DC2\ETXC\STX+\"* Field mask to selectively return fields.\n\
\\n\
\\f\n\
\\ENQ\EOT\b\STX\STX\ACK\DC2\ETXC\STX\ESC\n\
\\f\n\
\\ENQ\EOT\b\STX\STX\SOH\DC2\ETXC\FS&\n\
\\f\n\
\\ENQ\EOT\b\STX\STX\ETX\DC2\ETXC)*\n\
\T\n\
\\STX\EOT\t\DC2\EOTG\NULJ\SOH\SUBH Response containing the UTxOs associated with the requested addresses.\n\
\\n\
\\n\
\\n\
\\ETX\EOT\t\SOH\DC2\ETXG\b\EM\n\
\\GS\n\
\\EOT\EOT\t\STX\NUL\DC2\ETXH\STX!\"\DLE List of UTxOs.\n\
\\n\
\\f\n\
\\ENQ\EOT\t\STX\NUL\EOT\DC2\ETXH\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\t\STX\NUL\ACK\DC2\ETXH\v\SYN\n\
\\f\n\
\\ENQ\EOT\t\STX\NUL\SOH\DC2\ETXH\ETB\FS\n\
\\f\n\
\\ENQ\EOT\t\STX\NUL\ETX\DC2\ETXH\US \n\
\J\n\
\\EOT\EOT\t\STX\SOH\DC2\ETXI\STX\FS\"= The chain point that represent the ledger current position.\n\
\\n\
\\f\n\
\\ENQ\EOT\t\STX\SOH\ACK\DC2\ETXI\STX\f\n\
\\f\n\
\\ENQ\EOT\t\STX\SOH\SOH\DC2\ETXI\r\ETB\n\
\\f\n\
\\ENQ\EOT\t\STX\SOH\ETX\DC2\ETXI\SUB\ESC\n\
\E\n\
\\STX\ACK\NUL\DC2\EOTM\NULP\SOH\SUB9 Service definition for querying the state of the chain.\n\
\\n\
\\n\
\\n\
\\ETX\ACK\NUL\SOH\DC2\ETXM\b\DC4\n\
\'\n\
\\EOT\ACK\NUL\STX\NUL\DC2\ETXN\STXA\"\SUB Get overall chain state.\n\
\\n\
\\f\n\
\\ENQ\ACK\NUL\STX\NUL\SOH\DC2\ETXN\ACK\DLE\n\
\\f\n\
\\ENQ\ACK\NUL\STX\NUL\STX\DC2\ETXN\DC1\"\n\
\\f\n\
\\ENQ\ACK\NUL\STX\NUL\ETX\DC2\ETXN-?\n\
\0\n\
\\EOT\ACK\NUL\STX\SOH\DC2\ETXO\STX>\"# Read specific UTxOs by reference.\n\
\\n\
\\f\n\
\\ENQ\ACK\NUL\STX\SOH\SOH\DC2\ETXO\ACK\SI\n\
\\f\n\
\\ENQ\ACK\NUL\STX\SOH\STX\DC2\ETXO\DLE \n\
\\f\n\
\\ENQ\ACK\NUL\STX\SOH\ETX\DC2\ETXO+<b\ACKproto3"