{- This file was auto-generated from btc_lsp/method/swap_from_ln.proto by the proto-lens-protoc program. -}
{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies, DeriveGeneric#-}
{-# OPTIONS_GHC -Wno-unused-imports#-}
{-# OPTIONS_GHC -Wno-duplicate-exports#-}
{-# OPTIONS_GHC -Wno-dodgy-exports#-}
module Proto.BtcLsp.Method.SwapFromLn (
        Request(), Response(), Response'Either(..), _Response'Success',
        _Response'Failure', Response'Failure(),
        Response'Failure'InputFailure(..), Response'Failure'InputFailure(),
        Response'Failure'InputFailure'UnrecognizedValue, Response'Success()
    ) 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 Text.PrettyPrint.GenericPretty.Instance
import qualified GHC.Generics
import qualified Text.PrettyPrint.GenericPretty
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.BtcLsp.Data.HighLevel
{- | Fields :
     
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.ctx' @:: Lens' Request Proto.BtcLsp.Data.HighLevel.Ctx@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.maybe'ctx' @:: Lens' Request (Prelude.Maybe Proto.BtcLsp.Data.HighLevel.Ctx)@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.fundMoney' @:: Lens' Request Proto.BtcLsp.Data.HighLevel.FundMoney@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.maybe'fundMoney' @:: Lens' Request (Prelude.Maybe Proto.BtcLsp.Data.HighLevel.FundMoney)@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.fundOnChainAddress' @:: Lens' Request Proto.BtcLsp.Data.HighLevel.FundOnChainAddress@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.maybe'fundOnChainAddress' @:: Lens' Request (Prelude.Maybe Proto.BtcLsp.Data.HighLevel.FundOnChainAddress)@ -}
data Request
  = Request'_constructor {Request -> Maybe Ctx
_Request'ctx :: !(Prelude.Maybe Proto.BtcLsp.Data.HighLevel.Ctx),
                          Request -> Maybe FundMoney
_Request'fundMoney :: !(Prelude.Maybe Proto.BtcLsp.Data.HighLevel.FundMoney),
                          Request -> Maybe FundOnChainAddress
_Request'fundOnChainAddress :: !(Prelude.Maybe Proto.BtcLsp.Data.HighLevel.FundOnChainAddress),
                          Request -> FieldSet
_Request'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Request -> Request -> Bool
(Request -> Request -> Bool)
-> (Request -> Request -> Bool) -> Eq Request
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Request -> Request -> Bool
$c/= :: Request -> Request -> Bool
== :: Request -> Request -> Bool
$c== :: Request -> Request -> Bool
Prelude.Eq, Eq Request
Eq Request
-> (Request -> Request -> Ordering)
-> (Request -> Request -> Bool)
-> (Request -> Request -> Bool)
-> (Request -> Request -> Bool)
-> (Request -> Request -> Bool)
-> (Request -> Request -> Request)
-> (Request -> Request -> Request)
-> Ord Request
Request -> Request -> Bool
Request -> Request -> Ordering
Request -> Request -> Request
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Request -> Request -> Request
$cmin :: Request -> Request -> Request
max :: Request -> Request -> Request
$cmax :: Request -> Request -> Request
>= :: Request -> Request -> Bool
$c>= :: Request -> Request -> Bool
> :: Request -> Request -> Bool
$c> :: Request -> Request -> Bool
<= :: Request -> Request -> Bool
$c<= :: Request -> Request -> Bool
< :: Request -> Request -> Bool
$c< :: Request -> Request -> Bool
compare :: Request -> Request -> Ordering
$ccompare :: Request -> Request -> Ordering
Prelude.Ord, (forall x. Request -> Rep Request x)
-> (forall x. Rep Request x -> Request) -> Generic Request
forall x. Rep Request x -> Request
forall x. Request -> Rep Request x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Request x -> Request
$cfrom :: forall x. Request -> Rep Request x
GHC.Generics.Generic)
instance Prelude.Show Request where
  showsPrec :: Int -> Request -> ShowS
showsPrec Int
_ Request
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (Request -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Request
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Text.PrettyPrint.GenericPretty.Out Request
instance Data.ProtoLens.Field.HasField Request "ctx" Proto.BtcLsp.Data.HighLevel.Ctx where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "ctx" -> (Ctx -> f Ctx) -> Request -> f Request
fieldOf Proxy# "ctx"
_
    = ((Maybe Ctx -> f (Maybe Ctx)) -> Request -> f Request)
-> ((Ctx -> f Ctx) -> Maybe Ctx -> f (Maybe Ctx))
-> (Ctx -> f Ctx)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Request -> Maybe Ctx)
-> (Request -> Maybe Ctx -> Request)
-> Lens Request Request (Maybe Ctx) (Maybe Ctx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Request -> Maybe Ctx
_Request'ctx (\ Request
x__ Maybe Ctx
y__ -> Request
x__ {_Request'ctx :: Maybe Ctx
_Request'ctx = Maybe Ctx
y__}))
        (Ctx -> Lens' (Maybe Ctx) Ctx
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Ctx
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Request "maybe'ctx" (Prelude.Maybe Proto.BtcLsp.Data.HighLevel.Ctx) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'ctx"
-> (Maybe Ctx -> f (Maybe Ctx)) -> Request -> f Request
fieldOf Proxy# "maybe'ctx"
_
    = ((Maybe Ctx -> f (Maybe Ctx)) -> Request -> f Request)
-> ((Maybe Ctx -> f (Maybe Ctx)) -> Maybe Ctx -> f (Maybe Ctx))
-> (Maybe Ctx -> f (Maybe Ctx))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Request -> Maybe Ctx)
-> (Request -> Maybe Ctx -> Request)
-> Lens Request Request (Maybe Ctx) (Maybe Ctx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Request -> Maybe Ctx
_Request'ctx (\ Request
x__ Maybe Ctx
y__ -> Request
x__ {_Request'ctx :: Maybe Ctx
_Request'ctx = Maybe Ctx
y__}))
        (Maybe Ctx -> f (Maybe Ctx)) -> Maybe Ctx -> f (Maybe Ctx)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Request "fundMoney" Proto.BtcLsp.Data.HighLevel.FundMoney where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "fundMoney"
-> (FundMoney -> f FundMoney) -> Request -> f Request
fieldOf Proxy# "fundMoney"
_
    = ((Maybe FundMoney -> f (Maybe FundMoney)) -> Request -> f Request)
-> ((FundMoney -> f FundMoney)
    -> Maybe FundMoney -> f (Maybe FundMoney))
-> (FundMoney -> f FundMoney)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Request -> Maybe FundMoney)
-> (Request -> Maybe FundMoney -> Request)
-> Lens Request Request (Maybe FundMoney) (Maybe FundMoney)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Request -> Maybe FundMoney
_Request'fundMoney (\ Request
x__ Maybe FundMoney
y__ -> Request
x__ {_Request'fundMoney :: Maybe FundMoney
_Request'fundMoney = Maybe FundMoney
y__}))
        (FundMoney -> Lens' (Maybe FundMoney) FundMoney
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens FundMoney
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Request "maybe'fundMoney" (Prelude.Maybe Proto.BtcLsp.Data.HighLevel.FundMoney) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'fundMoney"
-> (Maybe FundMoney -> f (Maybe FundMoney)) -> Request -> f Request
fieldOf Proxy# "maybe'fundMoney"
_
    = ((Maybe FundMoney -> f (Maybe FundMoney)) -> Request -> f Request)
-> ((Maybe FundMoney -> f (Maybe FundMoney))
    -> Maybe FundMoney -> f (Maybe FundMoney))
-> (Maybe FundMoney -> f (Maybe FundMoney))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Request -> Maybe FundMoney)
-> (Request -> Maybe FundMoney -> Request)
-> Lens Request Request (Maybe FundMoney) (Maybe FundMoney)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Request -> Maybe FundMoney
_Request'fundMoney (\ Request
x__ Maybe FundMoney
y__ -> Request
x__ {_Request'fundMoney :: Maybe FundMoney
_Request'fundMoney = Maybe FundMoney
y__}))
        (Maybe FundMoney -> f (Maybe FundMoney))
-> Maybe FundMoney -> f (Maybe FundMoney)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Request "fundOnChainAddress" Proto.BtcLsp.Data.HighLevel.FundOnChainAddress where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "fundOnChainAddress"
-> (FundOnChainAddress -> f FundOnChainAddress)
-> Request
-> f Request
fieldOf Proxy# "fundOnChainAddress"
_
    = ((Maybe FundOnChainAddress -> f (Maybe FundOnChainAddress))
 -> Request -> f Request)
-> ((FundOnChainAddress -> f FundOnChainAddress)
    -> Maybe FundOnChainAddress -> f (Maybe FundOnChainAddress))
-> (FundOnChainAddress -> f FundOnChainAddress)
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Request -> Maybe FundOnChainAddress)
-> (Request -> Maybe FundOnChainAddress -> Request)
-> Lens
     Request
     Request
     (Maybe FundOnChainAddress)
     (Maybe FundOnChainAddress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Request -> Maybe FundOnChainAddress
_Request'fundOnChainAddress
           (\ Request
x__ Maybe FundOnChainAddress
y__ -> Request
x__ {_Request'fundOnChainAddress :: Maybe FundOnChainAddress
_Request'fundOnChainAddress = Maybe FundOnChainAddress
y__}))
        (FundOnChainAddress
-> Lens' (Maybe FundOnChainAddress) FundOnChainAddress
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens FundOnChainAddress
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Request "maybe'fundOnChainAddress" (Prelude.Maybe Proto.BtcLsp.Data.HighLevel.FundOnChainAddress) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'fundOnChainAddress"
-> (Maybe FundOnChainAddress -> f (Maybe FundOnChainAddress))
-> Request
-> f Request
fieldOf Proxy# "maybe'fundOnChainAddress"
_
    = ((Maybe FundOnChainAddress -> f (Maybe FundOnChainAddress))
 -> Request -> f Request)
-> ((Maybe FundOnChainAddress -> f (Maybe FundOnChainAddress))
    -> Maybe FundOnChainAddress -> f (Maybe FundOnChainAddress))
-> (Maybe FundOnChainAddress -> f (Maybe FundOnChainAddress))
-> Request
-> f Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Request -> Maybe FundOnChainAddress)
-> (Request -> Maybe FundOnChainAddress -> Request)
-> Lens
     Request
     Request
     (Maybe FundOnChainAddress)
     (Maybe FundOnChainAddress)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Request -> Maybe FundOnChainAddress
_Request'fundOnChainAddress
           (\ Request
x__ Maybe FundOnChainAddress
y__ -> Request
x__ {_Request'fundOnChainAddress :: Maybe FundOnChainAddress
_Request'fundOnChainAddress = Maybe FundOnChainAddress
y__}))
        (Maybe FundOnChainAddress -> f (Maybe FundOnChainAddress))
-> Maybe FundOnChainAddress -> f (Maybe FundOnChainAddress)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Request where
  messageName :: Proxy Request -> Text
messageName Proxy Request
_ = String -> Text
Data.Text.pack String
"BtcLsp.Method.SwapFromLn.Request"
  packedMessageDescriptor :: Proxy Request -> ByteString
packedMessageDescriptor Proxy Request
_
    = ByteString
"\n\
      \\aRequest\DC2,\n\
      \\ETXctx\CAN\SOH \SOH(\v2\SUB.BtcLsp.Data.HighLevel.CtxR\ETXctx\DC2?\n\
      \\n\
      \fund_money\CAN\STX \SOH(\v2 .BtcLsp.Data.HighLevel.FundMoneyR\tfundMoney\DC2\\\n\
      \\NAKfund_on_chain_address\CAN\ETX \SOH(\v2).BtcLsp.Data.HighLevel.FundOnChainAddressR\DC2fundOnChainAddress"
  packedFileDescriptor :: Proxy Request -> ByteString
packedFileDescriptor Proxy Request
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor Request)
fieldsByTag
    = let
        ctx__field_descriptor :: FieldDescriptor Request
ctx__field_descriptor
          = String
-> FieldTypeDescriptor Ctx
-> FieldAccessor Request Ctx
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"ctx"
              (MessageOrGroup -> FieldTypeDescriptor Ctx
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.BtcLsp.Data.HighLevel.Ctx)
              (Lens Request Request (Maybe Ctx) (Maybe Ctx)
-> FieldAccessor Request Ctx
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'ctx")) ::
              Data.ProtoLens.FieldDescriptor Request
        fundMoney__field_descriptor :: FieldDescriptor Request
fundMoney__field_descriptor
          = String
-> FieldTypeDescriptor FundMoney
-> FieldAccessor Request FundMoney
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"fund_money"
              (MessageOrGroup -> FieldTypeDescriptor FundMoney
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.BtcLsp.Data.HighLevel.FundMoney)
              (Lens Request Request (Maybe FundMoney) (Maybe FundMoney)
-> FieldAccessor Request FundMoney
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'fundMoney")) ::
              Data.ProtoLens.FieldDescriptor Request
        fundOnChainAddress__field_descriptor :: FieldDescriptor Request
fundOnChainAddress__field_descriptor
          = String
-> FieldTypeDescriptor FundOnChainAddress
-> FieldAccessor Request FundOnChainAddress
-> FieldDescriptor Request
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"fund_on_chain_address"
              (MessageOrGroup -> FieldTypeDescriptor FundOnChainAddress
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.BtcLsp.Data.HighLevel.FundOnChainAddress)
              (Lens
  Request
  Request
  (Maybe FundOnChainAddress)
  (Maybe FundOnChainAddress)
-> FieldAccessor Request FundOnChainAddress
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'fundOnChainAddress")) ::
              Data.ProtoLens.FieldDescriptor Request
      in
        [(Tag, FieldDescriptor Request)]
-> Map Tag (FieldDescriptor Request)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor Request
ctx__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor Request
fundMoney__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
3, FieldDescriptor Request
fundOnChainAddress__field_descriptor)]
  unknownFields :: Lens' Request FieldSet
unknownFields
    = (Request -> FieldSet)
-> (Request -> FieldSet -> Request) -> Lens' Request FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Request -> FieldSet
_Request'_unknownFields
        (\ Request
x__ FieldSet
y__ -> Request
x__ {_Request'_unknownFields :: FieldSet
_Request'_unknownFields = FieldSet
y__})
  defMessage :: Request
defMessage
    = Request'_constructor :: Maybe Ctx
-> Maybe FundMoney
-> Maybe FundOnChainAddress
-> FieldSet
-> Request
Request'_constructor
        {_Request'ctx :: Maybe Ctx
_Request'ctx = Maybe Ctx
forall a. Maybe a
Prelude.Nothing,
         _Request'fundMoney :: Maybe FundMoney
_Request'fundMoney = Maybe FundMoney
forall a. Maybe a
Prelude.Nothing,
         _Request'fundOnChainAddress :: Maybe FundOnChainAddress
_Request'fundOnChainAddress = Maybe FundOnChainAddress
forall a. Maybe a
Prelude.Nothing,
         _Request'_unknownFields :: FieldSet
_Request'_unknownFields = []}
  parseMessage :: Parser Request
parseMessage
    = let
        loop :: Request -> Data.ProtoLens.Encoding.Bytes.Parser Request
        loop :: Request -> Parser Request
loop Request
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      Request -> Parser Request
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Request Request FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Request -> Request
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter Request Request FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Request
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do Ctx
y <- Parser Ctx -> String -> Parser Ctx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser Ctx -> Parser Ctx
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 Ctx
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"ctx"
                                Request -> Parser Request
loop (Setter Request Request Ctx Ctx -> Ctx -> Request -> Request
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 @"ctx") Ctx
y Request
x)
                        Word64
18
                          -> do FundMoney
y <- Parser FundMoney -> String -> Parser FundMoney
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser FundMoney -> Parser FundMoney
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 FundMoney
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"fund_money"
                                Request -> Parser Request
loop
                                  (Setter Request Request FundMoney FundMoney
-> FundMoney -> Request -> Request
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 @"fundMoney") FundMoney
y Request
x)
                        Word64
26
                          -> do FundOnChainAddress
y <- Parser FundOnChainAddress -> String -> Parser FundOnChainAddress
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser FundOnChainAddress -> Parser FundOnChainAddress
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 FundOnChainAddress
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"fund_on_chain_address"
                                Request -> Parser Request
loop
                                  (Setter Request Request FundOnChainAddress FundOnChainAddress
-> FundOnChainAddress -> Request -> Request
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 @"fundOnChainAddress") FundOnChainAddress
y Request
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Request -> Parser Request
loop
                                  (Setter Request Request FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Request -> Request
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter Request Request FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Request
x)
      in
        Parser Request -> String -> Parser Request
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Request -> Parser Request
loop Request
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"Request"
  buildMessage :: Request -> Builder
buildMessage
    = \ Request
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (case
                  FoldLike (Maybe Ctx) Request Request (Maybe Ctx) (Maybe Ctx)
-> Request -> Maybe Ctx
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'ctx") Request
_x
              of
                Maybe Ctx
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                (Prelude.Just Ctx
_v)
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                       ((ByteString -> Builder) -> (Ctx -> ByteString) -> Ctx -> 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))
                          Ctx -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage Ctx
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (case
                     FoldLike
  (Maybe FundMoney)
  Request
  Request
  (Maybe FundMoney)
  (Maybe FundMoney)
-> Request -> Maybe FundMoney
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'fundMoney") Request
_x
                 of
                   Maybe FundMoney
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   (Prelude.Just FundMoney
_v)
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
18)
                          ((ByteString -> Builder)
-> (FundMoney -> ByteString) -> FundMoney -> 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))
                             FundMoney -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage FundMoney
_v))
                (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                   (case
                        FoldLike
  (Maybe FundOnChainAddress)
  Request
  Request
  (Maybe FundOnChainAddress)
  (Maybe FundOnChainAddress)
-> Request -> Maybe FundOnChainAddress
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'fundOnChainAddress") Request
_x
                    of
                      Maybe FundOnChainAddress
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                      (Prelude.Just FundOnChainAddress
_v)
                        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                             (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
26)
                             ((ByteString -> Builder)
-> (FundOnChainAddress -> ByteString)
-> FundOnChainAddress
-> 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))
                                FundOnChainAddress -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage FundOnChainAddress
_v))
                   (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (FoldLike FieldSet Request Request FieldSet FieldSet
-> Request -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Request Request FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Request
_x))))
instance Control.DeepSeq.NFData Request where
  rnf :: Request -> ()
rnf
    = \ Request
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Request -> FieldSet
_Request'_unknownFields Request
x__)
             (Maybe Ctx -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (Request -> Maybe Ctx
_Request'ctx Request
x__)
                (Maybe FundMoney -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (Request -> Maybe FundMoney
_Request'fundMoney Request
x__)
                   (Maybe FundOnChainAddress -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Request -> Maybe FundOnChainAddress
_Request'fundOnChainAddress Request
x__) ())))
{- | Fields :
     
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.ctx' @:: Lens' Response Proto.BtcLsp.Data.HighLevel.Ctx@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.maybe'ctx' @:: Lens' Response (Prelude.Maybe Proto.BtcLsp.Data.HighLevel.Ctx)@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.maybe'either' @:: Lens' Response (Prelude.Maybe Response'Either)@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.maybe'success' @:: Lens' Response (Prelude.Maybe Response'Success)@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.success' @:: Lens' Response Response'Success@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.maybe'failure' @:: Lens' Response (Prelude.Maybe Response'Failure)@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.failure' @:: Lens' Response Response'Failure@ -}
data Response
  = Response'_constructor {Response -> Maybe Ctx
_Response'ctx :: !(Prelude.Maybe Proto.BtcLsp.Data.HighLevel.Ctx),
                           Response -> Maybe Response'Either
_Response'either :: !(Prelude.Maybe Response'Either),
                           Response -> FieldSet
_Response'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Response -> Response -> Bool
(Response -> Response -> Bool)
-> (Response -> Response -> Bool) -> Eq Response
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Response -> Response -> Bool
$c/= :: Response -> Response -> Bool
== :: Response -> Response -> Bool
$c== :: Response -> Response -> Bool
Prelude.Eq, Eq Response
Eq Response
-> (Response -> Response -> Ordering)
-> (Response -> Response -> Bool)
-> (Response -> Response -> Bool)
-> (Response -> Response -> Bool)
-> (Response -> Response -> Bool)
-> (Response -> Response -> Response)
-> (Response -> Response -> Response)
-> Ord Response
Response -> Response -> Bool
Response -> Response -> Ordering
Response -> Response -> Response
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Response -> Response -> Response
$cmin :: Response -> Response -> Response
max :: Response -> Response -> Response
$cmax :: Response -> Response -> Response
>= :: Response -> Response -> Bool
$c>= :: Response -> Response -> Bool
> :: Response -> Response -> Bool
$c> :: Response -> Response -> Bool
<= :: Response -> Response -> Bool
$c<= :: Response -> Response -> Bool
< :: Response -> Response -> Bool
$c< :: Response -> Response -> Bool
compare :: Response -> Response -> Ordering
$ccompare :: Response -> Response -> Ordering
Prelude.Ord, (forall x. Response -> Rep Response x)
-> (forall x. Rep Response x -> Response) -> Generic Response
forall x. Rep Response x -> Response
forall x. Response -> Rep Response x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Response x -> Response
$cfrom :: forall x. Response -> Rep Response x
GHC.Generics.Generic)
instance Prelude.Show Response where
  showsPrec :: Int -> Response -> ShowS
showsPrec Int
_ Response
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (Response -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Response
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Text.PrettyPrint.GenericPretty.Out Response
data Response'Either
  = Response'Success' !Response'Success |
    Response'Failure' !Response'Failure
  deriving stock (Int -> Response'Either -> ShowS
[Response'Either] -> ShowS
Response'Either -> String
(Int -> Response'Either -> ShowS)
-> (Response'Either -> String)
-> ([Response'Either] -> ShowS)
-> Show Response'Either
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Response'Either] -> ShowS
$cshowList :: [Response'Either] -> ShowS
show :: Response'Either -> String
$cshow :: Response'Either -> String
showsPrec :: Int -> Response'Either -> ShowS
$cshowsPrec :: Int -> Response'Either -> ShowS
Prelude.Show,
                  Response'Either -> Response'Either -> Bool
(Response'Either -> Response'Either -> Bool)
-> (Response'Either -> Response'Either -> Bool)
-> Eq Response'Either
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Response'Either -> Response'Either -> Bool
$c/= :: Response'Either -> Response'Either -> Bool
== :: Response'Either -> Response'Either -> Bool
$c== :: Response'Either -> Response'Either -> Bool
Prelude.Eq,
                  Eq Response'Either
Eq Response'Either
-> (Response'Either -> Response'Either -> Ordering)
-> (Response'Either -> Response'Either -> Bool)
-> (Response'Either -> Response'Either -> Bool)
-> (Response'Either -> Response'Either -> Bool)
-> (Response'Either -> Response'Either -> Bool)
-> (Response'Either -> Response'Either -> Response'Either)
-> (Response'Either -> Response'Either -> Response'Either)
-> Ord Response'Either
Response'Either -> Response'Either -> Bool
Response'Either -> Response'Either -> Ordering
Response'Either -> Response'Either -> Response'Either
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Response'Either -> Response'Either -> Response'Either
$cmin :: Response'Either -> Response'Either -> Response'Either
max :: Response'Either -> Response'Either -> Response'Either
$cmax :: Response'Either -> Response'Either -> Response'Either
>= :: Response'Either -> Response'Either -> Bool
$c>= :: Response'Either -> Response'Either -> Bool
> :: Response'Either -> Response'Either -> Bool
$c> :: Response'Either -> Response'Either -> Bool
<= :: Response'Either -> Response'Either -> Bool
$c<= :: Response'Either -> Response'Either -> Bool
< :: Response'Either -> Response'Either -> Bool
$c< :: Response'Either -> Response'Either -> Bool
compare :: Response'Either -> Response'Either -> Ordering
$ccompare :: Response'Either -> Response'Either -> Ordering
Prelude.Ord,
                  (forall x. Response'Either -> Rep Response'Either x)
-> (forall x. Rep Response'Either x -> Response'Either)
-> Generic Response'Either
forall x. Rep Response'Either x -> Response'Either
forall x. Response'Either -> Rep Response'Either x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Response'Either x -> Response'Either
$cfrom :: forall x. Response'Either -> Rep Response'Either x
GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out Response'Either
instance Data.ProtoLens.Field.HasField Response "ctx" Proto.BtcLsp.Data.HighLevel.Ctx where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "ctx" -> (Ctx -> f Ctx) -> Response -> f Response
fieldOf Proxy# "ctx"
_
    = ((Maybe Ctx -> f (Maybe Ctx)) -> Response -> f Response)
-> ((Ctx -> f Ctx) -> Maybe Ctx -> f (Maybe Ctx))
-> (Ctx -> f Ctx)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response -> Maybe Ctx)
-> (Response -> Maybe Ctx -> Response)
-> Lens Response Response (Maybe Ctx) (Maybe Ctx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response -> Maybe Ctx
_Response'ctx (\ Response
x__ Maybe Ctx
y__ -> Response
x__ {_Response'ctx :: Maybe Ctx
_Response'ctx = Maybe Ctx
y__}))
        (Ctx -> Lens' (Maybe Ctx) Ctx
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Ctx
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Response "maybe'ctx" (Prelude.Maybe Proto.BtcLsp.Data.HighLevel.Ctx) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'ctx"
-> (Maybe Ctx -> f (Maybe Ctx)) -> Response -> f Response
fieldOf Proxy# "maybe'ctx"
_
    = ((Maybe Ctx -> f (Maybe Ctx)) -> Response -> f Response)
-> ((Maybe Ctx -> f (Maybe Ctx)) -> Maybe Ctx -> f (Maybe Ctx))
-> (Maybe Ctx -> f (Maybe Ctx))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response -> Maybe Ctx)
-> (Response -> Maybe Ctx -> Response)
-> Lens Response Response (Maybe Ctx) (Maybe Ctx)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response -> Maybe Ctx
_Response'ctx (\ Response
x__ Maybe Ctx
y__ -> Response
x__ {_Response'ctx :: Maybe Ctx
_Response'ctx = Maybe Ctx
y__}))
        (Maybe Ctx -> f (Maybe Ctx)) -> Maybe Ctx -> f (Maybe Ctx)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Response "maybe'either" (Prelude.Maybe Response'Either) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'either"
-> (Maybe Response'Either -> f (Maybe Response'Either))
-> Response
-> f Response
fieldOf Proxy# "maybe'either"
_
    = ((Maybe Response'Either -> f (Maybe Response'Either))
 -> Response -> f Response)
-> ((Maybe Response'Either -> f (Maybe Response'Either))
    -> Maybe Response'Either -> f (Maybe Response'Either))
-> (Maybe Response'Either -> f (Maybe Response'Either))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response -> Maybe Response'Either)
-> (Response -> Maybe Response'Either -> Response)
-> Lens
     Response Response (Maybe Response'Either) (Maybe Response'Either)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response -> Maybe Response'Either
_Response'either (\ Response
x__ Maybe Response'Either
y__ -> Response
x__ {_Response'either :: Maybe Response'Either
_Response'either = Maybe Response'Either
y__}))
        (Maybe Response'Either -> f (Maybe Response'Either))
-> Maybe Response'Either -> f (Maybe Response'Either)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Response "maybe'success" (Prelude.Maybe Response'Success) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'success"
-> (Maybe Response'Success -> f (Maybe Response'Success))
-> Response
-> f Response
fieldOf Proxy# "maybe'success"
_
    = ((Maybe Response'Either -> f (Maybe Response'Either))
 -> Response -> f Response)
-> ((Maybe Response'Success -> f (Maybe Response'Success))
    -> Maybe Response'Either -> f (Maybe Response'Either))
-> (Maybe Response'Success -> f (Maybe Response'Success))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response -> Maybe Response'Either)
-> (Response -> Maybe Response'Either -> Response)
-> Lens
     Response Response (Maybe Response'Either) (Maybe Response'Either)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response -> Maybe Response'Either
_Response'either (\ Response
x__ Maybe Response'Either
y__ -> Response
x__ {_Response'either :: Maybe Response'Either
_Response'either = Maybe Response'Either
y__}))
        ((Maybe Response'Either -> Maybe Response'Success)
-> (Maybe Response'Either
    -> Maybe Response'Success -> Maybe Response'Either)
-> Lens
     (Maybe Response'Either)
     (Maybe Response'Either)
     (Maybe Response'Success)
     (Maybe Response'Success)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           (\ Maybe Response'Either
x__
              -> case Maybe Response'Either
x__ of
                   (Prelude.Just (Response'Success' Response'Success
x__val)) -> Response'Success -> Maybe Response'Success
forall a. a -> Maybe a
Prelude.Just Response'Success
x__val
                   Maybe Response'Either
_otherwise -> Maybe Response'Success
forall a. Maybe a
Prelude.Nothing)
           (\ Maybe Response'Either
_ Maybe Response'Success
y__ -> (Response'Success -> Response'Either)
-> Maybe Response'Success -> Maybe Response'Either
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap Response'Success -> Response'Either
Response'Success' Maybe Response'Success
y__))
instance Data.ProtoLens.Field.HasField Response "success" Response'Success where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "success"
-> (Response'Success -> f Response'Success)
-> Response
-> f Response
fieldOf Proxy# "success"
_
    = ((Maybe Response'Either -> f (Maybe Response'Either))
 -> Response -> f Response)
-> ((Response'Success -> f Response'Success)
    -> Maybe Response'Either -> f (Maybe Response'Either))
-> (Response'Success -> f Response'Success)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response -> Maybe Response'Either)
-> (Response -> Maybe Response'Either -> Response)
-> Lens
     Response Response (Maybe Response'Either) (Maybe Response'Either)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response -> Maybe Response'Either
_Response'either (\ Response
x__ Maybe Response'Either
y__ -> Response
x__ {_Response'either :: Maybe Response'Either
_Response'either = Maybe Response'Either
y__}))
        (((Maybe Response'Success -> f (Maybe Response'Success))
 -> Maybe Response'Either -> f (Maybe Response'Either))
-> ((Response'Success -> f Response'Success)
    -> Maybe Response'Success -> f (Maybe Response'Success))
-> (Response'Success -> f Response'Success)
-> Maybe Response'Either
-> f (Maybe Response'Either)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
           ((Maybe Response'Either -> Maybe Response'Success)
-> (Maybe Response'Either
    -> Maybe Response'Success -> Maybe Response'Either)
-> Lens
     (Maybe Response'Either)
     (Maybe Response'Either)
     (Maybe Response'Success)
     (Maybe Response'Success)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
              (\ Maybe Response'Either
x__
                 -> case Maybe Response'Either
x__ of
                      (Prelude.Just (Response'Success' Response'Success
x__val)) -> Response'Success -> Maybe Response'Success
forall a. a -> Maybe a
Prelude.Just Response'Success
x__val
                      Maybe Response'Either
_otherwise -> Maybe Response'Success
forall a. Maybe a
Prelude.Nothing)
              (\ Maybe Response'Either
_ Maybe Response'Success
y__ -> (Response'Success -> Response'Either)
-> Maybe Response'Success -> Maybe Response'Either
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap Response'Success -> Response'Either
Response'Success' Maybe Response'Success
y__))
           (Response'Success -> Lens' (Maybe Response'Success) Response'Success
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Response'Success
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Response "maybe'failure" (Prelude.Maybe Response'Failure) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'failure"
-> (Maybe Response'Failure -> f (Maybe Response'Failure))
-> Response
-> f Response
fieldOf Proxy# "maybe'failure"
_
    = ((Maybe Response'Either -> f (Maybe Response'Either))
 -> Response -> f Response)
-> ((Maybe Response'Failure -> f (Maybe Response'Failure))
    -> Maybe Response'Either -> f (Maybe Response'Either))
-> (Maybe Response'Failure -> f (Maybe Response'Failure))
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response -> Maybe Response'Either)
-> (Response -> Maybe Response'Either -> Response)
-> Lens
     Response Response (Maybe Response'Either) (Maybe Response'Either)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response -> Maybe Response'Either
_Response'either (\ Response
x__ Maybe Response'Either
y__ -> Response
x__ {_Response'either :: Maybe Response'Either
_Response'either = Maybe Response'Either
y__}))
        ((Maybe Response'Either -> Maybe Response'Failure)
-> (Maybe Response'Either
    -> Maybe Response'Failure -> Maybe Response'Either)
-> Lens
     (Maybe Response'Either)
     (Maybe Response'Either)
     (Maybe Response'Failure)
     (Maybe Response'Failure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           (\ Maybe Response'Either
x__
              -> case Maybe Response'Either
x__ of
                   (Prelude.Just (Response'Failure' Response'Failure
x__val)) -> Response'Failure -> Maybe Response'Failure
forall a. a -> Maybe a
Prelude.Just Response'Failure
x__val
                   Maybe Response'Either
_otherwise -> Maybe Response'Failure
forall a. Maybe a
Prelude.Nothing)
           (\ Maybe Response'Either
_ Maybe Response'Failure
y__ -> (Response'Failure -> Response'Either)
-> Maybe Response'Failure -> Maybe Response'Either
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap Response'Failure -> Response'Either
Response'Failure' Maybe Response'Failure
y__))
instance Data.ProtoLens.Field.HasField Response "failure" Response'Failure where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "failure"
-> (Response'Failure -> f Response'Failure)
-> Response
-> f Response
fieldOf Proxy# "failure"
_
    = ((Maybe Response'Either -> f (Maybe Response'Either))
 -> Response -> f Response)
-> ((Response'Failure -> f Response'Failure)
    -> Maybe Response'Either -> f (Maybe Response'Either))
-> (Response'Failure -> f Response'Failure)
-> Response
-> f Response
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response -> Maybe Response'Either)
-> (Response -> Maybe Response'Either -> Response)
-> Lens
     Response Response (Maybe Response'Either) (Maybe Response'Either)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response -> Maybe Response'Either
_Response'either (\ Response
x__ Maybe Response'Either
y__ -> Response
x__ {_Response'either :: Maybe Response'Either
_Response'either = Maybe Response'Either
y__}))
        (((Maybe Response'Failure -> f (Maybe Response'Failure))
 -> Maybe Response'Either -> f (Maybe Response'Either))
-> ((Response'Failure -> f Response'Failure)
    -> Maybe Response'Failure -> f (Maybe Response'Failure))
-> (Response'Failure -> f Response'Failure)
-> Maybe Response'Either
-> f (Maybe Response'Either)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
           ((Maybe Response'Either -> Maybe Response'Failure)
-> (Maybe Response'Either
    -> Maybe Response'Failure -> Maybe Response'Either)
-> Lens
     (Maybe Response'Either)
     (Maybe Response'Either)
     (Maybe Response'Failure)
     (Maybe Response'Failure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
              (\ Maybe Response'Either
x__
                 -> case Maybe Response'Either
x__ of
                      (Prelude.Just (Response'Failure' Response'Failure
x__val)) -> Response'Failure -> Maybe Response'Failure
forall a. a -> Maybe a
Prelude.Just Response'Failure
x__val
                      Maybe Response'Either
_otherwise -> Maybe Response'Failure
forall a. Maybe a
Prelude.Nothing)
              (\ Maybe Response'Either
_ Maybe Response'Failure
y__ -> (Response'Failure -> Response'Either)
-> Maybe Response'Failure -> Maybe Response'Either
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap Response'Failure -> Response'Either
Response'Failure' Maybe Response'Failure
y__))
           (Response'Failure -> Lens' (Maybe Response'Failure) Response'Failure
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Response'Failure
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message Response where
  messageName :: Proxy Response -> Text
messageName Proxy Response
_ = String -> Text
Data.Text.pack String
"BtcLsp.Method.SwapFromLn.Response"
  packedMessageDescriptor :: Proxy Response -> ByteString
packedMessageDescriptor Proxy Response
_
    = ByteString
"\n\
      \\bResponse\DC2,\n\
      \\ETXctx\CAN\SOH \SOH(\v2\SUB.BtcLsp.Data.HighLevel.CtxR\ETXctx\DC2F\n\
      \\asuccess\CAN\STX \SOH(\v2*.BtcLsp.Method.SwapFromLn.Response.SuccessH\NULR\asuccess\DC2F\n\
      \\afailure\CAN\ETX \SOH(\v2*.BtcLsp.Method.SwapFromLn.Response.FailureH\NULR\afailure\SUBd\n\
      \\aSuccess\DC2Y\n\
      \\DC4fund_ln_hodl_invoice\CAN\SOH \SOH(\v2(.BtcLsp.Data.HighLevel.FundLnHodlInvoiceR\DC1fundLnHodlInvoice\SUB\254\SOH\n\
      \\aFailure\DC2=\n\
      \\ageneric\CAN\SOH \ETX(\v2#.BtcLsp.Data.HighLevel.InputFailureR\ageneric\DC2S\n\
      \\bspecific\CAN\STX \ETX(\SO27.BtcLsp.Method.SwapFromLn.Response.Failure.InputFailureR\bspecific\DC2B\n\
      \\binternal\CAN\ETX \ETX(\v2&.BtcLsp.Data.HighLevel.InternalFailureR\binternal\"\ESC\n\
      \\fInputFailure\DC2\v\n\
      \\aDEFAULT\DLE\NULB\b\n\
      \\ACKeither"
  packedFileDescriptor :: Proxy Response -> ByteString
packedFileDescriptor Proxy Response
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor Response)
fieldsByTag
    = let
        ctx__field_descriptor :: FieldDescriptor Response
ctx__field_descriptor
          = String
-> FieldTypeDescriptor Ctx
-> FieldAccessor Response Ctx
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"ctx"
              (MessageOrGroup -> FieldTypeDescriptor Ctx
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.BtcLsp.Data.HighLevel.Ctx)
              (Lens Response Response (Maybe Ctx) (Maybe Ctx)
-> FieldAccessor Response Ctx
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'ctx")) ::
              Data.ProtoLens.FieldDescriptor Response
        success__field_descriptor :: FieldDescriptor Response
success__field_descriptor
          = String
-> FieldTypeDescriptor Response'Success
-> FieldAccessor Response Response'Success
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"success"
              (MessageOrGroup -> FieldTypeDescriptor Response'Success
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Response'Success)
              (Lens' Response (Maybe Response'Success)
-> FieldAccessor Response Response'Success
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'success")) ::
              Data.ProtoLens.FieldDescriptor Response
        failure__field_descriptor :: FieldDescriptor Response
failure__field_descriptor
          = String
-> FieldTypeDescriptor Response'Failure
-> FieldAccessor Response Response'Failure
-> FieldDescriptor Response
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"failure"
              (MessageOrGroup -> FieldTypeDescriptor Response'Failure
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Response'Failure)
              (Lens' Response (Maybe Response'Failure)
-> FieldAccessor Response Response'Failure
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'failure")) ::
              Data.ProtoLens.FieldDescriptor Response
      in
        [(Tag, FieldDescriptor Response)]
-> Map Tag (FieldDescriptor Response)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor Response
ctx__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor Response
success__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
3, FieldDescriptor Response
failure__field_descriptor)]
  unknownFields :: Lens' Response FieldSet
unknownFields
    = (Response -> FieldSet)
-> (Response -> FieldSet -> Response) -> Lens' Response FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Response -> FieldSet
_Response'_unknownFields
        (\ Response
x__ FieldSet
y__ -> Response
x__ {_Response'_unknownFields :: FieldSet
_Response'_unknownFields = FieldSet
y__})
  defMessage :: Response
defMessage
    = Response'_constructor :: Maybe Ctx -> Maybe Response'Either -> FieldSet -> Response
Response'_constructor
        {_Response'ctx :: Maybe Ctx
_Response'ctx = Maybe Ctx
forall a. Maybe a
Prelude.Nothing,
         _Response'either :: Maybe Response'Either
_Response'either = Maybe Response'Either
forall a. Maybe a
Prelude.Nothing, _Response'_unknownFields :: FieldSet
_Response'_unknownFields = []}
  parseMessage :: Parser Response
parseMessage
    = let
        loop :: Response -> Data.ProtoLens.Encoding.Bytes.Parser Response
        loop :: Response -> Parser Response
loop Response
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      Response -> Parser Response
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Response Response FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Response -> Response
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter Response Response FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Response
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do Ctx
y <- Parser Ctx -> String -> Parser Ctx
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser Ctx -> Parser Ctx
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 Ctx
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"ctx"
                                Response -> Parser Response
loop (Setter Response Response Ctx Ctx -> Ctx -> Response -> Response
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 @"ctx") Ctx
y Response
x)
                        Word64
18
                          -> do Response'Success
y <- Parser Response'Success -> String -> Parser Response'Success
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser Response'Success -> Parser Response'Success
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 Response'Success
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"success"
                                Response -> Parser Response
loop (Setter Response Response Response'Success Response'Success
-> Response'Success -> Response -> Response
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 @"success") Response'Success
y Response
x)
                        Word64
26
                          -> do Response'Failure
y <- Parser Response'Failure -> String -> Parser Response'Failure
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser Response'Failure -> Parser Response'Failure
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 Response'Failure
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"failure"
                                Response -> Parser Response
loop (Setter Response Response Response'Failure Response'Failure
-> Response'Failure -> Response -> Response
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 @"failure") Response'Failure
y Response
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Response -> Parser Response
loop
                                  (Setter Response Response FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Response -> Response
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter Response Response FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Response
x)
      in
        Parser Response -> String -> Parser Response
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Response -> Parser Response
loop Response
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"Response"
  buildMessage :: Response -> Builder
buildMessage
    = \ Response
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (case
                  FoldLike (Maybe Ctx) Response Response (Maybe Ctx) (Maybe Ctx)
-> Response -> Maybe Ctx
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'ctx") Response
_x
              of
                Maybe Ctx
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                (Prelude.Just Ctx
_v)
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                       ((ByteString -> Builder) -> (Ctx -> ByteString) -> Ctx -> 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))
                          Ctx -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage Ctx
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (case
                     FoldLike
  (Maybe Response'Either)
  Response
  Response
  (Maybe Response'Either)
  (Maybe Response'Either)
-> Response -> Maybe Response'Either
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'either") Response
_x
                 of
                   Maybe Response'Either
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   (Prelude.Just (Response'Success' Response'Success
v))
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
18)
                          ((ByteString -> Builder)
-> (Response'Success -> ByteString) -> Response'Success -> 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))
                             Response'Success -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage Response'Success
v)
                   (Prelude.Just (Response'Failure' Response'Failure
v))
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
26)
                          ((ByteString -> Builder)
-> (Response'Failure -> ByteString) -> Response'Failure -> 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))
                             Response'Failure -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage Response'Failure
v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet Response Response FieldSet FieldSet
-> Response -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Response Response FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Response
_x)))
instance Control.DeepSeq.NFData Response where
  rnf :: Response -> ()
rnf
    = \ Response
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Response -> FieldSet
_Response'_unknownFields Response
x__)
             (Maybe Ctx -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (Response -> Maybe Ctx
_Response'ctx Response
x__)
                (Maybe Response'Either -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Response -> Maybe Response'Either
_Response'either Response
x__) ()))
instance Control.DeepSeq.NFData Response'Either where
  rnf :: Response'Either -> ()
rnf (Response'Success' Response'Success
x__) = Response'Success -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf Response'Success
x__
  rnf (Response'Failure' Response'Failure
x__) = Response'Failure -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf Response'Failure
x__
_Response'Success' ::
  Data.ProtoLens.Prism.Prism' Response'Either Response'Success
_Response'Success' :: Prism' Response'Either Response'Success
_Response'Success'
  = (Response'Success -> Response'Either)
-> (Response'Either -> Maybe Response'Success)
-> Prism' Response'Either Response'Success
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
      Response'Success -> Response'Either
Response'Success'
      (\ Response'Either
p__
         -> case Response'Either
p__ of
              (Response'Success' Response'Success
p__val) -> Response'Success -> Maybe Response'Success
forall a. a -> Maybe a
Prelude.Just Response'Success
p__val
              Response'Either
_otherwise -> Maybe Response'Success
forall a. Maybe a
Prelude.Nothing)
_Response'Failure' ::
  Data.ProtoLens.Prism.Prism' Response'Either Response'Failure
_Response'Failure' :: Prism' Response'Either Response'Failure
_Response'Failure'
  = (Response'Failure -> Response'Either)
-> (Response'Either -> Maybe Response'Failure)
-> Prism' Response'Either Response'Failure
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
      Response'Failure -> Response'Either
Response'Failure'
      (\ Response'Either
p__
         -> case Response'Either
p__ of
              (Response'Failure' Response'Failure
p__val) -> Response'Failure -> Maybe Response'Failure
forall a. a -> Maybe a
Prelude.Just Response'Failure
p__val
              Response'Either
_otherwise -> Maybe Response'Failure
forall a. Maybe a
Prelude.Nothing)
{- | Fields :
     
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.generic' @:: Lens' Response'Failure [Proto.BtcLsp.Data.HighLevel.InputFailure]@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.vec'generic' @:: Lens' Response'Failure (Data.Vector.Vector Proto.BtcLsp.Data.HighLevel.InputFailure)@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.specific' @:: Lens' Response'Failure [Response'Failure'InputFailure]@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.vec'specific' @:: Lens' Response'Failure (Data.Vector.Vector Response'Failure'InputFailure)@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.internal' @:: Lens' Response'Failure [Proto.BtcLsp.Data.HighLevel.InternalFailure]@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.vec'internal' @:: Lens' Response'Failure (Data.Vector.Vector Proto.BtcLsp.Data.HighLevel.InternalFailure)@ -}
data Response'Failure
  = Response'Failure'_constructor {Response'Failure -> Vector InputFailure
_Response'Failure'generic :: !(Data.Vector.Vector Proto.BtcLsp.Data.HighLevel.InputFailure),
                                   Response'Failure -> Vector Response'Failure'InputFailure
_Response'Failure'specific :: !(Data.Vector.Vector Response'Failure'InputFailure),
                                   Response'Failure -> Vector InternalFailure
_Response'Failure'internal :: !(Data.Vector.Vector Proto.BtcLsp.Data.HighLevel.InternalFailure),
                                   Response'Failure -> FieldSet
_Response'Failure'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Response'Failure -> Response'Failure -> Bool
(Response'Failure -> Response'Failure -> Bool)
-> (Response'Failure -> Response'Failure -> Bool)
-> Eq Response'Failure
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Response'Failure -> Response'Failure -> Bool
$c/= :: Response'Failure -> Response'Failure -> Bool
== :: Response'Failure -> Response'Failure -> Bool
$c== :: Response'Failure -> Response'Failure -> Bool
Prelude.Eq, Eq Response'Failure
Eq Response'Failure
-> (Response'Failure -> Response'Failure -> Ordering)
-> (Response'Failure -> Response'Failure -> Bool)
-> (Response'Failure -> Response'Failure -> Bool)
-> (Response'Failure -> Response'Failure -> Bool)
-> (Response'Failure -> Response'Failure -> Bool)
-> (Response'Failure -> Response'Failure -> Response'Failure)
-> (Response'Failure -> Response'Failure -> Response'Failure)
-> Ord Response'Failure
Response'Failure -> Response'Failure -> Bool
Response'Failure -> Response'Failure -> Ordering
Response'Failure -> Response'Failure -> Response'Failure
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Response'Failure -> Response'Failure -> Response'Failure
$cmin :: Response'Failure -> Response'Failure -> Response'Failure
max :: Response'Failure -> Response'Failure -> Response'Failure
$cmax :: Response'Failure -> Response'Failure -> Response'Failure
>= :: Response'Failure -> Response'Failure -> Bool
$c>= :: Response'Failure -> Response'Failure -> Bool
> :: Response'Failure -> Response'Failure -> Bool
$c> :: Response'Failure -> Response'Failure -> Bool
<= :: Response'Failure -> Response'Failure -> Bool
$c<= :: Response'Failure -> Response'Failure -> Bool
< :: Response'Failure -> Response'Failure -> Bool
$c< :: Response'Failure -> Response'Failure -> Bool
compare :: Response'Failure -> Response'Failure -> Ordering
$ccompare :: Response'Failure -> Response'Failure -> Ordering
Prelude.Ord, (forall x. Response'Failure -> Rep Response'Failure x)
-> (forall x. Rep Response'Failure x -> Response'Failure)
-> Generic Response'Failure
forall x. Rep Response'Failure x -> Response'Failure
forall x. Response'Failure -> Rep Response'Failure x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Response'Failure x -> Response'Failure
$cfrom :: forall x. Response'Failure -> Rep Response'Failure x
GHC.Generics.Generic)
instance Prelude.Show Response'Failure where
  showsPrec :: Int -> Response'Failure -> ShowS
showsPrec Int
_ Response'Failure
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (Response'Failure -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Response'Failure
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Text.PrettyPrint.GenericPretty.Out Response'Failure
instance Data.ProtoLens.Field.HasField Response'Failure "generic" [Proto.BtcLsp.Data.HighLevel.InputFailure] where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "generic"
-> ([InputFailure] -> f [InputFailure])
-> Response'Failure
-> f Response'Failure
fieldOf Proxy# "generic"
_
    = ((Vector InputFailure -> f (Vector InputFailure))
 -> Response'Failure -> f Response'Failure)
-> (([InputFailure] -> f [InputFailure])
    -> Vector InputFailure -> f (Vector InputFailure))
-> ([InputFailure] -> f [InputFailure])
-> Response'Failure
-> f Response'Failure
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response'Failure -> Vector InputFailure)
-> (Response'Failure -> Vector InputFailure -> Response'Failure)
-> Lens
     Response'Failure
     Response'Failure
     (Vector InputFailure)
     (Vector InputFailure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response'Failure -> Vector InputFailure
_Response'Failure'generic
           (\ Response'Failure
x__ Vector InputFailure
y__ -> Response'Failure
x__ {_Response'Failure'generic :: Vector InputFailure
_Response'Failure'generic = Vector InputFailure
y__}))
        ((Vector InputFailure -> [InputFailure])
-> (Vector InputFailure -> [InputFailure] -> Vector InputFailure)
-> Lens
     (Vector InputFailure)
     (Vector InputFailure)
     [InputFailure]
     [InputFailure]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector InputFailure -> [InputFailure]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ Vector InputFailure
_ [InputFailure]
y__ -> [InputFailure] -> Vector InputFailure
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [InputFailure]
y__))
instance Data.ProtoLens.Field.HasField Response'Failure "vec'generic" (Data.Vector.Vector Proto.BtcLsp.Data.HighLevel.InputFailure) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "vec'generic"
-> (Vector InputFailure -> f (Vector InputFailure))
-> Response'Failure
-> f Response'Failure
fieldOf Proxy# "vec'generic"
_
    = ((Vector InputFailure -> f (Vector InputFailure))
 -> Response'Failure -> f Response'Failure)
-> ((Vector InputFailure -> f (Vector InputFailure))
    -> Vector InputFailure -> f (Vector InputFailure))
-> (Vector InputFailure -> f (Vector InputFailure))
-> Response'Failure
-> f Response'Failure
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response'Failure -> Vector InputFailure)
-> (Response'Failure -> Vector InputFailure -> Response'Failure)
-> Lens
     Response'Failure
     Response'Failure
     (Vector InputFailure)
     (Vector InputFailure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response'Failure -> Vector InputFailure
_Response'Failure'generic
           (\ Response'Failure
x__ Vector InputFailure
y__ -> Response'Failure
x__ {_Response'Failure'generic :: Vector InputFailure
_Response'Failure'generic = Vector InputFailure
y__}))
        (Vector InputFailure -> f (Vector InputFailure))
-> Vector InputFailure -> f (Vector InputFailure)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Response'Failure "specific" [Response'Failure'InputFailure] where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "specific"
-> ([Response'Failure'InputFailure]
    -> f [Response'Failure'InputFailure])
-> Response'Failure
-> f Response'Failure
fieldOf Proxy# "specific"
_
    = ((Vector Response'Failure'InputFailure
  -> f (Vector Response'Failure'InputFailure))
 -> Response'Failure -> f Response'Failure)
-> (([Response'Failure'InputFailure]
     -> f [Response'Failure'InputFailure])
    -> Vector Response'Failure'InputFailure
    -> f (Vector Response'Failure'InputFailure))
-> ([Response'Failure'InputFailure]
    -> f [Response'Failure'InputFailure])
-> Response'Failure
-> f Response'Failure
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response'Failure -> Vector Response'Failure'InputFailure)
-> (Response'Failure
    -> Vector Response'Failure'InputFailure -> Response'Failure)
-> Lens
     Response'Failure
     Response'Failure
     (Vector Response'Failure'InputFailure)
     (Vector Response'Failure'InputFailure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response'Failure -> Vector Response'Failure'InputFailure
_Response'Failure'specific
           (\ Response'Failure
x__ Vector Response'Failure'InputFailure
y__ -> Response'Failure
x__ {_Response'Failure'specific :: Vector Response'Failure'InputFailure
_Response'Failure'specific = Vector Response'Failure'InputFailure
y__}))
        ((Vector Response'Failure'InputFailure
 -> [Response'Failure'InputFailure])
-> (Vector Response'Failure'InputFailure
    -> [Response'Failure'InputFailure]
    -> Vector Response'Failure'InputFailure)
-> Lens
     (Vector Response'Failure'InputFailure)
     (Vector Response'Failure'InputFailure)
     [Response'Failure'InputFailure]
     [Response'Failure'InputFailure]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector Response'Failure'InputFailure
-> [Response'Failure'InputFailure]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ Vector Response'Failure'InputFailure
_ [Response'Failure'InputFailure]
y__ -> [Response'Failure'InputFailure]
-> Vector Response'Failure'InputFailure
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Response'Failure'InputFailure]
y__))
instance Data.ProtoLens.Field.HasField Response'Failure "vec'specific" (Data.Vector.Vector Response'Failure'InputFailure) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "vec'specific"
-> (Vector Response'Failure'InputFailure
    -> f (Vector Response'Failure'InputFailure))
-> Response'Failure
-> f Response'Failure
fieldOf Proxy# "vec'specific"
_
    = ((Vector Response'Failure'InputFailure
  -> f (Vector Response'Failure'InputFailure))
 -> Response'Failure -> f Response'Failure)
-> ((Vector Response'Failure'InputFailure
     -> f (Vector Response'Failure'InputFailure))
    -> Vector Response'Failure'InputFailure
    -> f (Vector Response'Failure'InputFailure))
-> (Vector Response'Failure'InputFailure
    -> f (Vector Response'Failure'InputFailure))
-> Response'Failure
-> f Response'Failure
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response'Failure -> Vector Response'Failure'InputFailure)
-> (Response'Failure
    -> Vector Response'Failure'InputFailure -> Response'Failure)
-> Lens
     Response'Failure
     Response'Failure
     (Vector Response'Failure'InputFailure)
     (Vector Response'Failure'InputFailure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response'Failure -> Vector Response'Failure'InputFailure
_Response'Failure'specific
           (\ Response'Failure
x__ Vector Response'Failure'InputFailure
y__ -> Response'Failure
x__ {_Response'Failure'specific :: Vector Response'Failure'InputFailure
_Response'Failure'specific = Vector Response'Failure'InputFailure
y__}))
        (Vector Response'Failure'InputFailure
 -> f (Vector Response'Failure'InputFailure))
-> Vector Response'Failure'InputFailure
-> f (Vector Response'Failure'InputFailure)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Response'Failure "internal" [Proto.BtcLsp.Data.HighLevel.InternalFailure] where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "internal"
-> ([InternalFailure] -> f [InternalFailure])
-> Response'Failure
-> f Response'Failure
fieldOf Proxy# "internal"
_
    = ((Vector InternalFailure -> f (Vector InternalFailure))
 -> Response'Failure -> f Response'Failure)
-> (([InternalFailure] -> f [InternalFailure])
    -> Vector InternalFailure -> f (Vector InternalFailure))
-> ([InternalFailure] -> f [InternalFailure])
-> Response'Failure
-> f Response'Failure
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response'Failure -> Vector InternalFailure)
-> (Response'Failure -> Vector InternalFailure -> Response'Failure)
-> Lens
     Response'Failure
     Response'Failure
     (Vector InternalFailure)
     (Vector InternalFailure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response'Failure -> Vector InternalFailure
_Response'Failure'internal
           (\ Response'Failure
x__ Vector InternalFailure
y__ -> Response'Failure
x__ {_Response'Failure'internal :: Vector InternalFailure
_Response'Failure'internal = Vector InternalFailure
y__}))
        ((Vector InternalFailure -> [InternalFailure])
-> (Vector InternalFailure
    -> [InternalFailure] -> Vector InternalFailure)
-> Lens
     (Vector InternalFailure)
     (Vector InternalFailure)
     [InternalFailure]
     [InternalFailure]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector InternalFailure -> [InternalFailure]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ Vector InternalFailure
_ [InternalFailure]
y__ -> [InternalFailure] -> Vector InternalFailure
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [InternalFailure]
y__))
instance Data.ProtoLens.Field.HasField Response'Failure "vec'internal" (Data.Vector.Vector Proto.BtcLsp.Data.HighLevel.InternalFailure) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "vec'internal"
-> (Vector InternalFailure -> f (Vector InternalFailure))
-> Response'Failure
-> f Response'Failure
fieldOf Proxy# "vec'internal"
_
    = ((Vector InternalFailure -> f (Vector InternalFailure))
 -> Response'Failure -> f Response'Failure)
-> ((Vector InternalFailure -> f (Vector InternalFailure))
    -> Vector InternalFailure -> f (Vector InternalFailure))
-> (Vector InternalFailure -> f (Vector InternalFailure))
-> Response'Failure
-> f Response'Failure
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response'Failure -> Vector InternalFailure)
-> (Response'Failure -> Vector InternalFailure -> Response'Failure)
-> Lens
     Response'Failure
     Response'Failure
     (Vector InternalFailure)
     (Vector InternalFailure)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response'Failure -> Vector InternalFailure
_Response'Failure'internal
           (\ Response'Failure
x__ Vector InternalFailure
y__ -> Response'Failure
x__ {_Response'Failure'internal :: Vector InternalFailure
_Response'Failure'internal = Vector InternalFailure
y__}))
        (Vector InternalFailure -> f (Vector InternalFailure))
-> Vector InternalFailure -> f (Vector InternalFailure)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Response'Failure where
  messageName :: Proxy Response'Failure -> Text
messageName Proxy Response'Failure
_
    = String -> Text
Data.Text.pack String
"BtcLsp.Method.SwapFromLn.Response.Failure"
  packedMessageDescriptor :: Proxy Response'Failure -> ByteString
packedMessageDescriptor Proxy Response'Failure
_
    = ByteString
"\n\
      \\aFailure\DC2=\n\
      \\ageneric\CAN\SOH \ETX(\v2#.BtcLsp.Data.HighLevel.InputFailureR\ageneric\DC2S\n\
      \\bspecific\CAN\STX \ETX(\SO27.BtcLsp.Method.SwapFromLn.Response.Failure.InputFailureR\bspecific\DC2B\n\
      \\binternal\CAN\ETX \ETX(\v2&.BtcLsp.Data.HighLevel.InternalFailureR\binternal\"\ESC\n\
      \\fInputFailure\DC2\v\n\
      \\aDEFAULT\DLE\NUL"
  packedFileDescriptor :: Proxy Response'Failure -> ByteString
packedFileDescriptor Proxy Response'Failure
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor Response'Failure)
fieldsByTag
    = let
        generic__field_descriptor :: FieldDescriptor Response'Failure
generic__field_descriptor
          = String
-> FieldTypeDescriptor InputFailure
-> FieldAccessor Response'Failure InputFailure
-> FieldDescriptor Response'Failure
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"generic"
              (MessageOrGroup -> FieldTypeDescriptor InputFailure
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.BtcLsp.Data.HighLevel.InputFailure)
              (Packing
-> Lens' Response'Failure [InputFailure]
-> FieldAccessor Response'Failure InputFailure
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 @"generic")) ::
              Data.ProtoLens.FieldDescriptor Response'Failure
        specific__field_descriptor :: FieldDescriptor Response'Failure
specific__field_descriptor
          = String
-> FieldTypeDescriptor Response'Failure'InputFailure
-> FieldAccessor Response'Failure Response'Failure'InputFailure
-> FieldDescriptor Response'Failure
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"specific"
              (ScalarField Response'Failure'InputFailure
-> FieldTypeDescriptor Response'Failure'InputFailure
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Response'Failure'InputFailure
forall t. MessageEnum t => ScalarField t
Data.ProtoLens.EnumField ::
                 Data.ProtoLens.FieldTypeDescriptor Response'Failure'InputFailure)
              (Packing
-> Lens' Response'Failure [Response'Failure'InputFailure]
-> FieldAccessor Response'Failure Response'Failure'InputFailure
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Packed (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"specific")) ::
              Data.ProtoLens.FieldDescriptor Response'Failure
        internal__field_descriptor :: FieldDescriptor Response'Failure
internal__field_descriptor
          = String
-> FieldTypeDescriptor InternalFailure
-> FieldAccessor Response'Failure InternalFailure
-> FieldDescriptor Response'Failure
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"internal"
              (MessageOrGroup -> FieldTypeDescriptor InternalFailure
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.BtcLsp.Data.HighLevel.InternalFailure)
              (Packing
-> Lens' Response'Failure [InternalFailure]
-> FieldAccessor Response'Failure InternalFailure
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 @"internal")) ::
              Data.ProtoLens.FieldDescriptor Response'Failure
      in
        [(Tag, FieldDescriptor Response'Failure)]
-> Map Tag (FieldDescriptor Response'Failure)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor Response'Failure
generic__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor Response'Failure
specific__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
3, FieldDescriptor Response'Failure
internal__field_descriptor)]
  unknownFields :: Lens' Response'Failure FieldSet
unknownFields
    = (Response'Failure -> FieldSet)
-> (Response'Failure -> FieldSet -> Response'Failure)
-> Lens' Response'Failure FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Response'Failure -> FieldSet
_Response'Failure'_unknownFields
        (\ Response'Failure
x__ FieldSet
y__ -> Response'Failure
x__ {_Response'Failure'_unknownFields :: FieldSet
_Response'Failure'_unknownFields = FieldSet
y__})
  defMessage :: Response'Failure
defMessage
    = Response'Failure'_constructor :: Vector InputFailure
-> Vector Response'Failure'InputFailure
-> Vector InternalFailure
-> FieldSet
-> Response'Failure
Response'Failure'_constructor
        {_Response'Failure'generic :: Vector InputFailure
_Response'Failure'generic = Vector InputFailure
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _Response'Failure'specific :: Vector Response'Failure'InputFailure
_Response'Failure'specific = Vector Response'Failure'InputFailure
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _Response'Failure'internal :: Vector InternalFailure
_Response'Failure'internal = Vector InternalFailure
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _Response'Failure'_unknownFields :: FieldSet
_Response'Failure'_unknownFields = []}
  parseMessage :: Parser Response'Failure
parseMessage
    = let
        loop ::
          Response'Failure
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.BtcLsp.Data.HighLevel.InputFailure
             -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.BtcLsp.Data.HighLevel.InternalFailure
                -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Response'Failure'InputFailure
                   -> Data.ProtoLens.Encoding.Bytes.Parser Response'Failure
        loop :: Response'Failure
-> Growing Vector RealWorld InputFailure
-> Growing Vector RealWorld InternalFailure
-> Growing Vector RealWorld Response'Failure'InputFailure
-> Parser Response'Failure
loop Response'Failure
x Growing Vector RealWorld InputFailure
mutable'generic Growing Vector RealWorld InternalFailure
mutable'internal Growing Vector RealWorld Response'Failure'InputFailure
mutable'specific
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector InputFailure
frozen'generic <- IO (Vector InputFailure) -> Parser (Vector InputFailure)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                          (Growing Vector (PrimState IO) InputFailure
-> IO (Vector InputFailure)
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 InputFailure
Growing Vector (PrimState IO) InputFailure
mutable'generic)
                      Vector InternalFailure
frozen'internal <- IO (Vector InternalFailure) -> Parser (Vector InternalFailure)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                           (Growing Vector (PrimState IO) InternalFailure
-> IO (Vector InternalFailure)
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 InternalFailure
Growing Vector (PrimState IO) InternalFailure
mutable'internal)
                      Vector Response'Failure'InputFailure
frozen'specific <- IO (Vector Response'Failure'InputFailure)
-> Parser (Vector Response'Failure'InputFailure)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                           (Growing Vector (PrimState IO) Response'Failure'InputFailure
-> IO (Vector Response'Failure'InputFailure)
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 Response'Failure'InputFailure
Growing Vector (PrimState IO) Response'Failure'InputFailure
mutable'specific)
                      (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      Response'Failure -> Parser Response'Failure
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Response'Failure Response'Failure FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Response'Failure -> Response'Failure
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter Response'Failure Response'Failure FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter
  Response'Failure
  Response'Failure
  (Vector InputFailure)
  (Vector InputFailure)
-> Vector InputFailure -> Response'Failure -> Response'Failure
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'generic") Vector InputFailure
frozen'generic
                              (Setter
  Response'Failure
  Response'Failure
  (Vector InternalFailure)
  (Vector InternalFailure)
-> Vector InternalFailure -> Response'Failure -> Response'Failure
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'internal") Vector InternalFailure
frozen'internal
                                 (Setter
  Response'Failure
  Response'Failure
  (Vector Response'Failure'InputFailure)
  (Vector Response'Failure'InputFailure)
-> Vector Response'Failure'InputFailure
-> Response'Failure
-> Response'Failure
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'specific") Vector Response'Failure'InputFailure
frozen'specific
                                    Response'Failure
x))))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do !InputFailure
y <- Parser InputFailure -> String -> Parser InputFailure
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser InputFailure -> Parser InputFailure
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 InputFailure
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        String
"generic"
                                Growing Vector RealWorld InputFailure
v <- IO (Growing Vector RealWorld InputFailure)
-> Parser (Growing Vector RealWorld InputFailure)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) InputFailure
-> InputFailure -> IO (Growing Vector (PrimState IO) InputFailure)
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 InputFailure
Growing Vector (PrimState IO) InputFailure
mutable'generic InputFailure
y)
                                Response'Failure
-> Growing Vector RealWorld InputFailure
-> Growing Vector RealWorld InternalFailure
-> Growing Vector RealWorld Response'Failure'InputFailure
-> Parser Response'Failure
loop Response'Failure
x Growing Vector RealWorld InputFailure
v Growing Vector RealWorld InternalFailure
mutable'internal Growing Vector RealWorld Response'Failure'InputFailure
mutable'specific
                        Word64
16
                          -> do !Response'Failure'InputFailure
y <- Parser Response'Failure'InputFailure
-> String -> Parser Response'Failure'InputFailure
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        ((Int -> Response'Failure'InputFailure)
-> Parser Int -> Parser Response'Failure'InputFailure
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                           Int -> Response'Failure'InputFailure
forall a. Enum a => Int -> a
Prelude.toEnum
                                           ((Word64 -> Int) -> Parser Word64 -> Parser Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                              Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
                                              Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt))
                                        String
"specific"
                                Growing Vector RealWorld Response'Failure'InputFailure
v <- IO (Growing Vector RealWorld Response'Failure'InputFailure)
-> Parser (Growing Vector RealWorld Response'Failure'InputFailure)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) Response'Failure'InputFailure
-> Response'Failure'InputFailure
-> IO (Growing Vector (PrimState IO) Response'Failure'InputFailure)
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 Response'Failure'InputFailure
Growing Vector (PrimState IO) Response'Failure'InputFailure
mutable'specific Response'Failure'InputFailure
y)
                                Response'Failure
-> Growing Vector RealWorld InputFailure
-> Growing Vector RealWorld InternalFailure
-> Growing Vector RealWorld Response'Failure'InputFailure
-> Parser Response'Failure
loop Response'Failure
x Growing Vector RealWorld InputFailure
mutable'generic Growing Vector RealWorld InternalFailure
mutable'internal Growing Vector RealWorld Response'Failure'InputFailure
v
                        Word64
18
                          -> do Growing Vector RealWorld Response'Failure'InputFailure
y <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                        Int
-> Parser (Growing Vector RealWorld Response'Failure'InputFailure)
-> Parser (Growing Vector RealWorld Response'Failure'InputFailure)
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)
                                          ((let
                                              ploop :: Growing v RealWorld a -> Parser (Growing v RealWorld a)
ploop Growing v RealWorld a
qs
                                                = do Bool
packedEnd <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
                                                     if Bool
packedEnd then
                                                         Growing v RealWorld a -> Parser (Growing v RealWorld a)
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return Growing v RealWorld a
qs
                                                     else
                                                         do !a
q <- Parser a -> String -> Parser a
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                                                    ((Int -> a) -> Parser Int -> Parser a
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                                                       Int -> a
forall a. Enum a => Int -> a
Prelude.toEnum
                                                                       ((Word64 -> Int) -> Parser Word64 -> Parser Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                                                          Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
                                                                          Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt))
                                                                    String
"specific"
                                                            Growing v RealWorld a
qs' <- IO (Growing v RealWorld a) -> Parser (Growing v RealWorld a)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                                                     (Growing v (PrimState IO) a -> a -> IO (Growing v (PrimState IO) a)
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 v RealWorld a
Growing v (PrimState IO) a
qs a
q)
                                                            Growing v RealWorld a -> Parser (Growing v RealWorld a)
ploop Growing v RealWorld a
qs'
                                            in Growing Vector RealWorld Response'Failure'InputFailure
-> Parser (Growing Vector RealWorld Response'Failure'InputFailure)
forall {a} {v :: * -> *}.
(Enum a, Vector v a) =>
Growing v RealWorld a -> Parser (Growing v RealWorld a)
ploop)
                                             Growing Vector RealWorld Response'Failure'InputFailure
mutable'specific)
                                Response'Failure
-> Growing Vector RealWorld InputFailure
-> Growing Vector RealWorld InternalFailure
-> Growing Vector RealWorld Response'Failure'InputFailure
-> Parser Response'Failure
loop Response'Failure
x Growing Vector RealWorld InputFailure
mutable'generic Growing Vector RealWorld InternalFailure
mutable'internal Growing Vector RealWorld Response'Failure'InputFailure
y
                        Word64
26
                          -> do !InternalFailure
y <- Parser InternalFailure -> String -> Parser InternalFailure
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser InternalFailure -> Parser InternalFailure
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 InternalFailure
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        String
"internal"
                                Growing Vector RealWorld InternalFailure
v <- IO (Growing Vector RealWorld InternalFailure)
-> Parser (Growing Vector RealWorld InternalFailure)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) InternalFailure
-> InternalFailure
-> IO (Growing Vector (PrimState IO) InternalFailure)
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 InternalFailure
Growing Vector (PrimState IO) InternalFailure
mutable'internal InternalFailure
y)
                                Response'Failure
-> Growing Vector RealWorld InputFailure
-> Growing Vector RealWorld InternalFailure
-> Growing Vector RealWorld Response'Failure'InputFailure
-> Parser Response'Failure
loop Response'Failure
x Growing Vector RealWorld InputFailure
mutable'generic Growing Vector RealWorld InternalFailure
v Growing Vector RealWorld Response'Failure'InputFailure
mutable'specific
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Response'Failure
-> Growing Vector RealWorld InputFailure
-> Growing Vector RealWorld InternalFailure
-> Growing Vector RealWorld Response'Failure'InputFailure
-> Parser Response'Failure
loop
                                  (Setter Response'Failure Response'Failure FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Response'Failure -> Response'Failure
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter Response'Failure Response'Failure FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Response'Failure
x)
                                  Growing Vector RealWorld InputFailure
mutable'generic Growing Vector RealWorld InternalFailure
mutable'internal Growing Vector RealWorld Response'Failure'InputFailure
mutable'specific
      in
        Parser Response'Failure -> String -> Parser Response'Failure
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld InputFailure
mutable'generic <- IO (Growing Vector RealWorld InputFailure)
-> Parser (Growing Vector RealWorld InputFailure)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                   IO (Growing Vector RealWorld InputFailure)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              Growing Vector RealWorld InternalFailure
mutable'internal <- IO (Growing Vector RealWorld InternalFailure)
-> Parser (Growing Vector RealWorld InternalFailure)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                    IO (Growing Vector RealWorld InternalFailure)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              Growing Vector RealWorld Response'Failure'InputFailure
mutable'specific <- IO (Growing Vector RealWorld Response'Failure'InputFailure)
-> Parser (Growing Vector RealWorld Response'Failure'InputFailure)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                    IO (Growing Vector RealWorld Response'Failure'InputFailure)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              Response'Failure
-> Growing Vector RealWorld InputFailure
-> Growing Vector RealWorld InternalFailure
-> Growing Vector RealWorld Response'Failure'InputFailure
-> Parser Response'Failure
loop
                Response'Failure
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld InputFailure
mutable'generic Growing Vector RealWorld InternalFailure
mutable'internal
                Growing Vector RealWorld Response'Failure'InputFailure
mutable'specific)
          String
"Failure"
  buildMessage :: Response'Failure -> Builder
buildMessage
    = \ Response'Failure
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             ((InputFailure -> Builder) -> Vector InputFailure -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ InputFailure
_v
                   -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                        (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                        ((ByteString -> Builder)
-> (InputFailure -> ByteString) -> InputFailure -> 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))
                           InputFailure -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage InputFailure
_v))
                (FoldLike
  (Vector InputFailure)
  Response'Failure
  Response'Failure
  (Vector InputFailure)
  (Vector InputFailure)
-> Response'Failure -> Vector InputFailure
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'generic") Response'Failure
_x))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   p :: Vector Response'Failure'InputFailure
p = FoldLike
  (Vector Response'Failure'InputFailure)
  Response'Failure
  Response'Failure
  (Vector Response'Failure'InputFailure)
  (Vector Response'Failure'InputFailure)
-> Response'Failure -> Vector Response'Failure'InputFailure
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'specific") Response'Failure
_x
                 in
                   if Vector Response'Failure'InputFailure -> Bool
forall (v :: * -> *) a. Vector v a => v a -> Bool
Data.Vector.Generic.null Vector Response'Failure'InputFailure
p 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))
                            (Builder -> ByteString
Data.ProtoLens.Encoding.Bytes.runBuilder
                               ((Response'Failure'InputFailure -> Builder)
-> Vector Response'Failure'InputFailure -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                                  ((Int -> Builder)
-> (Response'Failure'InputFailure -> Int)
-> Response'Failure'InputFailure
-> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                                     ((Word64 -> Builder) -> (Int -> Word64) -> Int -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                                        Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                        Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral)
                                     Response'Failure'InputFailure -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum)
                                  Vector Response'Failure'InputFailure
p))))
                (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                   ((InternalFailure -> Builder) -> Vector InternalFailure -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                      (\ InternalFailure
_v
                         -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                              (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
26)
                              ((ByteString -> Builder)
-> (InternalFailure -> ByteString) -> InternalFailure -> 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))
                                 InternalFailure -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage InternalFailure
_v))
                      (FoldLike
  (Vector InternalFailure)
  Response'Failure
  Response'Failure
  (Vector InternalFailure)
  (Vector InternalFailure)
-> Response'Failure -> Vector InternalFailure
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'internal") Response'Failure
_x))
                   (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (FoldLike
  FieldSet Response'Failure Response'Failure FieldSet FieldSet
-> Response'Failure -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet Response'Failure Response'Failure FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Response'Failure
_x))))
instance Control.DeepSeq.NFData Response'Failure where
  rnf :: Response'Failure -> ()
rnf
    = \ Response'Failure
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Response'Failure -> FieldSet
_Response'Failure'_unknownFields Response'Failure
x__)
             (Vector InputFailure -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (Response'Failure -> Vector InputFailure
_Response'Failure'generic Response'Failure
x__)
                (Vector Response'Failure'InputFailure -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (Response'Failure -> Vector Response'Failure'InputFailure
_Response'Failure'specific Response'Failure
x__)
                   (Vector InternalFailure -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Response'Failure -> Vector InternalFailure
_Response'Failure'internal Response'Failure
x__) ())))
newtype Response'Failure'InputFailure'UnrecognizedValue
  = Response'Failure'InputFailure'UnrecognizedValue Data.Int.Int32
  deriving stock (Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
(Response'Failure'InputFailure'UnrecognizedValue
 -> Response'Failure'InputFailure'UnrecognizedValue -> Bool)
-> (Response'Failure'InputFailure'UnrecognizedValue
    -> Response'Failure'InputFailure'UnrecognizedValue -> Bool)
-> Eq Response'Failure'InputFailure'UnrecognizedValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
$c/= :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
== :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
$c== :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
Prelude.Eq,
                  Eq Response'Failure'InputFailure'UnrecognizedValue
Eq Response'Failure'InputFailure'UnrecognizedValue
-> (Response'Failure'InputFailure'UnrecognizedValue
    -> Response'Failure'InputFailure'UnrecognizedValue -> Ordering)
-> (Response'Failure'InputFailure'UnrecognizedValue
    -> Response'Failure'InputFailure'UnrecognizedValue -> Bool)
-> (Response'Failure'InputFailure'UnrecognizedValue
    -> Response'Failure'InputFailure'UnrecognizedValue -> Bool)
-> (Response'Failure'InputFailure'UnrecognizedValue
    -> Response'Failure'InputFailure'UnrecognizedValue -> Bool)
-> (Response'Failure'InputFailure'UnrecognizedValue
    -> Response'Failure'InputFailure'UnrecognizedValue -> Bool)
-> (Response'Failure'InputFailure'UnrecognizedValue
    -> Response'Failure'InputFailure'UnrecognizedValue
    -> Response'Failure'InputFailure'UnrecognizedValue)
-> (Response'Failure'InputFailure'UnrecognizedValue
    -> Response'Failure'InputFailure'UnrecognizedValue
    -> Response'Failure'InputFailure'UnrecognizedValue)
-> Ord Response'Failure'InputFailure'UnrecognizedValue
Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Ordering
Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue
$cmin :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue
max :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue
$cmax :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue
>= :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
$c>= :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
> :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
$c> :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
<= :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
$c<= :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
< :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
$c< :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Bool
compare :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Ordering
$ccompare :: Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure'UnrecognizedValue -> Ordering
Prelude.Ord,
                  Int -> Response'Failure'InputFailure'UnrecognizedValue -> ShowS
[Response'Failure'InputFailure'UnrecognizedValue] -> ShowS
Response'Failure'InputFailure'UnrecognizedValue -> String
(Int -> Response'Failure'InputFailure'UnrecognizedValue -> ShowS)
-> (Response'Failure'InputFailure'UnrecognizedValue -> String)
-> ([Response'Failure'InputFailure'UnrecognizedValue] -> ShowS)
-> Show Response'Failure'InputFailure'UnrecognizedValue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Response'Failure'InputFailure'UnrecognizedValue] -> ShowS
$cshowList :: [Response'Failure'InputFailure'UnrecognizedValue] -> ShowS
show :: Response'Failure'InputFailure'UnrecognizedValue -> String
$cshow :: Response'Failure'InputFailure'UnrecognizedValue -> String
showsPrec :: Int -> Response'Failure'InputFailure'UnrecognizedValue -> ShowS
$cshowsPrec :: Int -> Response'Failure'InputFailure'UnrecognizedValue -> ShowS
Prelude.Show,
                  (forall x.
 Response'Failure'InputFailure'UnrecognizedValue
 -> Rep Response'Failure'InputFailure'UnrecognizedValue x)
-> (forall x.
    Rep Response'Failure'InputFailure'UnrecognizedValue x
    -> Response'Failure'InputFailure'UnrecognizedValue)
-> Generic Response'Failure'InputFailure'UnrecognizedValue
forall x.
Rep Response'Failure'InputFailure'UnrecognizedValue x
-> Response'Failure'InputFailure'UnrecognizedValue
forall x.
Response'Failure'InputFailure'UnrecognizedValue
-> Rep Response'Failure'InputFailure'UnrecognizedValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep Response'Failure'InputFailure'UnrecognizedValue x
-> Response'Failure'InputFailure'UnrecognizedValue
$cfrom :: forall x.
Response'Failure'InputFailure'UnrecognizedValue
-> Rep Response'Failure'InputFailure'UnrecognizedValue x
GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out Response'Failure'InputFailure'UnrecognizedValue
data Response'Failure'InputFailure
  = Response'Failure'DEFAULT |
    Response'Failure'InputFailure'Unrecognized !Response'Failure'InputFailure'UnrecognizedValue
  deriving stock (Int -> Response'Failure'InputFailure -> ShowS
[Response'Failure'InputFailure] -> ShowS
Response'Failure'InputFailure -> String
(Int -> Response'Failure'InputFailure -> ShowS)
-> (Response'Failure'InputFailure -> String)
-> ([Response'Failure'InputFailure] -> ShowS)
-> Show Response'Failure'InputFailure
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Response'Failure'InputFailure] -> ShowS
$cshowList :: [Response'Failure'InputFailure] -> ShowS
show :: Response'Failure'InputFailure -> String
$cshow :: Response'Failure'InputFailure -> String
showsPrec :: Int -> Response'Failure'InputFailure -> ShowS
$cshowsPrec :: Int -> Response'Failure'InputFailure -> ShowS
Prelude.Show,
                  Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
(Response'Failure'InputFailure
 -> Response'Failure'InputFailure -> Bool)
-> (Response'Failure'InputFailure
    -> Response'Failure'InputFailure -> Bool)
-> Eq Response'Failure'InputFailure
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
$c/= :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
== :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
$c== :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
Prelude.Eq,
                  Eq Response'Failure'InputFailure
Eq Response'Failure'InputFailure
-> (Response'Failure'InputFailure
    -> Response'Failure'InputFailure -> Ordering)
-> (Response'Failure'InputFailure
    -> Response'Failure'InputFailure -> Bool)
-> (Response'Failure'InputFailure
    -> Response'Failure'InputFailure -> Bool)
-> (Response'Failure'InputFailure
    -> Response'Failure'InputFailure -> Bool)
-> (Response'Failure'InputFailure
    -> Response'Failure'InputFailure -> Bool)
-> (Response'Failure'InputFailure
    -> Response'Failure'InputFailure -> Response'Failure'InputFailure)
-> (Response'Failure'InputFailure
    -> Response'Failure'InputFailure -> Response'Failure'InputFailure)
-> Ord Response'Failure'InputFailure
Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Ordering
Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Response'Failure'InputFailure
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Response'Failure'InputFailure
$cmin :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Response'Failure'InputFailure
max :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Response'Failure'InputFailure
$cmax :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Response'Failure'InputFailure
>= :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
$c>= :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
> :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
$c> :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
<= :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
$c<= :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
< :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
$c< :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Bool
compare :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Ordering
$ccompare :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> Ordering
Prelude.Ord,
                  (forall x.
 Response'Failure'InputFailure
 -> Rep Response'Failure'InputFailure x)
-> (forall x.
    Rep Response'Failure'InputFailure x
    -> Response'Failure'InputFailure)
-> Generic Response'Failure'InputFailure
forall x.
Rep Response'Failure'InputFailure x
-> Response'Failure'InputFailure
forall x.
Response'Failure'InputFailure
-> Rep Response'Failure'InputFailure x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep Response'Failure'InputFailure x
-> Response'Failure'InputFailure
$cfrom :: forall x.
Response'Failure'InputFailure
-> Rep Response'Failure'InputFailure x
GHC.Generics.Generic)
instance Data.ProtoLens.MessageEnum Response'Failure'InputFailure where
  maybeToEnum :: Int -> Maybe Response'Failure'InputFailure
maybeToEnum Int
0 = Response'Failure'InputFailure
-> Maybe Response'Failure'InputFailure
forall a. a -> Maybe a
Prelude.Just Response'Failure'InputFailure
Response'Failure'DEFAULT
  maybeToEnum Int
k
    = Response'Failure'InputFailure
-> Maybe Response'Failure'InputFailure
forall a. a -> Maybe a
Prelude.Just
        (Response'Failure'InputFailure'UnrecognizedValue
-> Response'Failure'InputFailure
Response'Failure'InputFailure'Unrecognized
           (Int32 -> Response'Failure'InputFailure'UnrecognizedValue
Response'Failure'InputFailure'UnrecognizedValue
              (Int -> Int32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int
k)))
  showEnum :: Response'Failure'InputFailure -> String
showEnum Response'Failure'InputFailure
Response'Failure'DEFAULT = String
"DEFAULT"
  showEnum
    (Response'Failure'InputFailure'Unrecognized (Response'Failure'InputFailure'UnrecognizedValue Int32
k))
    = Int32 -> String
forall a. Show a => a -> String
Prelude.show Int32
k
  readEnum :: String -> Maybe Response'Failure'InputFailure
readEnum String
k
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k String
"DEFAULT" = Response'Failure'InputFailure
-> Maybe Response'Failure'InputFailure
forall a. a -> Maybe a
Prelude.Just Response'Failure'InputFailure
Response'Failure'DEFAULT
    | Bool
Prelude.otherwise
    = Maybe Int
-> (Int -> Maybe Response'Failure'InputFailure)
-> Maybe Response'Failure'InputFailure
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
(Prelude.>>=) (String -> Maybe Int
forall a. Read a => String -> Maybe a
Text.Read.readMaybe String
k) Int -> Maybe Response'Failure'InputFailure
forall a. MessageEnum a => Int -> Maybe a
Data.ProtoLens.maybeToEnum
instance Prelude.Bounded Response'Failure'InputFailure where
  minBound :: Response'Failure'InputFailure
minBound = Response'Failure'InputFailure
Response'Failure'DEFAULT
  maxBound :: Response'Failure'InputFailure
maxBound = Response'Failure'InputFailure
Response'Failure'DEFAULT
instance Prelude.Enum Response'Failure'InputFailure where
  toEnum :: Int -> Response'Failure'InputFailure
toEnum Int
k__
    = Response'Failure'InputFailure
-> (Response'Failure'InputFailure -> Response'Failure'InputFailure)
-> Maybe Response'Failure'InputFailure
-> Response'Failure'InputFailure
forall b a. b -> (a -> b) -> Maybe a -> b
Prelude.maybe
        (String -> Response'Failure'InputFailure
forall a. HasCallStack => String -> a
Prelude.error
           (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
              String
"toEnum: unknown value for enum InputFailure: "
              (Int -> String
forall a. Show a => a -> String
Prelude.show Int
k__)))
        Response'Failure'InputFailure -> Response'Failure'InputFailure
forall a. a -> a
Prelude.id (Int -> Maybe Response'Failure'InputFailure
forall a. MessageEnum a => Int -> Maybe a
Data.ProtoLens.maybeToEnum Int
k__)
  fromEnum :: Response'Failure'InputFailure -> Int
fromEnum Response'Failure'InputFailure
Response'Failure'DEFAULT = Int
0
  fromEnum
    (Response'Failure'InputFailure'Unrecognized (Response'Failure'InputFailure'UnrecognizedValue Int32
k))
    = Int32 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int32
k
  succ :: Response'Failure'InputFailure -> Response'Failure'InputFailure
succ Response'Failure'InputFailure
Response'Failure'DEFAULT
    = String -> Response'Failure'InputFailure
forall a. HasCallStack => String -> a
Prelude.error
        String
"Response'Failure'InputFailure.succ: bad argument Response'Failure'DEFAULT. This value would be out of bounds."
  succ (Response'Failure'InputFailure'Unrecognized Response'Failure'InputFailure'UnrecognizedValue
_)
    = String -> Response'Failure'InputFailure
forall a. HasCallStack => String -> a
Prelude.error
        String
"Response'Failure'InputFailure.succ: bad argument: unrecognized value"
  pred :: Response'Failure'InputFailure -> Response'Failure'InputFailure
pred Response'Failure'InputFailure
Response'Failure'DEFAULT
    = String -> Response'Failure'InputFailure
forall a. HasCallStack => String -> a
Prelude.error
        String
"Response'Failure'InputFailure.pred: bad argument Response'Failure'DEFAULT. This value would be out of bounds."
  pred (Response'Failure'InputFailure'Unrecognized Response'Failure'InputFailure'UnrecognizedValue
_)
    = String -> Response'Failure'InputFailure
forall a. HasCallStack => String -> a
Prelude.error
        String
"Response'Failure'InputFailure.pred: bad argument: unrecognized value"
  enumFrom :: Response'Failure'InputFailure -> [Response'Failure'InputFailure]
enumFrom = Response'Failure'InputFailure -> [Response'Failure'InputFailure]
forall a. (Enum a, Bounded a) => a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFrom
  enumFromTo :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> [Response'Failure'InputFailure]
enumFromTo = Response'Failure'InputFailure
-> Response'Failure'InputFailure -> [Response'Failure'InputFailure]
forall a. Enum a => a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromTo
  enumFromThen :: Response'Failure'InputFailure
-> Response'Failure'InputFailure -> [Response'Failure'InputFailure]
enumFromThen = Response'Failure'InputFailure
-> Response'Failure'InputFailure -> [Response'Failure'InputFailure]
forall a. (Enum a, Bounded a) => a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromThen
  enumFromThenTo :: Response'Failure'InputFailure
-> Response'Failure'InputFailure
-> Response'Failure'InputFailure
-> [Response'Failure'InputFailure]
enumFromThenTo = Response'Failure'InputFailure
-> Response'Failure'InputFailure
-> Response'Failure'InputFailure
-> [Response'Failure'InputFailure]
forall a. Enum a => a -> a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault Response'Failure'InputFailure where
  fieldDefault :: Response'Failure'InputFailure
fieldDefault = Response'Failure'InputFailure
Response'Failure'DEFAULT
instance Control.DeepSeq.NFData Response'Failure'InputFailure where
  rnf :: Response'Failure'InputFailure -> ()
rnf Response'Failure'InputFailure
x__ = Response'Failure'InputFailure -> () -> ()
Prelude.seq Response'Failure'InputFailure
x__ ()
instance Text.PrettyPrint.GenericPretty.Out Response'Failure'InputFailure
{- | Fields :
     
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.fundLnHodlInvoice' @:: Lens' Response'Success Proto.BtcLsp.Data.HighLevel.FundLnHodlInvoice@
         * 'Proto.BtcLsp.Method.SwapFromLn_Fields.maybe'fundLnHodlInvoice' @:: Lens' Response'Success (Prelude.Maybe Proto.BtcLsp.Data.HighLevel.FundLnHodlInvoice)@ -}
data Response'Success
  = Response'Success'_constructor {Response'Success -> Maybe FundLnHodlInvoice
_Response'Success'fundLnHodlInvoice :: !(Prelude.Maybe Proto.BtcLsp.Data.HighLevel.FundLnHodlInvoice),
                                   Response'Success -> FieldSet
_Response'Success'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Response'Success -> Response'Success -> Bool
(Response'Success -> Response'Success -> Bool)
-> (Response'Success -> Response'Success -> Bool)
-> Eq Response'Success
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Response'Success -> Response'Success -> Bool
$c/= :: Response'Success -> Response'Success -> Bool
== :: Response'Success -> Response'Success -> Bool
$c== :: Response'Success -> Response'Success -> Bool
Prelude.Eq, Eq Response'Success
Eq Response'Success
-> (Response'Success -> Response'Success -> Ordering)
-> (Response'Success -> Response'Success -> Bool)
-> (Response'Success -> Response'Success -> Bool)
-> (Response'Success -> Response'Success -> Bool)
-> (Response'Success -> Response'Success -> Bool)
-> (Response'Success -> Response'Success -> Response'Success)
-> (Response'Success -> Response'Success -> Response'Success)
-> Ord Response'Success
Response'Success -> Response'Success -> Bool
Response'Success -> Response'Success -> Ordering
Response'Success -> Response'Success -> Response'Success
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Response'Success -> Response'Success -> Response'Success
$cmin :: Response'Success -> Response'Success -> Response'Success
max :: Response'Success -> Response'Success -> Response'Success
$cmax :: Response'Success -> Response'Success -> Response'Success
>= :: Response'Success -> Response'Success -> Bool
$c>= :: Response'Success -> Response'Success -> Bool
> :: Response'Success -> Response'Success -> Bool
$c> :: Response'Success -> Response'Success -> Bool
<= :: Response'Success -> Response'Success -> Bool
$c<= :: Response'Success -> Response'Success -> Bool
< :: Response'Success -> Response'Success -> Bool
$c< :: Response'Success -> Response'Success -> Bool
compare :: Response'Success -> Response'Success -> Ordering
$ccompare :: Response'Success -> Response'Success -> Ordering
Prelude.Ord, (forall x. Response'Success -> Rep Response'Success x)
-> (forall x. Rep Response'Success x -> Response'Success)
-> Generic Response'Success
forall x. Rep Response'Success x -> Response'Success
forall x. Response'Success -> Rep Response'Success x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Response'Success x -> Response'Success
$cfrom :: forall x. Response'Success -> Rep Response'Success x
GHC.Generics.Generic)
instance Prelude.Show Response'Success where
  showsPrec :: Int -> Response'Success -> ShowS
showsPrec Int
_ Response'Success
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (Response'Success -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Response'Success
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Text.PrettyPrint.GenericPretty.Out Response'Success
instance Data.ProtoLens.Field.HasField Response'Success "fundLnHodlInvoice" Proto.BtcLsp.Data.HighLevel.FundLnHodlInvoice where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "fundLnHodlInvoice"
-> (FundLnHodlInvoice -> f FundLnHodlInvoice)
-> Response'Success
-> f Response'Success
fieldOf Proxy# "fundLnHodlInvoice"
_
    = ((Maybe FundLnHodlInvoice -> f (Maybe FundLnHodlInvoice))
 -> Response'Success -> f Response'Success)
-> ((FundLnHodlInvoice -> f FundLnHodlInvoice)
    -> Maybe FundLnHodlInvoice -> f (Maybe FundLnHodlInvoice))
-> (FundLnHodlInvoice -> f FundLnHodlInvoice)
-> Response'Success
-> f Response'Success
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response'Success -> Maybe FundLnHodlInvoice)
-> (Response'Success
    -> Maybe FundLnHodlInvoice -> Response'Success)
-> Lens
     Response'Success
     Response'Success
     (Maybe FundLnHodlInvoice)
     (Maybe FundLnHodlInvoice)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response'Success -> Maybe FundLnHodlInvoice
_Response'Success'fundLnHodlInvoice
           (\ Response'Success
x__ Maybe FundLnHodlInvoice
y__ -> Response'Success
x__ {_Response'Success'fundLnHodlInvoice :: Maybe FundLnHodlInvoice
_Response'Success'fundLnHodlInvoice = Maybe FundLnHodlInvoice
y__}))
        (FundLnHodlInvoice
-> Lens' (Maybe FundLnHodlInvoice) FundLnHodlInvoice
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens FundLnHodlInvoice
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Response'Success "maybe'fundLnHodlInvoice" (Prelude.Maybe Proto.BtcLsp.Data.HighLevel.FundLnHodlInvoice) where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "maybe'fundLnHodlInvoice"
-> (Maybe FundLnHodlInvoice -> f (Maybe FundLnHodlInvoice))
-> Response'Success
-> f Response'Success
fieldOf Proxy# "maybe'fundLnHodlInvoice"
_
    = ((Maybe FundLnHodlInvoice -> f (Maybe FundLnHodlInvoice))
 -> Response'Success -> f Response'Success)
-> ((Maybe FundLnHodlInvoice -> f (Maybe FundLnHodlInvoice))
    -> Maybe FundLnHodlInvoice -> f (Maybe FundLnHodlInvoice))
-> (Maybe FundLnHodlInvoice -> f (Maybe FundLnHodlInvoice))
-> Response'Success
-> f Response'Success
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Response'Success -> Maybe FundLnHodlInvoice)
-> (Response'Success
    -> Maybe FundLnHodlInvoice -> Response'Success)
-> Lens
     Response'Success
     Response'Success
     (Maybe FundLnHodlInvoice)
     (Maybe FundLnHodlInvoice)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Response'Success -> Maybe FundLnHodlInvoice
_Response'Success'fundLnHodlInvoice
           (\ Response'Success
x__ Maybe FundLnHodlInvoice
y__ -> Response'Success
x__ {_Response'Success'fundLnHodlInvoice :: Maybe FundLnHodlInvoice
_Response'Success'fundLnHodlInvoice = Maybe FundLnHodlInvoice
y__}))
        (Maybe FundLnHodlInvoice -> f (Maybe FundLnHodlInvoice))
-> Maybe FundLnHodlInvoice -> f (Maybe FundLnHodlInvoice)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Response'Success where
  messageName :: Proxy Response'Success -> Text
messageName Proxy Response'Success
_
    = String -> Text
Data.Text.pack String
"BtcLsp.Method.SwapFromLn.Response.Success"
  packedMessageDescriptor :: Proxy Response'Success -> ByteString
packedMessageDescriptor Proxy Response'Success
_
    = ByteString
"\n\
      \\aSuccess\DC2Y\n\
      \\DC4fund_ln_hodl_invoice\CAN\SOH \SOH(\v2(.BtcLsp.Data.HighLevel.FundLnHodlInvoiceR\DC1fundLnHodlInvoice"
  packedFileDescriptor :: Proxy Response'Success -> ByteString
packedFileDescriptor Proxy Response'Success
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor Response'Success)
fieldsByTag
    = let
        fundLnHodlInvoice__field_descriptor :: FieldDescriptor Response'Success
fundLnHodlInvoice__field_descriptor
          = String
-> FieldTypeDescriptor FundLnHodlInvoice
-> FieldAccessor Response'Success FundLnHodlInvoice
-> FieldDescriptor Response'Success
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"fund_ln_hodl_invoice"
              (MessageOrGroup -> FieldTypeDescriptor FundLnHodlInvoice
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.BtcLsp.Data.HighLevel.FundLnHodlInvoice)
              (Lens
  Response'Success
  Response'Success
  (Maybe FundLnHodlInvoice)
  (Maybe FundLnHodlInvoice)
-> FieldAccessor Response'Success FundLnHodlInvoice
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'fundLnHodlInvoice")) ::
              Data.ProtoLens.FieldDescriptor Response'Success
      in
        [(Tag, FieldDescriptor Response'Success)]
-> Map Tag (FieldDescriptor Response'Success)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor Response'Success
fundLnHodlInvoice__field_descriptor)]
  unknownFields :: Lens' Response'Success FieldSet
unknownFields
    = (Response'Success -> FieldSet)
-> (Response'Success -> FieldSet -> Response'Success)
-> Lens' Response'Success FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Response'Success -> FieldSet
_Response'Success'_unknownFields
        (\ Response'Success
x__ FieldSet
y__ -> Response'Success
x__ {_Response'Success'_unknownFields :: FieldSet
_Response'Success'_unknownFields = FieldSet
y__})
  defMessage :: Response'Success
defMessage
    = Response'Success'_constructor :: Maybe FundLnHodlInvoice -> FieldSet -> Response'Success
Response'Success'_constructor
        {_Response'Success'fundLnHodlInvoice :: Maybe FundLnHodlInvoice
_Response'Success'fundLnHodlInvoice = Maybe FundLnHodlInvoice
forall a. Maybe a
Prelude.Nothing,
         _Response'Success'_unknownFields :: FieldSet
_Response'Success'_unknownFields = []}
  parseMessage :: Parser Response'Success
parseMessage
    = let
        loop ::
          Response'Success
          -> Data.ProtoLens.Encoding.Bytes.Parser Response'Success
        loop :: Response'Success -> Parser Response'Success
loop Response'Success
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  String
"Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      Response'Success -> Parser Response'Success
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Response'Success Response'Success FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Response'Success -> Response'Success
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter Response'Success Response'Success FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Response'Success
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do FundLnHodlInvoice
y <- Parser FundLnHodlInvoice -> String -> Parser FundLnHodlInvoice
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser FundLnHodlInvoice -> Parser FundLnHodlInvoice
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 FundLnHodlInvoice
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       String
"fund_ln_hodl_invoice"
                                Response'Success -> Parser Response'Success
loop
                                  (Setter
  Response'Success
  Response'Success
  FundLnHodlInvoice
  FundLnHodlInvoice
-> FundLnHodlInvoice -> Response'Success -> Response'Success
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 @"fundLnHodlInvoice") FundLnHodlInvoice
y Response'Success
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Response'Success -> Parser Response'Success
loop
                                  (Setter Response'Success Response'Success FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Response'Success -> Response'Success
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter Response'Success Response'Success FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Response'Success
x)
      in
        Parser Response'Success -> String -> Parser Response'Success
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Response'Success -> Parser Response'Success
loop Response'Success
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"Success"
  buildMessage :: Response'Success -> Builder
buildMessage
    = \ Response'Success
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (case
                  FoldLike
  (Maybe FundLnHodlInvoice)
  Response'Success
  Response'Success
  (Maybe FundLnHodlInvoice)
  (Maybe FundLnHodlInvoice)
-> Response'Success -> Maybe FundLnHodlInvoice
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'fundLnHodlInvoice") Response'Success
_x
              of
                Maybe FundLnHodlInvoice
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                (Prelude.Just FundLnHodlInvoice
_v)
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                       ((ByteString -> Builder)
-> (FundLnHodlInvoice -> ByteString)
-> FundLnHodlInvoice
-> 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))
                          FundLnHodlInvoice -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage FundLnHodlInvoice
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike
  FieldSet Response'Success Response'Success FieldSet FieldSet
-> Response'Success -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet Response'Success Response'Success FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Response'Success
_x))
instance Control.DeepSeq.NFData Response'Success where
  rnf :: Response'Success -> ()
rnf
    = \ Response'Success
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Response'Success -> FieldSet
_Response'Success'_unknownFields Response'Success
x__)
             (Maybe FundLnHodlInvoice -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (Response'Success -> Maybe FundLnHodlInvoice
_Response'Success'fundLnHodlInvoice Response'Success
x__) ())
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
  = ByteString
"\n\
    \!btc_lsp/method/swap_from_ln.proto\DC2\CANBtcLsp.Method.SwapFromLn\SUB\GSbtc_lsp/data/high_level.proto\"\214\SOH\n\
    \\aRequest\DC2,\n\
    \\ETXctx\CAN\SOH \SOH(\v2\SUB.BtcLsp.Data.HighLevel.CtxR\ETXctx\DC2?\n\
    \\n\
    \fund_money\CAN\STX \SOH(\v2 .BtcLsp.Data.HighLevel.FundMoneyR\tfundMoney\DC2\\\n\
    \\NAKfund_on_chain_address\CAN\ETX \SOH(\v2).BtcLsp.Data.HighLevel.FundOnChainAddressR\DC2fundOnChainAddress\"\185\EOT\n\
    \\bResponse\DC2,\n\
    \\ETXctx\CAN\SOH \SOH(\v2\SUB.BtcLsp.Data.HighLevel.CtxR\ETXctx\DC2F\n\
    \\asuccess\CAN\STX \SOH(\v2*.BtcLsp.Method.SwapFromLn.Response.SuccessH\NULR\asuccess\DC2F\n\
    \\afailure\CAN\ETX \SOH(\v2*.BtcLsp.Method.SwapFromLn.Response.FailureH\NULR\afailure\SUBd\n\
    \\aSuccess\DC2Y\n\
    \\DC4fund_ln_hodl_invoice\CAN\SOH \SOH(\v2(.BtcLsp.Data.HighLevel.FundLnHodlInvoiceR\DC1fundLnHodlInvoice\SUB\254\SOH\n\
    \\aFailure\DC2=\n\
    \\ageneric\CAN\SOH \ETX(\v2#.BtcLsp.Data.HighLevel.InputFailureR\ageneric\DC2S\n\
    \\bspecific\CAN\STX \ETX(\SO27.BtcLsp.Method.SwapFromLn.Response.Failure.InputFailureR\bspecific\DC2B\n\
    \\binternal\CAN\ETX \ETX(\v2&.BtcLsp.Data.HighLevel.InternalFailureR\binternal\"\ESC\n\
    \\fInputFailure\DC2\v\n\
    \\aDEFAULT\DLE\NULB\b\n\
    \\ACKeitherJ\246\ACK\n\
    \\ACK\DC2\EOT\NUL\NUL!\SOH\n\
    \\b\n\
    \\SOH\f\DC2\ETX\NUL\NUL\DLE\n\
    \\b\n\
    \\SOH\STX\DC2\ETX\STX\NUL!\n\
    \\t\n\
    \\STX\ETX\NUL\DC2\ETX\EOT\NUL'\n\
    \\n\
    \\n\
    \\STX\EOT\NUL\DC2\EOT\ACK\NUL\n\
    \\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\SOH\DC2\ETX\ACK\b\SI\n\
    \\v\n\
    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\a\STX%\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ACK\DC2\ETX\a\STX\FS\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\a\GS \n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\a#$\n\
    \\v\n\
    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\b\STX2\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ACK\DC2\ETX\b\STX\"\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\b#-\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\b01\n\
    \\v\n\
    \\EOT\EOT\NUL\STX\STX\DC2\ETX\t\STXF\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\STX\ACK\DC2\ETX\t\STX+\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\STX\SOH\DC2\ETX\t,A\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX\tDE\n\
    \\n\
    \\n\
    \\STX\EOT\SOH\DC2\EOT\f\NUL!\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\SOH\SOH\DC2\ETX\f\b\DLE\n\
    \\v\n\
    \\EOT\EOT\SOH\STX\NUL\DC2\ETX\r\STX%\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ACK\DC2\ETX\r\STX\FS\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\r\GS \n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\r#$\n\
    \\f\n\
    \\EOT\EOT\SOH\b\NUL\DC2\EOT\SI\STX\DC2\ETX\n\
    \\f\n\
    \\ENQ\EOT\SOH\b\NUL\SOH\DC2\ETX\SI\b\SO\n\
    \\v\n\
    \\EOT\EOT\SOH\STX\SOH\DC2\ETX\DLE\EOT\CAN\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\SOH\ACK\DC2\ETX\DLE\EOT\v\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\SOH\SOH\DC2\ETX\DLE\f\DC3\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\SOH\ETX\DC2\ETX\DLE\SYN\ETB\n\
    \\v\n\
    \\EOT\EOT\SOH\STX\STX\DC2\ETX\DC1\EOT\CAN\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\STX\ACK\DC2\ETX\DC1\EOT\v\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\STX\SOH\DC2\ETX\DC1\f\DC3\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\STX\ETX\DC2\ETX\DC1\SYN\ETB\n\
    \\f\n\
    \\EOT\EOT\SOH\ETX\NUL\DC2\EOT\DC4\STX\SYN\ETX\n\
    \\f\n\
    \\ENQ\EOT\SOH\ETX\NUL\SOH\DC2\ETX\DC4\n\
    \\DC1\n\
    \\r\n\
    \\ACK\EOT\SOH\ETX\NUL\STX\NUL\DC2\ETX\NAK\EOTF\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\NUL\STX\NUL\ACK\DC2\ETX\NAK\EOT,\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\NUL\STX\NUL\SOH\DC2\ETX\NAK-A\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\NUL\STX\NUL\ETX\DC2\ETX\NAKDE\n\
    \\f\n\
    \\EOT\EOT\SOH\ETX\SOH\DC2\EOT\CAN\STX \ETX\n\
    \\f\n\
    \\ENQ\EOT\SOH\ETX\SOH\SOH\DC2\ETX\CAN\n\
    \\DC1\n\
    \\r\n\
    \\ACK\EOT\SOH\ETX\SOH\STX\NUL\DC2\ETX\EM\EOT=\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\NUL\EOT\DC2\ETX\EM\EOT\f\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\NUL\ACK\DC2\ETX\EM\r0\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\NUL\SOH\DC2\ETX\EM18\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\NUL\ETX\DC2\ETX\EM;<\n\
    \\r\n\
    \\ACK\EOT\SOH\ETX\SOH\STX\SOH\DC2\ETX\SUB\EOT'\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\SOH\EOT\DC2\ETX\SUB\EOT\f\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\SOH\ACK\DC2\ETX\SUB\r\EM\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\SOH\SOH\DC2\ETX\SUB\SUB\"\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\SOH\ETX\DC2\ETX\SUB%&\n\
    \\r\n\
    \\ACK\EOT\SOH\ETX\SOH\STX\STX\DC2\ETX\ESC\EOTA\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\STX\EOT\DC2\ETX\ESC\EOT\f\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\STX\ACK\DC2\ETX\ESC\r3\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\STX\SOH\DC2\ETX\ESC4<\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\STX\STX\ETX\DC2\ETX\ESC?@\n\
    \\SO\n\
    \\ACK\EOT\SOH\ETX\SOH\EOT\NUL\DC2\EOT\GS\EOT\US\ENQ\n\
    \\SO\n\
    \\a\EOT\SOH\ETX\SOH\EOT\NUL\SOH\DC2\ETX\GS\t\NAK\n\
    \\SI\n\
    \\b\EOT\SOH\ETX\SOH\EOT\NUL\STX\NUL\DC2\ETX\RS\ACK\DC2\n\
    \\DLE\n\
    \\t\EOT\SOH\ETX\SOH\EOT\NUL\STX\NUL\SOH\DC2\ETX\RS\ACK\r\n\
    \\DLE\n\
    \\t\EOT\SOH\ETX\SOH\EOT\NUL\STX\NUL\STX\DC2\ETX\RS\DLE\DC1b\ACKproto3"