{- This file was auto-generated from btc_lsp/data/low_level.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.Data.LowLevel (
        LnHodlInvoice(), LnInvoice(), Msat(), OnChainAddress(), Urational()
    ) 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
{- | Fields :
     
         * 'Proto.BtcLsp.Data.LowLevel_Fields.val' @:: Lens' LnHodlInvoice Data.Text.Text@ -}
data LnHodlInvoice
  = LnHodlInvoice'_constructor {LnHodlInvoice -> Text
_LnHodlInvoice'val :: !Data.Text.Text,
                                LnHodlInvoice -> FieldSet
_LnHodlInvoice'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (LnHodlInvoice -> LnHodlInvoice -> Bool
(LnHodlInvoice -> LnHodlInvoice -> Bool)
-> (LnHodlInvoice -> LnHodlInvoice -> Bool) -> Eq LnHodlInvoice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LnHodlInvoice -> LnHodlInvoice -> Bool
$c/= :: LnHodlInvoice -> LnHodlInvoice -> Bool
== :: LnHodlInvoice -> LnHodlInvoice -> Bool
$c== :: LnHodlInvoice -> LnHodlInvoice -> Bool
Prelude.Eq, Eq LnHodlInvoice
Eq LnHodlInvoice
-> (LnHodlInvoice -> LnHodlInvoice -> Ordering)
-> (LnHodlInvoice -> LnHodlInvoice -> Bool)
-> (LnHodlInvoice -> LnHodlInvoice -> Bool)
-> (LnHodlInvoice -> LnHodlInvoice -> Bool)
-> (LnHodlInvoice -> LnHodlInvoice -> Bool)
-> (LnHodlInvoice -> LnHodlInvoice -> LnHodlInvoice)
-> (LnHodlInvoice -> LnHodlInvoice -> LnHodlInvoice)
-> Ord LnHodlInvoice
LnHodlInvoice -> LnHodlInvoice -> Bool
LnHodlInvoice -> LnHodlInvoice -> Ordering
LnHodlInvoice -> LnHodlInvoice -> LnHodlInvoice
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 :: LnHodlInvoice -> LnHodlInvoice -> LnHodlInvoice
$cmin :: LnHodlInvoice -> LnHodlInvoice -> LnHodlInvoice
max :: LnHodlInvoice -> LnHodlInvoice -> LnHodlInvoice
$cmax :: LnHodlInvoice -> LnHodlInvoice -> LnHodlInvoice
>= :: LnHodlInvoice -> LnHodlInvoice -> Bool
$c>= :: LnHodlInvoice -> LnHodlInvoice -> Bool
> :: LnHodlInvoice -> LnHodlInvoice -> Bool
$c> :: LnHodlInvoice -> LnHodlInvoice -> Bool
<= :: LnHodlInvoice -> LnHodlInvoice -> Bool
$c<= :: LnHodlInvoice -> LnHodlInvoice -> Bool
< :: LnHodlInvoice -> LnHodlInvoice -> Bool
$c< :: LnHodlInvoice -> LnHodlInvoice -> Bool
compare :: LnHodlInvoice -> LnHodlInvoice -> Ordering
$ccompare :: LnHodlInvoice -> LnHodlInvoice -> Ordering
Prelude.Ord, (forall x. LnHodlInvoice -> Rep LnHodlInvoice x)
-> (forall x. Rep LnHodlInvoice x -> LnHodlInvoice)
-> Generic LnHodlInvoice
forall x. Rep LnHodlInvoice x -> LnHodlInvoice
forall x. LnHodlInvoice -> Rep LnHodlInvoice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LnHodlInvoice x -> LnHodlInvoice
$cfrom :: forall x. LnHodlInvoice -> Rep LnHodlInvoice x
GHC.Generics.Generic)
instance Prelude.Show LnHodlInvoice where
  showsPrec :: Int -> LnHodlInvoice -> ShowS
showsPrec Int
_ LnHodlInvoice
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (LnHodlInvoice -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort LnHodlInvoice
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Text.PrettyPrint.GenericPretty.Out LnHodlInvoice
instance Data.ProtoLens.Field.HasField LnHodlInvoice "val" Data.Text.Text where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "val"
-> (Text -> f Text) -> LnHodlInvoice -> f LnHodlInvoice
fieldOf Proxy# "val"
_
    = ((Text -> f Text) -> LnHodlInvoice -> f LnHodlInvoice)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> LnHodlInvoice
-> f LnHodlInvoice
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((LnHodlInvoice -> Text)
-> (LnHodlInvoice -> Text -> LnHodlInvoice)
-> Lens LnHodlInvoice LnHodlInvoice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           LnHodlInvoice -> Text
_LnHodlInvoice'val (\ LnHodlInvoice
x__ Text
y__ -> LnHodlInvoice
x__ {_LnHodlInvoice'val :: Text
_LnHodlInvoice'val = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message LnHodlInvoice where
  messageName :: Proxy LnHodlInvoice -> Text
messageName Proxy LnHodlInvoice
_ = String -> Text
Data.Text.pack String
"BtcLsp.Data.LowLevel.LnHodlInvoice"
  packedMessageDescriptor :: Proxy LnHodlInvoice -> ByteString
packedMessageDescriptor Proxy LnHodlInvoice
_
    = ByteString
"\n\
      \\rLnHodlInvoice\DC2\DLE\n\
      \\ETXval\CAN\SOH \SOH(\tR\ETXval"
  packedFileDescriptor :: Proxy LnHodlInvoice -> ByteString
packedFileDescriptor Proxy LnHodlInvoice
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor LnHodlInvoice)
fieldsByTag
    = let
        val__field_descriptor :: FieldDescriptor LnHodlInvoice
val__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor LnHodlInvoice Text
-> FieldDescriptor LnHodlInvoice
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"val"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens LnHodlInvoice LnHodlInvoice Text Text
-> FieldAccessor LnHodlInvoice Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"val")) ::
              Data.ProtoLens.FieldDescriptor LnHodlInvoice
      in
        [(Tag, FieldDescriptor LnHodlInvoice)]
-> Map Tag (FieldDescriptor LnHodlInvoice)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor LnHodlInvoice
val__field_descriptor)]
  unknownFields :: Lens' LnHodlInvoice FieldSet
unknownFields
    = (LnHodlInvoice -> FieldSet)
-> (LnHodlInvoice -> FieldSet -> LnHodlInvoice)
-> Lens' LnHodlInvoice FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        LnHodlInvoice -> FieldSet
_LnHodlInvoice'_unknownFields
        (\ LnHodlInvoice
x__ FieldSet
y__ -> LnHodlInvoice
x__ {_LnHodlInvoice'_unknownFields :: FieldSet
_LnHodlInvoice'_unknownFields = FieldSet
y__})
  defMessage :: LnHodlInvoice
defMessage
    = LnHodlInvoice'_constructor :: Text -> FieldSet -> LnHodlInvoice
LnHodlInvoice'_constructor
        {_LnHodlInvoice'val :: Text
_LnHodlInvoice'val = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _LnHodlInvoice'_unknownFields :: FieldSet
_LnHodlInvoice'_unknownFields = []}
  parseMessage :: Parser LnHodlInvoice
parseMessage
    = let
        loop ::
          LnHodlInvoice -> Data.ProtoLens.Encoding.Bytes.Parser LnHodlInvoice
        loop :: LnHodlInvoice -> Parser LnHodlInvoice
loop LnHodlInvoice
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]))))
                      LnHodlInvoice -> Parser LnHodlInvoice
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter LnHodlInvoice LnHodlInvoice FieldSet FieldSet
-> (FieldSet -> FieldSet) -> LnHodlInvoice -> LnHodlInvoice
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 LnHodlInvoice LnHodlInvoice FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) LnHodlInvoice
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       String
"val"
                                LnHodlInvoice -> Parser LnHodlInvoice
loop (Setter LnHodlInvoice LnHodlInvoice Text Text
-> Text -> LnHodlInvoice -> LnHodlInvoice
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 @"val") Text
y LnHodlInvoice
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                LnHodlInvoice -> Parser LnHodlInvoice
loop
                                  (Setter LnHodlInvoice LnHodlInvoice FieldSet FieldSet
-> (FieldSet -> FieldSet) -> LnHodlInvoice -> LnHodlInvoice
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 LnHodlInvoice LnHodlInvoice FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) LnHodlInvoice
x)
      in
        Parser LnHodlInvoice -> String -> Parser LnHodlInvoice
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do LnHodlInvoice -> Parser LnHodlInvoice
loop LnHodlInvoice
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"LnHodlInvoice"
  buildMessage :: LnHodlInvoice -> Builder
buildMessage
    = \ LnHodlInvoice
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: Text
_v = FoldLike Text LnHodlInvoice LnHodlInvoice Text Text
-> LnHodlInvoice -> Text
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 @"val") LnHodlInvoice
_x
              in
                if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                      ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> 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))
                         Text -> ByteString
Data.Text.Encoding.encodeUtf8 Text
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet LnHodlInvoice LnHodlInvoice FieldSet FieldSet
-> LnHodlInvoice -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet LnHodlInvoice LnHodlInvoice FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields LnHodlInvoice
_x))
instance Control.DeepSeq.NFData LnHodlInvoice where
  rnf :: LnHodlInvoice -> ()
rnf
    = \ LnHodlInvoice
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (LnHodlInvoice -> FieldSet
_LnHodlInvoice'_unknownFields LnHodlInvoice
x__)
             (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (LnHodlInvoice -> Text
_LnHodlInvoice'val LnHodlInvoice
x__) ())
{- | Fields :
     
         * 'Proto.BtcLsp.Data.LowLevel_Fields.val' @:: Lens' LnInvoice Data.Text.Text@ -}
data LnInvoice
  = LnInvoice'_constructor {LnInvoice -> Text
_LnInvoice'val :: !Data.Text.Text,
                            LnInvoice -> FieldSet
_LnInvoice'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (LnInvoice -> LnInvoice -> Bool
(LnInvoice -> LnInvoice -> Bool)
-> (LnInvoice -> LnInvoice -> Bool) -> Eq LnInvoice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LnInvoice -> LnInvoice -> Bool
$c/= :: LnInvoice -> LnInvoice -> Bool
== :: LnInvoice -> LnInvoice -> Bool
$c== :: LnInvoice -> LnInvoice -> Bool
Prelude.Eq, Eq LnInvoice
Eq LnInvoice
-> (LnInvoice -> LnInvoice -> Ordering)
-> (LnInvoice -> LnInvoice -> Bool)
-> (LnInvoice -> LnInvoice -> Bool)
-> (LnInvoice -> LnInvoice -> Bool)
-> (LnInvoice -> LnInvoice -> Bool)
-> (LnInvoice -> LnInvoice -> LnInvoice)
-> (LnInvoice -> LnInvoice -> LnInvoice)
-> Ord LnInvoice
LnInvoice -> LnInvoice -> Bool
LnInvoice -> LnInvoice -> Ordering
LnInvoice -> LnInvoice -> LnInvoice
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 :: LnInvoice -> LnInvoice -> LnInvoice
$cmin :: LnInvoice -> LnInvoice -> LnInvoice
max :: LnInvoice -> LnInvoice -> LnInvoice
$cmax :: LnInvoice -> LnInvoice -> LnInvoice
>= :: LnInvoice -> LnInvoice -> Bool
$c>= :: LnInvoice -> LnInvoice -> Bool
> :: LnInvoice -> LnInvoice -> Bool
$c> :: LnInvoice -> LnInvoice -> Bool
<= :: LnInvoice -> LnInvoice -> Bool
$c<= :: LnInvoice -> LnInvoice -> Bool
< :: LnInvoice -> LnInvoice -> Bool
$c< :: LnInvoice -> LnInvoice -> Bool
compare :: LnInvoice -> LnInvoice -> Ordering
$ccompare :: LnInvoice -> LnInvoice -> Ordering
Prelude.Ord, (forall x. LnInvoice -> Rep LnInvoice x)
-> (forall x. Rep LnInvoice x -> LnInvoice) -> Generic LnInvoice
forall x. Rep LnInvoice x -> LnInvoice
forall x. LnInvoice -> Rep LnInvoice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LnInvoice x -> LnInvoice
$cfrom :: forall x. LnInvoice -> Rep LnInvoice x
GHC.Generics.Generic)
instance Prelude.Show LnInvoice where
  showsPrec :: Int -> LnInvoice -> ShowS
showsPrec Int
_ LnInvoice
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (LnInvoice -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort LnInvoice
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Text.PrettyPrint.GenericPretty.Out LnInvoice
instance Data.ProtoLens.Field.HasField LnInvoice "val" Data.Text.Text where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "val" -> (Text -> f Text) -> LnInvoice -> f LnInvoice
fieldOf Proxy# "val"
_
    = ((Text -> f Text) -> LnInvoice -> f LnInvoice)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> LnInvoice
-> f LnInvoice
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((LnInvoice -> Text)
-> (LnInvoice -> Text -> LnInvoice)
-> Lens LnInvoice LnInvoice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           LnInvoice -> Text
_LnInvoice'val (\ LnInvoice
x__ Text
y__ -> LnInvoice
x__ {_LnInvoice'val :: Text
_LnInvoice'val = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message LnInvoice where
  messageName :: Proxy LnInvoice -> Text
messageName Proxy LnInvoice
_ = String -> Text
Data.Text.pack String
"BtcLsp.Data.LowLevel.LnInvoice"
  packedMessageDescriptor :: Proxy LnInvoice -> ByteString
packedMessageDescriptor Proxy LnInvoice
_
    = ByteString
"\n\
      \\tLnInvoice\DC2\DLE\n\
      \\ETXval\CAN\SOH \SOH(\tR\ETXval"
  packedFileDescriptor :: Proxy LnInvoice -> ByteString
packedFileDescriptor Proxy LnInvoice
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor LnInvoice)
fieldsByTag
    = let
        val__field_descriptor :: FieldDescriptor LnInvoice
val__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor LnInvoice Text
-> FieldDescriptor LnInvoice
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"val"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens LnInvoice LnInvoice Text Text
-> FieldAccessor LnInvoice Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"val")) ::
              Data.ProtoLens.FieldDescriptor LnInvoice
      in
        [(Tag, FieldDescriptor LnInvoice)]
-> Map Tag (FieldDescriptor LnInvoice)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor LnInvoice
val__field_descriptor)]
  unknownFields :: Lens' LnInvoice FieldSet
unknownFields
    = (LnInvoice -> FieldSet)
-> (LnInvoice -> FieldSet -> LnInvoice) -> Lens' LnInvoice FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        LnInvoice -> FieldSet
_LnInvoice'_unknownFields
        (\ LnInvoice
x__ FieldSet
y__ -> LnInvoice
x__ {_LnInvoice'_unknownFields :: FieldSet
_LnInvoice'_unknownFields = FieldSet
y__})
  defMessage :: LnInvoice
defMessage
    = LnInvoice'_constructor :: Text -> FieldSet -> LnInvoice
LnInvoice'_constructor
        {_LnInvoice'val :: Text
_LnInvoice'val = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _LnInvoice'_unknownFields :: FieldSet
_LnInvoice'_unknownFields = []}
  parseMessage :: Parser LnInvoice
parseMessage
    = let
        loop :: LnInvoice -> Data.ProtoLens.Encoding.Bytes.Parser LnInvoice
        loop :: LnInvoice -> Parser LnInvoice
loop LnInvoice
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]))))
                      LnInvoice -> Parser LnInvoice
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter LnInvoice LnInvoice FieldSet FieldSet
-> (FieldSet -> FieldSet) -> LnInvoice -> LnInvoice
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 LnInvoice LnInvoice FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) LnInvoice
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       String
"val"
                                LnInvoice -> Parser LnInvoice
loop (Setter LnInvoice LnInvoice Text Text
-> Text -> LnInvoice -> LnInvoice
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 @"val") Text
y LnInvoice
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                LnInvoice -> Parser LnInvoice
loop
                                  (Setter LnInvoice LnInvoice FieldSet FieldSet
-> (FieldSet -> FieldSet) -> LnInvoice -> LnInvoice
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 LnInvoice LnInvoice FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) LnInvoice
x)
      in
        Parser LnInvoice -> String -> Parser LnInvoice
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do LnInvoice -> Parser LnInvoice
loop LnInvoice
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"LnInvoice"
  buildMessage :: LnInvoice -> Builder
buildMessage
    = \ LnInvoice
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: Text
_v = FoldLike Text LnInvoice LnInvoice Text Text -> LnInvoice -> Text
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 @"val") LnInvoice
_x
              in
                if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                      ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> 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))
                         Text -> ByteString
Data.Text.Encoding.encodeUtf8 Text
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet LnInvoice LnInvoice FieldSet FieldSet
-> LnInvoice -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet LnInvoice LnInvoice FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields LnInvoice
_x))
instance Control.DeepSeq.NFData LnInvoice where
  rnf :: LnInvoice -> ()
rnf
    = \ LnInvoice
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (LnInvoice -> FieldSet
_LnInvoice'_unknownFields LnInvoice
x__)
             (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (LnInvoice -> Text
_LnInvoice'val LnInvoice
x__) ())
{- | Fields :
     
         * 'Proto.BtcLsp.Data.LowLevel_Fields.val' @:: Lens' Msat Data.Word.Word64@ -}
data Msat
  = Msat'_constructor {Msat -> Word64
_Msat'val :: !Data.Word.Word64,
                       Msat -> FieldSet
_Msat'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Msat -> Msat -> Bool
(Msat -> Msat -> Bool) -> (Msat -> Msat -> Bool) -> Eq Msat
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Msat -> Msat -> Bool
$c/= :: Msat -> Msat -> Bool
== :: Msat -> Msat -> Bool
$c== :: Msat -> Msat -> Bool
Prelude.Eq, Eq Msat
Eq Msat
-> (Msat -> Msat -> Ordering)
-> (Msat -> Msat -> Bool)
-> (Msat -> Msat -> Bool)
-> (Msat -> Msat -> Bool)
-> (Msat -> Msat -> Bool)
-> (Msat -> Msat -> Msat)
-> (Msat -> Msat -> Msat)
-> Ord Msat
Msat -> Msat -> Bool
Msat -> Msat -> Ordering
Msat -> Msat -> Msat
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 :: Msat -> Msat -> Msat
$cmin :: Msat -> Msat -> Msat
max :: Msat -> Msat -> Msat
$cmax :: Msat -> Msat -> Msat
>= :: Msat -> Msat -> Bool
$c>= :: Msat -> Msat -> Bool
> :: Msat -> Msat -> Bool
$c> :: Msat -> Msat -> Bool
<= :: Msat -> Msat -> Bool
$c<= :: Msat -> Msat -> Bool
< :: Msat -> Msat -> Bool
$c< :: Msat -> Msat -> Bool
compare :: Msat -> Msat -> Ordering
$ccompare :: Msat -> Msat -> Ordering
Prelude.Ord, (forall x. Msat -> Rep Msat x)
-> (forall x. Rep Msat x -> Msat) -> Generic Msat
forall x. Rep Msat x -> Msat
forall x. Msat -> Rep Msat x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Msat x -> Msat
$cfrom :: forall x. Msat -> Rep Msat x
GHC.Generics.Generic)
instance Prelude.Show Msat where
  showsPrec :: Int -> Msat -> ShowS
showsPrec Int
_ Msat
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (Msat -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Msat
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Text.PrettyPrint.GenericPretty.Out Msat
instance Data.ProtoLens.Field.HasField Msat "val" Data.Word.Word64 where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "val" -> (Word64 -> f Word64) -> Msat -> f Msat
fieldOf Proxy# "val"
_
    = ((Word64 -> f Word64) -> Msat -> f Msat)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> Msat
-> f Msat
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Msat -> Word64)
-> (Msat -> Word64 -> Msat) -> Lens Msat Msat Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Msat -> Word64
_Msat'val (\ Msat
x__ Word64
y__ -> Msat
x__ {_Msat'val :: Word64
_Msat'val = Word64
y__}))
        (Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Msat where
  messageName :: Proxy Msat -> Text
messageName Proxy Msat
_ = String -> Text
Data.Text.pack String
"BtcLsp.Data.LowLevel.Msat"
  packedMessageDescriptor :: Proxy Msat -> ByteString
packedMessageDescriptor Proxy Msat
_
    = ByteString
"\n\
      \\EOTMsat\DC2\DLE\n\
      \\ETXval\CAN\SOH \SOH(\EOTR\ETXval"
  packedFileDescriptor :: Proxy Msat -> ByteString
packedFileDescriptor Proxy Msat
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor Msat)
fieldsByTag
    = let
        val__field_descriptor :: FieldDescriptor Msat
val__field_descriptor
          = String
-> FieldTypeDescriptor Word64
-> FieldAccessor Msat Word64
-> FieldDescriptor Msat
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"val"
              (ScalarField Word64 -> FieldTypeDescriptor Word64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word64
Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (WireDefault Word64
-> Lens Msat Msat Word64 Word64 -> FieldAccessor Msat Word64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Word64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"val")) ::
              Data.ProtoLens.FieldDescriptor Msat
      in
        [(Tag, FieldDescriptor Msat)] -> Map Tag (FieldDescriptor Msat)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor Msat
val__field_descriptor)]
  unknownFields :: Lens' Msat FieldSet
unknownFields
    = (Msat -> FieldSet)
-> (Msat -> FieldSet -> Msat) -> Lens' Msat FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Msat -> FieldSet
_Msat'_unknownFields
        (\ Msat
x__ FieldSet
y__ -> Msat
x__ {_Msat'_unknownFields :: FieldSet
_Msat'_unknownFields = FieldSet
y__})
  defMessage :: Msat
defMessage
    = Msat'_constructor :: Word64 -> FieldSet -> Msat
Msat'_constructor
        {_Msat'val :: Word64
_Msat'val = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _Msat'_unknownFields :: FieldSet
_Msat'_unknownFields = []}
  parseMessage :: Parser Msat
parseMessage
    = let
        loop :: Msat -> Data.ProtoLens.Encoding.Bytes.Parser Msat
        loop :: Msat -> Parser Msat
loop Msat
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]))))
                      Msat -> Parser Msat
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Msat Msat FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Msat -> Msat
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 Msat Msat FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Msat
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
8 -> do Word64
y <- Parser Word64 -> String -> Parser Word64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt String
"val"
                                Msat -> Parser Msat
loop (Setter Msat Msat Word64 Word64 -> Word64 -> Msat -> Msat
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 @"val") Word64
y Msat
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Msat -> Parser Msat
loop
                                  (Setter Msat Msat FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Msat -> Msat
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 Msat Msat FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Msat
x)
      in
        Parser Msat -> String -> Parser Msat
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Msat -> Parser Msat
loop Msat
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"Msat"
  buildMessage :: Msat -> Builder
buildMessage
    = \ Msat
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: Word64
_v = FoldLike Word64 Msat Msat Word64 Word64 -> Msat -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"val") Msat
_x
              in
                if Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word64
_v Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
8)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet Msat Msat FieldSet FieldSet -> Msat -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Msat Msat FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Msat
_x))
instance Control.DeepSeq.NFData Msat where
  rnf :: Msat -> ()
rnf
    = \ Msat
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Msat -> FieldSet
_Msat'_unknownFields Msat
x__)
             (Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Msat -> Word64
_Msat'val Msat
x__) ())
{- | Fields :
     
         * 'Proto.BtcLsp.Data.LowLevel_Fields.val' @:: Lens' OnChainAddress Data.Text.Text@ -}
data OnChainAddress
  = OnChainAddress'_constructor {OnChainAddress -> Text
_OnChainAddress'val :: !Data.Text.Text,
                                 OnChainAddress -> FieldSet
_OnChainAddress'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (OnChainAddress -> OnChainAddress -> Bool
(OnChainAddress -> OnChainAddress -> Bool)
-> (OnChainAddress -> OnChainAddress -> Bool) -> Eq OnChainAddress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OnChainAddress -> OnChainAddress -> Bool
$c/= :: OnChainAddress -> OnChainAddress -> Bool
== :: OnChainAddress -> OnChainAddress -> Bool
$c== :: OnChainAddress -> OnChainAddress -> Bool
Prelude.Eq, Eq OnChainAddress
Eq OnChainAddress
-> (OnChainAddress -> OnChainAddress -> Ordering)
-> (OnChainAddress -> OnChainAddress -> Bool)
-> (OnChainAddress -> OnChainAddress -> Bool)
-> (OnChainAddress -> OnChainAddress -> Bool)
-> (OnChainAddress -> OnChainAddress -> Bool)
-> (OnChainAddress -> OnChainAddress -> OnChainAddress)
-> (OnChainAddress -> OnChainAddress -> OnChainAddress)
-> Ord OnChainAddress
OnChainAddress -> OnChainAddress -> Bool
OnChainAddress -> OnChainAddress -> Ordering
OnChainAddress -> OnChainAddress -> OnChainAddress
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 :: OnChainAddress -> OnChainAddress -> OnChainAddress
$cmin :: OnChainAddress -> OnChainAddress -> OnChainAddress
max :: OnChainAddress -> OnChainAddress -> OnChainAddress
$cmax :: OnChainAddress -> OnChainAddress -> OnChainAddress
>= :: OnChainAddress -> OnChainAddress -> Bool
$c>= :: OnChainAddress -> OnChainAddress -> Bool
> :: OnChainAddress -> OnChainAddress -> Bool
$c> :: OnChainAddress -> OnChainAddress -> Bool
<= :: OnChainAddress -> OnChainAddress -> Bool
$c<= :: OnChainAddress -> OnChainAddress -> Bool
< :: OnChainAddress -> OnChainAddress -> Bool
$c< :: OnChainAddress -> OnChainAddress -> Bool
compare :: OnChainAddress -> OnChainAddress -> Ordering
$ccompare :: OnChainAddress -> OnChainAddress -> Ordering
Prelude.Ord, (forall x. OnChainAddress -> Rep OnChainAddress x)
-> (forall x. Rep OnChainAddress x -> OnChainAddress)
-> Generic OnChainAddress
forall x. Rep OnChainAddress x -> OnChainAddress
forall x. OnChainAddress -> Rep OnChainAddress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OnChainAddress x -> OnChainAddress
$cfrom :: forall x. OnChainAddress -> Rep OnChainAddress x
GHC.Generics.Generic)
instance Prelude.Show OnChainAddress where
  showsPrec :: Int -> OnChainAddress -> ShowS
showsPrec Int
_ OnChainAddress
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (OnChainAddress -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort OnChainAddress
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Text.PrettyPrint.GenericPretty.Out OnChainAddress
instance Data.ProtoLens.Field.HasField OnChainAddress "val" Data.Text.Text where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "val"
-> (Text -> f Text) -> OnChainAddress -> f OnChainAddress
fieldOf Proxy# "val"
_
    = ((Text -> f Text) -> OnChainAddress -> f OnChainAddress)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> OnChainAddress
-> f OnChainAddress
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((OnChainAddress -> Text)
-> (OnChainAddress -> Text -> OnChainAddress)
-> Lens OnChainAddress OnChainAddress Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           OnChainAddress -> Text
_OnChainAddress'val (\ OnChainAddress
x__ Text
y__ -> OnChainAddress
x__ {_OnChainAddress'val :: Text
_OnChainAddress'val = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message OnChainAddress where
  messageName :: Proxy OnChainAddress -> Text
messageName Proxy OnChainAddress
_
    = String -> Text
Data.Text.pack String
"BtcLsp.Data.LowLevel.OnChainAddress"
  packedMessageDescriptor :: Proxy OnChainAddress -> ByteString
packedMessageDescriptor Proxy OnChainAddress
_
    = ByteString
"\n\
      \\SOOnChainAddress\DC2\DLE\n\
      \\ETXval\CAN\SOH \SOH(\tR\ETXval"
  packedFileDescriptor :: Proxy OnChainAddress -> ByteString
packedFileDescriptor Proxy OnChainAddress
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor OnChainAddress)
fieldsByTag
    = let
        val__field_descriptor :: FieldDescriptor OnChainAddress
val__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor OnChainAddress Text
-> FieldDescriptor OnChainAddress
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"val"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens OnChainAddress OnChainAddress Text Text
-> FieldAccessor OnChainAddress Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"val")) ::
              Data.ProtoLens.FieldDescriptor OnChainAddress
      in
        [(Tag, FieldDescriptor OnChainAddress)]
-> Map Tag (FieldDescriptor OnChainAddress)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor OnChainAddress
val__field_descriptor)]
  unknownFields :: Lens' OnChainAddress FieldSet
unknownFields
    = (OnChainAddress -> FieldSet)
-> (OnChainAddress -> FieldSet -> OnChainAddress)
-> Lens' OnChainAddress FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        OnChainAddress -> FieldSet
_OnChainAddress'_unknownFields
        (\ OnChainAddress
x__ FieldSet
y__ -> OnChainAddress
x__ {_OnChainAddress'_unknownFields :: FieldSet
_OnChainAddress'_unknownFields = FieldSet
y__})
  defMessage :: OnChainAddress
defMessage
    = OnChainAddress'_constructor :: Text -> FieldSet -> OnChainAddress
OnChainAddress'_constructor
        {_OnChainAddress'val :: Text
_OnChainAddress'val = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _OnChainAddress'_unknownFields :: FieldSet
_OnChainAddress'_unknownFields = []}
  parseMessage :: Parser OnChainAddress
parseMessage
    = let
        loop ::
          OnChainAddress
          -> Data.ProtoLens.Encoding.Bytes.Parser OnChainAddress
        loop :: OnChainAddress -> Parser OnChainAddress
loop OnChainAddress
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]))))
                      OnChainAddress -> Parser OnChainAddress
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter OnChainAddress OnChainAddress FieldSet FieldSet
-> (FieldSet -> FieldSet) -> OnChainAddress -> OnChainAddress
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 OnChainAddress OnChainAddress FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) OnChainAddress
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
10
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       String
"val"
                                OnChainAddress -> Parser OnChainAddress
loop (Setter OnChainAddress OnChainAddress Text Text
-> Text -> OnChainAddress -> OnChainAddress
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 @"val") Text
y OnChainAddress
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                OnChainAddress -> Parser OnChainAddress
loop
                                  (Setter OnChainAddress OnChainAddress FieldSet FieldSet
-> (FieldSet -> FieldSet) -> OnChainAddress -> OnChainAddress
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 OnChainAddress OnChainAddress FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) OnChainAddress
x)
      in
        Parser OnChainAddress -> String -> Parser OnChainAddress
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do OnChainAddress -> Parser OnChainAddress
loop OnChainAddress
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"OnChainAddress"
  buildMessage :: OnChainAddress -> Builder
buildMessage
    = \ OnChainAddress
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: Text
_v = FoldLike Text OnChainAddress OnChainAddress Text Text
-> OnChainAddress -> Text
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 @"val") OnChainAddress
_x
              in
                if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
10)
                      ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> 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))
                         Text -> ByteString
Data.Text.Encoding.encodeUtf8 Text
_v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet OnChainAddress OnChainAddress FieldSet FieldSet
-> OnChainAddress -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet OnChainAddress OnChainAddress FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields OnChainAddress
_x))
instance Control.DeepSeq.NFData OnChainAddress where
  rnf :: OnChainAddress -> ()
rnf
    = \ OnChainAddress
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (OnChainAddress -> FieldSet
_OnChainAddress'_unknownFields OnChainAddress
x__)
             (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (OnChainAddress -> Text
_OnChainAddress'val OnChainAddress
x__) ())
{- | Fields :
     
         * 'Proto.BtcLsp.Data.LowLevel_Fields.numerator' @:: Lens' Urational Data.Word.Word64@
         * 'Proto.BtcLsp.Data.LowLevel_Fields.denominator' @:: Lens' Urational Data.Word.Word64@ -}
data Urational
  = Urational'_constructor {Urational -> Word64
_Urational'numerator :: !Data.Word.Word64,
                            Urational -> Word64
_Urational'denominator :: !Data.Word.Word64,
                            Urational -> FieldSet
_Urational'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Urational -> Urational -> Bool
(Urational -> Urational -> Bool)
-> (Urational -> Urational -> Bool) -> Eq Urational
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Urational -> Urational -> Bool
$c/= :: Urational -> Urational -> Bool
== :: Urational -> Urational -> Bool
$c== :: Urational -> Urational -> Bool
Prelude.Eq, Eq Urational
Eq Urational
-> (Urational -> Urational -> Ordering)
-> (Urational -> Urational -> Bool)
-> (Urational -> Urational -> Bool)
-> (Urational -> Urational -> Bool)
-> (Urational -> Urational -> Bool)
-> (Urational -> Urational -> Urational)
-> (Urational -> Urational -> Urational)
-> Ord Urational
Urational -> Urational -> Bool
Urational -> Urational -> Ordering
Urational -> Urational -> Urational
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 :: Urational -> Urational -> Urational
$cmin :: Urational -> Urational -> Urational
max :: Urational -> Urational -> Urational
$cmax :: Urational -> Urational -> Urational
>= :: Urational -> Urational -> Bool
$c>= :: Urational -> Urational -> Bool
> :: Urational -> Urational -> Bool
$c> :: Urational -> Urational -> Bool
<= :: Urational -> Urational -> Bool
$c<= :: Urational -> Urational -> Bool
< :: Urational -> Urational -> Bool
$c< :: Urational -> Urational -> Bool
compare :: Urational -> Urational -> Ordering
$ccompare :: Urational -> Urational -> Ordering
Prelude.Ord, (forall x. Urational -> Rep Urational x)
-> (forall x. Rep Urational x -> Urational) -> Generic Urational
forall x. Rep Urational x -> Urational
forall x. Urational -> Rep Urational x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Urational x -> Urational
$cfrom :: forall x. Urational -> Rep Urational x
GHC.Generics.Generic)
instance Prelude.Show Urational where
  showsPrec :: Int -> Urational -> ShowS
showsPrec Int
_ Urational
__x String
__s
    = Char -> ShowS
Prelude.showChar
        Char
'{'
        (String -> ShowS
Prelude.showString
           (Urational -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Urational
__x) (Char -> ShowS
Prelude.showChar Char
'}' String
__s))
instance Text.PrettyPrint.GenericPretty.Out Urational
instance Data.ProtoLens.Field.HasField Urational "numerator" Data.Word.Word64 where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "numerator"
-> (Word64 -> f Word64) -> Urational -> f Urational
fieldOf Proxy# "numerator"
_
    = ((Word64 -> f Word64) -> Urational -> f Urational)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> Urational
-> f Urational
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Urational -> Word64)
-> (Urational -> Word64 -> Urational)
-> Lens Urational Urational Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Urational -> Word64
_Urational'numerator
           (\ Urational
x__ Word64
y__ -> Urational
x__ {_Urational'numerator :: Word64
_Urational'numerator = Word64
y__}))
        (Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Urational "denominator" Data.Word.Word64 where
  fieldOf :: forall (f :: * -> *).
Functor f =>
Proxy# "denominator"
-> (Word64 -> f Word64) -> Urational -> f Urational
fieldOf Proxy# "denominator"
_
    = ((Word64 -> f Word64) -> Urational -> f Urational)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> Urational
-> f Urational
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Urational -> Word64)
-> (Urational -> Word64 -> Urational)
-> Lens Urational Urational Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Urational -> Word64
_Urational'denominator
           (\ Urational
x__ Word64
y__ -> Urational
x__ {_Urational'denominator :: Word64
_Urational'denominator = Word64
y__}))
        (Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Urational where
  messageName :: Proxy Urational -> Text
messageName Proxy Urational
_ = String -> Text
Data.Text.pack String
"BtcLsp.Data.LowLevel.Urational"
  packedMessageDescriptor :: Proxy Urational -> ByteString
packedMessageDescriptor Proxy Urational
_
    = ByteString
"\n\
      \\tUrational\DC2\FS\n\
      \\tnumerator\CAN\SOH \SOH(\EOTR\tnumerator\DC2 \n\
      \\vdenominator\CAN\STX \SOH(\EOTR\vdenominator"
  packedFileDescriptor :: Proxy Urational -> ByteString
packedFileDescriptor Proxy Urational
_ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor Urational)
fieldsByTag
    = let
        numerator__field_descriptor :: FieldDescriptor Urational
numerator__field_descriptor
          = String
-> FieldTypeDescriptor Word64
-> FieldAccessor Urational Word64
-> FieldDescriptor Urational
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"numerator"
              (ScalarField Word64 -> FieldTypeDescriptor Word64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word64
Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (WireDefault Word64
-> Lens Urational Urational Word64 Word64
-> FieldAccessor Urational Word64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Word64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"numerator")) ::
              Data.ProtoLens.FieldDescriptor Urational
        denominator__field_descriptor :: FieldDescriptor Urational
denominator__field_descriptor
          = String
-> FieldTypeDescriptor Word64
-> FieldAccessor Urational Word64
-> FieldDescriptor Urational
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              String
"denominator"
              (ScalarField Word64 -> FieldTypeDescriptor Word64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word64
Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (WireDefault Word64
-> Lens Urational Urational Word64 Word64
-> FieldAccessor Urational Word64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Word64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"denominator")) ::
              Data.ProtoLens.FieldDescriptor Urational
      in
        [(Tag, FieldDescriptor Urational)]
-> Map Tag (FieldDescriptor Urational)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag Int
1, FieldDescriptor Urational
numerator__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag Int
2, FieldDescriptor Urational
denominator__field_descriptor)]
  unknownFields :: Lens' Urational FieldSet
unknownFields
    = (Urational -> FieldSet)
-> (Urational -> FieldSet -> Urational) -> Lens' Urational FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Urational -> FieldSet
_Urational'_unknownFields
        (\ Urational
x__ FieldSet
y__ -> Urational
x__ {_Urational'_unknownFields :: FieldSet
_Urational'_unknownFields = FieldSet
y__})
  defMessage :: Urational
defMessage
    = Urational'_constructor :: Word64 -> Word64 -> FieldSet -> Urational
Urational'_constructor
        {_Urational'numerator :: Word64
_Urational'numerator = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _Urational'denominator :: Word64
_Urational'denominator = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _Urational'_unknownFields :: FieldSet
_Urational'_unknownFields = []}
  parseMessage :: Parser Urational
parseMessage
    = let
        loop :: Urational -> Data.ProtoLens.Encoding.Bytes.Parser Urational
        loop :: Urational -> Parser Urational
loop Urational
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]))))
                      Urational -> Parser Urational
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Urational Urational FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Urational -> Urational
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 Urational Urational FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Urational
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        Word64
8 -> do Word64
y <- Parser Word64 -> String -> Parser Word64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt String
"numerator"
                                Urational -> Parser Urational
loop
                                  (Setter Urational Urational Word64 Word64
-> Word64 -> Urational -> Urational
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 @"numerator") Word64
y Urational
x)
                        Word64
16
                          -> do Word64
y <- Parser Word64 -> String -> Parser Word64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt String
"denominator"
                                Urational -> Parser Urational
loop
                                  (Setter Urational Urational Word64 Word64
-> Word64 -> Urational -> Urational
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 @"denominator") Word64
y Urational
x)
                        Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Urational -> Parser Urational
loop
                                  (Setter Urational Urational FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Urational -> Urational
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 Urational Urational FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Urational
x)
      in
        Parser Urational -> String -> Parser Urational
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Urational -> Parser Urational
loop Urational
forall msg. Message msg => msg
Data.ProtoLens.defMessage) String
"Urational"
  buildMessage :: Urational -> Builder
buildMessage
    = \ Urational
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Word64
_v = FoldLike Word64 Urational Urational Word64 Word64
-> Urational -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"numerator") Urational
_x
              in
                if Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word64
_v Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
8)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   _v :: Word64
_v
                     = FoldLike Word64 Urational Urational Word64 Word64
-> Urational -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"denominator") Urational
_x
                 in
                   if Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word64
_v Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                       Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   else
                       Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
16)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet Urational Urational FieldSet FieldSet
-> Urational -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Urational Urational FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Urational
_x)))
instance Control.DeepSeq.NFData Urational where
  rnf :: Urational -> ()
rnf
    = \ Urational
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Urational -> FieldSet
_Urational'_unknownFields Urational
x__)
             (Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (Urational -> Word64
_Urational'numerator Urational
x__)
                (Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Urational -> Word64
_Urational'denominator Urational
x__) ()))
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
  = ByteString
"\n\
    \\FSbtc_lsp/data/low_level.proto\DC2\DC4BtcLsp.Data.LowLevel\"K\n\
    \\tUrational\DC2\FS\n\
    \\tnumerator\CAN\SOH \SOH(\EOTR\tnumerator\DC2 \n\
    \\vdenominator\CAN\STX \SOH(\EOTR\vdenominator\"\CAN\n\
    \\EOTMsat\DC2\DLE\n\
    \\ETXval\CAN\SOH \SOH(\EOTR\ETXval\"\GS\n\
    \\tLnInvoice\DC2\DLE\n\
    \\ETXval\CAN\SOH \SOH(\tR\ETXval\"!\n\
    \\rLnHodlInvoice\DC2\DLE\n\
    \\ETXval\CAN\SOH \SOH(\tR\ETXval\"\"\n\
    \\SOOnChainAddress\DC2\DLE\n\
    \\ETXval\CAN\SOH \SOH(\tR\ETXvalJ\206\EOT\n\
    \\ACK\DC2\EOT\NUL\NUL\GS\SOH\n\
    \\b\n\
    \\SOH\f\DC2\ETX\NUL\NUL\DLE\n\
    \x\n\
    \\SOH\STX\DC2\ETX\b\NUL\GS2n\n\
    \ LowLevel types which are used only to\n\
    \ create HighLevel types, and are not used\n\
    \ directly in Grpc Methods.\n\
    \\n\
    \\n\
    \\n\
    \\n\
    \\STX\EOT\NUL\DC2\EOT\n\
    \\NUL\r\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\SOH\DC2\ETX\n\
    \\b\DC1\n\
    \\v\n\
    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\v\STX\ETB\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\v\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\v\t\DC2\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\v\NAK\SYN\n\
    \\v\n\
    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\f\STX\EM\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\f\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\f\t\DC4\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\f\ETB\CAN\n\
    \\n\
    \\n\
    \\STX\EOT\SOH\DC2\EOT\SI\NUL\DC1\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\SOH\SOH\DC2\ETX\SI\b\f\n\
    \\v\n\
    \\EOT\EOT\SOH\STX\NUL\DC2\ETX\DLE\STX\DC1\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ENQ\DC2\ETX\DLE\STX\b\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\DLE\t\f\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\DLE\SI\DLE\n\
    \\n\
    \\n\
    \\STX\EOT\STX\DC2\EOT\DC3\NUL\NAK\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\STX\SOH\DC2\ETX\DC3\b\DC1\n\
    \\v\n\
    \\EOT\EOT\STX\STX\NUL\DC2\ETX\DC4\STX\DC1\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETX\DC4\STX\b\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX\DC4\t\f\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX\DC4\SI\DLE\n\
    \\n\
    \\n\
    \\STX\EOT\ETX\DC2\EOT\ETB\NUL\EM\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\ETX\SOH\DC2\ETX\ETB\b\NAK\n\
    \\v\n\
    \\EOT\EOT\ETX\STX\NUL\DC2\ETX\CAN\STX\DC1\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\NUL\ENQ\DC2\ETX\CAN\STX\b\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\NUL\SOH\DC2\ETX\CAN\t\f\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\NUL\ETX\DC2\ETX\CAN\SI\DLE\n\
    \\n\
    \\n\
    \\STX\EOT\EOT\DC2\EOT\ESC\NUL\GS\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\EOT\SOH\DC2\ETX\ESC\b\SYN\n\
    \\v\n\
    \\EOT\EOT\EOT\STX\NUL\DC2\ETX\FS\STX\DC1\n\
    \\f\n\
    \\ENQ\EOT\EOT\STX\NUL\ENQ\DC2\ETX\FS\STX\b\n\
    \\f\n\
    \\ENQ\EOT\EOT\STX\NUL\SOH\DC2\ETX\FS\t\f\n\
    \\f\n\
    \\ENQ\EOT\EOT\STX\NUL\ETX\DC2\ETX\FS\SI\DLEb\ACKproto3"