{- This file was auto-generated from utxorpc/v1alpha/watch/watch.proto by the proto-lens-protoc program. -}
{-# 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.Watch.Watch (
        WatchService(..), AnyChainTx(), AnyChainTx'Chain(..),
        _AnyChainTx'Cardano, AnyChainTxPattern(),
        AnyChainTxPattern'Chain(..), _AnyChainTxPattern'Cardano,
        BlockRef(), TxPredicate(), WatchTxRequest(), WatchTxResponse(),
        WatchTxResponse'Action(..), _WatchTxResponse'Apply,
        _WatchTxResponse'Undo
    ) 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
{- | Fields :
     
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.maybe'chain' @:: Lens' AnyChainTx (Prelude.Maybe AnyChainTx'Chain)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.maybe'cardano' @:: Lens' AnyChainTx (Prelude.Maybe Proto.Utxorpc.V1alpha.Cardano.Cardano.Tx)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.cardano' @:: Lens' AnyChainTx Proto.Utxorpc.V1alpha.Cardano.Cardano.Tx@ -}
data AnyChainTx
  = AnyChainTx'_constructor {AnyChainTx -> Maybe AnyChainTx'Chain
_AnyChainTx'chain :: !(Prelude.Maybe AnyChainTx'Chain),
                             AnyChainTx -> FieldSet
_AnyChainTx'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (AnyChainTx -> AnyChainTx -> Bool
(AnyChainTx -> AnyChainTx -> Bool)
-> (AnyChainTx -> AnyChainTx -> Bool) -> Eq AnyChainTx
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnyChainTx -> AnyChainTx -> Bool
== :: AnyChainTx -> AnyChainTx -> Bool
$c/= :: AnyChainTx -> AnyChainTx -> Bool
/= :: AnyChainTx -> AnyChainTx -> Bool
Prelude.Eq, Eq AnyChainTx
Eq AnyChainTx =>
(AnyChainTx -> AnyChainTx -> Ordering)
-> (AnyChainTx -> AnyChainTx -> Bool)
-> (AnyChainTx -> AnyChainTx -> Bool)
-> (AnyChainTx -> AnyChainTx -> Bool)
-> (AnyChainTx -> AnyChainTx -> Bool)
-> (AnyChainTx -> AnyChainTx -> AnyChainTx)
-> (AnyChainTx -> AnyChainTx -> AnyChainTx)
-> Ord AnyChainTx
AnyChainTx -> AnyChainTx -> Bool
AnyChainTx -> AnyChainTx -> Ordering
AnyChainTx -> AnyChainTx -> AnyChainTx
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 :: AnyChainTx -> AnyChainTx -> Ordering
compare :: AnyChainTx -> AnyChainTx -> Ordering
$c< :: AnyChainTx -> AnyChainTx -> Bool
< :: AnyChainTx -> AnyChainTx -> Bool
$c<= :: AnyChainTx -> AnyChainTx -> Bool
<= :: AnyChainTx -> AnyChainTx -> Bool
$c> :: AnyChainTx -> AnyChainTx -> Bool
> :: AnyChainTx -> AnyChainTx -> Bool
$c>= :: AnyChainTx -> AnyChainTx -> Bool
>= :: AnyChainTx -> AnyChainTx -> Bool
$cmax :: AnyChainTx -> AnyChainTx -> AnyChainTx
max :: AnyChainTx -> AnyChainTx -> AnyChainTx
$cmin :: AnyChainTx -> AnyChainTx -> AnyChainTx
min :: AnyChainTx -> AnyChainTx -> AnyChainTx
Prelude.Ord)
instance Prelude.Show AnyChainTx where
  showsPrec :: Int -> AnyChainTx -> ShowS
showsPrec Int
_ AnyChainTx
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (AnyChainTx -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort AnyChainTx
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
data AnyChainTx'Chain
  = AnyChainTx'Cardano !Proto.Utxorpc.V1alpha.Cardano.Cardano.Tx
  deriving stock (Int -> AnyChainTx'Chain -> ShowS
[AnyChainTx'Chain] -> ShowS
AnyChainTx'Chain -> String
(Int -> AnyChainTx'Chain -> ShowS)
-> (AnyChainTx'Chain -> String)
-> ([AnyChainTx'Chain] -> ShowS)
-> Show AnyChainTx'Chain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AnyChainTx'Chain -> ShowS
showsPrec :: Int -> AnyChainTx'Chain -> ShowS
$cshow :: AnyChainTx'Chain -> String
show :: AnyChainTx'Chain -> String
$cshowList :: [AnyChainTx'Chain] -> ShowS
showList :: [AnyChainTx'Chain] -> ShowS
Prelude.Show, AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
(AnyChainTx'Chain -> AnyChainTx'Chain -> Bool)
-> (AnyChainTx'Chain -> AnyChainTx'Chain -> Bool)
-> Eq AnyChainTx'Chain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
== :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
$c/= :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
/= :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
Prelude.Eq, Eq AnyChainTx'Chain
Eq AnyChainTx'Chain =>
(AnyChainTx'Chain -> AnyChainTx'Chain -> Ordering)
-> (AnyChainTx'Chain -> AnyChainTx'Chain -> Bool)
-> (AnyChainTx'Chain -> AnyChainTx'Chain -> Bool)
-> (AnyChainTx'Chain -> AnyChainTx'Chain -> Bool)
-> (AnyChainTx'Chain -> AnyChainTx'Chain -> Bool)
-> (AnyChainTx'Chain -> AnyChainTx'Chain -> AnyChainTx'Chain)
-> (AnyChainTx'Chain -> AnyChainTx'Chain -> AnyChainTx'Chain)
-> Ord AnyChainTx'Chain
AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
AnyChainTx'Chain -> AnyChainTx'Chain -> Ordering
AnyChainTx'Chain -> AnyChainTx'Chain -> AnyChainTx'Chain
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 :: AnyChainTx'Chain -> AnyChainTx'Chain -> Ordering
compare :: AnyChainTx'Chain -> AnyChainTx'Chain -> Ordering
$c< :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
< :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
$c<= :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
<= :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
$c> :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
> :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
$c>= :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
>= :: AnyChainTx'Chain -> AnyChainTx'Chain -> Bool
$cmax :: AnyChainTx'Chain -> AnyChainTx'Chain -> AnyChainTx'Chain
max :: AnyChainTx'Chain -> AnyChainTx'Chain -> AnyChainTx'Chain
$cmin :: AnyChainTx'Chain -> AnyChainTx'Chain -> AnyChainTx'Chain
min :: AnyChainTx'Chain -> AnyChainTx'Chain -> AnyChainTx'Chain
Prelude.Ord)
instance Data.ProtoLens.Field.HasField AnyChainTx "maybe'chain" (Prelude.Maybe AnyChainTx'Chain) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'chain"
-> (Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain))
-> AnyChainTx
-> f AnyChainTx
fieldOf Proxy# "maybe'chain"
_
    = ((Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain))
 -> AnyChainTx -> f AnyChainTx)
-> ((Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain))
    -> Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain))
-> (Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain))
-> AnyChainTx
-> f AnyChainTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((AnyChainTx -> Maybe AnyChainTx'Chain)
-> (AnyChainTx -> Maybe AnyChainTx'Chain -> AnyChainTx)
-> Lens
     AnyChainTx
     AnyChainTx
     (Maybe AnyChainTx'Chain)
     (Maybe AnyChainTx'Chain)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           AnyChainTx -> Maybe AnyChainTx'Chain
_AnyChainTx'chain (\ AnyChainTx
x__ Maybe AnyChainTx'Chain
y__ -> AnyChainTx
x__ {_AnyChainTx'chain = y__}))
        (Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain))
-> Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField AnyChainTx "maybe'cardano" (Prelude.Maybe Proto.Utxorpc.V1alpha.Cardano.Cardano.Tx) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'cardano"
-> (Maybe Tx -> f (Maybe Tx)) -> AnyChainTx -> f AnyChainTx
fieldOf Proxy# "maybe'cardano"
_
    = ((Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain))
 -> AnyChainTx -> f AnyChainTx)
-> ((Maybe Tx -> f (Maybe Tx))
    -> Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain))
-> (Maybe Tx -> f (Maybe Tx))
-> AnyChainTx
-> f AnyChainTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((AnyChainTx -> Maybe AnyChainTx'Chain)
-> (AnyChainTx -> Maybe AnyChainTx'Chain -> AnyChainTx)
-> Lens
     AnyChainTx
     AnyChainTx
     (Maybe AnyChainTx'Chain)
     (Maybe AnyChainTx'Chain)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           AnyChainTx -> Maybe AnyChainTx'Chain
_AnyChainTx'chain (\ AnyChainTx
x__ Maybe AnyChainTx'Chain
y__ -> AnyChainTx
x__ {_AnyChainTx'chain = y__}))
        ((Maybe AnyChainTx'Chain -> Maybe Tx)
-> (Maybe AnyChainTx'Chain -> Maybe Tx -> Maybe AnyChainTx'Chain)
-> Lens
     (Maybe AnyChainTx'Chain)
     (Maybe AnyChainTx'Chain)
     (Maybe Tx)
     (Maybe Tx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           (\ Maybe AnyChainTx'Chain
x__
              -> case Maybe AnyChainTx'Chain
x__ of
                   (Prelude.Just (AnyChainTx'Cardano Tx
x__val)) -> Tx -> Maybe Tx
forall a. a -> Maybe a
Prelude.Just Tx
x__val
                   Maybe AnyChainTx'Chain
_otherwise -> Maybe Tx
forall a. Maybe a
Prelude.Nothing)
           (\ Maybe AnyChainTx'Chain
_ Maybe Tx
y__ -> (Tx -> AnyChainTx'Chain) -> Maybe Tx -> Maybe AnyChainTx'Chain
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap Tx -> AnyChainTx'Chain
AnyChainTx'Cardano Maybe Tx
y__))
instance Data.ProtoLens.Field.HasField AnyChainTx "cardano" Proto.Utxorpc.V1alpha.Cardano.Cardano.Tx where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "cardano" -> (Tx -> f Tx) -> AnyChainTx -> f AnyChainTx
fieldOf Proxy# "cardano"
_
    = ((Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain))
 -> AnyChainTx -> f AnyChainTx)
-> ((Tx -> f Tx)
    -> Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain))
-> (Tx -> f Tx)
-> AnyChainTx
-> f AnyChainTx
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((AnyChainTx -> Maybe AnyChainTx'Chain)
-> (AnyChainTx -> Maybe AnyChainTx'Chain -> AnyChainTx)
-> Lens
     AnyChainTx
     AnyChainTx
     (Maybe AnyChainTx'Chain)
     (Maybe AnyChainTx'Chain)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           AnyChainTx -> Maybe AnyChainTx'Chain
_AnyChainTx'chain (\ AnyChainTx
x__ Maybe AnyChainTx'Chain
y__ -> AnyChainTx
x__ {_AnyChainTx'chain = y__}))
        (((Maybe Tx -> f (Maybe Tx))
 -> Maybe AnyChainTx'Chain -> f (Maybe AnyChainTx'Chain))
-> ((Tx -> f Tx) -> Maybe Tx -> f (Maybe Tx))
-> (Tx -> f Tx)
-> Maybe AnyChainTx'Chain
-> f (Maybe AnyChainTx'Chain)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
           ((Maybe AnyChainTx'Chain -> Maybe Tx)
-> (Maybe AnyChainTx'Chain -> Maybe Tx -> Maybe AnyChainTx'Chain)
-> Lens
     (Maybe AnyChainTx'Chain)
     (Maybe AnyChainTx'Chain)
     (Maybe Tx)
     (Maybe Tx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
              (\ Maybe AnyChainTx'Chain
x__
                 -> case Maybe AnyChainTx'Chain
x__ of
                      (Prelude.Just (AnyChainTx'Cardano Tx
x__val)) -> Tx -> Maybe Tx
forall a. a -> Maybe a
Prelude.Just Tx
x__val
                      Maybe AnyChainTx'Chain
_otherwise -> Maybe Tx
forall a. Maybe a
Prelude.Nothing)
              (\ Maybe AnyChainTx'Chain
_ Maybe Tx
y__ -> (Tx -> AnyChainTx'Chain) -> Maybe Tx -> Maybe AnyChainTx'Chain
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap Tx -> AnyChainTx'Chain
AnyChainTx'Cardano Maybe Tx
y__))
           (Tx -> Lens' (Maybe Tx) Tx
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Tx
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message AnyChainTx where
  messageName :: Proxy AnyChainTx -> Text
messageName Proxy AnyChainTx
_ = String -> Text
Data.Text.pack String
"utxorpc.v1alpha.watch.AnyChainTx"
  packedMessageDescriptor :: Proxy AnyChainTx -> ByteString
packedMessageDescriptor Proxy AnyChainTx
_
    = ByteString
"\n\
      \\n\
      \AnyChainTx\DC27\n\
      \\acardano\CAN\SOH \SOH(\v2\ESC.utxorpc.v1alpha.cardano.TxH\NULR\acardanoB\a\n\
      \\ENQchain"
  packedFileDescriptor :: Proxy AnyChainTx -> ByteString
packedFileDescriptor Proxy AnyChainTx
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor AnyChainTx)
fieldsByTag
    = let
        cardano__field_descriptor :: FieldDescriptor AnyChainTx
cardano__field_descriptor
          = String
-> FieldTypeDescriptor Tx
-> FieldAccessor AnyChainTx Tx
-> FieldDescriptor AnyChainTx
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"cardano"
              (MessageOrGroup -> FieldTypeDescriptor Tx
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Utxorpc.V1alpha.Cardano.Cardano.Tx)
              (Lens' AnyChainTx (Maybe Tx) -> FieldAccessor AnyChainTx Tx
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 AnyChainTx
      in
        [(Tag, FieldDescriptor AnyChainTx)]
-> Map Tag (FieldDescriptor AnyChainTx)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor AnyChainTx
cardano__field_descriptor)]
  unknownFields :: Lens' AnyChainTx FieldSet
unknownFields
    = (AnyChainTx -> FieldSet)
-> (AnyChainTx -> FieldSet -> AnyChainTx)
-> Lens' AnyChainTx FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        AnyChainTx -> FieldSet
_AnyChainTx'_unknownFields
        (\ AnyChainTx
x__ FieldSet
y__ -> AnyChainTx
x__ {_AnyChainTx'_unknownFields = y__})
  defMessage :: AnyChainTx
defMessage
    = AnyChainTx'_constructor
        {_AnyChainTx'chain :: Maybe AnyChainTx'Chain
_AnyChainTx'chain = Maybe AnyChainTx'Chain
forall a. Maybe a
Prelude.Nothing,
         _AnyChainTx'_unknownFields :: FieldSet
_AnyChainTx'_unknownFields = []}
  parseMessage :: Parser AnyChainTx
parseMessage
    = let
        loop ::
          AnyChainTx -> Data.ProtoLens.Encoding.Bytes.Parser AnyChainTx
        loop :: AnyChainTx -> Parser AnyChainTx
loop AnyChainTx
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      AnyChainTx -> Parser AnyChainTx
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter AnyChainTx AnyChainTx FieldSet FieldSet
-> (FieldSet -> FieldSet) -> AnyChainTx -> AnyChainTx
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           LensLike' f AnyChainTx FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' AnyChainTx FieldSet
Setter AnyChainTx AnyChainTx FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) AnyChainTx
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do Tx
y <- Parser Tx -> String -> Parser Tx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser Tx -> Parser Tx
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser Tx
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"cardano"
                                AnyChainTx -> Parser AnyChainTx
loop (Setter AnyChainTx AnyChainTx Tx Tx
-> Tx -> AnyChainTx -> AnyChainTx
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"cardano") Tx
y AnyChainTx
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                AnyChainTx -> Parser AnyChainTx
loop
                                  (Setter AnyChainTx AnyChainTx FieldSet FieldSet
-> (FieldSet -> FieldSet) -> AnyChainTx -> AnyChainTx
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     LensLike' f AnyChainTx FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' AnyChainTx FieldSet
Setter AnyChainTx AnyChainTx FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) AnyChainTx
x)
      in
        Parser AnyChainTx -> String -> Parser AnyChainTx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do AnyChainTx -> Parser AnyChainTx
loop AnyChainTx
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"AnyChainTx"
  buildMessage :: AnyChainTx -> Builder
buildMessage
    = \ AnyChainTx
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (case
                  FoldLike
  (Maybe AnyChainTx'Chain)
  AnyChainTx
  AnyChainTx
  (Maybe AnyChainTx'Chain)
  (Maybe AnyChainTx'Chain)
-> AnyChainTx -> Maybe AnyChainTx'Chain
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'chain") AnyChainTx
_x
              of
                Maybe AnyChainTx'Chain
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                (Prelude.Just (AnyChainTx'Cardano Tx
v))
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                       ((ByteString -> Builder) -> (Tx -> ByteString) -> Tx -> 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))
                          Tx -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage Tx
v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet AnyChainTx AnyChainTx FieldSet FieldSet
-> AnyChainTx -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet AnyChainTx AnyChainTx FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' AnyChainTx FieldSet
Data.ProtoLens.unknownFields AnyChainTx
_x))
instance Control.DeepSeq.NFData AnyChainTx where
  rnf :: AnyChainTx -> ()
rnf
    = \ AnyChainTx
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (AnyChainTx -> FieldSet
_AnyChainTx'_unknownFields AnyChainTx
x__)
             (Maybe AnyChainTx'Chain -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (AnyChainTx -> Maybe AnyChainTx'Chain
_AnyChainTx'chain AnyChainTx
x__) ())
instance Control.DeepSeq.NFData AnyChainTx'Chain where
  rnf :: AnyChainTx'Chain -> ()
rnf (AnyChainTx'Cardano Tx
x__) = Tx -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf Tx
x__
_AnyChainTx'Cardano ::
  Data.ProtoLens.Prism.Prism' AnyChainTx'Chain Proto.Utxorpc.V1alpha.Cardano.Cardano.Tx
_AnyChainTx'Cardano :: Prism' AnyChainTx'Chain Tx
_AnyChainTx'Cardano
  = (Tx -> AnyChainTx'Chain)
-> (AnyChainTx'Chain -> Maybe Tx) -> Prism' AnyChainTx'Chain Tx
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
      Tx -> AnyChainTx'Chain
AnyChainTx'Cardano
      (\ AnyChainTx'Chain
p__
         -> case AnyChainTx'Chain
p__ of (AnyChainTx'Cardano Tx
p__val) -> Tx -> Maybe Tx
forall a. a -> Maybe a
Prelude.Just Tx
p__val)
{- | Fields :
     
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.maybe'chain' @:: Lens' AnyChainTxPattern (Prelude.Maybe AnyChainTxPattern'Chain)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.maybe'cardano' @:: Lens' AnyChainTxPattern (Prelude.Maybe Proto.Utxorpc.V1alpha.Cardano.Cardano.TxPattern)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.cardano' @:: Lens' AnyChainTxPattern Proto.Utxorpc.V1alpha.Cardano.Cardano.TxPattern@ -}
data AnyChainTxPattern
  = AnyChainTxPattern'_constructor {AnyChainTxPattern -> Maybe AnyChainTxPattern'Chain
_AnyChainTxPattern'chain :: !(Prelude.Maybe AnyChainTxPattern'Chain),
                                    AnyChainTxPattern -> FieldSet
_AnyChainTxPattern'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (AnyChainTxPattern -> AnyChainTxPattern -> Bool
(AnyChainTxPattern -> AnyChainTxPattern -> Bool)
-> (AnyChainTxPattern -> AnyChainTxPattern -> Bool)
-> Eq AnyChainTxPattern
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
== :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
$c/= :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
/= :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
Prelude.Eq, Eq AnyChainTxPattern
Eq AnyChainTxPattern =>
(AnyChainTxPattern -> AnyChainTxPattern -> Ordering)
-> (AnyChainTxPattern -> AnyChainTxPattern -> Bool)
-> (AnyChainTxPattern -> AnyChainTxPattern -> Bool)
-> (AnyChainTxPattern -> AnyChainTxPattern -> Bool)
-> (AnyChainTxPattern -> AnyChainTxPattern -> Bool)
-> (AnyChainTxPattern -> AnyChainTxPattern -> AnyChainTxPattern)
-> (AnyChainTxPattern -> AnyChainTxPattern -> AnyChainTxPattern)
-> Ord AnyChainTxPattern
AnyChainTxPattern -> AnyChainTxPattern -> Bool
AnyChainTxPattern -> AnyChainTxPattern -> Ordering
AnyChainTxPattern -> AnyChainTxPattern -> AnyChainTxPattern
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 :: AnyChainTxPattern -> AnyChainTxPattern -> Ordering
compare :: AnyChainTxPattern -> AnyChainTxPattern -> Ordering
$c< :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
< :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
$c<= :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
<= :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
$c> :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
> :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
$c>= :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
>= :: AnyChainTxPattern -> AnyChainTxPattern -> Bool
$cmax :: AnyChainTxPattern -> AnyChainTxPattern -> AnyChainTxPattern
max :: AnyChainTxPattern -> AnyChainTxPattern -> AnyChainTxPattern
$cmin :: AnyChainTxPattern -> AnyChainTxPattern -> AnyChainTxPattern
min :: AnyChainTxPattern -> AnyChainTxPattern -> AnyChainTxPattern
Prelude.Ord)
instance Prelude.Show AnyChainTxPattern where
  showsPrec :: Int -> AnyChainTxPattern -> ShowS
showsPrec Int
_ AnyChainTxPattern
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (AnyChainTxPattern -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort AnyChainTxPattern
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
data AnyChainTxPattern'Chain
  = AnyChainTxPattern'Cardano !Proto.Utxorpc.V1alpha.Cardano.Cardano.TxPattern
  deriving stock (Int -> AnyChainTxPattern'Chain -> ShowS
[AnyChainTxPattern'Chain] -> ShowS
AnyChainTxPattern'Chain -> String
(Int -> AnyChainTxPattern'Chain -> ShowS)
-> (AnyChainTxPattern'Chain -> String)
-> ([AnyChainTxPattern'Chain] -> ShowS)
-> Show AnyChainTxPattern'Chain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AnyChainTxPattern'Chain -> ShowS
showsPrec :: Int -> AnyChainTxPattern'Chain -> ShowS
$cshow :: AnyChainTxPattern'Chain -> String
show :: AnyChainTxPattern'Chain -> String
$cshowList :: [AnyChainTxPattern'Chain] -> ShowS
showList :: [AnyChainTxPattern'Chain] -> ShowS
Prelude.Show, AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
(AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool)
-> (AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool)
-> Eq AnyChainTxPattern'Chain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
== :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
$c/= :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
/= :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
Prelude.Eq, Eq AnyChainTxPattern'Chain
Eq AnyChainTxPattern'Chain =>
(AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Ordering)
-> (AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool)
-> (AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool)
-> (AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool)
-> (AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool)
-> (AnyChainTxPattern'Chain
    -> AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain)
-> (AnyChainTxPattern'Chain
    -> AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain)
-> Ord AnyChainTxPattern'Chain
AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Ordering
AnyChainTxPattern'Chain
-> AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain
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 :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Ordering
compare :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Ordering
$c< :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
< :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
$c<= :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
<= :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
$c> :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
> :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
$c>= :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
>= :: AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain -> Bool
$cmax :: AnyChainTxPattern'Chain
-> AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain
max :: AnyChainTxPattern'Chain
-> AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain
$cmin :: AnyChainTxPattern'Chain
-> AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain
min :: AnyChainTxPattern'Chain
-> AnyChainTxPattern'Chain -> AnyChainTxPattern'Chain
Prelude.Ord)
instance Data.ProtoLens.Field.HasField AnyChainTxPattern "maybe'chain" (Prelude.Maybe AnyChainTxPattern'Chain) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'chain"
-> (Maybe AnyChainTxPattern'Chain
    -> f (Maybe AnyChainTxPattern'Chain))
-> AnyChainTxPattern
-> f AnyChainTxPattern
fieldOf Proxy# "maybe'chain"
_
    = ((Maybe AnyChainTxPattern'Chain
  -> f (Maybe AnyChainTxPattern'Chain))
 -> AnyChainTxPattern -> f AnyChainTxPattern)
-> ((Maybe AnyChainTxPattern'Chain
     -> f (Maybe AnyChainTxPattern'Chain))
    -> Maybe AnyChainTxPattern'Chain
    -> f (Maybe AnyChainTxPattern'Chain))
-> (Maybe AnyChainTxPattern'Chain
    -> f (Maybe AnyChainTxPattern'Chain))
-> AnyChainTxPattern
-> f AnyChainTxPattern
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((AnyChainTxPattern -> Maybe AnyChainTxPattern'Chain)
-> (AnyChainTxPattern
    -> Maybe AnyChainTxPattern'Chain -> AnyChainTxPattern)
-> Lens
     AnyChainTxPattern
     AnyChainTxPattern
     (Maybe AnyChainTxPattern'Chain)
     (Maybe AnyChainTxPattern'Chain)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           AnyChainTxPattern -> Maybe AnyChainTxPattern'Chain
_AnyChainTxPattern'chain
           (\ AnyChainTxPattern
x__ Maybe AnyChainTxPattern'Chain
y__ -> AnyChainTxPattern
x__ {_AnyChainTxPattern'chain = y__}))
        (Maybe AnyChainTxPattern'Chain
 -> f (Maybe AnyChainTxPattern'Chain))
-> Maybe AnyChainTxPattern'Chain
-> f (Maybe AnyChainTxPattern'Chain)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField AnyChainTxPattern "maybe'cardano" (Prelude.Maybe Proto.Utxorpc.V1alpha.Cardano.Cardano.TxPattern) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'cardano"
-> (Maybe TxPattern -> f (Maybe TxPattern))
-> AnyChainTxPattern
-> f AnyChainTxPattern
fieldOf Proxy# "maybe'cardano"
_
    = ((Maybe AnyChainTxPattern'Chain
  -> f (Maybe AnyChainTxPattern'Chain))
 -> AnyChainTxPattern -> f AnyChainTxPattern)
-> ((Maybe TxPattern -> f (Maybe TxPattern))
    -> Maybe AnyChainTxPattern'Chain
    -> f (Maybe AnyChainTxPattern'Chain))
-> (Maybe TxPattern -> f (Maybe TxPattern))
-> AnyChainTxPattern
-> f AnyChainTxPattern
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((AnyChainTxPattern -> Maybe AnyChainTxPattern'Chain)
-> (AnyChainTxPattern
    -> Maybe AnyChainTxPattern'Chain -> AnyChainTxPattern)
-> Lens
     AnyChainTxPattern
     AnyChainTxPattern
     (Maybe AnyChainTxPattern'Chain)
     (Maybe AnyChainTxPattern'Chain)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           AnyChainTxPattern -> Maybe AnyChainTxPattern'Chain
_AnyChainTxPattern'chain
           (\ AnyChainTxPattern
x__ Maybe AnyChainTxPattern'Chain
y__ -> AnyChainTxPattern
x__ {_AnyChainTxPattern'chain = y__}))
        ((Maybe AnyChainTxPattern'Chain -> Maybe TxPattern)
-> (Maybe AnyChainTxPattern'Chain
    -> Maybe TxPattern -> Maybe AnyChainTxPattern'Chain)
-> Lens
     (Maybe AnyChainTxPattern'Chain)
     (Maybe AnyChainTxPattern'Chain)
     (Maybe TxPattern)
     (Maybe TxPattern)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           (\ Maybe AnyChainTxPattern'Chain
x__
              -> case Maybe AnyChainTxPattern'Chain
x__ of
                   (Prelude.Just (AnyChainTxPattern'Cardano TxPattern
x__val))
                     -> TxPattern -> Maybe TxPattern
forall a. a -> Maybe a
Prelude.Just TxPattern
x__val
                   Maybe AnyChainTxPattern'Chain
_otherwise -> Maybe TxPattern
forall a. Maybe a
Prelude.Nothing)
           (\ Maybe AnyChainTxPattern'Chain
_ Maybe TxPattern
y__ -> (TxPattern -> AnyChainTxPattern'Chain)
-> Maybe TxPattern -> Maybe AnyChainTxPattern'Chain
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap TxPattern -> AnyChainTxPattern'Chain
AnyChainTxPattern'Cardano Maybe TxPattern
y__))
instance Data.ProtoLens.Field.HasField AnyChainTxPattern "cardano" Proto.Utxorpc.V1alpha.Cardano.Cardano.TxPattern where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "cardano"
-> (TxPattern -> f TxPattern)
-> AnyChainTxPattern
-> f AnyChainTxPattern
fieldOf Proxy# "cardano"
_
    = ((Maybe AnyChainTxPattern'Chain
  -> f (Maybe AnyChainTxPattern'Chain))
 -> AnyChainTxPattern -> f AnyChainTxPattern)
-> ((TxPattern -> f TxPattern)
    -> Maybe AnyChainTxPattern'Chain
    -> f (Maybe AnyChainTxPattern'Chain))
-> (TxPattern -> f TxPattern)
-> AnyChainTxPattern
-> f AnyChainTxPattern
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((AnyChainTxPattern -> Maybe AnyChainTxPattern'Chain)
-> (AnyChainTxPattern
    -> Maybe AnyChainTxPattern'Chain -> AnyChainTxPattern)
-> Lens
     AnyChainTxPattern
     AnyChainTxPattern
     (Maybe AnyChainTxPattern'Chain)
     (Maybe AnyChainTxPattern'Chain)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           AnyChainTxPattern -> Maybe AnyChainTxPattern'Chain
_AnyChainTxPattern'chain
           (\ AnyChainTxPattern
x__ Maybe AnyChainTxPattern'Chain
y__ -> AnyChainTxPattern
x__ {_AnyChainTxPattern'chain = y__}))
        (((Maybe TxPattern -> f (Maybe TxPattern))
 -> Maybe AnyChainTxPattern'Chain
 -> f (Maybe AnyChainTxPattern'Chain))
-> ((TxPattern -> f TxPattern)
    -> Maybe TxPattern -> f (Maybe TxPattern))
-> (TxPattern -> f TxPattern)
-> Maybe AnyChainTxPattern'Chain
-> f (Maybe AnyChainTxPattern'Chain)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
           ((Maybe AnyChainTxPattern'Chain -> Maybe TxPattern)
-> (Maybe AnyChainTxPattern'Chain
    -> Maybe TxPattern -> Maybe AnyChainTxPattern'Chain)
-> Lens
     (Maybe AnyChainTxPattern'Chain)
     (Maybe AnyChainTxPattern'Chain)
     (Maybe TxPattern)
     (Maybe TxPattern)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
              (\ Maybe AnyChainTxPattern'Chain
x__
                 -> case Maybe AnyChainTxPattern'Chain
x__ of
                      (Prelude.Just (AnyChainTxPattern'Cardano TxPattern
x__val))
                        -> TxPattern -> Maybe TxPattern
forall a. a -> Maybe a
Prelude.Just TxPattern
x__val
                      Maybe AnyChainTxPattern'Chain
_otherwise -> Maybe TxPattern
forall a. Maybe a
Prelude.Nothing)
              (\ Maybe AnyChainTxPattern'Chain
_ Maybe TxPattern
y__ -> (TxPattern -> AnyChainTxPattern'Chain)
-> Maybe TxPattern -> Maybe AnyChainTxPattern'Chain
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap TxPattern -> AnyChainTxPattern'Chain
AnyChainTxPattern'Cardano Maybe TxPattern
y__))
           (TxPattern -> Lens' (Maybe TxPattern) TxPattern
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens TxPattern
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message AnyChainTxPattern where
  messageName :: Proxy AnyChainTxPattern -> Text
messageName Proxy AnyChainTxPattern
_
    = String -> Text
Data.Text.pack String
"utxorpc.v1alpha.watch.AnyChainTxPattern"
  packedMessageDescriptor :: Proxy AnyChainTxPattern -> ByteString
packedMessageDescriptor Proxy AnyChainTxPattern
_
    = ByteString
"\n\
      \\DC1AnyChainTxPattern\DC2>\n\
      \\acardano\CAN\SOH \SOH(\v2\".utxorpc.v1alpha.cardano.TxPatternH\NULR\acardanoB\a\n\
      \\ENQchain"
  packedFileDescriptor :: Proxy AnyChainTxPattern -> ByteString
packedFileDescriptor Proxy AnyChainTxPattern
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor AnyChainTxPattern)
fieldsByTag
    = let
        cardano__field_descriptor :: FieldDescriptor AnyChainTxPattern
cardano__field_descriptor
          = String
-> FieldTypeDescriptor TxPattern
-> FieldAccessor AnyChainTxPattern TxPattern
-> FieldDescriptor AnyChainTxPattern
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"cardano"
              (MessageOrGroup -> FieldTypeDescriptor TxPattern
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Utxorpc.V1alpha.Cardano.Cardano.TxPattern)
              (Lens' AnyChainTxPattern (Maybe TxPattern)
-> FieldAccessor AnyChainTxPattern TxPattern
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 AnyChainTxPattern
      in
        [(Tag, FieldDescriptor AnyChainTxPattern)]
-> Map Tag (FieldDescriptor AnyChainTxPattern)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor AnyChainTxPattern
cardano__field_descriptor)]
  unknownFields :: Lens' AnyChainTxPattern FieldSet
unknownFields
    = (AnyChainTxPattern -> FieldSet)
-> (AnyChainTxPattern -> FieldSet -> AnyChainTxPattern)
-> Lens' AnyChainTxPattern FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        AnyChainTxPattern -> FieldSet
_AnyChainTxPattern'_unknownFields
        (\ AnyChainTxPattern
x__ FieldSet
y__ -> AnyChainTxPattern
x__ {_AnyChainTxPattern'_unknownFields = y__})
  defMessage :: AnyChainTxPattern
defMessage
    = AnyChainTxPattern'_constructor
        {_AnyChainTxPattern'chain :: Maybe AnyChainTxPattern'Chain
_AnyChainTxPattern'chain = Maybe AnyChainTxPattern'Chain
forall a. Maybe a
Prelude.Nothing,
         _AnyChainTxPattern'_unknownFields :: FieldSet
_AnyChainTxPattern'_unknownFields = []}
  parseMessage :: Parser AnyChainTxPattern
parseMessage
    = let
        loop ::
          AnyChainTxPattern
          -> Data.ProtoLens.Encoding.Bytes.Parser AnyChainTxPattern
        loop :: AnyChainTxPattern -> Parser AnyChainTxPattern
loop AnyChainTxPattern
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      AnyChainTxPattern -> Parser AnyChainTxPattern
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter AnyChainTxPattern AnyChainTxPattern FieldSet FieldSet
-> (FieldSet -> FieldSet) -> AnyChainTxPattern -> AnyChainTxPattern
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           LensLike' f AnyChainTxPattern FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' AnyChainTxPattern FieldSet
Setter AnyChainTxPattern AnyChainTxPattern FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) AnyChainTxPattern
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do TxPattern
y <- Parser TxPattern -> String -> Parser TxPattern
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser TxPattern -> Parser TxPattern
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser TxPattern
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"cardano"
                                AnyChainTxPattern -> Parser AnyChainTxPattern
loop (Setter AnyChainTxPattern AnyChainTxPattern TxPattern TxPattern
-> TxPattern -> AnyChainTxPattern -> AnyChainTxPattern
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"cardano") TxPattern
y AnyChainTxPattern
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                AnyChainTxPattern -> Parser AnyChainTxPattern
loop
                                  (Setter AnyChainTxPattern AnyChainTxPattern FieldSet FieldSet
-> (FieldSet -> FieldSet) -> AnyChainTxPattern -> AnyChainTxPattern
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     LensLike' f AnyChainTxPattern FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' AnyChainTxPattern FieldSet
Setter AnyChainTxPattern AnyChainTxPattern FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) AnyChainTxPattern
x)
      in
        Parser AnyChainTxPattern -> String -> Parser AnyChainTxPattern
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do AnyChainTxPattern -> Parser AnyChainTxPattern
loop AnyChainTxPattern
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"AnyChainTxPattern"
  buildMessage :: AnyChainTxPattern -> Builder
buildMessage
    = \ AnyChainTxPattern
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (case
                  FoldLike
  (Maybe AnyChainTxPattern'Chain)
  AnyChainTxPattern
  AnyChainTxPattern
  (Maybe AnyChainTxPattern'Chain)
  (Maybe AnyChainTxPattern'Chain)
-> AnyChainTxPattern -> Maybe AnyChainTxPattern'Chain
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'chain") AnyChainTxPattern
_x
              of
                Maybe AnyChainTxPattern'Chain
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                (Prelude.Just (AnyChainTxPattern'Cardano TxPattern
v))
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                       ((ByteString -> Builder)
-> (TxPattern -> ByteString) -> TxPattern -> 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))
                          TxPattern -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage TxPattern
v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike
  FieldSet AnyChainTxPattern AnyChainTxPattern FieldSet FieldSet
-> AnyChainTxPattern -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet AnyChainTxPattern AnyChainTxPattern FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' AnyChainTxPattern FieldSet
Data.ProtoLens.unknownFields AnyChainTxPattern
_x))
instance Control.DeepSeq.NFData AnyChainTxPattern where
  rnf :: AnyChainTxPattern -> ()
rnf
    = \ AnyChainTxPattern
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (AnyChainTxPattern -> FieldSet
_AnyChainTxPattern'_unknownFields AnyChainTxPattern
x__)
             (Maybe AnyChainTxPattern'Chain -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (AnyChainTxPattern -> Maybe AnyChainTxPattern'Chain
_AnyChainTxPattern'chain AnyChainTxPattern
x__) ())
instance Control.DeepSeq.NFData AnyChainTxPattern'Chain where
  rnf :: AnyChainTxPattern'Chain -> ()
rnf (AnyChainTxPattern'Cardano TxPattern
x__) = TxPattern -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf TxPattern
x__
_AnyChainTxPattern'Cardano ::
  Data.ProtoLens.Prism.Prism' AnyChainTxPattern'Chain Proto.Utxorpc.V1alpha.Cardano.Cardano.TxPattern
_AnyChainTxPattern'Cardano :: Prism' AnyChainTxPattern'Chain TxPattern
_AnyChainTxPattern'Cardano
  = (TxPattern -> AnyChainTxPattern'Chain)
-> (AnyChainTxPattern'Chain -> Maybe TxPattern)
-> Prism' AnyChainTxPattern'Chain TxPattern
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
      TxPattern -> AnyChainTxPattern'Chain
AnyChainTxPattern'Cardano
      (\ AnyChainTxPattern'Chain
p__
         -> case AnyChainTxPattern'Chain
p__ of
              (AnyChainTxPattern'Cardano TxPattern
p__val) -> TxPattern -> Maybe TxPattern
forall a. a -> Maybe a
Prelude.Just TxPattern
p__val)
{- | Fields :
     
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.index' @:: Lens' BlockRef Data.Word.Word64@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.hash' @:: Lens' BlockRef Data.ByteString.ByteString@ -}
data BlockRef
  = BlockRef'_constructor {BlockRef -> Word64
_BlockRef'index :: !Data.Word.Word64,
                           BlockRef -> ByteString
_BlockRef'hash :: !Data.ByteString.ByteString,
                           BlockRef -> FieldSet
_BlockRef'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (BlockRef -> BlockRef -> Bool
(BlockRef -> BlockRef -> Bool)
-> (BlockRef -> BlockRef -> Bool) -> Eq BlockRef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BlockRef -> BlockRef -> Bool
== :: BlockRef -> BlockRef -> Bool
$c/= :: BlockRef -> BlockRef -> Bool
/= :: BlockRef -> BlockRef -> Bool
Prelude.Eq, Eq BlockRef
Eq BlockRef =>
(BlockRef -> BlockRef -> Ordering)
-> (BlockRef -> BlockRef -> Bool)
-> (BlockRef -> BlockRef -> Bool)
-> (BlockRef -> BlockRef -> Bool)
-> (BlockRef -> BlockRef -> Bool)
-> (BlockRef -> BlockRef -> BlockRef)
-> (BlockRef -> BlockRef -> BlockRef)
-> Ord BlockRef
BlockRef -> BlockRef -> Bool
BlockRef -> BlockRef -> Ordering
BlockRef -> BlockRef -> BlockRef
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 :: BlockRef -> BlockRef -> Ordering
compare :: BlockRef -> BlockRef -> Ordering
$c< :: BlockRef -> BlockRef -> Bool
< :: BlockRef -> BlockRef -> Bool
$c<= :: BlockRef -> BlockRef -> Bool
<= :: BlockRef -> BlockRef -> Bool
$c> :: BlockRef -> BlockRef -> Bool
> :: BlockRef -> BlockRef -> Bool
$c>= :: BlockRef -> BlockRef -> Bool
>= :: BlockRef -> BlockRef -> Bool
$cmax :: BlockRef -> BlockRef -> BlockRef
max :: BlockRef -> BlockRef -> BlockRef
$cmin :: BlockRef -> BlockRef -> BlockRef
min :: BlockRef -> BlockRef -> BlockRef
Prelude.Ord)
instance Prelude.Show BlockRef where
  showsPrec :: Int -> BlockRef -> ShowS
showsPrec Int
_ BlockRef
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (BlockRef -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort BlockRef
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField BlockRef "index" Data.Word.Word64 where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "index" -> (Word64 -> f Word64) -> BlockRef -> f BlockRef
fieldOf Proxy# "index"
_
    = ((Word64 -> f Word64) -> BlockRef -> f BlockRef)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> BlockRef
-> f BlockRef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((BlockRef -> Word64)
-> (BlockRef -> Word64 -> BlockRef)
-> Lens BlockRef BlockRef Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           BlockRef -> Word64
_BlockRef'index (\ BlockRef
x__ Word64
y__ -> BlockRef
x__ {_BlockRef'index = y__}))
        (Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField BlockRef "hash" Data.ByteString.ByteString where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "hash"
-> (ByteString -> f ByteString) -> BlockRef -> f BlockRef
fieldOf Proxy# "hash"
_
    = ((ByteString -> f ByteString) -> BlockRef -> f BlockRef)
-> ((ByteString -> f ByteString) -> ByteString -> f ByteString)
-> (ByteString -> f ByteString)
-> BlockRef
-> f BlockRef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((BlockRef -> ByteString)
-> (BlockRef -> ByteString -> BlockRef)
-> Lens BlockRef BlockRef ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           BlockRef -> ByteString
_BlockRef'hash (\ BlockRef
x__ ByteString
y__ -> BlockRef
x__ {_BlockRef'hash = y__}))
        (ByteString -> f ByteString) -> ByteString -> f ByteString
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message BlockRef where
  messageName :: Proxy BlockRef -> Text
messageName Proxy BlockRef
_ = String -> Text
Data.Text.pack String
"utxorpc.v1alpha.watch.BlockRef"
  packedMessageDescriptor :: Proxy BlockRef -> ByteString
packedMessageDescriptor Proxy BlockRef
_
    = ByteString
"\n\
      \\bBlockRef\DC2\DC4\n\
      \\ENQindex\CAN\SOH \SOH(\EOTR\ENQindex\DC2\DC2\n\
      \\EOThash\CAN\STX \SOH(\fR\EOThash"
  packedFileDescriptor :: Proxy BlockRef -> ByteString
packedFileDescriptor Proxy BlockRef
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor BlockRef)
fieldsByTag
    = let
        index__field_descriptor :: FieldDescriptor BlockRef
index__field_descriptor
          = String
-> FieldTypeDescriptor Word64
-> FieldAccessor BlockRef Word64
-> FieldDescriptor BlockRef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"index"
              (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 BlockRef BlockRef Word64 Word64
-> FieldAccessor BlockRef 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 @"index")) ::
              Data.ProtoLens.FieldDescriptor BlockRef
        hash__field_descriptor :: FieldDescriptor BlockRef
hash__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor BlockRef ByteString
-> FieldDescriptor BlockRef
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 BlockRef BlockRef ByteString ByteString
-> FieldAccessor BlockRef 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 BlockRef
      in
        [(Tag, FieldDescriptor BlockRef)]
-> Map Tag (FieldDescriptor BlockRef)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor BlockRef
index__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor BlockRef
hash__field_descriptor)]
  unknownFields :: Lens' BlockRef FieldSet
unknownFields
    = (BlockRef -> FieldSet)
-> (BlockRef -> FieldSet -> BlockRef) -> Lens' BlockRef FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        BlockRef -> FieldSet
_BlockRef'_unknownFields
        (\ BlockRef
x__ FieldSet
y__ -> BlockRef
x__ {_BlockRef'_unknownFields = y__})
  defMessage :: BlockRef
defMessage
    = BlockRef'_constructor
        {_BlockRef'index :: Word64
_BlockRef'index = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _BlockRef'hash :: ByteString
_BlockRef'hash = ByteString
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _BlockRef'_unknownFields :: FieldSet
_BlockRef'_unknownFields = []}
  parseMessage :: Parser BlockRef
parseMessage
    = let
        loop :: BlockRef -> Data.ProtoLens.Encoding.Bytes.Parser BlockRef
        loop :: BlockRef -> Parser BlockRef
loop BlockRef
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      BlockRef -> Parser BlockRef
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter BlockRef BlockRef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> BlockRef -> BlockRef
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           LensLike' f BlockRef FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' BlockRef FieldSet
Setter BlockRef BlockRef FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) BlockRef
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
8 -> do Word64
y <- Parser Word64 -> String -> Parser Word64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt String
"index"
                                BlockRef -> Parser BlockRef
loop (Setter BlockRef BlockRef Word64 Word64
-> Word64 -> BlockRef -> BlockRef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"index") Word64
y BlockRef
x)
                        Word64
18
                          -> do ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len))
                                       String
"hash"
                                BlockRef -> Parser BlockRef
loop (Setter BlockRef BlockRef ByteString ByteString
-> ByteString -> BlockRef -> BlockRef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"hash") ByteString
y BlockRef
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                BlockRef -> Parser BlockRef
loop
                                  (Setter BlockRef BlockRef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> BlockRef -> BlockRef
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     LensLike' f BlockRef FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' BlockRef FieldSet
Setter BlockRef BlockRef FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) BlockRef
x)
      in
        Parser BlockRef -> String -> Parser BlockRef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do BlockRef -> Parser BlockRef
loop BlockRef
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"BlockRef"
  buildMessage :: BlockRef -> Builder
buildMessage
    = \ BlockRef
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Word64
_v = FoldLike Word64 BlockRef BlockRef Word64 Word64
-> BlockRef -> 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 @"index") BlockRef
_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 BlockRef BlockRef ByteString ByteString
-> BlockRef -> 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") BlockRef
_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))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet BlockRef BlockRef FieldSet FieldSet
-> BlockRef -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet BlockRef BlockRef FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' BlockRef FieldSet
Data.ProtoLens.unknownFields BlockRef
_x)))
instance Control.DeepSeq.NFData BlockRef where
  rnf :: BlockRef -> ()
rnf
    = \ BlockRef
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (BlockRef -> FieldSet
_BlockRef'_unknownFields BlockRef
x__)
             (Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (BlockRef -> Word64
_BlockRef'index BlockRef
x__)
                (ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (BlockRef -> ByteString
_BlockRef'hash BlockRef
x__) ()))
{- | Fields :
     
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.match' @:: Lens' TxPredicate AnyChainTxPattern@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.maybe'match' @:: Lens' TxPredicate (Prelude.Maybe AnyChainTxPattern)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.not' @:: Lens' TxPredicate [TxPredicate]@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.vec'not' @:: Lens' TxPredicate (Data.Vector.Vector TxPredicate)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.allOf' @:: Lens' TxPredicate [TxPredicate]@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.vec'allOf' @:: Lens' TxPredicate (Data.Vector.Vector TxPredicate)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.anyOf' @:: Lens' TxPredicate [TxPredicate]@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.vec'anyOf' @:: Lens' TxPredicate (Data.Vector.Vector TxPredicate)@ -}
data TxPredicate
  = TxPredicate'_constructor {TxPredicate -> Maybe AnyChainTxPattern
_TxPredicate'match :: !(Prelude.Maybe AnyChainTxPattern),
                              TxPredicate -> Vector TxPredicate
_TxPredicate'not :: !(Data.Vector.Vector TxPredicate),
                              TxPredicate -> Vector TxPredicate
_TxPredicate'allOf :: !(Data.Vector.Vector TxPredicate),
                              TxPredicate -> Vector TxPredicate
_TxPredicate'anyOf :: !(Data.Vector.Vector TxPredicate),
                              TxPredicate -> FieldSet
_TxPredicate'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (TxPredicate -> TxPredicate -> Bool
(TxPredicate -> TxPredicate -> Bool)
-> (TxPredicate -> TxPredicate -> Bool) -> Eq TxPredicate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TxPredicate -> TxPredicate -> Bool
== :: TxPredicate -> TxPredicate -> Bool
$c/= :: TxPredicate -> TxPredicate -> Bool
/= :: TxPredicate -> TxPredicate -> Bool
Prelude.Eq, Eq TxPredicate
Eq TxPredicate =>
(TxPredicate -> TxPredicate -> Ordering)
-> (TxPredicate -> TxPredicate -> Bool)
-> (TxPredicate -> TxPredicate -> Bool)
-> (TxPredicate -> TxPredicate -> Bool)
-> (TxPredicate -> TxPredicate -> Bool)
-> (TxPredicate -> TxPredicate -> TxPredicate)
-> (TxPredicate -> TxPredicate -> TxPredicate)
-> Ord TxPredicate
TxPredicate -> TxPredicate -> Bool
TxPredicate -> TxPredicate -> Ordering
TxPredicate -> TxPredicate -> TxPredicate
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 :: TxPredicate -> TxPredicate -> Ordering
compare :: TxPredicate -> TxPredicate -> Ordering
$c< :: TxPredicate -> TxPredicate -> Bool
< :: TxPredicate -> TxPredicate -> Bool
$c<= :: TxPredicate -> TxPredicate -> Bool
<= :: TxPredicate -> TxPredicate -> Bool
$c> :: TxPredicate -> TxPredicate -> Bool
> :: TxPredicate -> TxPredicate -> Bool
$c>= :: TxPredicate -> TxPredicate -> Bool
>= :: TxPredicate -> TxPredicate -> Bool
$cmax :: TxPredicate -> TxPredicate -> TxPredicate
max :: TxPredicate -> TxPredicate -> TxPredicate
$cmin :: TxPredicate -> TxPredicate -> TxPredicate
min :: TxPredicate -> TxPredicate -> TxPredicate
Prelude.Ord)
instance Prelude.Show TxPredicate where
  showsPrec :: Int -> TxPredicate -> ShowS
showsPrec Int
_ TxPredicate
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (TxPredicate -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort TxPredicate
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField TxPredicate "match" AnyChainTxPattern where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "match"
-> (AnyChainTxPattern -> f AnyChainTxPattern)
-> TxPredicate
-> f TxPredicate
fieldOf Proxy# "match"
_
    = ((Maybe AnyChainTxPattern -> f (Maybe AnyChainTxPattern))
 -> TxPredicate -> f TxPredicate)
-> ((AnyChainTxPattern -> f AnyChainTxPattern)
    -> Maybe AnyChainTxPattern -> f (Maybe AnyChainTxPattern))
-> (AnyChainTxPattern -> f AnyChainTxPattern)
-> TxPredicate
-> f TxPredicate
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((TxPredicate -> Maybe AnyChainTxPattern)
-> (TxPredicate -> Maybe AnyChainTxPattern -> TxPredicate)
-> Lens
     TxPredicate
     TxPredicate
     (Maybe AnyChainTxPattern)
     (Maybe AnyChainTxPattern)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           TxPredicate -> Maybe AnyChainTxPattern
_TxPredicate'match (\ TxPredicate
x__ Maybe AnyChainTxPattern
y__ -> TxPredicate
x__ {_TxPredicate'match = y__}))
        (AnyChainTxPattern
-> Lens' (Maybe AnyChainTxPattern) AnyChainTxPattern
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens AnyChainTxPattern
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField TxPredicate "maybe'match" (Prelude.Maybe AnyChainTxPattern) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'match"
-> (Maybe AnyChainTxPattern -> f (Maybe AnyChainTxPattern))
-> TxPredicate
-> f TxPredicate
fieldOf Proxy# "maybe'match"
_
    = ((Maybe AnyChainTxPattern -> f (Maybe AnyChainTxPattern))
 -> TxPredicate -> f TxPredicate)
-> ((Maybe AnyChainTxPattern -> f (Maybe AnyChainTxPattern))
    -> Maybe AnyChainTxPattern -> f (Maybe AnyChainTxPattern))
-> (Maybe AnyChainTxPattern -> f (Maybe AnyChainTxPattern))
-> TxPredicate
-> f TxPredicate
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((TxPredicate -> Maybe AnyChainTxPattern)
-> (TxPredicate -> Maybe AnyChainTxPattern -> TxPredicate)
-> Lens
     TxPredicate
     TxPredicate
     (Maybe AnyChainTxPattern)
     (Maybe AnyChainTxPattern)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           TxPredicate -> Maybe AnyChainTxPattern
_TxPredicate'match (\ TxPredicate
x__ Maybe AnyChainTxPattern
y__ -> TxPredicate
x__ {_TxPredicate'match = y__}))
        (Maybe AnyChainTxPattern -> f (Maybe AnyChainTxPattern))
-> Maybe AnyChainTxPattern -> f (Maybe AnyChainTxPattern)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField TxPredicate "not" [TxPredicate] where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "not"
-> ([TxPredicate] -> f [TxPredicate])
-> TxPredicate
-> f TxPredicate
fieldOf Proxy# "not"
_
    = ((Vector TxPredicate -> f (Vector TxPredicate))
 -> TxPredicate -> f TxPredicate)
-> (([TxPredicate] -> f [TxPredicate])
    -> Vector TxPredicate -> f (Vector TxPredicate))
-> ([TxPredicate] -> f [TxPredicate])
-> TxPredicate
-> f TxPredicate
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((TxPredicate -> Vector TxPredicate)
-> (TxPredicate -> Vector TxPredicate -> TxPredicate)
-> Lens
     TxPredicate TxPredicate (Vector TxPredicate) (Vector TxPredicate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           TxPredicate -> Vector TxPredicate
_TxPredicate'not (\ TxPredicate
x__ Vector TxPredicate
y__ -> TxPredicate
x__ {_TxPredicate'not = y__}))
        ((Vector TxPredicate -> [TxPredicate])
-> (Vector TxPredicate -> [TxPredicate] -> Vector TxPredicate)
-> Lens
     (Vector TxPredicate)
     (Vector TxPredicate)
     [TxPredicate]
     [TxPredicate]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector TxPredicate -> [TxPredicate]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ Vector TxPredicate
_ [TxPredicate]
y__ -> [TxPredicate] -> Vector TxPredicate
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [TxPredicate]
y__))
instance Data.ProtoLens.Field.HasField TxPredicate "vec'not" (Data.Vector.Vector TxPredicate) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "vec'not"
-> (Vector TxPredicate -> f (Vector TxPredicate))
-> TxPredicate
-> f TxPredicate
fieldOf Proxy# "vec'not"
_
    = ((Vector TxPredicate -> f (Vector TxPredicate))
 -> TxPredicate -> f TxPredicate)
-> ((Vector TxPredicate -> f (Vector TxPredicate))
    -> Vector TxPredicate -> f (Vector TxPredicate))
-> (Vector TxPredicate -> f (Vector TxPredicate))
-> TxPredicate
-> f TxPredicate
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((TxPredicate -> Vector TxPredicate)
-> (TxPredicate -> Vector TxPredicate -> TxPredicate)
-> Lens
     TxPredicate TxPredicate (Vector TxPredicate) (Vector TxPredicate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           TxPredicate -> Vector TxPredicate
_TxPredicate'not (\ TxPredicate
x__ Vector TxPredicate
y__ -> TxPredicate
x__ {_TxPredicate'not = y__}))
        (Vector TxPredicate -> f (Vector TxPredicate))
-> Vector TxPredicate -> f (Vector TxPredicate)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField TxPredicate "allOf" [TxPredicate] where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "allOf"
-> ([TxPredicate] -> f [TxPredicate])
-> TxPredicate
-> f TxPredicate
fieldOf Proxy# "allOf"
_
    = ((Vector TxPredicate -> f (Vector TxPredicate))
 -> TxPredicate -> f TxPredicate)
-> (([TxPredicate] -> f [TxPredicate])
    -> Vector TxPredicate -> f (Vector TxPredicate))
-> ([TxPredicate] -> f [TxPredicate])
-> TxPredicate
-> f TxPredicate
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((TxPredicate -> Vector TxPredicate)
-> (TxPredicate -> Vector TxPredicate -> TxPredicate)
-> Lens
     TxPredicate TxPredicate (Vector TxPredicate) (Vector TxPredicate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           TxPredicate -> Vector TxPredicate
_TxPredicate'allOf (\ TxPredicate
x__ Vector TxPredicate
y__ -> TxPredicate
x__ {_TxPredicate'allOf = y__}))
        ((Vector TxPredicate -> [TxPredicate])
-> (Vector TxPredicate -> [TxPredicate] -> Vector TxPredicate)
-> Lens
     (Vector TxPredicate)
     (Vector TxPredicate)
     [TxPredicate]
     [TxPredicate]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector TxPredicate -> [TxPredicate]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ Vector TxPredicate
_ [TxPredicate]
y__ -> [TxPredicate] -> Vector TxPredicate
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [TxPredicate]
y__))
instance Data.ProtoLens.Field.HasField TxPredicate "vec'allOf" (Data.Vector.Vector TxPredicate) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "vec'allOf"
-> (Vector TxPredicate -> f (Vector TxPredicate))
-> TxPredicate
-> f TxPredicate
fieldOf Proxy# "vec'allOf"
_
    = ((Vector TxPredicate -> f (Vector TxPredicate))
 -> TxPredicate -> f TxPredicate)
-> ((Vector TxPredicate -> f (Vector TxPredicate))
    -> Vector TxPredicate -> f (Vector TxPredicate))
-> (Vector TxPredicate -> f (Vector TxPredicate))
-> TxPredicate
-> f TxPredicate
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((TxPredicate -> Vector TxPredicate)
-> (TxPredicate -> Vector TxPredicate -> TxPredicate)
-> Lens
     TxPredicate TxPredicate (Vector TxPredicate) (Vector TxPredicate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           TxPredicate -> Vector TxPredicate
_TxPredicate'allOf (\ TxPredicate
x__ Vector TxPredicate
y__ -> TxPredicate
x__ {_TxPredicate'allOf = y__}))
        (Vector TxPredicate -> f (Vector TxPredicate))
-> Vector TxPredicate -> f (Vector TxPredicate)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField TxPredicate "anyOf" [TxPredicate] where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "anyOf"
-> ([TxPredicate] -> f [TxPredicate])
-> TxPredicate
-> f TxPredicate
fieldOf Proxy# "anyOf"
_
    = ((Vector TxPredicate -> f (Vector TxPredicate))
 -> TxPredicate -> f TxPredicate)
-> (([TxPredicate] -> f [TxPredicate])
    -> Vector TxPredicate -> f (Vector TxPredicate))
-> ([TxPredicate] -> f [TxPredicate])
-> TxPredicate
-> f TxPredicate
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((TxPredicate -> Vector TxPredicate)
-> (TxPredicate -> Vector TxPredicate -> TxPredicate)
-> Lens
     TxPredicate TxPredicate (Vector TxPredicate) (Vector TxPredicate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           TxPredicate -> Vector TxPredicate
_TxPredicate'anyOf (\ TxPredicate
x__ Vector TxPredicate
y__ -> TxPredicate
x__ {_TxPredicate'anyOf = y__}))
        ((Vector TxPredicate -> [TxPredicate])
-> (Vector TxPredicate -> [TxPredicate] -> Vector TxPredicate)
-> Lens
     (Vector TxPredicate)
     (Vector TxPredicate)
     [TxPredicate]
     [TxPredicate]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector TxPredicate -> [TxPredicate]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ Vector TxPredicate
_ [TxPredicate]
y__ -> [TxPredicate] -> Vector TxPredicate
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [TxPredicate]
y__))
instance Data.ProtoLens.Field.HasField TxPredicate "vec'anyOf" (Data.Vector.Vector TxPredicate) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "vec'anyOf"
-> (Vector TxPredicate -> f (Vector TxPredicate))
-> TxPredicate
-> f TxPredicate
fieldOf Proxy# "vec'anyOf"
_
    = ((Vector TxPredicate -> f (Vector TxPredicate))
 -> TxPredicate -> f TxPredicate)
-> ((Vector TxPredicate -> f (Vector TxPredicate))
    -> Vector TxPredicate -> f (Vector TxPredicate))
-> (Vector TxPredicate -> f (Vector TxPredicate))
-> TxPredicate
-> f TxPredicate
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((TxPredicate -> Vector TxPredicate)
-> (TxPredicate -> Vector TxPredicate -> TxPredicate)
-> Lens
     TxPredicate TxPredicate (Vector TxPredicate) (Vector TxPredicate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           TxPredicate -> Vector TxPredicate
_TxPredicate'anyOf (\ TxPredicate
x__ Vector TxPredicate
y__ -> TxPredicate
x__ {_TxPredicate'anyOf = y__}))
        (Vector TxPredicate -> f (Vector TxPredicate))
-> Vector TxPredicate -> f (Vector TxPredicate)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message TxPredicate where
  messageName :: Proxy TxPredicate -> Text
messageName Proxy TxPredicate
_ = String -> Text
Data.Text.pack String
"utxorpc.v1alpha.watch.TxPredicate"
  packedMessageDescriptor :: Proxy TxPredicate -> ByteString
packedMessageDescriptor Proxy TxPredicate
_
    = ByteString
"\n\
      \\vTxPredicate\DC2>\n\
      \\ENQmatch\CAN\SOH \SOH(\v2(.utxorpc.v1alpha.watch.AnyChainTxPatternR\ENQmatch\DC24\n\
      \\ETXnot\CAN\STX \ETX(\v2\".utxorpc.v1alpha.watch.TxPredicateR\ETXnot\DC29\n\
      \\ACKall_of\CAN\ETX \ETX(\v2\".utxorpc.v1alpha.watch.TxPredicateR\ENQallOf\DC29\n\
      \\ACKany_of\CAN\EOT \ETX(\v2\".utxorpc.v1alpha.watch.TxPredicateR\ENQanyOf"
  packedFileDescriptor :: Proxy TxPredicate -> ByteString
packedFileDescriptor Proxy TxPredicate
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor TxPredicate)
fieldsByTag
    = let
        match__field_descriptor :: FieldDescriptor TxPredicate
match__field_descriptor
          = String
-> FieldTypeDescriptor AnyChainTxPattern
-> FieldAccessor TxPredicate AnyChainTxPattern
-> FieldDescriptor TxPredicate
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"match"
              (MessageOrGroup -> FieldTypeDescriptor AnyChainTxPattern
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor AnyChainTxPattern)
              (Lens
  TxPredicate
  TxPredicate
  (Maybe AnyChainTxPattern)
  (Maybe AnyChainTxPattern)
-> FieldAccessor TxPredicate AnyChainTxPattern
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'match")) ::
              Data.ProtoLens.FieldDescriptor TxPredicate
        not__field_descriptor :: FieldDescriptor TxPredicate
not__field_descriptor
          = String
-> FieldTypeDescriptor TxPredicate
-> FieldAccessor TxPredicate TxPredicate
-> FieldDescriptor TxPredicate
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"not"
              (MessageOrGroup -> FieldTypeDescriptor TxPredicate
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor TxPredicate)
              (Packing
-> Lens' TxPredicate [TxPredicate]
-> FieldAccessor TxPredicate TxPredicate
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 @"not")) ::
              Data.ProtoLens.FieldDescriptor TxPredicate
        allOf__field_descriptor :: FieldDescriptor TxPredicate
allOf__field_descriptor
          = String
-> FieldTypeDescriptor TxPredicate
-> FieldAccessor TxPredicate TxPredicate
-> FieldDescriptor TxPredicate
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"all_of"
              (MessageOrGroup -> FieldTypeDescriptor TxPredicate
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor TxPredicate)
              (Packing
-> Lens' TxPredicate [TxPredicate]
-> FieldAccessor TxPredicate TxPredicate
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 @"allOf")) ::
              Data.ProtoLens.FieldDescriptor TxPredicate
        anyOf__field_descriptor :: FieldDescriptor TxPredicate
anyOf__field_descriptor
          = String
-> FieldTypeDescriptor TxPredicate
-> FieldAccessor TxPredicate TxPredicate
-> FieldDescriptor TxPredicate
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"any_of"
              (MessageOrGroup -> FieldTypeDescriptor TxPredicate
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor TxPredicate)
              (Packing
-> Lens' TxPredicate [TxPredicate]
-> FieldAccessor TxPredicate TxPredicate
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 @"anyOf")) ::
              Data.ProtoLens.FieldDescriptor TxPredicate
      in
        [(Tag, FieldDescriptor TxPredicate)]
-> Map Tag (FieldDescriptor TxPredicate)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor TxPredicate
match__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor TxPredicate
not__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
3, FieldDescriptor TxPredicate
allOf__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
4, FieldDescriptor TxPredicate
anyOf__field_descriptor)]
  unknownFields :: Lens' TxPredicate FieldSet
unknownFields
    = (TxPredicate -> FieldSet)
-> (TxPredicate -> FieldSet -> TxPredicate)
-> Lens' TxPredicate FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        TxPredicate -> FieldSet
_TxPredicate'_unknownFields
        (\ TxPredicate
x__ FieldSet
y__ -> TxPredicate
x__ {_TxPredicate'_unknownFields = y__})
  defMessage :: TxPredicate
defMessage
    = TxPredicate'_constructor
        {_TxPredicate'match :: Maybe AnyChainTxPattern
_TxPredicate'match = Maybe AnyChainTxPattern
forall a. Maybe a
Prelude.Nothing,
         _TxPredicate'not :: Vector TxPredicate
_TxPredicate'not = Vector TxPredicate
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _TxPredicate'allOf :: Vector TxPredicate
_TxPredicate'allOf = Vector TxPredicate
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _TxPredicate'anyOf :: Vector TxPredicate
_TxPredicate'anyOf = Vector TxPredicate
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _TxPredicate'_unknownFields :: FieldSet
_TxPredicate'_unknownFields = []}
  parseMessage :: Parser TxPredicate
parseMessage
    = let
        loop ::
          TxPredicate
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld TxPredicate
             -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld TxPredicate
                -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld TxPredicate
                   -> Data.ProtoLens.Encoding.Bytes.Parser TxPredicate
        loop :: TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Parser TxPredicate
loop TxPredicate
x Growing Vector RealWorld TxPredicate
mutable'allOf Growing Vector RealWorld TxPredicate
mutable'anyOf Growing Vector RealWorld TxPredicate
mutable'not
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector TxPredicate
frozen'allOf <- IO (Vector TxPredicate) -> Parser (Vector TxPredicate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                        (Growing Vector (PrimState IO) TxPredicate
-> IO (Vector TxPredicate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze Growing Vector RealWorld TxPredicate
Growing Vector (PrimState IO) TxPredicate
mutable'allOf)
                      Vector TxPredicate
frozen'anyOf <- IO (Vector TxPredicate) -> Parser (Vector TxPredicate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                        (Growing Vector (PrimState IO) TxPredicate
-> IO (Vector TxPredicate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze Growing Vector RealWorld TxPredicate
Growing Vector (PrimState IO) TxPredicate
mutable'anyOf)
                      Vector TxPredicate
frozen'not <- IO (Vector TxPredicate) -> Parser (Vector TxPredicate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                      (Growing Vector (PrimState IO) TxPredicate
-> IO (Vector TxPredicate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze Growing Vector RealWorld TxPredicate
Growing Vector (PrimState IO) TxPredicate
mutable'not)
                      (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      TxPredicate -> Parser TxPredicate
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter TxPredicate TxPredicate FieldSet FieldSet
-> (FieldSet -> FieldSet) -> TxPredicate -> TxPredicate
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           LensLike' f TxPredicate FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' TxPredicate FieldSet
Setter TxPredicate TxPredicate FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter
  TxPredicate TxPredicate (Vector TxPredicate) (Vector TxPredicate)
-> Vector TxPredicate -> TxPredicate -> TxPredicate
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'allOf") Vector TxPredicate
frozen'allOf
                              (Setter
  TxPredicate TxPredicate (Vector TxPredicate) (Vector TxPredicate)
-> Vector TxPredicate -> TxPredicate -> TxPredicate
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                 (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'anyOf") Vector TxPredicate
frozen'anyOf
                                 (Setter
  TxPredicate TxPredicate (Vector TxPredicate) (Vector TxPredicate)
-> Vector TxPredicate -> TxPredicate -> TxPredicate
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                    (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'not") Vector TxPredicate
frozen'not TxPredicate
x))))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do AnyChainTxPattern
y <- Parser AnyChainTxPattern -> String -> Parser AnyChainTxPattern
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser AnyChainTxPattern -> Parser AnyChainTxPattern
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser AnyChainTxPattern
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"match"
                                TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Parser TxPredicate
loop
                                  (Setter TxPredicate TxPredicate AnyChainTxPattern AnyChainTxPattern
-> AnyChainTxPattern -> TxPredicate -> TxPredicate
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"match") AnyChainTxPattern
y TxPredicate
x)
                                  Growing Vector RealWorld TxPredicate
mutable'allOf Growing Vector RealWorld TxPredicate
mutable'anyOf Growing Vector RealWorld TxPredicate
mutable'not
                        Word64
18
                          -> do !TxPredicate
y <- Parser TxPredicate -> String -> Parser TxPredicate
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser TxPredicate -> Parser TxPredicate
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                              (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                              Parser TxPredicate
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        String
"not"
                                Growing Vector RealWorld TxPredicate
v <- IO (Growing Vector RealWorld TxPredicate)
-> Parser (Growing Vector RealWorld TxPredicate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) TxPredicate
-> TxPredicate -> IO (Growing Vector (PrimState IO) TxPredicate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append Growing Vector RealWorld TxPredicate
Growing Vector (PrimState IO) TxPredicate
mutable'not TxPredicate
y)
                                TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Parser TxPredicate
loop TxPredicate
x Growing Vector RealWorld TxPredicate
mutable'allOf Growing Vector RealWorld TxPredicate
mutable'anyOf Growing Vector RealWorld TxPredicate
v
                        Word64
26
                          -> do !TxPredicate
y <- Parser TxPredicate -> String -> Parser TxPredicate
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser TxPredicate -> Parser TxPredicate
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                              (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                              Parser TxPredicate
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        String
"all_of"
                                Growing Vector RealWorld TxPredicate
v <- IO (Growing Vector RealWorld TxPredicate)
-> Parser (Growing Vector RealWorld TxPredicate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) TxPredicate
-> TxPredicate -> IO (Growing Vector (PrimState IO) TxPredicate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append Growing Vector RealWorld TxPredicate
Growing Vector (PrimState IO) TxPredicate
mutable'allOf TxPredicate
y)
                                TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Parser TxPredicate
loop TxPredicate
x Growing Vector RealWorld TxPredicate
v Growing Vector RealWorld TxPredicate
mutable'anyOf Growing Vector RealWorld TxPredicate
mutable'not
                        Word64
34
                          -> do !TxPredicate
y <- Parser TxPredicate -> String -> Parser TxPredicate
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser TxPredicate -> Parser TxPredicate
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                              (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                              Parser TxPredicate
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        String
"any_of"
                                Growing Vector RealWorld TxPredicate
v <- IO (Growing Vector RealWorld TxPredicate)
-> Parser (Growing Vector RealWorld TxPredicate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) TxPredicate
-> TxPredicate -> IO (Growing Vector (PrimState IO) TxPredicate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append Growing Vector RealWorld TxPredicate
Growing Vector (PrimState IO) TxPredicate
mutable'anyOf TxPredicate
y)
                                TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Parser TxPredicate
loop TxPredicate
x Growing Vector RealWorld TxPredicate
mutable'allOf Growing Vector RealWorld TxPredicate
v Growing Vector RealWorld TxPredicate
mutable'not
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Parser TxPredicate
loop
                                  (Setter TxPredicate TxPredicate FieldSet FieldSet
-> (FieldSet -> FieldSet) -> TxPredicate -> TxPredicate
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     LensLike' f TxPredicate FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' TxPredicate FieldSet
Setter TxPredicate TxPredicate FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) TxPredicate
x)
                                  Growing Vector RealWorld TxPredicate
mutable'allOf Growing Vector RealWorld TxPredicate
mutable'anyOf Growing Vector RealWorld TxPredicate
mutable'not
      in
        Parser TxPredicate -> String -> Parser TxPredicate
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld TxPredicate
mutable'allOf <- IO (Growing Vector RealWorld TxPredicate)
-> Parser (Growing Vector RealWorld TxPredicate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                 IO (Growing Vector RealWorld TxPredicate)
IO (Growing Vector (PrimState IO) TxPredicate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              Growing Vector RealWorld TxPredicate
mutable'anyOf <- IO (Growing Vector RealWorld TxPredicate)
-> Parser (Growing Vector RealWorld TxPredicate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                 IO (Growing Vector RealWorld TxPredicate)
IO (Growing Vector (PrimState IO) TxPredicate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              Growing Vector RealWorld TxPredicate
mutable'not <- IO (Growing Vector RealWorld TxPredicate)
-> Parser (Growing Vector RealWorld TxPredicate)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                               IO (Growing Vector RealWorld TxPredicate)
IO (Growing Vector (PrimState IO) TxPredicate)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Growing Vector RealWorld TxPredicate
-> Parser TxPredicate
loop
                TxPredicate
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld TxPredicate
mutable'allOf Growing Vector RealWorld TxPredicate
mutable'anyOf Growing Vector RealWorld TxPredicate
mutable'not)
          String
"TxPredicate"
  buildMessage :: TxPredicate -> Builder
buildMessage
    = \ TxPredicate
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (case
                  FoldLike
  (Maybe AnyChainTxPattern)
  TxPredicate
  TxPredicate
  (Maybe AnyChainTxPattern)
  (Maybe AnyChainTxPattern)
-> TxPredicate -> Maybe AnyChainTxPattern
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'match") TxPredicate
_x
              of
                Maybe AnyChainTxPattern
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                (Prelude.Just AnyChainTxPattern
_v)
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                       ((ByteString -> Builder)
-> (AnyChainTxPattern -> ByteString)
-> AnyChainTxPattern
-> 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))
                          AnyChainTxPattern -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage AnyChainTxPattern
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                ((TxPredicate -> Builder) -> Vector TxPredicate -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                   (\ TxPredicate
_v
                      -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                           (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
18)
                           ((ByteString -> Builder)
-> (TxPredicate -> ByteString) -> TxPredicate -> 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))
                              TxPredicate -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage TxPredicate
_v))
                   (FoldLike
  (Vector TxPredicate)
  TxPredicate
  TxPredicate
  (Vector TxPredicate)
  (Vector TxPredicate)
-> TxPredicate -> Vector TxPredicate
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'not") TxPredicate
_x))
                (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                   ((TxPredicate -> Builder) -> Vector TxPredicate -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                      (\ TxPredicate
_v
                         -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                              (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
26)
                              ((ByteString -> Builder)
-> (TxPredicate -> ByteString) -> TxPredicate -> 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))
                                 TxPredicate -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage TxPredicate
_v))
                      (FoldLike
  (Vector TxPredicate)
  TxPredicate
  TxPredicate
  (Vector TxPredicate)
  (Vector TxPredicate)
-> TxPredicate -> Vector TxPredicate
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'allOf") TxPredicate
_x))
                   (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      ((TxPredicate -> Builder) -> Vector TxPredicate -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                         (\ TxPredicate
_v
                            -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                 (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
34)
                                 ((ByteString -> Builder)
-> (TxPredicate -> ByteString) -> TxPredicate -> 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))
                                    TxPredicate -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage TxPredicate
_v))
                         (FoldLike
  (Vector TxPredicate)
  TxPredicate
  TxPredicate
  (Vector TxPredicate)
  (Vector TxPredicate)
-> TxPredicate -> Vector TxPredicate
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'anyOf") TxPredicate
_x))
                      (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                         (FoldLike FieldSet TxPredicate TxPredicate FieldSet FieldSet
-> TxPredicate -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet TxPredicate TxPredicate FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' TxPredicate FieldSet
Data.ProtoLens.unknownFields TxPredicate
_x)))))
instance Control.DeepSeq.NFData TxPredicate where
  rnf :: TxPredicate -> ()
rnf
    = \ TxPredicate
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (TxPredicate -> FieldSet
_TxPredicate'_unknownFields TxPredicate
x__)
             (Maybe AnyChainTxPattern -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (TxPredicate -> Maybe AnyChainTxPattern
_TxPredicate'match TxPredicate
x__)
                (Vector TxPredicate -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (TxPredicate -> Vector TxPredicate
_TxPredicate'not TxPredicate
x__)
                   (Vector TxPredicate -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                      (TxPredicate -> Vector TxPredicate
_TxPredicate'allOf TxPredicate
x__)
                      (Vector TxPredicate -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (TxPredicate -> Vector TxPredicate
_TxPredicate'anyOf TxPredicate
x__) ()))))
{- | Fields :
     
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.predicate' @:: Lens' WatchTxRequest TxPredicate@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.maybe'predicate' @:: Lens' WatchTxRequest (Prelude.Maybe TxPredicate)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.fieldMask' @:: Lens' WatchTxRequest Proto.Google.Protobuf.FieldMask.FieldMask@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.maybe'fieldMask' @:: Lens' WatchTxRequest (Prelude.Maybe Proto.Google.Protobuf.FieldMask.FieldMask)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.intersect' @:: Lens' WatchTxRequest [BlockRef]@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.vec'intersect' @:: Lens' WatchTxRequest (Data.Vector.Vector BlockRef)@ -}
data WatchTxRequest
  = WatchTxRequest'_constructor {WatchTxRequest -> Maybe TxPredicate
_WatchTxRequest'predicate :: !(Prelude.Maybe TxPredicate),
                                 WatchTxRequest -> Maybe FieldMask
_WatchTxRequest'fieldMask :: !(Prelude.Maybe Proto.Google.Protobuf.FieldMask.FieldMask),
                                 WatchTxRequest -> Vector BlockRef
_WatchTxRequest'intersect :: !(Data.Vector.Vector BlockRef),
                                 WatchTxRequest -> FieldSet
_WatchTxRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (WatchTxRequest -> WatchTxRequest -> Bool
(WatchTxRequest -> WatchTxRequest -> Bool)
-> (WatchTxRequest -> WatchTxRequest -> Bool) -> Eq WatchTxRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WatchTxRequest -> WatchTxRequest -> Bool
== :: WatchTxRequest -> WatchTxRequest -> Bool
$c/= :: WatchTxRequest -> WatchTxRequest -> Bool
/= :: WatchTxRequest -> WatchTxRequest -> Bool
Prelude.Eq, Eq WatchTxRequest
Eq WatchTxRequest =>
(WatchTxRequest -> WatchTxRequest -> Ordering)
-> (WatchTxRequest -> WatchTxRequest -> Bool)
-> (WatchTxRequest -> WatchTxRequest -> Bool)
-> (WatchTxRequest -> WatchTxRequest -> Bool)
-> (WatchTxRequest -> WatchTxRequest -> Bool)
-> (WatchTxRequest -> WatchTxRequest -> WatchTxRequest)
-> (WatchTxRequest -> WatchTxRequest -> WatchTxRequest)
-> Ord WatchTxRequest
WatchTxRequest -> WatchTxRequest -> Bool
WatchTxRequest -> WatchTxRequest -> Ordering
WatchTxRequest -> WatchTxRequest -> WatchTxRequest
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 :: WatchTxRequest -> WatchTxRequest -> Ordering
compare :: WatchTxRequest -> WatchTxRequest -> Ordering
$c< :: WatchTxRequest -> WatchTxRequest -> Bool
< :: WatchTxRequest -> WatchTxRequest -> Bool
$c<= :: WatchTxRequest -> WatchTxRequest -> Bool
<= :: WatchTxRequest -> WatchTxRequest -> Bool
$c> :: WatchTxRequest -> WatchTxRequest -> Bool
> :: WatchTxRequest -> WatchTxRequest -> Bool
$c>= :: WatchTxRequest -> WatchTxRequest -> Bool
>= :: WatchTxRequest -> WatchTxRequest -> Bool
$cmax :: WatchTxRequest -> WatchTxRequest -> WatchTxRequest
max :: WatchTxRequest -> WatchTxRequest -> WatchTxRequest
$cmin :: WatchTxRequest -> WatchTxRequest -> WatchTxRequest
min :: WatchTxRequest -> WatchTxRequest -> WatchTxRequest
Prelude.Ord)
instance Prelude.Show WatchTxRequest where
  showsPrec :: Int -> WatchTxRequest -> ShowS
showsPrec Int
_ WatchTxRequest
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (WatchTxRequest -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort WatchTxRequest
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Data.ProtoLens.Field.HasField WatchTxRequest "predicate" TxPredicate where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "predicate"
-> (TxPredicate -> f TxPredicate)
-> WatchTxRequest
-> f WatchTxRequest
fieldOf Proxy# "predicate"
_
    = ((Maybe TxPredicate -> f (Maybe TxPredicate))
 -> WatchTxRequest -> f WatchTxRequest)
-> ((TxPredicate -> f TxPredicate)
    -> Maybe TxPredicate -> f (Maybe TxPredicate))
-> (TxPredicate -> f TxPredicate)
-> WatchTxRequest
-> f WatchTxRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((WatchTxRequest -> Maybe TxPredicate)
-> (WatchTxRequest -> Maybe TxPredicate -> WatchTxRequest)
-> Lens
     WatchTxRequest
     WatchTxRequest
     (Maybe TxPredicate)
     (Maybe TxPredicate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           WatchTxRequest -> Maybe TxPredicate
_WatchTxRequest'predicate
           (\ WatchTxRequest
x__ Maybe TxPredicate
y__ -> WatchTxRequest
x__ {_WatchTxRequest'predicate = y__}))
        (TxPredicate -> Lens' (Maybe TxPredicate) TxPredicate
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens TxPredicate
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField WatchTxRequest "maybe'predicate" (Prelude.Maybe TxPredicate) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'predicate"
-> (Maybe TxPredicate -> f (Maybe TxPredicate))
-> WatchTxRequest
-> f WatchTxRequest
fieldOf Proxy# "maybe'predicate"
_
    = ((Maybe TxPredicate -> f (Maybe TxPredicate))
 -> WatchTxRequest -> f WatchTxRequest)
-> ((Maybe TxPredicate -> f (Maybe TxPredicate))
    -> Maybe TxPredicate -> f (Maybe TxPredicate))
-> (Maybe TxPredicate -> f (Maybe TxPredicate))
-> WatchTxRequest
-> f WatchTxRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((WatchTxRequest -> Maybe TxPredicate)
-> (WatchTxRequest -> Maybe TxPredicate -> WatchTxRequest)
-> Lens
     WatchTxRequest
     WatchTxRequest
     (Maybe TxPredicate)
     (Maybe TxPredicate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           WatchTxRequest -> Maybe TxPredicate
_WatchTxRequest'predicate
           (\ WatchTxRequest
x__ Maybe TxPredicate
y__ -> WatchTxRequest
x__ {_WatchTxRequest'predicate = y__}))
        (Maybe TxPredicate -> f (Maybe TxPredicate))
-> Maybe TxPredicate -> f (Maybe TxPredicate)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField WatchTxRequest "fieldMask" Proto.Google.Protobuf.FieldMask.FieldMask where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "fieldMask"
-> (FieldMask -> f FieldMask) -> WatchTxRequest -> f WatchTxRequest
fieldOf Proxy# "fieldMask"
_
    = ((Maybe FieldMask -> f (Maybe FieldMask))
 -> WatchTxRequest -> f WatchTxRequest)
-> ((FieldMask -> f FieldMask)
    -> Maybe FieldMask -> f (Maybe FieldMask))
-> (FieldMask -> f FieldMask)
-> WatchTxRequest
-> f WatchTxRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((WatchTxRequest -> Maybe FieldMask)
-> (WatchTxRequest -> Maybe FieldMask -> WatchTxRequest)
-> Lens
     WatchTxRequest WatchTxRequest (Maybe FieldMask) (Maybe FieldMask)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           WatchTxRequest -> Maybe FieldMask
_WatchTxRequest'fieldMask
           (\ WatchTxRequest
x__ Maybe FieldMask
y__ -> WatchTxRequest
x__ {_WatchTxRequest'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 WatchTxRequest "maybe'fieldMask" (Prelude.Maybe Proto.Google.Protobuf.FieldMask.FieldMask) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'fieldMask"
-> (Maybe FieldMask -> f (Maybe FieldMask))
-> WatchTxRequest
-> f WatchTxRequest
fieldOf Proxy# "maybe'fieldMask"
_
    = ((Maybe FieldMask -> f (Maybe FieldMask))
 -> WatchTxRequest -> f WatchTxRequest)
-> ((Maybe FieldMask -> f (Maybe FieldMask))
    -> Maybe FieldMask -> f (Maybe FieldMask))
-> (Maybe FieldMask -> f (Maybe FieldMask))
-> WatchTxRequest
-> f WatchTxRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((WatchTxRequest -> Maybe FieldMask)
-> (WatchTxRequest -> Maybe FieldMask -> WatchTxRequest)
-> Lens
     WatchTxRequest WatchTxRequest (Maybe FieldMask) (Maybe FieldMask)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           WatchTxRequest -> Maybe FieldMask
_WatchTxRequest'fieldMask
           (\ WatchTxRequest
x__ Maybe FieldMask
y__ -> WatchTxRequest
x__ {_WatchTxRequest'fieldMask = y__}))
        (Maybe FieldMask -> f (Maybe FieldMask))
-> Maybe FieldMask -> f (Maybe FieldMask)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField WatchTxRequest "intersect" [BlockRef] where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "intersect"
-> ([BlockRef] -> f [BlockRef])
-> WatchTxRequest
-> f WatchTxRequest
fieldOf Proxy# "intersect"
_
    = ((Vector BlockRef -> f (Vector BlockRef))
 -> WatchTxRequest -> f WatchTxRequest)
-> (([BlockRef] -> f [BlockRef])
    -> Vector BlockRef -> f (Vector BlockRef))
-> ([BlockRef] -> f [BlockRef])
-> WatchTxRequest
-> f WatchTxRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((WatchTxRequest -> Vector BlockRef)
-> (WatchTxRequest -> Vector BlockRef -> WatchTxRequest)
-> Lens
     WatchTxRequest WatchTxRequest (Vector BlockRef) (Vector BlockRef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           WatchTxRequest -> Vector BlockRef
_WatchTxRequest'intersect
           (\ WatchTxRequest
x__ Vector BlockRef
y__ -> WatchTxRequest
x__ {_WatchTxRequest'intersect = y__}))
        ((Vector BlockRef -> [BlockRef])
-> (Vector BlockRef -> [BlockRef] -> Vector BlockRef)
-> Lens (Vector BlockRef) (Vector BlockRef) [BlockRef] [BlockRef]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector BlockRef -> [BlockRef]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ Vector BlockRef
_ [BlockRef]
y__ -> [BlockRef] -> Vector BlockRef
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [BlockRef]
y__))
instance Data.ProtoLens.Field.HasField WatchTxRequest "vec'intersect" (Data.Vector.Vector BlockRef) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "vec'intersect"
-> (Vector BlockRef -> f (Vector BlockRef))
-> WatchTxRequest
-> f WatchTxRequest
fieldOf Proxy# "vec'intersect"
_
    = ((Vector BlockRef -> f (Vector BlockRef))
 -> WatchTxRequest -> f WatchTxRequest)
-> ((Vector BlockRef -> f (Vector BlockRef))
    -> Vector BlockRef -> f (Vector BlockRef))
-> (Vector BlockRef -> f (Vector BlockRef))
-> WatchTxRequest
-> f WatchTxRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((WatchTxRequest -> Vector BlockRef)
-> (WatchTxRequest -> Vector BlockRef -> WatchTxRequest)
-> Lens
     WatchTxRequest WatchTxRequest (Vector BlockRef) (Vector BlockRef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           WatchTxRequest -> Vector BlockRef
_WatchTxRequest'intersect
           (\ WatchTxRequest
x__ Vector BlockRef
y__ -> WatchTxRequest
x__ {_WatchTxRequest'intersect = y__}))
        (Vector BlockRef -> f (Vector BlockRef))
-> Vector BlockRef -> f (Vector BlockRef)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message WatchTxRequest where
  messageName :: Proxy WatchTxRequest -> Text
messageName Proxy WatchTxRequest
_
    = String -> Text
Data.Text.pack String
"utxorpc.v1alpha.watch.WatchTxRequest"
  packedMessageDescriptor :: Proxy WatchTxRequest -> ByteString
packedMessageDescriptor Proxy WatchTxRequest
_
    = ByteString
"\n\
      \\SOWatchTxRequest\DC2@\n\
      \\tpredicate\CAN\SOH \SOH(\v2\".utxorpc.v1alpha.watch.TxPredicateR\tpredicate\DC29\n\
      \\n\
      \field_mask\CAN\STX \SOH(\v2\SUB.google.protobuf.FieldMaskR\tfieldMask\DC2=\n\
      \\tintersect\CAN\ETX \ETX(\v2\US.utxorpc.v1alpha.watch.BlockRefR\tintersect"
  packedFileDescriptor :: Proxy WatchTxRequest -> ByteString
packedFileDescriptor Proxy WatchTxRequest
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor WatchTxRequest)
fieldsByTag
    = let
        predicate__field_descriptor :: FieldDescriptor WatchTxRequest
predicate__field_descriptor
          = String
-> FieldTypeDescriptor TxPredicate
-> FieldAccessor WatchTxRequest TxPredicate
-> FieldDescriptor WatchTxRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"predicate"
              (MessageOrGroup -> FieldTypeDescriptor TxPredicate
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor TxPredicate)
              (Lens
  WatchTxRequest
  WatchTxRequest
  (Maybe TxPredicate)
  (Maybe TxPredicate)
-> FieldAccessor WatchTxRequest TxPredicate
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'predicate")) ::
              Data.ProtoLens.FieldDescriptor WatchTxRequest
        fieldMask__field_descriptor :: FieldDescriptor WatchTxRequest
fieldMask__field_descriptor
          = String
-> FieldTypeDescriptor FieldMask
-> FieldAccessor WatchTxRequest FieldMask
-> FieldDescriptor WatchTxRequest
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
  WatchTxRequest WatchTxRequest (Maybe FieldMask) (Maybe FieldMask)
-> FieldAccessor WatchTxRequest 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 WatchTxRequest
        intersect__field_descriptor :: FieldDescriptor WatchTxRequest
intersect__field_descriptor
          = String
-> FieldTypeDescriptor BlockRef
-> FieldAccessor WatchTxRequest BlockRef
-> FieldDescriptor WatchTxRequest
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"intersect"
              (MessageOrGroup -> FieldTypeDescriptor BlockRef
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor BlockRef)
              (Packing
-> Lens' WatchTxRequest [BlockRef]
-> FieldAccessor WatchTxRequest BlockRef
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 @"intersect")) ::
              Data.ProtoLens.FieldDescriptor WatchTxRequest
      in
        [(Tag, FieldDescriptor WatchTxRequest)]
-> Map Tag (FieldDescriptor WatchTxRequest)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor WatchTxRequest
predicate__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor WatchTxRequest
fieldMask__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
3, FieldDescriptor WatchTxRequest
intersect__field_descriptor)]
  unknownFields :: Lens' WatchTxRequest FieldSet
unknownFields
    = (WatchTxRequest -> FieldSet)
-> (WatchTxRequest -> FieldSet -> WatchTxRequest)
-> Lens' WatchTxRequest FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        WatchTxRequest -> FieldSet
_WatchTxRequest'_unknownFields
        (\ WatchTxRequest
x__ FieldSet
y__ -> WatchTxRequest
x__ {_WatchTxRequest'_unknownFields = y__})
  defMessage :: WatchTxRequest
defMessage
    = WatchTxRequest'_constructor
        {_WatchTxRequest'predicate :: Maybe TxPredicate
_WatchTxRequest'predicate = Maybe TxPredicate
forall a. Maybe a
Prelude.Nothing,
         _WatchTxRequest'fieldMask :: Maybe FieldMask
_WatchTxRequest'fieldMask = Maybe FieldMask
forall a. Maybe a
Prelude.Nothing,
         _WatchTxRequest'intersect :: Vector BlockRef
_WatchTxRequest'intersect = Vector BlockRef
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _WatchTxRequest'_unknownFields :: FieldSet
_WatchTxRequest'_unknownFields = []}
  parseMessage :: Parser WatchTxRequest
parseMessage
    = let
        loop ::
          WatchTxRequest
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld BlockRef
             -> Data.ProtoLens.Encoding.Bytes.Parser WatchTxRequest
        loop :: WatchTxRequest
-> Growing Vector RealWorld BlockRef -> Parser WatchTxRequest
loop WatchTxRequest
x Growing Vector RealWorld BlockRef
mutable'intersect
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector BlockRef
frozen'intersect <- IO (Vector BlockRef) -> Parser (Vector BlockRef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                            (Growing Vector (PrimState IO) BlockRef -> IO (Vector BlockRef)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                               Growing Vector RealWorld BlockRef
Growing Vector (PrimState IO) BlockRef
mutable'intersect)
                      (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      WatchTxRequest -> Parser WatchTxRequest
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter WatchTxRequest WatchTxRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> WatchTxRequest -> WatchTxRequest
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           LensLike' f WatchTxRequest FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' WatchTxRequest FieldSet
Setter WatchTxRequest WatchTxRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter
  WatchTxRequest WatchTxRequest (Vector BlockRef) (Vector BlockRef)
-> Vector BlockRef -> WatchTxRequest -> WatchTxRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'intersect") Vector BlockRef
frozen'intersect WatchTxRequest
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do TxPredicate
y <- Parser TxPredicate -> String -> Parser TxPredicate
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser TxPredicate -> Parser TxPredicate
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser TxPredicate
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"predicate"
                                WatchTxRequest
-> Growing Vector RealWorld BlockRef -> Parser WatchTxRequest
loop
                                  (Setter WatchTxRequest WatchTxRequest TxPredicate TxPredicate
-> TxPredicate -> WatchTxRequest -> WatchTxRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"predicate") TxPredicate
y WatchTxRequest
x)
                                  Growing Vector RealWorld BlockRef
mutable'intersect
                        Word64
18
                          -> do FieldMask
y <- Parser FieldMask -> String -> Parser FieldMask
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser FieldMask -> Parser FieldMask
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser FieldMask
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"field_mask"
                                WatchTxRequest
-> Growing Vector RealWorld BlockRef -> Parser WatchTxRequest
loop
                                  (Setter WatchTxRequest WatchTxRequest FieldMask FieldMask
-> FieldMask -> WatchTxRequest -> WatchTxRequest
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"fieldMask") FieldMask
y WatchTxRequest
x)
                                  Growing Vector RealWorld BlockRef
mutable'intersect
                        Word64
26
                          -> do !BlockRef
y <- Parser BlockRef -> String -> Parser BlockRef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser BlockRef -> Parser BlockRef
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                              (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                              Parser BlockRef
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        String
"intersect"
                                Growing Vector RealWorld BlockRef
v <- IO (Growing Vector RealWorld BlockRef)
-> Parser (Growing Vector RealWorld BlockRef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) BlockRef
-> BlockRef -> IO (Growing Vector (PrimState IO) BlockRef)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append Growing Vector RealWorld BlockRef
Growing Vector (PrimState IO) BlockRef
mutable'intersect BlockRef
y)
                                WatchTxRequest
-> Growing Vector RealWorld BlockRef -> Parser WatchTxRequest
loop WatchTxRequest
x Growing Vector RealWorld BlockRef
v
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                WatchTxRequest
-> Growing Vector RealWorld BlockRef -> Parser WatchTxRequest
loop
                                  (Setter WatchTxRequest WatchTxRequest FieldSet FieldSet
-> (FieldSet -> FieldSet) -> WatchTxRequest -> WatchTxRequest
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     LensLike' f WatchTxRequest FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' WatchTxRequest FieldSet
Setter WatchTxRequest WatchTxRequest FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) WatchTxRequest
x)
                                  Growing Vector RealWorld BlockRef
mutable'intersect
      in
        Parser WatchTxRequest -> String -> Parser WatchTxRequest
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld BlockRef
mutable'intersect <- IO (Growing Vector RealWorld BlockRef)
-> Parser (Growing Vector RealWorld BlockRef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                     IO (Growing Vector RealWorld BlockRef)
IO (Growing Vector (PrimState IO) BlockRef)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              WatchTxRequest
-> Growing Vector RealWorld BlockRef -> Parser WatchTxRequest
loop WatchTxRequest
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld BlockRef
mutable'intersect)
          String
"WatchTxRequest"
  buildMessage :: WatchTxRequest -> Builder
buildMessage
    = \ WatchTxRequest
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (case
                  FoldLike
  (Maybe TxPredicate)
  WatchTxRequest
  WatchTxRequest
  (Maybe TxPredicate)
  (Maybe TxPredicate)
-> WatchTxRequest -> Maybe TxPredicate
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'predicate") WatchTxRequest
_x
              of
                Maybe TxPredicate
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                (Prelude.Just TxPredicate
_v)
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                       ((ByteString -> Builder)
-> (TxPredicate -> ByteString) -> TxPredicate -> 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))
                          TxPredicate -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage TxPredicate
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (case
                     FoldLike
  (Maybe FieldMask)
  WatchTxRequest
  WatchTxRequest
  (Maybe FieldMask)
  (Maybe FieldMask)
-> WatchTxRequest -> 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") WatchTxRequest
_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
18)
                          ((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.<>)
                   ((BlockRef -> Builder) -> Vector BlockRef -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                      (\ BlockRef
_v
                         -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                              (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
26)
                              ((ByteString -> Builder)
-> (BlockRef -> ByteString) -> BlockRef -> 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))
                                 BlockRef -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage BlockRef
_v))
                      (FoldLike
  (Vector BlockRef)
  WatchTxRequest
  WatchTxRequest
  (Vector BlockRef)
  (Vector BlockRef)
-> WatchTxRequest -> Vector BlockRef
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'intersect") WatchTxRequest
_x))
                   (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (FoldLike FieldSet WatchTxRequest WatchTxRequest FieldSet FieldSet
-> WatchTxRequest -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet WatchTxRequest WatchTxRequest FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' WatchTxRequest FieldSet
Data.ProtoLens.unknownFields WatchTxRequest
_x))))
instance Control.DeepSeq.NFData WatchTxRequest where
  rnf :: WatchTxRequest -> ()
rnf
    = \ WatchTxRequest
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (WatchTxRequest -> FieldSet
_WatchTxRequest'_unknownFields WatchTxRequest
x__)
             (Maybe TxPredicate -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (WatchTxRequest -> Maybe TxPredicate
_WatchTxRequest'predicate WatchTxRequest
x__)
                (Maybe FieldMask -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (WatchTxRequest -> Maybe FieldMask
_WatchTxRequest'fieldMask WatchTxRequest
x__)
                   (Vector BlockRef -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (WatchTxRequest -> Vector BlockRef
_WatchTxRequest'intersect WatchTxRequest
x__) ())))
{- | Fields :
     
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.maybe'action' @:: Lens' WatchTxResponse (Prelude.Maybe WatchTxResponse'Action)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.maybe'apply' @:: Lens' WatchTxResponse (Prelude.Maybe AnyChainTx)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.apply' @:: Lens' WatchTxResponse AnyChainTx@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.maybe'undo' @:: Lens' WatchTxResponse (Prelude.Maybe AnyChainTx)@
         * 'Proto.Utxorpc.V1alpha.Watch.Watch_Fields.undo' @:: Lens' WatchTxResponse AnyChainTx@ -}
data WatchTxResponse
  = WatchTxResponse'_constructor {WatchTxResponse -> Maybe WatchTxResponse'Action
_WatchTxResponse'action :: !(Prelude.Maybe WatchTxResponse'Action),
                                  WatchTxResponse -> FieldSet
_WatchTxResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (WatchTxResponse -> WatchTxResponse -> Bool
(WatchTxResponse -> WatchTxResponse -> Bool)
-> (WatchTxResponse -> WatchTxResponse -> Bool)
-> Eq WatchTxResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WatchTxResponse -> WatchTxResponse -> Bool
== :: WatchTxResponse -> WatchTxResponse -> Bool
$c/= :: WatchTxResponse -> WatchTxResponse -> Bool
/= :: WatchTxResponse -> WatchTxResponse -> Bool
Prelude.Eq, Eq WatchTxResponse
Eq WatchTxResponse =>
(WatchTxResponse -> WatchTxResponse -> Ordering)
-> (WatchTxResponse -> WatchTxResponse -> Bool)
-> (WatchTxResponse -> WatchTxResponse -> Bool)
-> (WatchTxResponse -> WatchTxResponse -> Bool)
-> (WatchTxResponse -> WatchTxResponse -> Bool)
-> (WatchTxResponse -> WatchTxResponse -> WatchTxResponse)
-> (WatchTxResponse -> WatchTxResponse -> WatchTxResponse)
-> Ord WatchTxResponse
WatchTxResponse -> WatchTxResponse -> Bool
WatchTxResponse -> WatchTxResponse -> Ordering
WatchTxResponse -> WatchTxResponse -> WatchTxResponse
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 :: WatchTxResponse -> WatchTxResponse -> Ordering
compare :: WatchTxResponse -> WatchTxResponse -> Ordering
$c< :: WatchTxResponse -> WatchTxResponse -> Bool
< :: WatchTxResponse -> WatchTxResponse -> Bool
$c<= :: WatchTxResponse -> WatchTxResponse -> Bool
<= :: WatchTxResponse -> WatchTxResponse -> Bool
$c> :: WatchTxResponse -> WatchTxResponse -> Bool
> :: WatchTxResponse -> WatchTxResponse -> Bool
$c>= :: WatchTxResponse -> WatchTxResponse -> Bool
>= :: WatchTxResponse -> WatchTxResponse -> Bool
$cmax :: WatchTxResponse -> WatchTxResponse -> WatchTxResponse
max :: WatchTxResponse -> WatchTxResponse -> WatchTxResponse
$cmin :: WatchTxResponse -> WatchTxResponse -> WatchTxResponse
min :: WatchTxResponse -> WatchTxResponse -> WatchTxResponse
Prelude.Ord)
instance Prelude.Show WatchTxResponse where
  showsPrec :: Int -> WatchTxResponse -> ShowS
showsPrec Int
_ WatchTxResponse
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (WatchTxResponse -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort WatchTxResponse
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
data WatchTxResponse'Action
  = WatchTxResponse'Apply !AnyChainTx |
    WatchTxResponse'Undo !AnyChainTx
  deriving stock (Int -> WatchTxResponse'Action -> ShowS
[WatchTxResponse'Action] -> ShowS
WatchTxResponse'Action -> String
(Int -> WatchTxResponse'Action -> ShowS)
-> (WatchTxResponse'Action -> String)
-> ([WatchTxResponse'Action] -> ShowS)
-> Show WatchTxResponse'Action
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WatchTxResponse'Action -> ShowS
showsPrec :: Int -> WatchTxResponse'Action -> ShowS
$cshow :: WatchTxResponse'Action -> String
show :: WatchTxResponse'Action -> String
$cshowList :: [WatchTxResponse'Action] -> ShowS
showList :: [WatchTxResponse'Action] -> ShowS
Prelude.Show, WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
(WatchTxResponse'Action -> WatchTxResponse'Action -> Bool)
-> (WatchTxResponse'Action -> WatchTxResponse'Action -> Bool)
-> Eq WatchTxResponse'Action
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
== :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
$c/= :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
/= :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
Prelude.Eq, Eq WatchTxResponse'Action
Eq WatchTxResponse'Action =>
(WatchTxResponse'Action -> WatchTxResponse'Action -> Ordering)
-> (WatchTxResponse'Action -> WatchTxResponse'Action -> Bool)
-> (WatchTxResponse'Action -> WatchTxResponse'Action -> Bool)
-> (WatchTxResponse'Action -> WatchTxResponse'Action -> Bool)
-> (WatchTxResponse'Action -> WatchTxResponse'Action -> Bool)
-> (WatchTxResponse'Action
    -> WatchTxResponse'Action -> WatchTxResponse'Action)
-> (WatchTxResponse'Action
    -> WatchTxResponse'Action -> WatchTxResponse'Action)
-> Ord WatchTxResponse'Action
WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
WatchTxResponse'Action -> WatchTxResponse'Action -> Ordering
WatchTxResponse'Action
-> WatchTxResponse'Action -> WatchTxResponse'Action
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 :: WatchTxResponse'Action -> WatchTxResponse'Action -> Ordering
compare :: WatchTxResponse'Action -> WatchTxResponse'Action -> Ordering
$c< :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
< :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
$c<= :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
<= :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
$c> :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
> :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
$c>= :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
>= :: WatchTxResponse'Action -> WatchTxResponse'Action -> Bool
$cmax :: WatchTxResponse'Action
-> WatchTxResponse'Action -> WatchTxResponse'Action
max :: WatchTxResponse'Action
-> WatchTxResponse'Action -> WatchTxResponse'Action
$cmin :: WatchTxResponse'Action
-> WatchTxResponse'Action -> WatchTxResponse'Action
min :: WatchTxResponse'Action
-> WatchTxResponse'Action -> WatchTxResponse'Action
Prelude.Ord)
instance Data.ProtoLens.Field.HasField WatchTxResponse "maybe'action" (Prelude.Maybe WatchTxResponse'Action) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'action"
-> (Maybe WatchTxResponse'Action
    -> f (Maybe WatchTxResponse'Action))
-> WatchTxResponse
-> f WatchTxResponse
fieldOf Proxy# "maybe'action"
_
    = ((Maybe WatchTxResponse'Action -> f (Maybe WatchTxResponse'Action))
 -> WatchTxResponse -> f WatchTxResponse)
-> ((Maybe WatchTxResponse'Action
     -> f (Maybe WatchTxResponse'Action))
    -> Maybe WatchTxResponse'Action
    -> f (Maybe WatchTxResponse'Action))
-> (Maybe WatchTxResponse'Action
    -> f (Maybe WatchTxResponse'Action))
-> WatchTxResponse
-> f WatchTxResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((WatchTxResponse -> Maybe WatchTxResponse'Action)
-> (WatchTxResponse
    -> Maybe WatchTxResponse'Action -> WatchTxResponse)
-> Lens
     WatchTxResponse
     WatchTxResponse
     (Maybe WatchTxResponse'Action)
     (Maybe WatchTxResponse'Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           WatchTxResponse -> Maybe WatchTxResponse'Action
_WatchTxResponse'action
           (\ WatchTxResponse
x__ Maybe WatchTxResponse'Action
y__ -> WatchTxResponse
x__ {_WatchTxResponse'action = y__}))
        (Maybe WatchTxResponse'Action -> f (Maybe WatchTxResponse'Action))
-> Maybe WatchTxResponse'Action -> f (Maybe WatchTxResponse'Action)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField WatchTxResponse "maybe'apply" (Prelude.Maybe AnyChainTx) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'apply"
-> (Maybe AnyChainTx -> f (Maybe AnyChainTx))
-> WatchTxResponse
-> f WatchTxResponse
fieldOf Proxy# "maybe'apply"
_
    = ((Maybe WatchTxResponse'Action -> f (Maybe WatchTxResponse'Action))
 -> WatchTxResponse -> f WatchTxResponse)
-> ((Maybe AnyChainTx -> f (Maybe AnyChainTx))
    -> Maybe WatchTxResponse'Action
    -> f (Maybe WatchTxResponse'Action))
-> (Maybe AnyChainTx -> f (Maybe AnyChainTx))
-> WatchTxResponse
-> f WatchTxResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((WatchTxResponse -> Maybe WatchTxResponse'Action)
-> (WatchTxResponse
    -> Maybe WatchTxResponse'Action -> WatchTxResponse)
-> Lens
     WatchTxResponse
     WatchTxResponse
     (Maybe WatchTxResponse'Action)
     (Maybe WatchTxResponse'Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           WatchTxResponse -> Maybe WatchTxResponse'Action
_WatchTxResponse'action
           (\ WatchTxResponse
x__ Maybe WatchTxResponse'Action
y__ -> WatchTxResponse
x__ {_WatchTxResponse'action = y__}))
        ((Maybe WatchTxResponse'Action -> Maybe AnyChainTx)
-> (Maybe WatchTxResponse'Action
    -> Maybe AnyChainTx -> Maybe WatchTxResponse'Action)
-> Lens
     (Maybe WatchTxResponse'Action)
     (Maybe WatchTxResponse'Action)
     (Maybe AnyChainTx)
     (Maybe AnyChainTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           (\ Maybe WatchTxResponse'Action
x__
              -> case Maybe WatchTxResponse'Action
x__ of
                   (Prelude.Just (WatchTxResponse'Apply AnyChainTx
x__val))
                     -> AnyChainTx -> Maybe AnyChainTx
forall a. a -> Maybe a
Prelude.Just AnyChainTx
x__val
                   Maybe WatchTxResponse'Action
_otherwise -> Maybe AnyChainTx
forall a. Maybe a
Prelude.Nothing)
           (\ Maybe WatchTxResponse'Action
_ Maybe AnyChainTx
y__ -> (AnyChainTx -> WatchTxResponse'Action)
-> Maybe AnyChainTx -> Maybe WatchTxResponse'Action
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap AnyChainTx -> WatchTxResponse'Action
WatchTxResponse'Apply Maybe AnyChainTx
y__))
instance Data.ProtoLens.Field.HasField WatchTxResponse "apply" AnyChainTx where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "apply"
-> (AnyChainTx -> f AnyChainTx)
-> WatchTxResponse
-> f WatchTxResponse
fieldOf Proxy# "apply"
_
    = ((Maybe WatchTxResponse'Action -> f (Maybe WatchTxResponse'Action))
 -> WatchTxResponse -> f WatchTxResponse)
-> ((AnyChainTx -> f AnyChainTx)
    -> Maybe WatchTxResponse'Action
    -> f (Maybe WatchTxResponse'Action))
-> (AnyChainTx -> f AnyChainTx)
-> WatchTxResponse
-> f WatchTxResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((WatchTxResponse -> Maybe WatchTxResponse'Action)
-> (WatchTxResponse
    -> Maybe WatchTxResponse'Action -> WatchTxResponse)
-> Lens
     WatchTxResponse
     WatchTxResponse
     (Maybe WatchTxResponse'Action)
     (Maybe WatchTxResponse'Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           WatchTxResponse -> Maybe WatchTxResponse'Action
_WatchTxResponse'action
           (\ WatchTxResponse
x__ Maybe WatchTxResponse'Action
y__ -> WatchTxResponse
x__ {_WatchTxResponse'action = y__}))
        (((Maybe AnyChainTx -> f (Maybe AnyChainTx))
 -> Maybe WatchTxResponse'Action
 -> f (Maybe WatchTxResponse'Action))
-> ((AnyChainTx -> f AnyChainTx)
    -> Maybe AnyChainTx -> f (Maybe AnyChainTx))
-> (AnyChainTx -> f AnyChainTx)
-> Maybe WatchTxResponse'Action
-> f (Maybe WatchTxResponse'Action)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
           ((Maybe WatchTxResponse'Action -> Maybe AnyChainTx)
-> (Maybe WatchTxResponse'Action
    -> Maybe AnyChainTx -> Maybe WatchTxResponse'Action)
-> Lens
     (Maybe WatchTxResponse'Action)
     (Maybe WatchTxResponse'Action)
     (Maybe AnyChainTx)
     (Maybe AnyChainTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
              (\ Maybe WatchTxResponse'Action
x__
                 -> case Maybe WatchTxResponse'Action
x__ of
                      (Prelude.Just (WatchTxResponse'Apply AnyChainTx
x__val))
                        -> AnyChainTx -> Maybe AnyChainTx
forall a. a -> Maybe a
Prelude.Just AnyChainTx
x__val
                      Maybe WatchTxResponse'Action
_otherwise -> Maybe AnyChainTx
forall a. Maybe a
Prelude.Nothing)
              (\ Maybe WatchTxResponse'Action
_ Maybe AnyChainTx
y__ -> (AnyChainTx -> WatchTxResponse'Action)
-> Maybe AnyChainTx -> Maybe WatchTxResponse'Action
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap AnyChainTx -> WatchTxResponse'Action
WatchTxResponse'Apply Maybe AnyChainTx
y__))
           (AnyChainTx -> Lens' (Maybe AnyChainTx) AnyChainTx
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens AnyChainTx
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField WatchTxResponse "maybe'undo" (Prelude.Maybe AnyChainTx) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'undo"
-> (Maybe AnyChainTx -> f (Maybe AnyChainTx))
-> WatchTxResponse
-> f WatchTxResponse
fieldOf Proxy# "maybe'undo"
_
    = ((Maybe WatchTxResponse'Action -> f (Maybe WatchTxResponse'Action))
 -> WatchTxResponse -> f WatchTxResponse)
-> ((Maybe AnyChainTx -> f (Maybe AnyChainTx))
    -> Maybe WatchTxResponse'Action
    -> f (Maybe WatchTxResponse'Action))
-> (Maybe AnyChainTx -> f (Maybe AnyChainTx))
-> WatchTxResponse
-> f WatchTxResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((WatchTxResponse -> Maybe WatchTxResponse'Action)
-> (WatchTxResponse
    -> Maybe WatchTxResponse'Action -> WatchTxResponse)
-> Lens
     WatchTxResponse
     WatchTxResponse
     (Maybe WatchTxResponse'Action)
     (Maybe WatchTxResponse'Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           WatchTxResponse -> Maybe WatchTxResponse'Action
_WatchTxResponse'action
           (\ WatchTxResponse
x__ Maybe WatchTxResponse'Action
y__ -> WatchTxResponse
x__ {_WatchTxResponse'action = y__}))
        ((Maybe WatchTxResponse'Action -> Maybe AnyChainTx)
-> (Maybe WatchTxResponse'Action
    -> Maybe AnyChainTx -> Maybe WatchTxResponse'Action)
-> Lens
     (Maybe WatchTxResponse'Action)
     (Maybe WatchTxResponse'Action)
     (Maybe AnyChainTx)
     (Maybe AnyChainTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           (\ Maybe WatchTxResponse'Action
x__
              -> case Maybe WatchTxResponse'Action
x__ of
                   (Prelude.Just (WatchTxResponse'Undo AnyChainTx
x__val)) -> AnyChainTx -> Maybe AnyChainTx
forall a. a -> Maybe a
Prelude.Just AnyChainTx
x__val
                   Maybe WatchTxResponse'Action
_otherwise -> Maybe AnyChainTx
forall a. Maybe a
Prelude.Nothing)
           (\ Maybe WatchTxResponse'Action
_ Maybe AnyChainTx
y__ -> (AnyChainTx -> WatchTxResponse'Action)
-> Maybe AnyChainTx -> Maybe WatchTxResponse'Action
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap AnyChainTx -> WatchTxResponse'Action
WatchTxResponse'Undo Maybe AnyChainTx
y__))
instance Data.ProtoLens.Field.HasField WatchTxResponse "undo" AnyChainTx where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "undo"
-> (AnyChainTx -> f AnyChainTx)
-> WatchTxResponse
-> f WatchTxResponse
fieldOf Proxy# "undo"
_
    = ((Maybe WatchTxResponse'Action -> f (Maybe WatchTxResponse'Action))
 -> WatchTxResponse -> f WatchTxResponse)
-> ((AnyChainTx -> f AnyChainTx)
    -> Maybe WatchTxResponse'Action
    -> f (Maybe WatchTxResponse'Action))
-> (AnyChainTx -> f AnyChainTx)
-> WatchTxResponse
-> f WatchTxResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((WatchTxResponse -> Maybe WatchTxResponse'Action)
-> (WatchTxResponse
    -> Maybe WatchTxResponse'Action -> WatchTxResponse)
-> Lens
     WatchTxResponse
     WatchTxResponse
     (Maybe WatchTxResponse'Action)
     (Maybe WatchTxResponse'Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           WatchTxResponse -> Maybe WatchTxResponse'Action
_WatchTxResponse'action
           (\ WatchTxResponse
x__ Maybe WatchTxResponse'Action
y__ -> WatchTxResponse
x__ {_WatchTxResponse'action = y__}))
        (((Maybe AnyChainTx -> f (Maybe AnyChainTx))
 -> Maybe WatchTxResponse'Action
 -> f (Maybe WatchTxResponse'Action))
-> ((AnyChainTx -> f AnyChainTx)
    -> Maybe AnyChainTx -> f (Maybe AnyChainTx))
-> (AnyChainTx -> f AnyChainTx)
-> Maybe WatchTxResponse'Action
-> f (Maybe WatchTxResponse'Action)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
           ((Maybe WatchTxResponse'Action -> Maybe AnyChainTx)
-> (Maybe WatchTxResponse'Action
    -> Maybe AnyChainTx -> Maybe WatchTxResponse'Action)
-> Lens
     (Maybe WatchTxResponse'Action)
     (Maybe WatchTxResponse'Action)
     (Maybe AnyChainTx)
     (Maybe AnyChainTx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
              (\ Maybe WatchTxResponse'Action
x__
                 -> case Maybe WatchTxResponse'Action
x__ of
                      (Prelude.Just (WatchTxResponse'Undo AnyChainTx
x__val)) -> AnyChainTx -> Maybe AnyChainTx
forall a. a -> Maybe a
Prelude.Just AnyChainTx
x__val
                      Maybe WatchTxResponse'Action
_otherwise -> Maybe AnyChainTx
forall a. Maybe a
Prelude.Nothing)
              (\ Maybe WatchTxResponse'Action
_ Maybe AnyChainTx
y__ -> (AnyChainTx -> WatchTxResponse'Action)
-> Maybe AnyChainTx -> Maybe WatchTxResponse'Action
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap AnyChainTx -> WatchTxResponse'Action
WatchTxResponse'Undo Maybe AnyChainTx
y__))
           (AnyChainTx -> Lens' (Maybe AnyChainTx) AnyChainTx
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens AnyChainTx
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message WatchTxResponse where
  messageName :: Proxy WatchTxResponse -> Text
messageName Proxy WatchTxResponse
_
    = String -> Text
Data.Text.pack String
"utxorpc.v1alpha.watch.WatchTxResponse"
  packedMessageDescriptor :: Proxy WatchTxResponse -> ByteString
packedMessageDescriptor Proxy WatchTxResponse
_
    = ByteString
"\n\
      \\SIWatchTxResponse\DC29\n\
      \\ENQapply\CAN\SOH \SOH(\v2!.utxorpc.v1alpha.watch.AnyChainTxH\NULR\ENQapply\DC27\n\
      \\EOTundo\CAN\STX \SOH(\v2!.utxorpc.v1alpha.watch.AnyChainTxH\NULR\EOTundoB\b\n\
      \\ACKaction"
  packedFileDescriptor :: Proxy WatchTxResponse -> ByteString
packedFileDescriptor Proxy WatchTxResponse
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor WatchTxResponse)
fieldsByTag
    = let
        apply__field_descriptor :: FieldDescriptor WatchTxResponse
apply__field_descriptor
          = String
-> FieldTypeDescriptor AnyChainTx
-> FieldAccessor WatchTxResponse AnyChainTx
-> FieldDescriptor WatchTxResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"apply"
              (MessageOrGroup -> FieldTypeDescriptor AnyChainTx
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor AnyChainTx)
              (Lens' WatchTxResponse (Maybe AnyChainTx)
-> FieldAccessor WatchTxResponse AnyChainTx
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'apply")) ::
              Data.ProtoLens.FieldDescriptor WatchTxResponse
        undo__field_descriptor :: FieldDescriptor WatchTxResponse
undo__field_descriptor
          = String
-> FieldTypeDescriptor AnyChainTx
-> FieldAccessor WatchTxResponse AnyChainTx
-> FieldDescriptor WatchTxResponse
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"undo"
              (MessageOrGroup -> FieldTypeDescriptor AnyChainTx
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor AnyChainTx)
              (Lens' WatchTxResponse (Maybe AnyChainTx)
-> FieldAccessor WatchTxResponse AnyChainTx
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'undo")) ::
              Data.ProtoLens.FieldDescriptor WatchTxResponse
      in
        [(Tag, FieldDescriptor WatchTxResponse)]
-> Map Tag (FieldDescriptor WatchTxResponse)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor WatchTxResponse
apply__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor WatchTxResponse
undo__field_descriptor)]
  unknownFields :: Lens' WatchTxResponse FieldSet
unknownFields
    = (WatchTxResponse -> FieldSet)
-> (WatchTxResponse -> FieldSet -> WatchTxResponse)
-> Lens' WatchTxResponse FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        WatchTxResponse -> FieldSet
_WatchTxResponse'_unknownFields
        (\ WatchTxResponse
x__ FieldSet
y__ -> WatchTxResponse
x__ {_WatchTxResponse'_unknownFields = y__})
  defMessage :: WatchTxResponse
defMessage
    = WatchTxResponse'_constructor
        {_WatchTxResponse'action :: Maybe WatchTxResponse'Action
_WatchTxResponse'action = Maybe WatchTxResponse'Action
forall a. Maybe a
Prelude.Nothing,
         _WatchTxResponse'_unknownFields :: FieldSet
_WatchTxResponse'_unknownFields = []}
  parseMessage :: Parser WatchTxResponse
parseMessage
    = let
        loop ::
          WatchTxResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser WatchTxResponse
        loop :: WatchTxResponse -> Parser WatchTxResponse
loop WatchTxResponse
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall a. [a] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall a. String -> Parser a
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      WatchTxResponse -> Parser WatchTxResponse
forall a. a -> Parser a
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter WatchTxResponse WatchTxResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> WatchTxResponse -> WatchTxResponse
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           LensLike' f WatchTxResponse FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' WatchTxResponse FieldSet
Setter WatchTxResponse WatchTxResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) WatchTxResponse
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do AnyChainTx
y <- Parser AnyChainTx -> String -> Parser AnyChainTx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser AnyChainTx -> Parser AnyChainTx
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser AnyChainTx
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"apply"
                                WatchTxResponse -> Parser WatchTxResponse
loop (Setter WatchTxResponse WatchTxResponse AnyChainTx AnyChainTx
-> AnyChainTx -> WatchTxResponse -> WatchTxResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"apply") AnyChainTx
y WatchTxResponse
x)
                        Word64
18
                          -> do AnyChainTx
y <- Parser AnyChainTx -> String -> Parser AnyChainTx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser AnyChainTx -> Parser AnyChainTx
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser AnyChainTx
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"undo"
                                WatchTxResponse -> Parser WatchTxResponse
loop (Setter WatchTxResponse WatchTxResponse AnyChainTx AnyChainTx
-> AnyChainTx -> WatchTxResponse -> WatchTxResponse
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"undo") AnyChainTx
y WatchTxResponse
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                WatchTxResponse -> Parser WatchTxResponse
loop
                                  (Setter WatchTxResponse WatchTxResponse FieldSet FieldSet
-> (FieldSet -> FieldSet) -> WatchTxResponse -> WatchTxResponse
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     LensLike' f WatchTxResponse FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' WatchTxResponse FieldSet
Setter WatchTxResponse WatchTxResponse FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) WatchTxResponse
x)
      in
        Parser WatchTxResponse -> String -> Parser WatchTxResponse
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do WatchTxResponse -> Parser WatchTxResponse
loop WatchTxResponse
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"WatchTxResponse"
  buildMessage :: WatchTxResponse -> Builder
buildMessage
    = \ WatchTxResponse
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (case
                  FoldLike
  (Maybe WatchTxResponse'Action)
  WatchTxResponse
  WatchTxResponse
  (Maybe WatchTxResponse'Action)
  (Maybe WatchTxResponse'Action)
-> WatchTxResponse -> Maybe WatchTxResponse'Action
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'action") WatchTxResponse
_x
              of
                Maybe WatchTxResponse'Action
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                (Prelude.Just (WatchTxResponse'Apply AnyChainTx
v))
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                       ((ByteString -> Builder)
-> (AnyChainTx -> ByteString) -> AnyChainTx -> 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))
                          AnyChainTx -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage AnyChainTx
v)
                (Prelude.Just (WatchTxResponse'Undo AnyChainTx
v))
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
18)
                       ((ByteString -> Builder)
-> (AnyChainTx -> ByteString) -> AnyChainTx -> 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))
                          AnyChainTx -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage AnyChainTx
v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet WatchTxResponse WatchTxResponse FieldSet FieldSet
-> WatchTxResponse -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet WatchTxResponse WatchTxResponse FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Lens' WatchTxResponse FieldSet
Data.ProtoLens.unknownFields WatchTxResponse
_x))
instance Control.DeepSeq.NFData WatchTxResponse where
  rnf :: WatchTxResponse -> ()
rnf
    = \ WatchTxResponse
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (WatchTxResponse -> FieldSet
_WatchTxResponse'_unknownFields WatchTxResponse
x__)
             (Maybe WatchTxResponse'Action -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (WatchTxResponse -> Maybe WatchTxResponse'Action
_WatchTxResponse'action WatchTxResponse
x__) ())
instance Control.DeepSeq.NFData WatchTxResponse'Action where
  rnf :: WatchTxResponse'Action -> ()
rnf (WatchTxResponse'Apply AnyChainTx
x__) = AnyChainTx -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf AnyChainTx
x__
  rnf (WatchTxResponse'Undo AnyChainTx
x__) = AnyChainTx -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf AnyChainTx
x__
_WatchTxResponse'Apply ::
  Data.ProtoLens.Prism.Prism' WatchTxResponse'Action AnyChainTx
_WatchTxResponse'Apply :: Prism' WatchTxResponse'Action AnyChainTx
_WatchTxResponse'Apply
  = (AnyChainTx -> WatchTxResponse'Action)
-> (WatchTxResponse'Action -> Maybe AnyChainTx)
-> Prism' WatchTxResponse'Action AnyChainTx
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
      AnyChainTx -> WatchTxResponse'Action
WatchTxResponse'Apply
      (\ WatchTxResponse'Action
p__
         -> case WatchTxResponse'Action
p__ of
              (WatchTxResponse'Apply AnyChainTx
p__val) -> AnyChainTx -> Maybe AnyChainTx
forall a. a -> Maybe a
Prelude.Just AnyChainTx
p__val
              WatchTxResponse'Action
_otherwise -> Maybe AnyChainTx
forall a. Maybe a
Prelude.Nothing)
_WatchTxResponse'Undo ::
  Data.ProtoLens.Prism.Prism' WatchTxResponse'Action AnyChainTx
_WatchTxResponse'Undo :: Prism' WatchTxResponse'Action AnyChainTx
_WatchTxResponse'Undo
  = (AnyChainTx -> WatchTxResponse'Action)
-> (WatchTxResponse'Action -> Maybe AnyChainTx)
-> Prism' WatchTxResponse'Action AnyChainTx
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
      AnyChainTx -> WatchTxResponse'Action
WatchTxResponse'Undo
      (\ WatchTxResponse'Action
p__
         -> case WatchTxResponse'Action
p__ of
              (WatchTxResponse'Undo AnyChainTx
p__val) -> AnyChainTx -> Maybe AnyChainTx
forall a. a -> Maybe a
Prelude.Just AnyChainTx
p__val
              WatchTxResponse'Action
_otherwise -> Maybe AnyChainTx
forall a. Maybe a
Prelude.Nothing)
data WatchService = WatchService {}
instance Data.ProtoLens.Service.Types.Service WatchService where
  type ServiceName WatchService = "WatchService"
  type ServicePackage WatchService = "utxorpc.v1alpha.watch"
  type ServiceMethods WatchService = '["watchTx"]
  packedServiceDescriptor :: Proxy WatchService -> ByteString
packedServiceDescriptor Proxy WatchService
_
    = ByteString
"\n\
      \\fWatchService\DC2Z\n\
      \\aWatchTx\DC2%.utxorpc.v1alpha.watch.WatchTxRequest\SUB&.utxorpc.v1alpha.watch.WatchTxResponse0\SOH"
instance Data.ProtoLens.Service.Types.HasMethodImpl WatchService "watchTx" where
  type MethodName WatchService "watchTx" = "WatchTx"
  type MethodInput WatchService "watchTx" = WatchTxRequest
  type MethodOutput WatchService "watchTx" = WatchTxResponse
  type MethodStreamingType WatchService "watchTx" = 'Data.ProtoLens.Service.Types.ServerStreaming
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
  = ByteString
"\n\
    \!utxorpc/v1alpha/watch/watch.proto\DC2\NAKutxorpc.v1alpha.watch\SUB google/protobuf/field_mask.proto\SUB%utxorpc/v1alpha/cardano/cardano.proto\"4\n\
    \\bBlockRef\DC2\DC4\n\
    \\ENQindex\CAN\SOH \SOH(\EOTR\ENQindex\DC2\DC2\n\
    \\EOThash\CAN\STX \SOH(\fR\EOThash\"\\\n\
    \\DC1AnyChainTxPattern\DC2>\n\
    \\acardano\CAN\SOH \SOH(\v2\".utxorpc.v1alpha.cardano.TxPatternH\NULR\acardanoB\a\n\
    \\ENQchain\"\249\SOH\n\
    \\vTxPredicate\DC2>\n\
    \\ENQmatch\CAN\SOH \SOH(\v2(.utxorpc.v1alpha.watch.AnyChainTxPatternR\ENQmatch\DC24\n\
    \\ETXnot\CAN\STX \ETX(\v2\".utxorpc.v1alpha.watch.TxPredicateR\ETXnot\DC29\n\
    \\ACKall_of\CAN\ETX \ETX(\v2\".utxorpc.v1alpha.watch.TxPredicateR\ENQallOf\DC29\n\
    \\ACKany_of\CAN\EOT \ETX(\v2\".utxorpc.v1alpha.watch.TxPredicateR\ENQanyOf\"\204\SOH\n\
    \\SOWatchTxRequest\DC2@\n\
    \\tpredicate\CAN\SOH \SOH(\v2\".utxorpc.v1alpha.watch.TxPredicateR\tpredicate\DC29\n\
    \\n\
    \field_mask\CAN\STX \SOH(\v2\SUB.google.protobuf.FieldMaskR\tfieldMask\DC2=\n\
    \\tintersect\CAN\ETX \ETX(\v2\US.utxorpc.v1alpha.watch.BlockRefR\tintersect\"N\n\
    \\n\
    \AnyChainTx\DC27\n\
    \\acardano\CAN\SOH \SOH(\v2\ESC.utxorpc.v1alpha.cardano.TxH\NULR\acardanoB\a\n\
    \\ENQchain\"\143\SOH\n\
    \\SIWatchTxResponse\DC29\n\
    \\ENQapply\CAN\SOH \SOH(\v2!.utxorpc.v1alpha.watch.AnyChainTxH\NULR\ENQapply\DC27\n\
    \\EOTundo\CAN\STX \SOH(\v2!.utxorpc.v1alpha.watch.AnyChainTxH\NULR\EOTundoB\b\n\
    \\ACKaction2j\n\
    \\fWatchService\DC2Z\n\
    \\aWatchTx\DC2%.utxorpc.v1alpha.watch.WatchTxRequest\SUB&.utxorpc.v1alpha.watch.WatchTxResponse0\SOHB\210\SOH\n\
    \\EMcom.utxorpc.v1alpha.watchB\n\
    \WatchProtoP\SOHZ3github.com/utxorpc/go-codegen/utxorpc/v1alpha/watch\162\STX\ETXUVW\170\STX\NAKUtxorpc.V1alpha.Watch\202\STX\NAKUtxorpc\\V1alpha\\Watch\226\STX!Utxorpc\\V1alpha\\Watch\\GPBMetadata\234\STX\ETBUtxorpc::V1alpha::WatchJ\159\DC1\n\
    \\ACK\DC2\EOT\NUL\NUL5\SOH\n\
    \\b\n\
    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\
    \\b\n\
    \\SOH\STX\DC2\ETX\STX\NUL\RS\n\
    \\t\n\
    \\STX\ETX\NUL\DC2\ETX\EOT\NUL*\n\
    \\t\n\
    \\STX\ETX\SOH\DC2\ETX\ENQ\NUL/\n\
    \8\n\
    \\STX\EOT\NUL\DC2\EOT\b\NUL\v\SOH\SUB, Represents a reference to a specific block\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\SOH\DC2\ETX\b\b\DLE\n\
    \B\n\
    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\t\STX\DC3\"5 Height or slot number (depending on the blockchain)\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\t\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\t\t\SO\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\t\DC1\DC2\n\
    \/\n\
    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\n\
    \\STX\DC1\"\" Hash of the content of the block\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\n\
    \\STX\a\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\n\
    \\b\f\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\n\
    \\SI\DLE\n\
    \D\n\
    \\STX\EOT\SOH\DC2\EOT\SO\NUL\DC2\SOH\SUB8 Represents a tx pattern from any supported blockchain.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\SOH\SOH\DC2\ETX\SO\b\EM\n\
    \\f\n\
    \\EOT\EOT\SOH\b\NUL\DC2\EOT\SI\STX\DC1\ETX\n\
    \\f\n\
    \\ENQ\EOT\SOH\b\NUL\SOH\DC2\ETX\SI\b\r\n\
    \$\n\
    \\EOT\EOT\SOH\STX\NUL\DC2\ETX\DLE\EOT2\"\ETB A Cardano tx pattern.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ACK\DC2\ETX\DLE\EOT%\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\DLE&-\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\DLE01\n\
    \\\\n\
    \\STX\EOT\STX\DC2\EOT\NAK\NUL\SUB\SOH\SUBP Represents a simple tx predicate that can composed to create more complex ones\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\STX\SOH\DC2\ETX\NAK\b\DC3\n\
    \8\n\
    \\EOT\EOT\STX\STX\NUL\DC2\ETX\SYN\STX\RS\"+ Predicate is true if tx exhibits pattern.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\ACK\DC2\ETX\SYN\STX\DC3\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX\SYN\DC4\EM\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX\SYN\FS\GS\n\
    \?\n\
    \\EOT\EOT\STX\STX\SOH\DC2\ETX\ETB\STX\US\"2 Predicate is true if tx doesn't exhibit pattern.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SOH\EOT\DC2\ETX\ETB\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SOH\ACK\DC2\ETX\ETB\v\SYN\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SOH\SOH\DC2\ETX\ETB\ETB\SUB\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SOH\ETX\DC2\ETX\ETB\GS\RS\n\
    \D\n\
    \\EOT\EOT\STX\STX\STX\DC2\ETX\CAN\STX\"\"7 Predicate is true if tx exhibits all of the patterns.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\STX\EOT\DC2\ETX\CAN\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\STX\ACK\DC2\ETX\CAN\v\SYN\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\STX\SOH\DC2\ETX\CAN\ETB\GS\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\STX\ETX\DC2\ETX\CAN !\n\
    \D\n\
    \\EOT\EOT\STX\STX\ETX\DC2\ETX\EM\STX\"\"7 Predicate is true if tx exhibits any of the patterns.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ETX\EOT\DC2\ETX\EM\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ETX\ACK\DC2\ETX\EM\v\SYN\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ETX\SOH\DC2\ETX\EM\ETB\GS\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ETX\ETX\DC2\ETX\EM !\n\
    \X\n\
    \\STX\EOT\ETX\DC2\EOT\GS\NUL!\SOH\SUBL Request to watch transactions from the chain based on a set of predicates.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\ETX\SOH\DC2\ETX\GS\b\SYN\n\
    \3\n\
    \\EOT\EOT\ETX\STX\NUL\DC2\ETX\RS\STX\FS\"& Predicate to filter transactions by.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\NUL\ACK\DC2\ETX\RS\STX\r\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\NUL\SOH\DC2\ETX\RS\SO\ETB\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\NUL\ETX\DC2\ETX\RS\SUB\ESC\n\
    \7\n\
    \\EOT\EOT\ETX\STX\SOH\DC2\ETX\US\STX+\"* Field mask to selectively return fields.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\SOH\ACK\DC2\ETX\US\STX\ESC\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\SOH\SOH\DC2\ETX\US\FS&\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\SOH\ETX\DC2\ETX\US)*\n\
    \A\n\
    \\EOT\EOT\ETX\STX\STX\DC2\ETX \STX\"\"4 List of block references to find the intersection.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\STX\EOT\DC2\ETX \STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\STX\ACK\DC2\ETX \v\DC3\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\STX\SOH\DC2\ETX \DC4\GS\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\STX\ETX\DC2\ETX  !\n\
    \E\n\
    \\STX\EOT\EOT\DC2\EOT$\NUL(\SOH\SUB9 Represents a transaction from any supported blockchain.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\EOT\SOH\DC2\ETX$\b\DC2\n\
    \\f\n\
    \\EOT\EOT\EOT\b\NUL\DC2\EOT%\STX'\ETX\n\
    \\f\n\
    \\ENQ\EOT\EOT\b\NUL\SOH\DC2\ETX%\b\r\n\
    \%\n\
    \\EOT\EOT\EOT\STX\NUL\DC2\ETX&\EOT+\"\CAN A Cardano transaction.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\EOT\STX\NUL\ACK\DC2\ETX&\EOT\RS\n\
    \\f\n\
    \\ENQ\EOT\EOT\STX\NUL\SOH\DC2\ETX&\US&\n\
    \\f\n\
    \\ENQ\EOT\EOT\STX\NUL\ETX\DC2\ETX&)*\n\
    \B\n\
    \\STX\EOT\ENQ\DC2\EOT+\NUL0\SOH\SUB6 Response containing the matching chain transactions.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\ENQ\SOH\DC2\ETX+\b\ETB\n\
    \\f\n\
    \\EOT\EOT\ENQ\b\NUL\DC2\EOT,\STX/\ETX\n\
    \\f\n\
    \\ENQ\EOT\ENQ\b\NUL\SOH\DC2\ETX,\b\SO\n\
    \&\n\
    \\EOT\EOT\ENQ\STX\NUL\DC2\ETX-\EOT\EM\"\EM Apply this transaction.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\ENQ\STX\NUL\ACK\DC2\ETX-\EOT\SO\n\
    \\f\n\
    \\ENQ\EOT\ENQ\STX\NUL\SOH\DC2\ETX-\SI\DC4\n\
    \\f\n\
    \\ENQ\EOT\ENQ\STX\NUL\ETX\DC2\ETX-\ETB\CAN\n\
    \%\n\
    \\EOT\EOT\ENQ\STX\SOH\DC2\ETX.\EOT\CAN\"\CAN Undo this transaction.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\ENQ\STX\SOH\ACK\DC2\ETX.\EOT\SO\n\
    \\f\n\
    \\ENQ\EOT\ENQ\STX\SOH\SOH\DC2\ETX.\SI\DC3\n\
    \\f\n\
    \\ENQ\EOT\ENQ\STX\SOH\ETX\DC2\ETX.\SYN\ETB\n\
    \O\n\
    \\STX\ACK\NUL\DC2\EOT3\NUL5\SOH\SUBC Service definition for watching transactions based on predicates.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\ACK\NUL\SOH\DC2\ETX3\b\DC4\n\
    \T\n\
    \\EOT\ACK\NUL\STX\NUL\DC2\ETX4\STX?\"G Stream transactions from the chain matching the specified predicates.\n\
    \\n\
    \\f\n\
    \\ENQ\ACK\NUL\STX\NUL\SOH\DC2\ETX4\ACK\r\n\
    \\f\n\
    \\ENQ\ACK\NUL\STX\NUL\STX\DC2\ETX4\SO\FS\n\
    \\f\n\
    \\ENQ\ACK\NUL\STX\NUL\ACK\DC2\ETX4'-\n\
    \\f\n\
    \\ENQ\ACK\NUL\STX\NUL\ETX\DC2\ETX4.=b\ACKproto3"