packages feed

lnd-client-0.1.0.1: src/Proto/Lnrpc/Ln1.hs

{- This file was auto-generated from lnrpc/ln1.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.Lnrpc.Ln1 (
        AMP(), AMPInvoiceState(), AbandonChannelRequest(),
        AbandonChannelResponse(), AddInvoiceResponse(),
        BakeMacaroonRequest(), BakeMacaroonResponse(),
        ChanBackupExportRequest(), ChanBackupSnapshot(), ChannelBackup(),
        ChannelBackupSubscription(), ChannelBackups(), ChannelFeeReport(),
        ChannelUpdate(), CheckMacPermRequest(), CheckMacPermResponse(),
        DebugLevelRequest(), DebugLevelResponse(),
        DeleteAllPaymentsRequest(), DeleteAllPaymentsResponse(),
        DeleteMacaroonIDRequest(), DeleteMacaroonIDResponse(),
        DeletePaymentRequest(), DeletePaymentResponse(),
        ExportChannelBackupRequest(), FailedUpdate(), Failure(),
        Failure'FailureCode(..), Failure'FailureCode(),
        Failure'FailureCode'UnrecognizedValue, FeeReportRequest(),
        FeeReportResponse(), ForwardingEvent(), ForwardingHistoryRequest(),
        ForwardingHistoryResponse(), HTLCAttempt(),
        HTLCAttempt'HTLCStatus(..), HTLCAttempt'HTLCStatus(),
        HTLCAttempt'HTLCStatus'UnrecognizedValue, InterceptFeedback(),
        Invoice(), Invoice'AmpInvoiceStateEntry(), Invoice'FeaturesEntry(),
        Invoice'InvoiceState(..), Invoice'InvoiceState(),
        Invoice'InvoiceState'UnrecognizedValue, InvoiceHTLC(),
        InvoiceHTLC'CustomRecordsEntry(), InvoiceHTLCState(..),
        InvoiceHTLCState(), InvoiceHTLCState'UnrecognizedValue,
        InvoiceSubscription(), ListInvoiceRequest(), ListInvoiceResponse(),
        ListMacaroonIDsRequest(), ListMacaroonIDsResponse(),
        ListPaymentsRequest(), ListPaymentsResponse(),
        ListPermissionsRequest(), ListPermissionsResponse(),
        ListPermissionsResponse'MethodPermissionsEntry(), MacaroonId(),
        MacaroonPermission(), MacaroonPermissionList(),
        MiddlewareRegistration(), MultiChanBackup(), Op(), PayReq(),
        PayReq'FeaturesEntry(), PayReqString(), Payment(),
        Payment'PaymentStatus(..), Payment'PaymentStatus(),
        Payment'PaymentStatus'UnrecognizedValue, PaymentFailureReason(..),
        PaymentFailureReason(), PaymentFailureReason'UnrecognizedValue,
        PaymentHash(), PolicyUpdateRequest(),
        PolicyUpdateRequest'Scope(..), _PolicyUpdateRequest'Global,
        _PolicyUpdateRequest'ChanPoint, PolicyUpdateResponse(),
        RPCMessage(), RPCMiddlewareRequest(),
        RPCMiddlewareRequest'InterceptType(..),
        _RPCMiddlewareRequest'StreamAuth, _RPCMiddlewareRequest'Request,
        _RPCMiddlewareRequest'Response, RPCMiddlewareResponse(),
        RPCMiddlewareResponse'MiddlewareMessage(..),
        _RPCMiddlewareResponse'Register, _RPCMiddlewareResponse'Feedback,
        RestoreBackupResponse(), RestoreChanBackupRequest(),
        RestoreChanBackupRequest'Backup(..),
        _RestoreChanBackupRequest'ChanBackups,
        _RestoreChanBackupRequest'MultiChanBackup, SetID(), StreamAuth(),
        UpdateFailure(..), UpdateFailure(),
        UpdateFailure'UnrecognizedValue, VerifyChanBackupResponse()
    ) 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.Lnrpc.Ln0
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.rootShare' @:: Lens' AMP Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.setId' @:: Lens' AMP Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.childIndex' @:: Lens' AMP Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.hash' @:: Lens' AMP Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.preimage' @:: Lens' AMP Data.ByteString.ByteString@ -}
data AMP
  = AMP'_constructor {_AMP'rootShare :: !Data.ByteString.ByteString,
                      _AMP'setId :: !Data.ByteString.ByteString,
                      _AMP'childIndex :: !Data.Word.Word32,
                      _AMP'hash :: !Data.ByteString.ByteString,
                      _AMP'preimage :: !Data.ByteString.ByteString,
                      _AMP'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show AMP where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out AMP
instance Data.ProtoLens.Field.HasField AMP "rootShare" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AMP'rootShare (\ x__ y__ -> x__ {_AMP'rootShare = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AMP "setId" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AMP'setId (\ x__ y__ -> x__ {_AMP'setId = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AMP "childIndex" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AMP'childIndex (\ x__ y__ -> x__ {_AMP'childIndex = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AMP "hash" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AMP'hash (\ x__ y__ -> x__ {_AMP'hash = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AMP "preimage" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AMP'preimage (\ x__ y__ -> x__ {_AMP'preimage = y__}))
        Prelude.id
instance Data.ProtoLens.Message AMP where
  messageName _ = Data.Text.pack "lnrpc.AMP"
  packedMessageDescriptor _
    = "\n\
      \\ETXAMP\DC2\GS\n\
      \\n\
      \root_share\CAN\SOH \SOH(\fR\trootShare\DC2\NAK\n\
      \\ACKset_id\CAN\STX \SOH(\fR\ENQsetId\DC2\US\n\
      \\vchild_index\CAN\ETX \SOH(\rR\n\
      \childIndex\DC2\DC2\n\
      \\EOThash\CAN\EOT \SOH(\fR\EOThash\DC2\SUB\n\
      \\bpreimage\CAN\ENQ \SOH(\fR\bpreimage"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        rootShare__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "root_share"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"rootShare")) ::
              Data.ProtoLens.FieldDescriptor AMP
        setId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "set_id"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"setId")) ::
              Data.ProtoLens.FieldDescriptor AMP
        childIndex__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "child_index"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"childIndex")) ::
              Data.ProtoLens.FieldDescriptor AMP
        hash__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "hash"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"hash")) ::
              Data.ProtoLens.FieldDescriptor AMP
        preimage__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "preimage"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"preimage")) ::
              Data.ProtoLens.FieldDescriptor AMP
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, rootShare__field_descriptor),
           (Data.ProtoLens.Tag 2, setId__field_descriptor),
           (Data.ProtoLens.Tag 3, childIndex__field_descriptor),
           (Data.ProtoLens.Tag 4, hash__field_descriptor),
           (Data.ProtoLens.Tag 5, preimage__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _AMP'_unknownFields (\ x__ y__ -> x__ {_AMP'_unknownFields = y__})
  defMessage
    = AMP'_constructor
        {_AMP'rootShare = Data.ProtoLens.fieldDefault,
         _AMP'setId = Data.ProtoLens.fieldDefault,
         _AMP'childIndex = Data.ProtoLens.fieldDefault,
         _AMP'hash = Data.ProtoLens.fieldDefault,
         _AMP'preimage = Data.ProtoLens.fieldDefault,
         _AMP'_unknownFields = []}
  parseMessage
    = let
        loop :: AMP -> Data.ProtoLens.Encoding.Bytes.Parser AMP
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "root_share"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"rootShare") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "set_id"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"setId") y x)
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "child_index"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"childIndex") y x)
                        34
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "hash"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"hash") y x)
                        42
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "preimage"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"preimage") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "AMP"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"rootShare") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs
                          -> (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"setId") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view (Data.ProtoLens.Field.field @"childIndex") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                   ((Data.Monoid.<>)
                      (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"hash") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 34)
                               ((\ bs
                                   -> (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
                                           (Prelude.fromIntegral (Data.ByteString.length bs)))
                                        (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                  _v))
                      ((Data.Monoid.<>)
                         (let
                            _v = Lens.Family2.view (Data.ProtoLens.Field.field @"preimage") _x
                          in
                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                Data.Monoid.mempty
                            else
                                (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 42)
                                  ((\ bs
                                      -> (Data.Monoid.<>)
                                           (Data.ProtoLens.Encoding.Bytes.putVarInt
                                              (Prelude.fromIntegral (Data.ByteString.length bs)))
                                           (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                     _v))
                         (Data.ProtoLens.Encoding.Wire.buildFieldSet
                            (Lens.Family2.view Data.ProtoLens.unknownFields _x))))))
instance Control.DeepSeq.NFData AMP where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_AMP'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_AMP'rootShare x__)
                (Control.DeepSeq.deepseq
                   (_AMP'setId x__)
                   (Control.DeepSeq.deepseq
                      (_AMP'childIndex x__)
                      (Control.DeepSeq.deepseq
                         (_AMP'hash x__)
                         (Control.DeepSeq.deepseq (_AMP'preimage x__) ())))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.state' @:: Lens' AMPInvoiceState InvoiceHTLCState@
         * 'Proto.Lnrpc.Ln1_Fields.settleIndex' @:: Lens' AMPInvoiceState Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.settleTime' @:: Lens' AMPInvoiceState Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.amtPaidMsat' @:: Lens' AMPInvoiceState Data.Int.Int64@ -}
data AMPInvoiceState
  = AMPInvoiceState'_constructor {_AMPInvoiceState'state :: !InvoiceHTLCState,
                                  _AMPInvoiceState'settleIndex :: !Data.Word.Word64,
                                  _AMPInvoiceState'settleTime :: !Data.Int.Int64,
                                  _AMPInvoiceState'amtPaidMsat :: !Data.Int.Int64,
                                  _AMPInvoiceState'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show AMPInvoiceState where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out AMPInvoiceState
instance Data.ProtoLens.Field.HasField AMPInvoiceState "state" InvoiceHTLCState where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AMPInvoiceState'state
           (\ x__ y__ -> x__ {_AMPInvoiceState'state = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AMPInvoiceState "settleIndex" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AMPInvoiceState'settleIndex
           (\ x__ y__ -> x__ {_AMPInvoiceState'settleIndex = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AMPInvoiceState "settleTime" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AMPInvoiceState'settleTime
           (\ x__ y__ -> x__ {_AMPInvoiceState'settleTime = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AMPInvoiceState "amtPaidMsat" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AMPInvoiceState'amtPaidMsat
           (\ x__ y__ -> x__ {_AMPInvoiceState'amtPaidMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Message AMPInvoiceState where
  messageName _ = Data.Text.pack "lnrpc.AMPInvoiceState"
  packedMessageDescriptor _
    = "\n\
      \\SIAMPInvoiceState\DC2-\n\
      \\ENQstate\CAN\SOH \SOH(\SO2\ETB.lnrpc.InvoiceHTLCStateR\ENQstate\DC2!\n\
      \\fsettle_index\CAN\STX \SOH(\EOTR\vsettleIndex\DC2\US\n\
      \\vsettle_time\CAN\ETX \SOH(\ETXR\n\
      \settleTime\DC2\"\n\
      \\ramt_paid_msat\CAN\ENQ \SOH(\ETXR\vamtPaidMsat"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        state__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "state"
              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
                 Data.ProtoLens.FieldTypeDescriptor InvoiceHTLCState)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"state")) ::
              Data.ProtoLens.FieldDescriptor AMPInvoiceState
        settleIndex__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "settle_index"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"settleIndex")) ::
              Data.ProtoLens.FieldDescriptor AMPInvoiceState
        settleTime__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "settle_time"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"settleTime")) ::
              Data.ProtoLens.FieldDescriptor AMPInvoiceState
        amtPaidMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "amt_paid_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"amtPaidMsat")) ::
              Data.ProtoLens.FieldDescriptor AMPInvoiceState
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, state__field_descriptor),
           (Data.ProtoLens.Tag 2, settleIndex__field_descriptor),
           (Data.ProtoLens.Tag 3, settleTime__field_descriptor),
           (Data.ProtoLens.Tag 5, amtPaidMsat__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _AMPInvoiceState'_unknownFields
        (\ x__ y__ -> x__ {_AMPInvoiceState'_unknownFields = y__})
  defMessage
    = AMPInvoiceState'_constructor
        {_AMPInvoiceState'state = Data.ProtoLens.fieldDefault,
         _AMPInvoiceState'settleIndex = Data.ProtoLens.fieldDefault,
         _AMPInvoiceState'settleTime = Data.ProtoLens.fieldDefault,
         _AMPInvoiceState'amtPaidMsat = Data.ProtoLens.fieldDefault,
         _AMPInvoiceState'_unknownFields = []}
  parseMessage
    = let
        loop ::
          AMPInvoiceState
          -> Data.ProtoLens.Encoding.Bytes.Parser AMPInvoiceState
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.toEnum
                                          (Prelude.fmap
                                             Prelude.fromIntegral
                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
                                       "state"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"state") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "settle_index"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"settleIndex") y x)
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "settle_time"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"settleTime") y x)
                        40
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "amt_paid_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"amtPaidMsat") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "AMPInvoiceState"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"state") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Prelude..)
                         ((Prelude..)
                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
                         Prelude.fromEnum _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view (Data.ProtoLens.Field.field @"settleIndex") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view (Data.ProtoLens.Field.field @"settleTime") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                   ((Data.Monoid.<>)
                      (let
                         _v
                           = Lens.Family2.view (Data.ProtoLens.Field.field @"amtPaidMsat") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
                               ((Prelude..)
                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
instance Control.DeepSeq.NFData AMPInvoiceState where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_AMPInvoiceState'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_AMPInvoiceState'state x__)
                (Control.DeepSeq.deepseq
                   (_AMPInvoiceState'settleIndex x__)
                   (Control.DeepSeq.deepseq
                      (_AMPInvoiceState'settleTime x__)
                      (Control.DeepSeq.deepseq (_AMPInvoiceState'amtPaidMsat x__) ()))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.channelPoint' @:: Lens' AbandonChannelRequest Proto.Lnrpc.Ln0.ChannelPoint@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'channelPoint' @:: Lens' AbandonChannelRequest (Prelude.Maybe Proto.Lnrpc.Ln0.ChannelPoint)@
         * 'Proto.Lnrpc.Ln1_Fields.pendingFundingShimOnly' @:: Lens' AbandonChannelRequest Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.iKnowWhatIAmDoing' @:: Lens' AbandonChannelRequest Prelude.Bool@ -}
data AbandonChannelRequest
  = AbandonChannelRequest'_constructor {_AbandonChannelRequest'channelPoint :: !(Prelude.Maybe Proto.Lnrpc.Ln0.ChannelPoint),
                                        _AbandonChannelRequest'pendingFundingShimOnly :: !Prelude.Bool,
                                        _AbandonChannelRequest'iKnowWhatIAmDoing :: !Prelude.Bool,
                                        _AbandonChannelRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show AbandonChannelRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out AbandonChannelRequest
instance Data.ProtoLens.Field.HasField AbandonChannelRequest "channelPoint" Proto.Lnrpc.Ln0.ChannelPoint where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AbandonChannelRequest'channelPoint
           (\ x__ y__ -> x__ {_AbandonChannelRequest'channelPoint = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField AbandonChannelRequest "maybe'channelPoint" (Prelude.Maybe Proto.Lnrpc.Ln0.ChannelPoint) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AbandonChannelRequest'channelPoint
           (\ x__ y__ -> x__ {_AbandonChannelRequest'channelPoint = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AbandonChannelRequest "pendingFundingShimOnly" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AbandonChannelRequest'pendingFundingShimOnly
           (\ x__ y__
              -> x__ {_AbandonChannelRequest'pendingFundingShimOnly = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AbandonChannelRequest "iKnowWhatIAmDoing" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AbandonChannelRequest'iKnowWhatIAmDoing
           (\ x__ y__
              -> x__ {_AbandonChannelRequest'iKnowWhatIAmDoing = y__}))
        Prelude.id
instance Data.ProtoLens.Message AbandonChannelRequest where
  messageName _ = Data.Text.pack "lnrpc.AbandonChannelRequest"
  packedMessageDescriptor _
    = "\n\
      \\NAKAbandonChannelRequest\DC28\n\
      \\rchannel_point\CAN\SOH \SOH(\v2\DC3.lnrpc.ChannelPointR\fchannelPoint\DC29\n\
      \\EMpending_funding_shim_only\CAN\STX \SOH(\bR\SYNpendingFundingShimOnly\DC21\n\
      \\SYNi_know_what_i_am_doing\CAN\ETX \SOH(\bR\DC1iKnowWhatIAmDoing"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        channelPoint__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "channel_point"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Lnrpc.Ln0.ChannelPoint)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'channelPoint")) ::
              Data.ProtoLens.FieldDescriptor AbandonChannelRequest
        pendingFundingShimOnly__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "pending_funding_shim_only"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"pendingFundingShimOnly")) ::
              Data.ProtoLens.FieldDescriptor AbandonChannelRequest
        iKnowWhatIAmDoing__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "i_know_what_i_am_doing"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"iKnowWhatIAmDoing")) ::
              Data.ProtoLens.FieldDescriptor AbandonChannelRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, channelPoint__field_descriptor),
           (Data.ProtoLens.Tag 2, pendingFundingShimOnly__field_descriptor),
           (Data.ProtoLens.Tag 3, iKnowWhatIAmDoing__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _AbandonChannelRequest'_unknownFields
        (\ x__ y__ -> x__ {_AbandonChannelRequest'_unknownFields = y__})
  defMessage
    = AbandonChannelRequest'_constructor
        {_AbandonChannelRequest'channelPoint = Prelude.Nothing,
         _AbandonChannelRequest'pendingFundingShimOnly = Data.ProtoLens.fieldDefault,
         _AbandonChannelRequest'iKnowWhatIAmDoing = Data.ProtoLens.fieldDefault,
         _AbandonChannelRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          AbandonChannelRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser AbandonChannelRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "channel_point"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"channelPoint") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "pending_funding_shim_only"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"pendingFundingShimOnly") y x)
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "i_know_what_i_am_doing"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"iKnowWhatIAmDoing") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "AbandonChannelRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (case
                  Lens.Family2.view
                    (Data.ProtoLens.Field.field @"maybe'channelPoint") _x
              of
                Prelude.Nothing -> Data.Monoid.mempty
                (Prelude.Just _v)
                  -> (Data.Monoid.<>)
                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                       ((Prelude..)
                          (\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                          Data.ProtoLens.encodeMessage _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view
                         (Data.ProtoLens.Field.field @"pendingFundingShimOnly") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         ((Prelude..)
                            Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                            _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view
                            (Data.ProtoLens.Field.field @"iKnowWhatIAmDoing") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                               _v))
                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
instance Control.DeepSeq.NFData AbandonChannelRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_AbandonChannelRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_AbandonChannelRequest'channelPoint x__)
                (Control.DeepSeq.deepseq
                   (_AbandonChannelRequest'pendingFundingShimOnly x__)
                   (Control.DeepSeq.deepseq
                      (_AbandonChannelRequest'iKnowWhatIAmDoing x__) ())))
{- | Fields :
      -}
data AbandonChannelResponse
  = AbandonChannelResponse'_constructor {_AbandonChannelResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show AbandonChannelResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out AbandonChannelResponse
instance Data.ProtoLens.Message AbandonChannelResponse where
  messageName _ = Data.Text.pack "lnrpc.AbandonChannelResponse"
  packedMessageDescriptor _
    = "\n\
      \\SYNAbandonChannelResponse"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag = let in Data.Map.fromList []
  unknownFields
    = Lens.Family2.Unchecked.lens
        _AbandonChannelResponse'_unknownFields
        (\ x__ y__ -> x__ {_AbandonChannelResponse'_unknownFields = y__})
  defMessage
    = AbandonChannelResponse'_constructor
        {_AbandonChannelResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          AbandonChannelResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser AbandonChannelResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of {
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x) }
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "AbandonChannelResponse"
  buildMessage
    = \ _x
        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
instance Control.DeepSeq.NFData AbandonChannelResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_AbandonChannelResponse'_unknownFields x__) ()
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.rHash' @:: Lens' AddInvoiceResponse Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.paymentRequest' @:: Lens' AddInvoiceResponse Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.addIndex' @:: Lens' AddInvoiceResponse Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.paymentAddr' @:: Lens' AddInvoiceResponse Data.ByteString.ByteString@ -}
data AddInvoiceResponse
  = AddInvoiceResponse'_constructor {_AddInvoiceResponse'rHash :: !Data.ByteString.ByteString,
                                     _AddInvoiceResponse'paymentRequest :: !Data.Text.Text,
                                     _AddInvoiceResponse'addIndex :: !Data.Word.Word64,
                                     _AddInvoiceResponse'paymentAddr :: !Data.ByteString.ByteString,
                                     _AddInvoiceResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show AddInvoiceResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out AddInvoiceResponse
instance Data.ProtoLens.Field.HasField AddInvoiceResponse "rHash" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AddInvoiceResponse'rHash
           (\ x__ y__ -> x__ {_AddInvoiceResponse'rHash = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AddInvoiceResponse "paymentRequest" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AddInvoiceResponse'paymentRequest
           (\ x__ y__ -> x__ {_AddInvoiceResponse'paymentRequest = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AddInvoiceResponse "addIndex" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AddInvoiceResponse'addIndex
           (\ x__ y__ -> x__ {_AddInvoiceResponse'addIndex = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField AddInvoiceResponse "paymentAddr" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _AddInvoiceResponse'paymentAddr
           (\ x__ y__ -> x__ {_AddInvoiceResponse'paymentAddr = y__}))
        Prelude.id
instance Data.ProtoLens.Message AddInvoiceResponse where
  messageName _ = Data.Text.pack "lnrpc.AddInvoiceResponse"
  packedMessageDescriptor _
    = "\n\
      \\DC2AddInvoiceResponse\DC2\NAK\n\
      \\ACKr_hash\CAN\SOH \SOH(\fR\ENQrHash\DC2'\n\
      \\SIpayment_request\CAN\STX \SOH(\tR\SOpaymentRequest\DC2\ESC\n\
      \\tadd_index\CAN\DLE \SOH(\EOTR\baddIndex\DC2!\n\
      \\fpayment_addr\CAN\DC1 \SOH(\fR\vpaymentAddr"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        rHash__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "r_hash"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"rHash")) ::
              Data.ProtoLens.FieldDescriptor AddInvoiceResponse
        paymentRequest__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payment_request"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"paymentRequest")) ::
              Data.ProtoLens.FieldDescriptor AddInvoiceResponse
        addIndex__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "add_index"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"addIndex")) ::
              Data.ProtoLens.FieldDescriptor AddInvoiceResponse
        paymentAddr__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payment_addr"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"paymentAddr")) ::
              Data.ProtoLens.FieldDescriptor AddInvoiceResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, rHash__field_descriptor),
           (Data.ProtoLens.Tag 2, paymentRequest__field_descriptor),
           (Data.ProtoLens.Tag 16, addIndex__field_descriptor),
           (Data.ProtoLens.Tag 17, paymentAddr__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _AddInvoiceResponse'_unknownFields
        (\ x__ y__ -> x__ {_AddInvoiceResponse'_unknownFields = y__})
  defMessage
    = AddInvoiceResponse'_constructor
        {_AddInvoiceResponse'rHash = Data.ProtoLens.fieldDefault,
         _AddInvoiceResponse'paymentRequest = Data.ProtoLens.fieldDefault,
         _AddInvoiceResponse'addIndex = Data.ProtoLens.fieldDefault,
         _AddInvoiceResponse'paymentAddr = Data.ProtoLens.fieldDefault,
         _AddInvoiceResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          AddInvoiceResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser AddInvoiceResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "r_hash"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"rHash") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "payment_request"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"paymentRequest") y x)
                        128
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "add_index"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"addIndex") y x)
                        138
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "payment_addr"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"paymentAddr") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "AddInvoiceResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"rHash") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs
                          -> (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view
                         (Data.ProtoLens.Field.field @"paymentRequest") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((Prelude..)
                            (\ bs
                               -> (Data.Monoid.<>)
                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            Data.Text.Encoding.encodeUtf8 _v))
                ((Data.Monoid.<>)
                   (let
                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"addIndex") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 128)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                   ((Data.Monoid.<>)
                      (let
                         _v
                           = Lens.Family2.view (Data.ProtoLens.Field.field @"paymentAddr") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 138)
                               ((\ bs
                                   -> (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
                                           (Prelude.fromIntegral (Data.ByteString.length bs)))
                                        (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                  _v))
                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
instance Control.DeepSeq.NFData AddInvoiceResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_AddInvoiceResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_AddInvoiceResponse'rHash x__)
                (Control.DeepSeq.deepseq
                   (_AddInvoiceResponse'paymentRequest x__)
                   (Control.DeepSeq.deepseq
                      (_AddInvoiceResponse'addIndex x__)
                      (Control.DeepSeq.deepseq
                         (_AddInvoiceResponse'paymentAddr x__) ()))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.permissions' @:: Lens' BakeMacaroonRequest [MacaroonPermission]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'permissions' @:: Lens' BakeMacaroonRequest (Data.Vector.Vector MacaroonPermission)@
         * 'Proto.Lnrpc.Ln1_Fields.rootKeyId' @:: Lens' BakeMacaroonRequest Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.allowExternalPermissions' @:: Lens' BakeMacaroonRequest Prelude.Bool@ -}
data BakeMacaroonRequest
  = BakeMacaroonRequest'_constructor {_BakeMacaroonRequest'permissions :: !(Data.Vector.Vector MacaroonPermission),
                                      _BakeMacaroonRequest'rootKeyId :: !Data.Word.Word64,
                                      _BakeMacaroonRequest'allowExternalPermissions :: !Prelude.Bool,
                                      _BakeMacaroonRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show BakeMacaroonRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out BakeMacaroonRequest
instance Data.ProtoLens.Field.HasField BakeMacaroonRequest "permissions" [MacaroonPermission] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _BakeMacaroonRequest'permissions
           (\ x__ y__ -> x__ {_BakeMacaroonRequest'permissions = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField BakeMacaroonRequest "vec'permissions" (Data.Vector.Vector MacaroonPermission) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _BakeMacaroonRequest'permissions
           (\ x__ y__ -> x__ {_BakeMacaroonRequest'permissions = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField BakeMacaroonRequest "rootKeyId" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _BakeMacaroonRequest'rootKeyId
           (\ x__ y__ -> x__ {_BakeMacaroonRequest'rootKeyId = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField BakeMacaroonRequest "allowExternalPermissions" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _BakeMacaroonRequest'allowExternalPermissions
           (\ x__ y__
              -> x__ {_BakeMacaroonRequest'allowExternalPermissions = y__}))
        Prelude.id
instance Data.ProtoLens.Message BakeMacaroonRequest where
  messageName _ = Data.Text.pack "lnrpc.BakeMacaroonRequest"
  packedMessageDescriptor _
    = "\n\
      \\DC3BakeMacaroonRequest\DC2;\n\
      \\vpermissions\CAN\SOH \ETX(\v2\EM.lnrpc.MacaroonPermissionR\vpermissions\DC2\RS\n\
      \\vroot_key_id\CAN\STX \SOH(\EOTR\trootKeyId\DC2<\n\
      \\SUBallow_external_permissions\CAN\ETX \SOH(\bR\CANallowExternalPermissions"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        permissions__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "permissions"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor MacaroonPermission)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"permissions")) ::
              Data.ProtoLens.FieldDescriptor BakeMacaroonRequest
        rootKeyId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "root_key_id"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"rootKeyId")) ::
              Data.ProtoLens.FieldDescriptor BakeMacaroonRequest
        allowExternalPermissions__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "allow_external_permissions"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"allowExternalPermissions")) ::
              Data.ProtoLens.FieldDescriptor BakeMacaroonRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, permissions__field_descriptor),
           (Data.ProtoLens.Tag 2, rootKeyId__field_descriptor),
           (Data.ProtoLens.Tag 3, allowExternalPermissions__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _BakeMacaroonRequest'_unknownFields
        (\ x__ y__ -> x__ {_BakeMacaroonRequest'_unknownFields = y__})
  defMessage
    = BakeMacaroonRequest'_constructor
        {_BakeMacaroonRequest'permissions = Data.Vector.Generic.empty,
         _BakeMacaroonRequest'rootKeyId = Data.ProtoLens.fieldDefault,
         _BakeMacaroonRequest'allowExternalPermissions = Data.ProtoLens.fieldDefault,
         _BakeMacaroonRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          BakeMacaroonRequest
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld MacaroonPermission
             -> Data.ProtoLens.Encoding.Bytes.Parser BakeMacaroonRequest
        loop x mutable'permissions
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'permissions <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                              (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                 mutable'permissions)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'permissions") frozen'permissions
                              x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "permissions"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append
                                          mutable'permissions y)
                                loop x v
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "root_key_id"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"rootKeyId") y x)
                                  mutable'permissions
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "allow_external_permissions"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"allowExternalPermissions") y x)
                                  mutable'permissions
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'permissions
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'permissions <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'permissions)
          "BakeMacaroonRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v
                   -> (Data.Monoid.<>)
                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((Prelude..)
                           (\ bs
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                      (Prelude.fromIntegral (Data.ByteString.length bs)))
                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                           Data.ProtoLens.encodeMessage _v))
                (Lens.Family2.view
                   (Data.ProtoLens.Field.field @"vec'permissions") _x))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"rootKeyId") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view
                            (Data.ProtoLens.Field.field @"allowExternalPermissions") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                               _v))
                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
instance Control.DeepSeq.NFData BakeMacaroonRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_BakeMacaroonRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_BakeMacaroonRequest'permissions x__)
                (Control.DeepSeq.deepseq
                   (_BakeMacaroonRequest'rootKeyId x__)
                   (Control.DeepSeq.deepseq
                      (_BakeMacaroonRequest'allowExternalPermissions x__) ())))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.macaroon' @:: Lens' BakeMacaroonResponse Data.Text.Text@ -}
data BakeMacaroonResponse
  = BakeMacaroonResponse'_constructor {_BakeMacaroonResponse'macaroon :: !Data.Text.Text,
                                       _BakeMacaroonResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show BakeMacaroonResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out BakeMacaroonResponse
instance Data.ProtoLens.Field.HasField BakeMacaroonResponse "macaroon" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _BakeMacaroonResponse'macaroon
           (\ x__ y__ -> x__ {_BakeMacaroonResponse'macaroon = y__}))
        Prelude.id
instance Data.ProtoLens.Message BakeMacaroonResponse where
  messageName _ = Data.Text.pack "lnrpc.BakeMacaroonResponse"
  packedMessageDescriptor _
    = "\n\
      \\DC4BakeMacaroonResponse\DC2\SUB\n\
      \\bmacaroon\CAN\SOH \SOH(\tR\bmacaroon"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        macaroon__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "macaroon"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"macaroon")) ::
              Data.ProtoLens.FieldDescriptor BakeMacaroonResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, macaroon__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _BakeMacaroonResponse'_unknownFields
        (\ x__ y__ -> x__ {_BakeMacaroonResponse'_unknownFields = y__})
  defMessage
    = BakeMacaroonResponse'_constructor
        {_BakeMacaroonResponse'macaroon = Data.ProtoLens.fieldDefault,
         _BakeMacaroonResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          BakeMacaroonResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser BakeMacaroonResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "macaroon"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"macaroon") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "BakeMacaroonResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"macaroon") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData BakeMacaroonResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_BakeMacaroonResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq (_BakeMacaroonResponse'macaroon x__) ())
{- | Fields :
      -}
data ChanBackupExportRequest
  = ChanBackupExportRequest'_constructor {_ChanBackupExportRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ChanBackupExportRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ChanBackupExportRequest
instance Data.ProtoLens.Message ChanBackupExportRequest where
  messageName _ = Data.Text.pack "lnrpc.ChanBackupExportRequest"
  packedMessageDescriptor _
    = "\n\
      \\ETBChanBackupExportRequest"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag = let in Data.Map.fromList []
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ChanBackupExportRequest'_unknownFields
        (\ x__ y__ -> x__ {_ChanBackupExportRequest'_unknownFields = y__})
  defMessage
    = ChanBackupExportRequest'_constructor
        {_ChanBackupExportRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ChanBackupExportRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser ChanBackupExportRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of {
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x) }
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ChanBackupExportRequest"
  buildMessage
    = \ _x
        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
instance Control.DeepSeq.NFData ChanBackupExportRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ChanBackupExportRequest'_unknownFields x__) ()
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.singleChanBackups' @:: Lens' ChanBackupSnapshot ChannelBackups@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'singleChanBackups' @:: Lens' ChanBackupSnapshot (Prelude.Maybe ChannelBackups)@
         * 'Proto.Lnrpc.Ln1_Fields.multiChanBackup' @:: Lens' ChanBackupSnapshot MultiChanBackup@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'multiChanBackup' @:: Lens' ChanBackupSnapshot (Prelude.Maybe MultiChanBackup)@ -}
data ChanBackupSnapshot
  = ChanBackupSnapshot'_constructor {_ChanBackupSnapshot'singleChanBackups :: !(Prelude.Maybe ChannelBackups),
                                     _ChanBackupSnapshot'multiChanBackup :: !(Prelude.Maybe MultiChanBackup),
                                     _ChanBackupSnapshot'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ChanBackupSnapshot where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ChanBackupSnapshot
instance Data.ProtoLens.Field.HasField ChanBackupSnapshot "singleChanBackups" ChannelBackups where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChanBackupSnapshot'singleChanBackups
           (\ x__ y__ -> x__ {_ChanBackupSnapshot'singleChanBackups = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ChanBackupSnapshot "maybe'singleChanBackups" (Prelude.Maybe ChannelBackups) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChanBackupSnapshot'singleChanBackups
           (\ x__ y__ -> x__ {_ChanBackupSnapshot'singleChanBackups = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChanBackupSnapshot "multiChanBackup" MultiChanBackup where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChanBackupSnapshot'multiChanBackup
           (\ x__ y__ -> x__ {_ChanBackupSnapshot'multiChanBackup = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ChanBackupSnapshot "maybe'multiChanBackup" (Prelude.Maybe MultiChanBackup) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChanBackupSnapshot'multiChanBackup
           (\ x__ y__ -> x__ {_ChanBackupSnapshot'multiChanBackup = y__}))
        Prelude.id
instance Data.ProtoLens.Message ChanBackupSnapshot where
  messageName _ = Data.Text.pack "lnrpc.ChanBackupSnapshot"
  packedMessageDescriptor _
    = "\n\
      \\DC2ChanBackupSnapshot\DC2E\n\
      \\DC3single_chan_backups\CAN\SOH \SOH(\v2\NAK.lnrpc.ChannelBackupsR\DC1singleChanBackups\DC2B\n\
      \\DC1multi_chan_backup\CAN\STX \SOH(\v2\SYN.lnrpc.MultiChanBackupR\SImultiChanBackup"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        singleChanBackups__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "single_chan_backups"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor ChannelBackups)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'singleChanBackups")) ::
              Data.ProtoLens.FieldDescriptor ChanBackupSnapshot
        multiChanBackup__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "multi_chan_backup"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor MultiChanBackup)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'multiChanBackup")) ::
              Data.ProtoLens.FieldDescriptor ChanBackupSnapshot
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, singleChanBackups__field_descriptor),
           (Data.ProtoLens.Tag 2, multiChanBackup__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ChanBackupSnapshot'_unknownFields
        (\ x__ y__ -> x__ {_ChanBackupSnapshot'_unknownFields = y__})
  defMessage
    = ChanBackupSnapshot'_constructor
        {_ChanBackupSnapshot'singleChanBackups = Prelude.Nothing,
         _ChanBackupSnapshot'multiChanBackup = Prelude.Nothing,
         _ChanBackupSnapshot'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ChanBackupSnapshot
          -> Data.ProtoLens.Encoding.Bytes.Parser ChanBackupSnapshot
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "single_chan_backups"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"singleChanBackups") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "multi_chan_backup"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"multiChanBackup") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ChanBackupSnapshot"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (case
                  Lens.Family2.view
                    (Data.ProtoLens.Field.field @"maybe'singleChanBackups") _x
              of
                Prelude.Nothing -> Data.Monoid.mempty
                (Prelude.Just _v)
                  -> (Data.Monoid.<>)
                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                       ((Prelude..)
                          (\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                          Data.ProtoLens.encodeMessage _v))
             ((Data.Monoid.<>)
                (case
                     Lens.Family2.view
                       (Data.ProtoLens.Field.field @"maybe'multiChanBackup") _x
                 of
                   Prelude.Nothing -> Data.Monoid.mempty
                   (Prelude.Just _v)
                     -> (Data.Monoid.<>)
                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((Prelude..)
                             (\ bs
                                -> (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                             Data.ProtoLens.encodeMessage _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData ChanBackupSnapshot where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ChanBackupSnapshot'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ChanBackupSnapshot'singleChanBackups x__)
                (Control.DeepSeq.deepseq
                   (_ChanBackupSnapshot'multiChanBackup x__) ()))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.chanPoint' @:: Lens' ChannelBackup Proto.Lnrpc.Ln0.ChannelPoint@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'chanPoint' @:: Lens' ChannelBackup (Prelude.Maybe Proto.Lnrpc.Ln0.ChannelPoint)@
         * 'Proto.Lnrpc.Ln1_Fields.chanBackup' @:: Lens' ChannelBackup Data.ByteString.ByteString@ -}
data ChannelBackup
  = ChannelBackup'_constructor {_ChannelBackup'chanPoint :: !(Prelude.Maybe Proto.Lnrpc.Ln0.ChannelPoint),
                                _ChannelBackup'chanBackup :: !Data.ByteString.ByteString,
                                _ChannelBackup'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ChannelBackup where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ChannelBackup
instance Data.ProtoLens.Field.HasField ChannelBackup "chanPoint" Proto.Lnrpc.Ln0.ChannelPoint where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelBackup'chanPoint
           (\ x__ y__ -> x__ {_ChannelBackup'chanPoint = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ChannelBackup "maybe'chanPoint" (Prelude.Maybe Proto.Lnrpc.Ln0.ChannelPoint) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelBackup'chanPoint
           (\ x__ y__ -> x__ {_ChannelBackup'chanPoint = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelBackup "chanBackup" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelBackup'chanBackup
           (\ x__ y__ -> x__ {_ChannelBackup'chanBackup = y__}))
        Prelude.id
instance Data.ProtoLens.Message ChannelBackup where
  messageName _ = Data.Text.pack "lnrpc.ChannelBackup"
  packedMessageDescriptor _
    = "\n\
      \\rChannelBackup\DC22\n\
      \\n\
      \chan_point\CAN\SOH \SOH(\v2\DC3.lnrpc.ChannelPointR\tchanPoint\DC2\US\n\
      \\vchan_backup\CAN\STX \SOH(\fR\n\
      \chanBackup"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        chanPoint__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_point"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Lnrpc.Ln0.ChannelPoint)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'chanPoint")) ::
              Data.ProtoLens.FieldDescriptor ChannelBackup
        chanBackup__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_backup"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"chanBackup")) ::
              Data.ProtoLens.FieldDescriptor ChannelBackup
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, chanPoint__field_descriptor),
           (Data.ProtoLens.Tag 2, chanBackup__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ChannelBackup'_unknownFields
        (\ x__ y__ -> x__ {_ChannelBackup'_unknownFields = y__})
  defMessage
    = ChannelBackup'_constructor
        {_ChannelBackup'chanPoint = Prelude.Nothing,
         _ChannelBackup'chanBackup = Data.ProtoLens.fieldDefault,
         _ChannelBackup'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ChannelBackup -> Data.ProtoLens.Encoding.Bytes.Parser ChannelBackup
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "chan_point"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"chanPoint") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "chan_backup"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"chanBackup") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ChannelBackup"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (case
                  Lens.Family2.view
                    (Data.ProtoLens.Field.field @"maybe'chanPoint") _x
              of
                Prelude.Nothing -> Data.Monoid.mempty
                (Prelude.Just _v)
                  -> (Data.Monoid.<>)
                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                       ((Prelude..)
                          (\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                          Data.ProtoLens.encodeMessage _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view (Data.ProtoLens.Field.field @"chanBackup") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData ChannelBackup where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ChannelBackup'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ChannelBackup'chanPoint x__)
                (Control.DeepSeq.deepseq (_ChannelBackup'chanBackup x__) ()))
{- | Fields :
      -}
data ChannelBackupSubscription
  = ChannelBackupSubscription'_constructor {_ChannelBackupSubscription'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ChannelBackupSubscription where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ChannelBackupSubscription
instance Data.ProtoLens.Message ChannelBackupSubscription where
  messageName _ = Data.Text.pack "lnrpc.ChannelBackupSubscription"
  packedMessageDescriptor _
    = "\n\
      \\EMChannelBackupSubscription"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag = let in Data.Map.fromList []
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ChannelBackupSubscription'_unknownFields
        (\ x__ y__
           -> x__ {_ChannelBackupSubscription'_unknownFields = y__})
  defMessage
    = ChannelBackupSubscription'_constructor
        {_ChannelBackupSubscription'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ChannelBackupSubscription
          -> Data.ProtoLens.Encoding.Bytes.Parser ChannelBackupSubscription
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of {
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x) }
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ChannelBackupSubscription"
  buildMessage
    = \ _x
        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
instance Control.DeepSeq.NFData ChannelBackupSubscription where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ChannelBackupSubscription'_unknownFields x__) ()
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.chanBackups' @:: Lens' ChannelBackups [ChannelBackup]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'chanBackups' @:: Lens' ChannelBackups (Data.Vector.Vector ChannelBackup)@ -}
data ChannelBackups
  = ChannelBackups'_constructor {_ChannelBackups'chanBackups :: !(Data.Vector.Vector ChannelBackup),
                                 _ChannelBackups'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ChannelBackups where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ChannelBackups
instance Data.ProtoLens.Field.HasField ChannelBackups "chanBackups" [ChannelBackup] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelBackups'chanBackups
           (\ x__ y__ -> x__ {_ChannelBackups'chanBackups = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField ChannelBackups "vec'chanBackups" (Data.Vector.Vector ChannelBackup) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelBackups'chanBackups
           (\ x__ y__ -> x__ {_ChannelBackups'chanBackups = y__}))
        Prelude.id
instance Data.ProtoLens.Message ChannelBackups where
  messageName _ = Data.Text.pack "lnrpc.ChannelBackups"
  packedMessageDescriptor _
    = "\n\
      \\SOChannelBackups\DC27\n\
      \\fchan_backups\CAN\SOH \ETX(\v2\DC4.lnrpc.ChannelBackupR\vchanBackups"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        chanBackups__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_backups"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor ChannelBackup)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"chanBackups")) ::
              Data.ProtoLens.FieldDescriptor ChannelBackups
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, chanBackups__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ChannelBackups'_unknownFields
        (\ x__ y__ -> x__ {_ChannelBackups'_unknownFields = y__})
  defMessage
    = ChannelBackups'_constructor
        {_ChannelBackups'chanBackups = Data.Vector.Generic.empty,
         _ChannelBackups'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ChannelBackups
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ChannelBackup
             -> Data.ProtoLens.Encoding.Bytes.Parser ChannelBackups
        loop x mutable'chanBackups
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'chanBackups <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                              (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                 mutable'chanBackups)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'chanBackups") frozen'chanBackups
                              x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "chan_backups"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append
                                          mutable'chanBackups y)
                                loop x v
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'chanBackups
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'chanBackups <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'chanBackups)
          "ChannelBackups"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v
                   -> (Data.Monoid.<>)
                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((Prelude..)
                           (\ bs
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                      (Prelude.fromIntegral (Data.ByteString.length bs)))
                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                           Data.ProtoLens.encodeMessage _v))
                (Lens.Family2.view
                   (Data.ProtoLens.Field.field @"vec'chanBackups") _x))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData ChannelBackups where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ChannelBackups'_unknownFields x__)
             (Control.DeepSeq.deepseq (_ChannelBackups'chanBackups x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.chanId' @:: Lens' ChannelFeeReport Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.channelPoint' @:: Lens' ChannelFeeReport Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.baseFeeMsat' @:: Lens' ChannelFeeReport Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.feePerMil' @:: Lens' ChannelFeeReport Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.feeRate' @:: Lens' ChannelFeeReport Prelude.Double@ -}
data ChannelFeeReport
  = ChannelFeeReport'_constructor {_ChannelFeeReport'chanId :: !Data.Word.Word64,
                                   _ChannelFeeReport'channelPoint :: !Data.Text.Text,
                                   _ChannelFeeReport'baseFeeMsat :: !Data.Int.Int64,
                                   _ChannelFeeReport'feePerMil :: !Data.Int.Int64,
                                   _ChannelFeeReport'feeRate :: !Prelude.Double,
                                   _ChannelFeeReport'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ChannelFeeReport where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ChannelFeeReport
instance Data.ProtoLens.Field.HasField ChannelFeeReport "chanId" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelFeeReport'chanId
           (\ x__ y__ -> x__ {_ChannelFeeReport'chanId = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelFeeReport "channelPoint" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelFeeReport'channelPoint
           (\ x__ y__ -> x__ {_ChannelFeeReport'channelPoint = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelFeeReport "baseFeeMsat" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelFeeReport'baseFeeMsat
           (\ x__ y__ -> x__ {_ChannelFeeReport'baseFeeMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelFeeReport "feePerMil" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelFeeReport'feePerMil
           (\ x__ y__ -> x__ {_ChannelFeeReport'feePerMil = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelFeeReport "feeRate" Prelude.Double where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelFeeReport'feeRate
           (\ x__ y__ -> x__ {_ChannelFeeReport'feeRate = y__}))
        Prelude.id
instance Data.ProtoLens.Message ChannelFeeReport where
  messageName _ = Data.Text.pack "lnrpc.ChannelFeeReport"
  packedMessageDescriptor _
    = "\n\
      \\DLEChannelFeeReport\DC2\ESC\n\
      \\achan_id\CAN\ENQ \SOH(\EOTR\ACKchanIdB\STX0\SOH\DC2#\n\
      \\rchannel_point\CAN\SOH \SOH(\tR\fchannelPoint\DC2\"\n\
      \\rbase_fee_msat\CAN\STX \SOH(\ETXR\vbaseFeeMsat\DC2\RS\n\
      \\vfee_per_mil\CAN\ETX \SOH(\ETXR\tfeePerMil\DC2\EM\n\
      \\bfee_rate\CAN\EOT \SOH(\SOHR\afeeRate"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        chanId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_id"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"chanId")) ::
              Data.ProtoLens.FieldDescriptor ChannelFeeReport
        channelPoint__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "channel_point"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"channelPoint")) ::
              Data.ProtoLens.FieldDescriptor ChannelFeeReport
        baseFeeMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "base_fee_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"baseFeeMsat")) ::
              Data.ProtoLens.FieldDescriptor ChannelFeeReport
        feePerMil__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fee_per_mil"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"feePerMil")) ::
              Data.ProtoLens.FieldDescriptor ChannelFeeReport
        feeRate__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fee_rate"
              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"feeRate")) ::
              Data.ProtoLens.FieldDescriptor ChannelFeeReport
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 5, chanId__field_descriptor),
           (Data.ProtoLens.Tag 1, channelPoint__field_descriptor),
           (Data.ProtoLens.Tag 2, baseFeeMsat__field_descriptor),
           (Data.ProtoLens.Tag 3, feePerMil__field_descriptor),
           (Data.ProtoLens.Tag 4, feeRate__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ChannelFeeReport'_unknownFields
        (\ x__ y__ -> x__ {_ChannelFeeReport'_unknownFields = y__})
  defMessage
    = ChannelFeeReport'_constructor
        {_ChannelFeeReport'chanId = Data.ProtoLens.fieldDefault,
         _ChannelFeeReport'channelPoint = Data.ProtoLens.fieldDefault,
         _ChannelFeeReport'baseFeeMsat = Data.ProtoLens.fieldDefault,
         _ChannelFeeReport'feePerMil = Data.ProtoLens.fieldDefault,
         _ChannelFeeReport'feeRate = Data.ProtoLens.fieldDefault,
         _ChannelFeeReport'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ChannelFeeReport
          -> Data.ProtoLens.Encoding.Bytes.Parser ChannelFeeReport
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        40
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "chan_id"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"chanId") y x)
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "channel_point"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"channelPoint") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "base_fee_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"baseFeeMsat") y x)
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "fee_per_mil"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"feePerMil") y x)
                        33
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Data.ProtoLens.Encoding.Bytes.wordToDouble
                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
                                       "fee_rate"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"feeRate") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ChannelFeeReport"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"chanId") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view (Data.ProtoLens.Field.field @"channelPoint") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                         ((Prelude..)
                            (\ bs
                               -> (Data.Monoid.<>)
                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            Data.Text.Encoding.encodeUtf8 _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view (Data.ProtoLens.Field.field @"baseFeeMsat") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                   ((Data.Monoid.<>)
                      (let
                         _v = Lens.Family2.view (Data.ProtoLens.Field.field @"feePerMil") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                               ((Prelude..)
                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                      ((Data.Monoid.<>)
                         (let
                            _v = Lens.Family2.view (Data.ProtoLens.Field.field @"feeRate") _x
                          in
                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                Data.Monoid.mempty
                            else
                                (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 33)
                                  ((Prelude..)
                                     Data.ProtoLens.Encoding.Bytes.putFixed64
                                     Data.ProtoLens.Encoding.Bytes.doubleToWord _v))
                         (Data.ProtoLens.Encoding.Wire.buildFieldSet
                            (Lens.Family2.view Data.ProtoLens.unknownFields _x))))))
instance Control.DeepSeq.NFData ChannelFeeReport where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ChannelFeeReport'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ChannelFeeReport'chanId x__)
                (Control.DeepSeq.deepseq
                   (_ChannelFeeReport'channelPoint x__)
                   (Control.DeepSeq.deepseq
                      (_ChannelFeeReport'baseFeeMsat x__)
                      (Control.DeepSeq.deepseq
                         (_ChannelFeeReport'feePerMil x__)
                         (Control.DeepSeq.deepseq (_ChannelFeeReport'feeRate x__) ())))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.signature' @:: Lens' ChannelUpdate Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.chainHash' @:: Lens' ChannelUpdate Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.chanId' @:: Lens' ChannelUpdate Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.timestamp' @:: Lens' ChannelUpdate Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.messageFlags' @:: Lens' ChannelUpdate Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.channelFlags' @:: Lens' ChannelUpdate Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.timeLockDelta' @:: Lens' ChannelUpdate Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.htlcMinimumMsat' @:: Lens' ChannelUpdate Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.baseFee' @:: Lens' ChannelUpdate Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.feeRate' @:: Lens' ChannelUpdate Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.htlcMaximumMsat' @:: Lens' ChannelUpdate Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.extraOpaqueData' @:: Lens' ChannelUpdate Data.ByteString.ByteString@ -}
data ChannelUpdate
  = ChannelUpdate'_constructor {_ChannelUpdate'signature :: !Data.ByteString.ByteString,
                                _ChannelUpdate'chainHash :: !Data.ByteString.ByteString,
                                _ChannelUpdate'chanId :: !Data.Word.Word64,
                                _ChannelUpdate'timestamp :: !Data.Word.Word32,
                                _ChannelUpdate'messageFlags :: !Data.Word.Word32,
                                _ChannelUpdate'channelFlags :: !Data.Word.Word32,
                                _ChannelUpdate'timeLockDelta :: !Data.Word.Word32,
                                _ChannelUpdate'htlcMinimumMsat :: !Data.Word.Word64,
                                _ChannelUpdate'baseFee :: !Data.Word.Word32,
                                _ChannelUpdate'feeRate :: !Data.Word.Word32,
                                _ChannelUpdate'htlcMaximumMsat :: !Data.Word.Word64,
                                _ChannelUpdate'extraOpaqueData :: !Data.ByteString.ByteString,
                                _ChannelUpdate'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ChannelUpdate where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ChannelUpdate
instance Data.ProtoLens.Field.HasField ChannelUpdate "signature" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'signature
           (\ x__ y__ -> x__ {_ChannelUpdate'signature = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelUpdate "chainHash" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'chainHash
           (\ x__ y__ -> x__ {_ChannelUpdate'chainHash = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelUpdate "chanId" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'chanId
           (\ x__ y__ -> x__ {_ChannelUpdate'chanId = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelUpdate "timestamp" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'timestamp
           (\ x__ y__ -> x__ {_ChannelUpdate'timestamp = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelUpdate "messageFlags" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'messageFlags
           (\ x__ y__ -> x__ {_ChannelUpdate'messageFlags = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelUpdate "channelFlags" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'channelFlags
           (\ x__ y__ -> x__ {_ChannelUpdate'channelFlags = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelUpdate "timeLockDelta" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'timeLockDelta
           (\ x__ y__ -> x__ {_ChannelUpdate'timeLockDelta = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelUpdate "htlcMinimumMsat" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'htlcMinimumMsat
           (\ x__ y__ -> x__ {_ChannelUpdate'htlcMinimumMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelUpdate "baseFee" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'baseFee
           (\ x__ y__ -> x__ {_ChannelUpdate'baseFee = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelUpdate "feeRate" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'feeRate
           (\ x__ y__ -> x__ {_ChannelUpdate'feeRate = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelUpdate "htlcMaximumMsat" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'htlcMaximumMsat
           (\ x__ y__ -> x__ {_ChannelUpdate'htlcMaximumMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ChannelUpdate "extraOpaqueData" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ChannelUpdate'extraOpaqueData
           (\ x__ y__ -> x__ {_ChannelUpdate'extraOpaqueData = y__}))
        Prelude.id
instance Data.ProtoLens.Message ChannelUpdate where
  messageName _ = Data.Text.pack "lnrpc.ChannelUpdate"
  packedMessageDescriptor _
    = "\n\
      \\rChannelUpdate\DC2\FS\n\
      \\tsignature\CAN\SOH \SOH(\fR\tsignature\DC2\GS\n\
      \\n\
      \chain_hash\CAN\STX \SOH(\fR\tchainHash\DC2\ESC\n\
      \\achan_id\CAN\ETX \SOH(\EOTR\ACKchanIdB\STX0\SOH\DC2\FS\n\
      \\ttimestamp\CAN\EOT \SOH(\rR\ttimestamp\DC2#\n\
      \\rmessage_flags\CAN\n\
      \ \SOH(\rR\fmessageFlags\DC2#\n\
      \\rchannel_flags\CAN\ENQ \SOH(\rR\fchannelFlags\DC2&\n\
      \\SItime_lock_delta\CAN\ACK \SOH(\rR\rtimeLockDelta\DC2*\n\
      \\DC1htlc_minimum_msat\CAN\a \SOH(\EOTR\SIhtlcMinimumMsat\DC2\EM\n\
      \\bbase_fee\CAN\b \SOH(\rR\abaseFee\DC2\EM\n\
      \\bfee_rate\CAN\t \SOH(\rR\afeeRate\DC2*\n\
      \\DC1htlc_maximum_msat\CAN\v \SOH(\EOTR\SIhtlcMaximumMsat\DC2*\n\
      \\DC1extra_opaque_data\CAN\f \SOH(\fR\SIextraOpaqueData"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        signature__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "signature"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"signature")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
        chainHash__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chain_hash"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"chainHash")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
        chanId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_id"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"chanId")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
        timestamp__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "timestamp"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"timestamp")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
        messageFlags__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "message_flags"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"messageFlags")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
        channelFlags__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "channel_flags"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"channelFlags")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
        timeLockDelta__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "time_lock_delta"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"timeLockDelta")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
        htlcMinimumMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "htlc_minimum_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"htlcMinimumMsat")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
        baseFee__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "base_fee"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"baseFee")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
        feeRate__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fee_rate"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"feeRate")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
        htlcMaximumMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "htlc_maximum_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"htlcMaximumMsat")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
        extraOpaqueData__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "extra_opaque_data"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"extraOpaqueData")) ::
              Data.ProtoLens.FieldDescriptor ChannelUpdate
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, signature__field_descriptor),
           (Data.ProtoLens.Tag 2, chainHash__field_descriptor),
           (Data.ProtoLens.Tag 3, chanId__field_descriptor),
           (Data.ProtoLens.Tag 4, timestamp__field_descriptor),
           (Data.ProtoLens.Tag 10, messageFlags__field_descriptor),
           (Data.ProtoLens.Tag 5, channelFlags__field_descriptor),
           (Data.ProtoLens.Tag 6, timeLockDelta__field_descriptor),
           (Data.ProtoLens.Tag 7, htlcMinimumMsat__field_descriptor),
           (Data.ProtoLens.Tag 8, baseFee__field_descriptor),
           (Data.ProtoLens.Tag 9, feeRate__field_descriptor),
           (Data.ProtoLens.Tag 11, htlcMaximumMsat__field_descriptor),
           (Data.ProtoLens.Tag 12, extraOpaqueData__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ChannelUpdate'_unknownFields
        (\ x__ y__ -> x__ {_ChannelUpdate'_unknownFields = y__})
  defMessage
    = ChannelUpdate'_constructor
        {_ChannelUpdate'signature = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'chainHash = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'chanId = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'timestamp = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'messageFlags = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'channelFlags = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'timeLockDelta = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'htlcMinimumMsat = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'baseFee = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'feeRate = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'htlcMaximumMsat = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'extraOpaqueData = Data.ProtoLens.fieldDefault,
         _ChannelUpdate'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ChannelUpdate -> Data.ProtoLens.Encoding.Bytes.Parser ChannelUpdate
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "signature"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"signature") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "chain_hash"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"chainHash") y x)
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "chan_id"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"chanId") y x)
                        32
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "timestamp"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"timestamp") y x)
                        80
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "message_flags"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"messageFlags") y x)
                        40
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "channel_flags"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"channelFlags") y x)
                        48
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "time_lock_delta"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"timeLockDelta") y x)
                        56
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "htlc_minimum_msat"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"htlcMinimumMsat") y x)
                        64
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "base_fee"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"baseFee") y x)
                        72
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "fee_rate"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"feeRate") y x)
                        88
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "htlc_maximum_msat"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"htlcMaximumMsat") y x)
                        98
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "extra_opaque_data"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"extraOpaqueData") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ChannelUpdate"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"signature") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs
                          -> (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"chainHash") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            _v))
                ((Data.Monoid.<>)
                   (let
                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"chanId") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                   ((Data.Monoid.<>)
                      (let
                         _v = Lens.Family2.view (Data.ProtoLens.Field.field @"timestamp") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                               ((Prelude..)
                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                      ((Data.Monoid.<>)
                         (let
                            _v
                              = Lens.Family2.view (Data.ProtoLens.Field.field @"messageFlags") _x
                          in
                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                Data.Monoid.mempty
                            else
                                (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 80)
                                  ((Prelude..)
                                     Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral
                                     _v))
                         ((Data.Monoid.<>)
                            (let
                               _v
                                 = Lens.Family2.view (Data.ProtoLens.Field.field @"channelFlags") _x
                             in
                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                   Data.Monoid.mempty
                               else
                                   (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
                                     ((Prelude..)
                                        Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral
                                        _v))
                            ((Data.Monoid.<>)
                               (let
                                  _v
                                    = Lens.Family2.view
                                        (Data.ProtoLens.Field.field @"timeLockDelta") _x
                                in
                                  if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                      Data.Monoid.mempty
                                  else
                                      (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt 48)
                                        ((Prelude..)
                                           Data.ProtoLens.Encoding.Bytes.putVarInt
                                           Prelude.fromIntegral _v))
                               ((Data.Monoid.<>)
                                  (let
                                     _v
                                       = Lens.Family2.view
                                           (Data.ProtoLens.Field.field @"htlcMinimumMsat") _x
                                   in
                                     if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                         Data.Monoid.mempty
                                     else
                                         (Data.Monoid.<>)
                                           (Data.ProtoLens.Encoding.Bytes.putVarInt 56)
                                           (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                                  ((Data.Monoid.<>)
                                     (let
                                        _v
                                          = Lens.Family2.view
                                              (Data.ProtoLens.Field.field @"baseFee") _x
                                      in
                                        if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                            Data.Monoid.mempty
                                        else
                                            (Data.Monoid.<>)
                                              (Data.ProtoLens.Encoding.Bytes.putVarInt 64)
                                              ((Prelude..)
                                                 Data.ProtoLens.Encoding.Bytes.putVarInt
                                                 Prelude.fromIntegral _v))
                                     ((Data.Monoid.<>)
                                        (let
                                           _v
                                             = Lens.Family2.view
                                                 (Data.ProtoLens.Field.field @"feeRate") _x
                                         in
                                           if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                               Data.Monoid.mempty
                                           else
                                               (Data.Monoid.<>)
                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 72)
                                                 ((Prelude..)
                                                    Data.ProtoLens.Encoding.Bytes.putVarInt
                                                    Prelude.fromIntegral _v))
                                        ((Data.Monoid.<>)
                                           (let
                                              _v
                                                = Lens.Family2.view
                                                    (Data.ProtoLens.Field.field @"htlcMaximumMsat")
                                                    _x
                                            in
                                              if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                                  Data.Monoid.mempty
                                              else
                                                  (Data.Monoid.<>)
                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt 88)
                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                                           ((Data.Monoid.<>)
                                              (let
                                                 _v
                                                   = Lens.Family2.view
                                                       (Data.ProtoLens.Field.field
                                                          @"extraOpaqueData")
                                                       _x
                                               in
                                                 if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                                     Data.Monoid.mempty
                                                 else
                                                     (Data.Monoid.<>)
                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt 98)
                                                       ((\ bs
                                                           -> (Data.Monoid.<>)
                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                   (Prelude.fromIntegral
                                                                      (Data.ByteString.length bs)))
                                                                (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                   bs))
                                                          _v))
                                              (Data.ProtoLens.Encoding.Wire.buildFieldSet
                                                 (Lens.Family2.view
                                                    Data.ProtoLens.unknownFields _x)))))))))))))
instance Control.DeepSeq.NFData ChannelUpdate where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ChannelUpdate'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ChannelUpdate'signature x__)
                (Control.DeepSeq.deepseq
                   (_ChannelUpdate'chainHash x__)
                   (Control.DeepSeq.deepseq
                      (_ChannelUpdate'chanId x__)
                      (Control.DeepSeq.deepseq
                         (_ChannelUpdate'timestamp x__)
                         (Control.DeepSeq.deepseq
                            (_ChannelUpdate'messageFlags x__)
                            (Control.DeepSeq.deepseq
                               (_ChannelUpdate'channelFlags x__)
                               (Control.DeepSeq.deepseq
                                  (_ChannelUpdate'timeLockDelta x__)
                                  (Control.DeepSeq.deepseq
                                     (_ChannelUpdate'htlcMinimumMsat x__)
                                     (Control.DeepSeq.deepseq
                                        (_ChannelUpdate'baseFee x__)
                                        (Control.DeepSeq.deepseq
                                           (_ChannelUpdate'feeRate x__)
                                           (Control.DeepSeq.deepseq
                                              (_ChannelUpdate'htlcMaximumMsat x__)
                                              (Control.DeepSeq.deepseq
                                                 (_ChannelUpdate'extraOpaqueData x__) ()))))))))))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.macaroon' @:: Lens' CheckMacPermRequest Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.permissions' @:: Lens' CheckMacPermRequest [MacaroonPermission]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'permissions' @:: Lens' CheckMacPermRequest (Data.Vector.Vector MacaroonPermission)@
         * 'Proto.Lnrpc.Ln1_Fields.fullMethod' @:: Lens' CheckMacPermRequest Data.Text.Text@ -}
data CheckMacPermRequest
  = CheckMacPermRequest'_constructor {_CheckMacPermRequest'macaroon :: !Data.ByteString.ByteString,
                                      _CheckMacPermRequest'permissions :: !(Data.Vector.Vector MacaroonPermission),
                                      _CheckMacPermRequest'fullMethod :: !Data.Text.Text,
                                      _CheckMacPermRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show CheckMacPermRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out CheckMacPermRequest
instance Data.ProtoLens.Field.HasField CheckMacPermRequest "macaroon" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _CheckMacPermRequest'macaroon
           (\ x__ y__ -> x__ {_CheckMacPermRequest'macaroon = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField CheckMacPermRequest "permissions" [MacaroonPermission] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _CheckMacPermRequest'permissions
           (\ x__ y__ -> x__ {_CheckMacPermRequest'permissions = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField CheckMacPermRequest "vec'permissions" (Data.Vector.Vector MacaroonPermission) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _CheckMacPermRequest'permissions
           (\ x__ y__ -> x__ {_CheckMacPermRequest'permissions = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField CheckMacPermRequest "fullMethod" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _CheckMacPermRequest'fullMethod
           (\ x__ y__ -> x__ {_CheckMacPermRequest'fullMethod = y__}))
        Prelude.id
instance Data.ProtoLens.Message CheckMacPermRequest where
  messageName _ = Data.Text.pack "lnrpc.CheckMacPermRequest"
  packedMessageDescriptor _
    = "\n\
      \\DC3CheckMacPermRequest\DC2\SUB\n\
      \\bmacaroon\CAN\SOH \SOH(\fR\bmacaroon\DC2;\n\
      \\vpermissions\CAN\STX \ETX(\v2\EM.lnrpc.MacaroonPermissionR\vpermissions\DC2\RS\n\
      \\n\
      \fullMethod\CAN\ETX \SOH(\tR\n\
      \fullMethod"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        macaroon__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "macaroon"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"macaroon")) ::
              Data.ProtoLens.FieldDescriptor CheckMacPermRequest
        permissions__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "permissions"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor MacaroonPermission)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"permissions")) ::
              Data.ProtoLens.FieldDescriptor CheckMacPermRequest
        fullMethod__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fullMethod"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"fullMethod")) ::
              Data.ProtoLens.FieldDescriptor CheckMacPermRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, macaroon__field_descriptor),
           (Data.ProtoLens.Tag 2, permissions__field_descriptor),
           (Data.ProtoLens.Tag 3, fullMethod__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _CheckMacPermRequest'_unknownFields
        (\ x__ y__ -> x__ {_CheckMacPermRequest'_unknownFields = y__})
  defMessage
    = CheckMacPermRequest'_constructor
        {_CheckMacPermRequest'macaroon = Data.ProtoLens.fieldDefault,
         _CheckMacPermRequest'permissions = Data.Vector.Generic.empty,
         _CheckMacPermRequest'fullMethod = Data.ProtoLens.fieldDefault,
         _CheckMacPermRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          CheckMacPermRequest
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld MacaroonPermission
             -> Data.ProtoLens.Encoding.Bytes.Parser CheckMacPermRequest
        loop x mutable'permissions
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'permissions <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                              (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                 mutable'permissions)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'permissions") frozen'permissions
                              x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "macaroon"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"macaroon") y x)
                                  mutable'permissions
                        18
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "permissions"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append
                                          mutable'permissions y)
                                loop x v
                        26
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "fullMethod"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"fullMethod") y x)
                                  mutable'permissions
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'permissions
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'permissions <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'permissions)
          "CheckMacPermRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"macaroon") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs
                          -> (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         _v))
             ((Data.Monoid.<>)
                (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                   (\ _v
                      -> (Data.Monoid.<>)
                           (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                           ((Prelude..)
                              (\ bs
                                 -> (Data.Monoid.<>)
                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
                                         (Prelude.fromIntegral (Data.ByteString.length bs)))
                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                              Data.ProtoLens.encodeMessage _v))
                   (Lens.Family2.view
                      (Data.ProtoLens.Field.field @"vec'permissions") _x))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view (Data.ProtoLens.Field.field @"fullMethod") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                            ((Prelude..)
                               (\ bs
                                  -> (Data.Monoid.<>)
                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
                                          (Prelude.fromIntegral (Data.ByteString.length bs)))
                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                               Data.Text.Encoding.encodeUtf8 _v))
                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
instance Control.DeepSeq.NFData CheckMacPermRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_CheckMacPermRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_CheckMacPermRequest'macaroon x__)
                (Control.DeepSeq.deepseq
                   (_CheckMacPermRequest'permissions x__)
                   (Control.DeepSeq.deepseq
                      (_CheckMacPermRequest'fullMethod x__) ())))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.valid' @:: Lens' CheckMacPermResponse Prelude.Bool@ -}
data CheckMacPermResponse
  = CheckMacPermResponse'_constructor {_CheckMacPermResponse'valid :: !Prelude.Bool,
                                       _CheckMacPermResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show CheckMacPermResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out CheckMacPermResponse
instance Data.ProtoLens.Field.HasField CheckMacPermResponse "valid" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _CheckMacPermResponse'valid
           (\ x__ y__ -> x__ {_CheckMacPermResponse'valid = y__}))
        Prelude.id
instance Data.ProtoLens.Message CheckMacPermResponse where
  messageName _ = Data.Text.pack "lnrpc.CheckMacPermResponse"
  packedMessageDescriptor _
    = "\n\
      \\DC4CheckMacPermResponse\DC2\DC4\n\
      \\ENQvalid\CAN\SOH \SOH(\bR\ENQvalid"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        valid__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "valid"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"valid")) ::
              Data.ProtoLens.FieldDescriptor CheckMacPermResponse
      in
        Data.Map.fromList [(Data.ProtoLens.Tag 1, valid__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _CheckMacPermResponse'_unknownFields
        (\ x__ y__ -> x__ {_CheckMacPermResponse'_unknownFields = y__})
  defMessage
    = CheckMacPermResponse'_constructor
        {_CheckMacPermResponse'valid = Data.ProtoLens.fieldDefault,
         _CheckMacPermResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          CheckMacPermResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser CheckMacPermResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "valid"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"valid") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "CheckMacPermResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"valid") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Prelude..)
                         Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                         _v))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData CheckMacPermResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_CheckMacPermResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq (_CheckMacPermResponse'valid x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.show' @:: Lens' DebugLevelRequest Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.levelSpec' @:: Lens' DebugLevelRequest Data.Text.Text@ -}
data DebugLevelRequest
  = DebugLevelRequest'_constructor {_DebugLevelRequest'show :: !Prelude.Bool,
                                    _DebugLevelRequest'levelSpec :: !Data.Text.Text,
                                    _DebugLevelRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show DebugLevelRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out DebugLevelRequest
instance Data.ProtoLens.Field.HasField DebugLevelRequest "show" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _DebugLevelRequest'show
           (\ x__ y__ -> x__ {_DebugLevelRequest'show = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField DebugLevelRequest "levelSpec" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _DebugLevelRequest'levelSpec
           (\ x__ y__ -> x__ {_DebugLevelRequest'levelSpec = y__}))
        Prelude.id
instance Data.ProtoLens.Message DebugLevelRequest where
  messageName _ = Data.Text.pack "lnrpc.DebugLevelRequest"
  packedMessageDescriptor _
    = "\n\
      \\DC1DebugLevelRequest\DC2\DC2\n\
      \\EOTshow\CAN\SOH \SOH(\bR\EOTshow\DC2\GS\n\
      \\n\
      \level_spec\CAN\STX \SOH(\tR\tlevelSpec"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        show__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "show"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"show")) ::
              Data.ProtoLens.FieldDescriptor DebugLevelRequest
        levelSpec__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "level_spec"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"levelSpec")) ::
              Data.ProtoLens.FieldDescriptor DebugLevelRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, show__field_descriptor),
           (Data.ProtoLens.Tag 2, levelSpec__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _DebugLevelRequest'_unknownFields
        (\ x__ y__ -> x__ {_DebugLevelRequest'_unknownFields = y__})
  defMessage
    = DebugLevelRequest'_constructor
        {_DebugLevelRequest'show = Data.ProtoLens.fieldDefault,
         _DebugLevelRequest'levelSpec = Data.ProtoLens.fieldDefault,
         _DebugLevelRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          DebugLevelRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser DebugLevelRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "show"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"show") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "level_spec"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"levelSpec") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "DebugLevelRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"show") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Prelude..)
                         Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                         _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"levelSpec") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((Prelude..)
                            (\ bs
                               -> (Data.Monoid.<>)
                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            Data.Text.Encoding.encodeUtf8 _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData DebugLevelRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_DebugLevelRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_DebugLevelRequest'show x__)
                (Control.DeepSeq.deepseq (_DebugLevelRequest'levelSpec x__) ()))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.subSystems' @:: Lens' DebugLevelResponse Data.Text.Text@ -}
data DebugLevelResponse
  = DebugLevelResponse'_constructor {_DebugLevelResponse'subSystems :: !Data.Text.Text,
                                     _DebugLevelResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show DebugLevelResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out DebugLevelResponse
instance Data.ProtoLens.Field.HasField DebugLevelResponse "subSystems" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _DebugLevelResponse'subSystems
           (\ x__ y__ -> x__ {_DebugLevelResponse'subSystems = y__}))
        Prelude.id
instance Data.ProtoLens.Message DebugLevelResponse where
  messageName _ = Data.Text.pack "lnrpc.DebugLevelResponse"
  packedMessageDescriptor _
    = "\n\
      \\DC2DebugLevelResponse\DC2\US\n\
      \\vsub_systems\CAN\SOH \SOH(\tR\n\
      \subSystems"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        subSystems__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "sub_systems"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"subSystems")) ::
              Data.ProtoLens.FieldDescriptor DebugLevelResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, subSystems__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _DebugLevelResponse'_unknownFields
        (\ x__ y__ -> x__ {_DebugLevelResponse'_unknownFields = y__})
  defMessage
    = DebugLevelResponse'_constructor
        {_DebugLevelResponse'subSystems = Data.ProtoLens.fieldDefault,
         _DebugLevelResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          DebugLevelResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser DebugLevelResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "sub_systems"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"subSystems") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "DebugLevelResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v
                  = Lens.Family2.view (Data.ProtoLens.Field.field @"subSystems") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData DebugLevelResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_DebugLevelResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq (_DebugLevelResponse'subSystems x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.failedPaymentsOnly' @:: Lens' DeleteAllPaymentsRequest Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.failedHtlcsOnly' @:: Lens' DeleteAllPaymentsRequest Prelude.Bool@ -}
data DeleteAllPaymentsRequest
  = DeleteAllPaymentsRequest'_constructor {_DeleteAllPaymentsRequest'failedPaymentsOnly :: !Prelude.Bool,
                                           _DeleteAllPaymentsRequest'failedHtlcsOnly :: !Prelude.Bool,
                                           _DeleteAllPaymentsRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show DeleteAllPaymentsRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out DeleteAllPaymentsRequest
instance Data.ProtoLens.Field.HasField DeleteAllPaymentsRequest "failedPaymentsOnly" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _DeleteAllPaymentsRequest'failedPaymentsOnly
           (\ x__ y__
              -> x__ {_DeleteAllPaymentsRequest'failedPaymentsOnly = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField DeleteAllPaymentsRequest "failedHtlcsOnly" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _DeleteAllPaymentsRequest'failedHtlcsOnly
           (\ x__ y__
              -> x__ {_DeleteAllPaymentsRequest'failedHtlcsOnly = y__}))
        Prelude.id
instance Data.ProtoLens.Message DeleteAllPaymentsRequest where
  messageName _ = Data.Text.pack "lnrpc.DeleteAllPaymentsRequest"
  packedMessageDescriptor _
    = "\n\
      \\CANDeleteAllPaymentsRequest\DC20\n\
      \\DC4failed_payments_only\CAN\SOH \SOH(\bR\DC2failedPaymentsOnly\DC2*\n\
      \\DC1failed_htlcs_only\CAN\STX \SOH(\bR\SIfailedHtlcsOnly"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        failedPaymentsOnly__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "failed_payments_only"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"failedPaymentsOnly")) ::
              Data.ProtoLens.FieldDescriptor DeleteAllPaymentsRequest
        failedHtlcsOnly__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "failed_htlcs_only"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"failedHtlcsOnly")) ::
              Data.ProtoLens.FieldDescriptor DeleteAllPaymentsRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, failedPaymentsOnly__field_descriptor),
           (Data.ProtoLens.Tag 2, failedHtlcsOnly__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _DeleteAllPaymentsRequest'_unknownFields
        (\ x__ y__ -> x__ {_DeleteAllPaymentsRequest'_unknownFields = y__})
  defMessage
    = DeleteAllPaymentsRequest'_constructor
        {_DeleteAllPaymentsRequest'failedPaymentsOnly = Data.ProtoLens.fieldDefault,
         _DeleteAllPaymentsRequest'failedHtlcsOnly = Data.ProtoLens.fieldDefault,
         _DeleteAllPaymentsRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          DeleteAllPaymentsRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser DeleteAllPaymentsRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "failed_payments_only"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"failedPaymentsOnly") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "failed_htlcs_only"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"failedHtlcsOnly") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "DeleteAllPaymentsRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v
                  = Lens.Family2.view
                      (Data.ProtoLens.Field.field @"failedPaymentsOnly") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Prelude..)
                         Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                         _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view
                         (Data.ProtoLens.Field.field @"failedHtlcsOnly") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         ((Prelude..)
                            Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                            _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData DeleteAllPaymentsRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_DeleteAllPaymentsRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_DeleteAllPaymentsRequest'failedPaymentsOnly x__)
                (Control.DeepSeq.deepseq
                   (_DeleteAllPaymentsRequest'failedHtlcsOnly x__) ()))
{- | Fields :
      -}
data DeleteAllPaymentsResponse
  = DeleteAllPaymentsResponse'_constructor {_DeleteAllPaymentsResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show DeleteAllPaymentsResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out DeleteAllPaymentsResponse
instance Data.ProtoLens.Message DeleteAllPaymentsResponse where
  messageName _ = Data.Text.pack "lnrpc.DeleteAllPaymentsResponse"
  packedMessageDescriptor _
    = "\n\
      \\EMDeleteAllPaymentsResponse"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag = let in Data.Map.fromList []
  unknownFields
    = Lens.Family2.Unchecked.lens
        _DeleteAllPaymentsResponse'_unknownFields
        (\ x__ y__
           -> x__ {_DeleteAllPaymentsResponse'_unknownFields = y__})
  defMessage
    = DeleteAllPaymentsResponse'_constructor
        {_DeleteAllPaymentsResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          DeleteAllPaymentsResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser DeleteAllPaymentsResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of {
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x) }
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "DeleteAllPaymentsResponse"
  buildMessage
    = \ _x
        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
instance Control.DeepSeq.NFData DeleteAllPaymentsResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_DeleteAllPaymentsResponse'_unknownFields x__) ()
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.rootKeyId' @:: Lens' DeleteMacaroonIDRequest Data.Word.Word64@ -}
data DeleteMacaroonIDRequest
  = DeleteMacaroonIDRequest'_constructor {_DeleteMacaroonIDRequest'rootKeyId :: !Data.Word.Word64,
                                          _DeleteMacaroonIDRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show DeleteMacaroonIDRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out DeleteMacaroonIDRequest
instance Data.ProtoLens.Field.HasField DeleteMacaroonIDRequest "rootKeyId" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _DeleteMacaroonIDRequest'rootKeyId
           (\ x__ y__ -> x__ {_DeleteMacaroonIDRequest'rootKeyId = y__}))
        Prelude.id
instance Data.ProtoLens.Message DeleteMacaroonIDRequest where
  messageName _ = Data.Text.pack "lnrpc.DeleteMacaroonIDRequest"
  packedMessageDescriptor _
    = "\n\
      \\ETBDeleteMacaroonIDRequest\DC2\RS\n\
      \\vroot_key_id\CAN\SOH \SOH(\EOTR\trootKeyId"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        rootKeyId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "root_key_id"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"rootKeyId")) ::
              Data.ProtoLens.FieldDescriptor DeleteMacaroonIDRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, rootKeyId__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _DeleteMacaroonIDRequest'_unknownFields
        (\ x__ y__ -> x__ {_DeleteMacaroonIDRequest'_unknownFields = y__})
  defMessage
    = DeleteMacaroonIDRequest'_constructor
        {_DeleteMacaroonIDRequest'rootKeyId = Data.ProtoLens.fieldDefault,
         _DeleteMacaroonIDRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          DeleteMacaroonIDRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser DeleteMacaroonIDRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "root_key_id"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"rootKeyId") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "DeleteMacaroonIDRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"rootKeyId") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData DeleteMacaroonIDRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_DeleteMacaroonIDRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_DeleteMacaroonIDRequest'rootKeyId x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.deleted' @:: Lens' DeleteMacaroonIDResponse Prelude.Bool@ -}
data DeleteMacaroonIDResponse
  = DeleteMacaroonIDResponse'_constructor {_DeleteMacaroonIDResponse'deleted :: !Prelude.Bool,
                                           _DeleteMacaroonIDResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show DeleteMacaroonIDResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out DeleteMacaroonIDResponse
instance Data.ProtoLens.Field.HasField DeleteMacaroonIDResponse "deleted" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _DeleteMacaroonIDResponse'deleted
           (\ x__ y__ -> x__ {_DeleteMacaroonIDResponse'deleted = y__}))
        Prelude.id
instance Data.ProtoLens.Message DeleteMacaroonIDResponse where
  messageName _ = Data.Text.pack "lnrpc.DeleteMacaroonIDResponse"
  packedMessageDescriptor _
    = "\n\
      \\CANDeleteMacaroonIDResponse\DC2\CAN\n\
      \\adeleted\CAN\SOH \SOH(\bR\adeleted"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        deleted__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "deleted"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"deleted")) ::
              Data.ProtoLens.FieldDescriptor DeleteMacaroonIDResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, deleted__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _DeleteMacaroonIDResponse'_unknownFields
        (\ x__ y__ -> x__ {_DeleteMacaroonIDResponse'_unknownFields = y__})
  defMessage
    = DeleteMacaroonIDResponse'_constructor
        {_DeleteMacaroonIDResponse'deleted = Data.ProtoLens.fieldDefault,
         _DeleteMacaroonIDResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          DeleteMacaroonIDResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser DeleteMacaroonIDResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "deleted"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"deleted") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "DeleteMacaroonIDResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"deleted") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Prelude..)
                         Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                         _v))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData DeleteMacaroonIDResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_DeleteMacaroonIDResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_DeleteMacaroonIDResponse'deleted x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.paymentHash' @:: Lens' DeletePaymentRequest Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.failedHtlcsOnly' @:: Lens' DeletePaymentRequest Prelude.Bool@ -}
data DeletePaymentRequest
  = DeletePaymentRequest'_constructor {_DeletePaymentRequest'paymentHash :: !Data.ByteString.ByteString,
                                       _DeletePaymentRequest'failedHtlcsOnly :: !Prelude.Bool,
                                       _DeletePaymentRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show DeletePaymentRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out DeletePaymentRequest
instance Data.ProtoLens.Field.HasField DeletePaymentRequest "paymentHash" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _DeletePaymentRequest'paymentHash
           (\ x__ y__ -> x__ {_DeletePaymentRequest'paymentHash = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField DeletePaymentRequest "failedHtlcsOnly" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _DeletePaymentRequest'failedHtlcsOnly
           (\ x__ y__ -> x__ {_DeletePaymentRequest'failedHtlcsOnly = y__}))
        Prelude.id
instance Data.ProtoLens.Message DeletePaymentRequest where
  messageName _ = Data.Text.pack "lnrpc.DeletePaymentRequest"
  packedMessageDescriptor _
    = "\n\
      \\DC4DeletePaymentRequest\DC2!\n\
      \\fpayment_hash\CAN\SOH \SOH(\fR\vpaymentHash\DC2*\n\
      \\DC1failed_htlcs_only\CAN\STX \SOH(\bR\SIfailedHtlcsOnly"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        paymentHash__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payment_hash"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"paymentHash")) ::
              Data.ProtoLens.FieldDescriptor DeletePaymentRequest
        failedHtlcsOnly__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "failed_htlcs_only"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"failedHtlcsOnly")) ::
              Data.ProtoLens.FieldDescriptor DeletePaymentRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, paymentHash__field_descriptor),
           (Data.ProtoLens.Tag 2, failedHtlcsOnly__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _DeletePaymentRequest'_unknownFields
        (\ x__ y__ -> x__ {_DeletePaymentRequest'_unknownFields = y__})
  defMessage
    = DeletePaymentRequest'_constructor
        {_DeletePaymentRequest'paymentHash = Data.ProtoLens.fieldDefault,
         _DeletePaymentRequest'failedHtlcsOnly = Data.ProtoLens.fieldDefault,
         _DeletePaymentRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          DeletePaymentRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser DeletePaymentRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "payment_hash"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"paymentHash") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "failed_htlcs_only"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"failedHtlcsOnly") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "DeletePaymentRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v
                  = Lens.Family2.view (Data.ProtoLens.Field.field @"paymentHash") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs
                          -> (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view
                         (Data.ProtoLens.Field.field @"failedHtlcsOnly") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         ((Prelude..)
                            Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                            _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData DeletePaymentRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_DeletePaymentRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_DeletePaymentRequest'paymentHash x__)
                (Control.DeepSeq.deepseq
                   (_DeletePaymentRequest'failedHtlcsOnly x__) ()))
{- | Fields :
      -}
data DeletePaymentResponse
  = DeletePaymentResponse'_constructor {_DeletePaymentResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show DeletePaymentResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out DeletePaymentResponse
instance Data.ProtoLens.Message DeletePaymentResponse where
  messageName _ = Data.Text.pack "lnrpc.DeletePaymentResponse"
  packedMessageDescriptor _
    = "\n\
      \\NAKDeletePaymentResponse"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag = let in Data.Map.fromList []
  unknownFields
    = Lens.Family2.Unchecked.lens
        _DeletePaymentResponse'_unknownFields
        (\ x__ y__ -> x__ {_DeletePaymentResponse'_unknownFields = y__})
  defMessage
    = DeletePaymentResponse'_constructor
        {_DeletePaymentResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          DeletePaymentResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser DeletePaymentResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of {
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x) }
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "DeletePaymentResponse"
  buildMessage
    = \ _x
        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
instance Control.DeepSeq.NFData DeletePaymentResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_DeletePaymentResponse'_unknownFields x__) ()
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.chanPoint' @:: Lens' ExportChannelBackupRequest Proto.Lnrpc.Ln0.ChannelPoint@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'chanPoint' @:: Lens' ExportChannelBackupRequest (Prelude.Maybe Proto.Lnrpc.Ln0.ChannelPoint)@ -}
data ExportChannelBackupRequest
  = ExportChannelBackupRequest'_constructor {_ExportChannelBackupRequest'chanPoint :: !(Prelude.Maybe Proto.Lnrpc.Ln0.ChannelPoint),
                                             _ExportChannelBackupRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ExportChannelBackupRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ExportChannelBackupRequest
instance Data.ProtoLens.Field.HasField ExportChannelBackupRequest "chanPoint" Proto.Lnrpc.Ln0.ChannelPoint where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ExportChannelBackupRequest'chanPoint
           (\ x__ y__ -> x__ {_ExportChannelBackupRequest'chanPoint = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ExportChannelBackupRequest "maybe'chanPoint" (Prelude.Maybe Proto.Lnrpc.Ln0.ChannelPoint) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ExportChannelBackupRequest'chanPoint
           (\ x__ y__ -> x__ {_ExportChannelBackupRequest'chanPoint = y__}))
        Prelude.id
instance Data.ProtoLens.Message ExportChannelBackupRequest where
  messageName _ = Data.Text.pack "lnrpc.ExportChannelBackupRequest"
  packedMessageDescriptor _
    = "\n\
      \\SUBExportChannelBackupRequest\DC22\n\
      \\n\
      \chan_point\CAN\SOH \SOH(\v2\DC3.lnrpc.ChannelPointR\tchanPoint"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        chanPoint__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_point"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Lnrpc.Ln0.ChannelPoint)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'chanPoint")) ::
              Data.ProtoLens.FieldDescriptor ExportChannelBackupRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, chanPoint__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ExportChannelBackupRequest'_unknownFields
        (\ x__ y__
           -> x__ {_ExportChannelBackupRequest'_unknownFields = y__})
  defMessage
    = ExportChannelBackupRequest'_constructor
        {_ExportChannelBackupRequest'chanPoint = Prelude.Nothing,
         _ExportChannelBackupRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ExportChannelBackupRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser ExportChannelBackupRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "chan_point"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"chanPoint") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ExportChannelBackupRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (case
                  Lens.Family2.view
                    (Data.ProtoLens.Field.field @"maybe'chanPoint") _x
              of
                Prelude.Nothing -> Data.Monoid.mempty
                (Prelude.Just _v)
                  -> (Data.Monoid.<>)
                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                       ((Prelude..)
                          (\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                          Data.ProtoLens.encodeMessage _v))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData ExportChannelBackupRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ExportChannelBackupRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ExportChannelBackupRequest'chanPoint x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.outpoint' @:: Lens' FailedUpdate Proto.Lnrpc.Ln0.OutPoint@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'outpoint' @:: Lens' FailedUpdate (Prelude.Maybe Proto.Lnrpc.Ln0.OutPoint)@
         * 'Proto.Lnrpc.Ln1_Fields.reason' @:: Lens' FailedUpdate UpdateFailure@
         * 'Proto.Lnrpc.Ln1_Fields.updateError' @:: Lens' FailedUpdate Data.Text.Text@ -}
data FailedUpdate
  = FailedUpdate'_constructor {_FailedUpdate'outpoint :: !(Prelude.Maybe Proto.Lnrpc.Ln0.OutPoint),
                               _FailedUpdate'reason :: !UpdateFailure,
                               _FailedUpdate'updateError :: !Data.Text.Text,
                               _FailedUpdate'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show FailedUpdate where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out FailedUpdate
instance Data.ProtoLens.Field.HasField FailedUpdate "outpoint" Proto.Lnrpc.Ln0.OutPoint where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _FailedUpdate'outpoint
           (\ x__ y__ -> x__ {_FailedUpdate'outpoint = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField FailedUpdate "maybe'outpoint" (Prelude.Maybe Proto.Lnrpc.Ln0.OutPoint) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _FailedUpdate'outpoint
           (\ x__ y__ -> x__ {_FailedUpdate'outpoint = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField FailedUpdate "reason" UpdateFailure where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _FailedUpdate'reason
           (\ x__ y__ -> x__ {_FailedUpdate'reason = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField FailedUpdate "updateError" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _FailedUpdate'updateError
           (\ x__ y__ -> x__ {_FailedUpdate'updateError = y__}))
        Prelude.id
instance Data.ProtoLens.Message FailedUpdate where
  messageName _ = Data.Text.pack "lnrpc.FailedUpdate"
  packedMessageDescriptor _
    = "\n\
      \\fFailedUpdate\DC2+\n\
      \\boutpoint\CAN\SOH \SOH(\v2\SI.lnrpc.OutPointR\boutpoint\DC2,\n\
      \\ACKreason\CAN\STX \SOH(\SO2\DC4.lnrpc.UpdateFailureR\ACKreason\DC2!\n\
      \\fupdate_error\CAN\ETX \SOH(\tR\vupdateError"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        outpoint__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "outpoint"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Lnrpc.Ln0.OutPoint)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'outpoint")) ::
              Data.ProtoLens.FieldDescriptor FailedUpdate
        reason__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "reason"
              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
                 Data.ProtoLens.FieldTypeDescriptor UpdateFailure)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"reason")) ::
              Data.ProtoLens.FieldDescriptor FailedUpdate
        updateError__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "update_error"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"updateError")) ::
              Data.ProtoLens.FieldDescriptor FailedUpdate
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, outpoint__field_descriptor),
           (Data.ProtoLens.Tag 2, reason__field_descriptor),
           (Data.ProtoLens.Tag 3, updateError__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _FailedUpdate'_unknownFields
        (\ x__ y__ -> x__ {_FailedUpdate'_unknownFields = y__})
  defMessage
    = FailedUpdate'_constructor
        {_FailedUpdate'outpoint = Prelude.Nothing,
         _FailedUpdate'reason = Data.ProtoLens.fieldDefault,
         _FailedUpdate'updateError = Data.ProtoLens.fieldDefault,
         _FailedUpdate'_unknownFields = []}
  parseMessage
    = let
        loop ::
          FailedUpdate -> Data.ProtoLens.Encoding.Bytes.Parser FailedUpdate
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "outpoint"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"outpoint") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.toEnum
                                          (Prelude.fmap
                                             Prelude.fromIntegral
                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
                                       "reason"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"reason") y x)
                        26
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "update_error"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"updateError") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "FailedUpdate"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (case
                  Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'outpoint") _x
              of
                Prelude.Nothing -> Data.Monoid.mempty
                (Prelude.Just _v)
                  -> (Data.Monoid.<>)
                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                       ((Prelude..)
                          (\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                          Data.ProtoLens.encodeMessage _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"reason") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         ((Prelude..)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
                            Prelude.fromEnum _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view (Data.ProtoLens.Field.field @"updateError") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                            ((Prelude..)
                               (\ bs
                                  -> (Data.Monoid.<>)
                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
                                          (Prelude.fromIntegral (Data.ByteString.length bs)))
                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                               Data.Text.Encoding.encodeUtf8 _v))
                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
instance Control.DeepSeq.NFData FailedUpdate where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_FailedUpdate'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_FailedUpdate'outpoint x__)
                (Control.DeepSeq.deepseq
                   (_FailedUpdate'reason x__)
                   (Control.DeepSeq.deepseq (_FailedUpdate'updateError x__) ())))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.code' @:: Lens' Failure Failure'FailureCode@
         * 'Proto.Lnrpc.Ln1_Fields.channelUpdate' @:: Lens' Failure ChannelUpdate@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'channelUpdate' @:: Lens' Failure (Prelude.Maybe ChannelUpdate)@
         * 'Proto.Lnrpc.Ln1_Fields.htlcMsat' @:: Lens' Failure Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.onionSha256' @:: Lens' Failure Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.cltvExpiry' @:: Lens' Failure Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.flags' @:: Lens' Failure Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.failureSourceIndex' @:: Lens' Failure Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.height' @:: Lens' Failure Data.Word.Word32@ -}
data Failure
  = Failure'_constructor {_Failure'code :: !Failure'FailureCode,
                          _Failure'channelUpdate :: !(Prelude.Maybe ChannelUpdate),
                          _Failure'htlcMsat :: !Data.Word.Word64,
                          _Failure'onionSha256 :: !Data.ByteString.ByteString,
                          _Failure'cltvExpiry :: !Data.Word.Word32,
                          _Failure'flags :: !Data.Word.Word32,
                          _Failure'failureSourceIndex :: !Data.Word.Word32,
                          _Failure'height :: !Data.Word.Word32,
                          _Failure'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show Failure where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out Failure
instance Data.ProtoLens.Field.HasField Failure "code" Failure'FailureCode where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Failure'code (\ x__ y__ -> x__ {_Failure'code = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Failure "channelUpdate" ChannelUpdate where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Failure'channelUpdate
           (\ x__ y__ -> x__ {_Failure'channelUpdate = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Failure "maybe'channelUpdate" (Prelude.Maybe ChannelUpdate) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Failure'channelUpdate
           (\ x__ y__ -> x__ {_Failure'channelUpdate = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Failure "htlcMsat" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Failure'htlcMsat (\ x__ y__ -> x__ {_Failure'htlcMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Failure "onionSha256" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Failure'onionSha256
           (\ x__ y__ -> x__ {_Failure'onionSha256 = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Failure "cltvExpiry" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Failure'cltvExpiry (\ x__ y__ -> x__ {_Failure'cltvExpiry = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Failure "flags" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Failure'flags (\ x__ y__ -> x__ {_Failure'flags = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Failure "failureSourceIndex" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Failure'failureSourceIndex
           (\ x__ y__ -> x__ {_Failure'failureSourceIndex = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Failure "height" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Failure'height (\ x__ y__ -> x__ {_Failure'height = y__}))
        Prelude.id
instance Data.ProtoLens.Message Failure where
  messageName _ = Data.Text.pack "lnrpc.Failure"
  packedMessageDescriptor _
    = "\n\
      \\aFailure\DC2.\n\
      \\EOTcode\CAN\SOH \SOH(\SO2\SUB.lnrpc.Failure.FailureCodeR\EOTcode\DC2;\n\
      \\SOchannel_update\CAN\ETX \SOH(\v2\DC4.lnrpc.ChannelUpdateR\rchannelUpdate\DC2\ESC\n\
      \\thtlc_msat\CAN\EOT \SOH(\EOTR\bhtlcMsat\DC2\"\n\
      \\ronion_sha_256\CAN\ENQ \SOH(\fR\vonionSha256\DC2\US\n\
      \\vcltv_expiry\CAN\ACK \SOH(\rR\n\
      \cltvExpiry\DC2\DC4\n\
      \\ENQflags\CAN\a \SOH(\rR\ENQflags\DC20\n\
      \\DC4failure_source_index\CAN\b \SOH(\rR\DC2failureSourceIndex\DC2\SYN\n\
      \\ACKheight\CAN\t \SOH(\rR\ACKheight\"\239\ENQ\n\
      \\vFailureCode\DC2\f\n\
      \\bRESERVED\DLE\NUL\DC2(\n\
      \$INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS\DLE\SOH\DC2\FS\n\
      \\CANINCORRECT_PAYMENT_AMOUNT\DLE\STX\DC2\US\n\
      \\ESCFINAL_INCORRECT_CLTV_EXPIRY\DLE\ETX\DC2\US\n\
      \\ESCFINAL_INCORRECT_HTLC_AMOUNT\DLE\EOT\DC2\EM\n\
      \\NAKFINAL_EXPIRY_TOO_SOON\DLE\ENQ\DC2\DC1\n\
      \\rINVALID_REALM\DLE\ACK\DC2\DC3\n\
      \\SIEXPIRY_TOO_SOON\DLE\a\DC2\EM\n\
      \\NAKINVALID_ONION_VERSION\DLE\b\DC2\SYN\n\
      \\DC2INVALID_ONION_HMAC\DLE\t\DC2\NAK\n\
      \\DC1INVALID_ONION_KEY\DLE\n\
      \\DC2\CAN\n\
      \\DC4AMOUNT_BELOW_MINIMUM\DLE\v\DC2\DC4\n\
      \\DLEFEE_INSUFFICIENT\DLE\f\DC2\EM\n\
      \\NAKINCORRECT_CLTV_EXPIRY\DLE\r\DC2\DC4\n\
      \\DLECHANNEL_DISABLED\DLE\SO\DC2\GS\n\
      \\EMTEMPORARY_CHANNEL_FAILURE\DLE\SI\DC2!\n\
      \\GSREQUIRED_NODE_FEATURE_MISSING\DLE\DLE\DC2$\n\
      \ REQUIRED_CHANNEL_FEATURE_MISSING\DLE\DC1\DC2\NAK\n\
      \\DC1UNKNOWN_NEXT_PEER\DLE\DC2\DC2\SUB\n\
      \\SYNTEMPORARY_NODE_FAILURE\DLE\DC3\DC2\SUB\n\
      \\SYNPERMANENT_NODE_FAILURE\DLE\DC4\DC2\GS\n\
      \\EMPERMANENT_CHANNEL_FAILURE\DLE\NAK\DC2\DC2\n\
      \\SOEXPIRY_TOO_FAR\DLE\SYN\DC2\SI\n\
      \\vMPP_TIMEOUT\DLE\ETB\DC2\EM\n\
      \\NAKINVALID_ONION_PAYLOAD\DLE\CAN\DC2\NAK\n\
      \\DLEINTERNAL_FAILURE\DLE\229\a\DC2\DC4\n\
      \\SIUNKNOWN_FAILURE\DLE\230\a\DC2\ETB\n\
      \\DC2UNREADABLE_FAILURE\DLE\231\aJ\EOT\b\STX\DLE\ETX"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        code__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "code"
              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
                 Data.ProtoLens.FieldTypeDescriptor Failure'FailureCode)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"code")) ::
              Data.ProtoLens.FieldDescriptor Failure
        channelUpdate__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "channel_update"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor ChannelUpdate)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'channelUpdate")) ::
              Data.ProtoLens.FieldDescriptor Failure
        htlcMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "htlc_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"htlcMsat")) ::
              Data.ProtoLens.FieldDescriptor Failure
        onionSha256__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "onion_sha_256"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"onionSha256")) ::
              Data.ProtoLens.FieldDescriptor Failure
        cltvExpiry__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "cltv_expiry"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"cltvExpiry")) ::
              Data.ProtoLens.FieldDescriptor Failure
        flags__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "flags"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"flags")) ::
              Data.ProtoLens.FieldDescriptor Failure
        failureSourceIndex__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "failure_source_index"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"failureSourceIndex")) ::
              Data.ProtoLens.FieldDescriptor Failure
        height__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "height"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"height")) ::
              Data.ProtoLens.FieldDescriptor Failure
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, code__field_descriptor),
           (Data.ProtoLens.Tag 3, channelUpdate__field_descriptor),
           (Data.ProtoLens.Tag 4, htlcMsat__field_descriptor),
           (Data.ProtoLens.Tag 5, onionSha256__field_descriptor),
           (Data.ProtoLens.Tag 6, cltvExpiry__field_descriptor),
           (Data.ProtoLens.Tag 7, flags__field_descriptor),
           (Data.ProtoLens.Tag 8, failureSourceIndex__field_descriptor),
           (Data.ProtoLens.Tag 9, height__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _Failure'_unknownFields
        (\ x__ y__ -> x__ {_Failure'_unknownFields = y__})
  defMessage
    = Failure'_constructor
        {_Failure'code = Data.ProtoLens.fieldDefault,
         _Failure'channelUpdate = Prelude.Nothing,
         _Failure'htlcMsat = Data.ProtoLens.fieldDefault,
         _Failure'onionSha256 = Data.ProtoLens.fieldDefault,
         _Failure'cltvExpiry = Data.ProtoLens.fieldDefault,
         _Failure'flags = Data.ProtoLens.fieldDefault,
         _Failure'failureSourceIndex = Data.ProtoLens.fieldDefault,
         _Failure'height = Data.ProtoLens.fieldDefault,
         _Failure'_unknownFields = []}
  parseMessage
    = let
        loop :: Failure -> Data.ProtoLens.Encoding.Bytes.Parser Failure
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.toEnum
                                          (Prelude.fmap
                                             Prelude.fromIntegral
                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
                                       "code"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"code") y x)
                        26
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "channel_update"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"channelUpdate") y x)
                        32
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "htlc_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"htlcMsat") y x)
                        42
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "onion_sha_256"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"onionSha256") y x)
                        48
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "cltv_expiry"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"cltvExpiry") y x)
                        56
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "flags"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"flags") y x)
                        64
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "failure_source_index"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"failureSourceIndex") y x)
                        72
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "height"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"height") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "Failure"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"code") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Prelude..)
                         ((Prelude..)
                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
                         Prelude.fromEnum _v))
             ((Data.Monoid.<>)
                (case
                     Lens.Family2.view
                       (Data.ProtoLens.Field.field @"maybe'channelUpdate") _x
                 of
                   Prelude.Nothing -> Data.Monoid.mempty
                   (Prelude.Just _v)
                     -> (Data.Monoid.<>)
                          (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                          ((Prelude..)
                             (\ bs
                                -> (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                             Data.ProtoLens.encodeMessage _v))
                ((Data.Monoid.<>)
                   (let
                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"htlcMsat") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                   ((Data.Monoid.<>)
                      (let
                         _v
                           = Lens.Family2.view (Data.ProtoLens.Field.field @"onionSha256") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 42)
                               ((\ bs
                                   -> (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
                                           (Prelude.fromIntegral (Data.ByteString.length bs)))
                                        (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                  _v))
                      ((Data.Monoid.<>)
                         (let
                            _v
                              = Lens.Family2.view (Data.ProtoLens.Field.field @"cltvExpiry") _x
                          in
                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                Data.Monoid.mempty
                            else
                                (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 48)
                                  ((Prelude..)
                                     Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral
                                     _v))
                         ((Data.Monoid.<>)
                            (let
                               _v = Lens.Family2.view (Data.ProtoLens.Field.field @"flags") _x
                             in
                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                   Data.Monoid.mempty
                               else
                                   (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 56)
                                     ((Prelude..)
                                        Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral
                                        _v))
                            ((Data.Monoid.<>)
                               (let
                                  _v
                                    = Lens.Family2.view
                                        (Data.ProtoLens.Field.field @"failureSourceIndex") _x
                                in
                                  if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                      Data.Monoid.mempty
                                  else
                                      (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt 64)
                                        ((Prelude..)
                                           Data.ProtoLens.Encoding.Bytes.putVarInt
                                           Prelude.fromIntegral _v))
                               ((Data.Monoid.<>)
                                  (let
                                     _v
                                       = Lens.Family2.view (Data.ProtoLens.Field.field @"height") _x
                                   in
                                     if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                         Data.Monoid.mempty
                                     else
                                         (Data.Monoid.<>)
                                           (Data.ProtoLens.Encoding.Bytes.putVarInt 72)
                                           ((Prelude..)
                                              Data.ProtoLens.Encoding.Bytes.putVarInt
                                              Prelude.fromIntegral _v))
                                  (Data.ProtoLens.Encoding.Wire.buildFieldSet
                                     (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))))))
instance Control.DeepSeq.NFData Failure where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_Failure'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_Failure'code x__)
                (Control.DeepSeq.deepseq
                   (_Failure'channelUpdate x__)
                   (Control.DeepSeq.deepseq
                      (_Failure'htlcMsat x__)
                      (Control.DeepSeq.deepseq
                         (_Failure'onionSha256 x__)
                         (Control.DeepSeq.deepseq
                            (_Failure'cltvExpiry x__)
                            (Control.DeepSeq.deepseq
                               (_Failure'flags x__)
                               (Control.DeepSeq.deepseq
                                  (_Failure'failureSourceIndex x__)
                                  (Control.DeepSeq.deepseq (_Failure'height x__) ()))))))))
newtype Failure'FailureCode'UnrecognizedValue
  = Failure'FailureCode'UnrecognizedValue Data.Int.Int32
  deriving stock (Prelude.Eq,
                  Prelude.Ord,
                  Prelude.Show,
                  GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out Failure'FailureCode'UnrecognizedValue
data Failure'FailureCode
  = Failure'RESERVED |
    Failure'INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS |
    Failure'INCORRECT_PAYMENT_AMOUNT |
    Failure'FINAL_INCORRECT_CLTV_EXPIRY |
    Failure'FINAL_INCORRECT_HTLC_AMOUNT |
    Failure'FINAL_EXPIRY_TOO_SOON |
    Failure'INVALID_REALM |
    Failure'EXPIRY_TOO_SOON |
    Failure'INVALID_ONION_VERSION |
    Failure'INVALID_ONION_HMAC |
    Failure'INVALID_ONION_KEY |
    Failure'AMOUNT_BELOW_MINIMUM |
    Failure'FEE_INSUFFICIENT |
    Failure'INCORRECT_CLTV_EXPIRY |
    Failure'CHANNEL_DISABLED |
    Failure'TEMPORARY_CHANNEL_FAILURE |
    Failure'REQUIRED_NODE_FEATURE_MISSING |
    Failure'REQUIRED_CHANNEL_FEATURE_MISSING |
    Failure'UNKNOWN_NEXT_PEER |
    Failure'TEMPORARY_NODE_FAILURE |
    Failure'PERMANENT_NODE_FAILURE |
    Failure'PERMANENT_CHANNEL_FAILURE |
    Failure'EXPIRY_TOO_FAR |
    Failure'MPP_TIMEOUT |
    Failure'INVALID_ONION_PAYLOAD |
    Failure'INTERNAL_FAILURE |
    Failure'UNKNOWN_FAILURE |
    Failure'UNREADABLE_FAILURE |
    Failure'FailureCode'Unrecognized !Failure'FailureCode'UnrecognizedValue
  deriving stock (Prelude.Show,
                  Prelude.Eq,
                  Prelude.Ord,
                  GHC.Generics.Generic)
instance Data.ProtoLens.MessageEnum Failure'FailureCode where
  maybeToEnum 0 = Prelude.Just Failure'RESERVED
  maybeToEnum 1
    = Prelude.Just Failure'INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS
  maybeToEnum 2 = Prelude.Just Failure'INCORRECT_PAYMENT_AMOUNT
  maybeToEnum 3 = Prelude.Just Failure'FINAL_INCORRECT_CLTV_EXPIRY
  maybeToEnum 4 = Prelude.Just Failure'FINAL_INCORRECT_HTLC_AMOUNT
  maybeToEnum 5 = Prelude.Just Failure'FINAL_EXPIRY_TOO_SOON
  maybeToEnum 6 = Prelude.Just Failure'INVALID_REALM
  maybeToEnum 7 = Prelude.Just Failure'EXPIRY_TOO_SOON
  maybeToEnum 8 = Prelude.Just Failure'INVALID_ONION_VERSION
  maybeToEnum 9 = Prelude.Just Failure'INVALID_ONION_HMAC
  maybeToEnum 10 = Prelude.Just Failure'INVALID_ONION_KEY
  maybeToEnum 11 = Prelude.Just Failure'AMOUNT_BELOW_MINIMUM
  maybeToEnum 12 = Prelude.Just Failure'FEE_INSUFFICIENT
  maybeToEnum 13 = Prelude.Just Failure'INCORRECT_CLTV_EXPIRY
  maybeToEnum 14 = Prelude.Just Failure'CHANNEL_DISABLED
  maybeToEnum 15 = Prelude.Just Failure'TEMPORARY_CHANNEL_FAILURE
  maybeToEnum 16 = Prelude.Just Failure'REQUIRED_NODE_FEATURE_MISSING
  maybeToEnum 17
    = Prelude.Just Failure'REQUIRED_CHANNEL_FEATURE_MISSING
  maybeToEnum 18 = Prelude.Just Failure'UNKNOWN_NEXT_PEER
  maybeToEnum 19 = Prelude.Just Failure'TEMPORARY_NODE_FAILURE
  maybeToEnum 20 = Prelude.Just Failure'PERMANENT_NODE_FAILURE
  maybeToEnum 21 = Prelude.Just Failure'PERMANENT_CHANNEL_FAILURE
  maybeToEnum 22 = Prelude.Just Failure'EXPIRY_TOO_FAR
  maybeToEnum 23 = Prelude.Just Failure'MPP_TIMEOUT
  maybeToEnum 24 = Prelude.Just Failure'INVALID_ONION_PAYLOAD
  maybeToEnum 997 = Prelude.Just Failure'INTERNAL_FAILURE
  maybeToEnum 998 = Prelude.Just Failure'UNKNOWN_FAILURE
  maybeToEnum 999 = Prelude.Just Failure'UNREADABLE_FAILURE
  maybeToEnum k
    = Prelude.Just
        (Failure'FailureCode'Unrecognized
           (Failure'FailureCode'UnrecognizedValue (Prelude.fromIntegral k)))
  showEnum Failure'RESERVED = "RESERVED"
  showEnum Failure'INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS
    = "INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS"
  showEnum Failure'INCORRECT_PAYMENT_AMOUNT
    = "INCORRECT_PAYMENT_AMOUNT"
  showEnum Failure'FINAL_INCORRECT_CLTV_EXPIRY
    = "FINAL_INCORRECT_CLTV_EXPIRY"
  showEnum Failure'FINAL_INCORRECT_HTLC_AMOUNT
    = "FINAL_INCORRECT_HTLC_AMOUNT"
  showEnum Failure'FINAL_EXPIRY_TOO_SOON = "FINAL_EXPIRY_TOO_SOON"
  showEnum Failure'INVALID_REALM = "INVALID_REALM"
  showEnum Failure'EXPIRY_TOO_SOON = "EXPIRY_TOO_SOON"
  showEnum Failure'INVALID_ONION_VERSION = "INVALID_ONION_VERSION"
  showEnum Failure'INVALID_ONION_HMAC = "INVALID_ONION_HMAC"
  showEnum Failure'INVALID_ONION_KEY = "INVALID_ONION_KEY"
  showEnum Failure'AMOUNT_BELOW_MINIMUM = "AMOUNT_BELOW_MINIMUM"
  showEnum Failure'FEE_INSUFFICIENT = "FEE_INSUFFICIENT"
  showEnum Failure'INCORRECT_CLTV_EXPIRY = "INCORRECT_CLTV_EXPIRY"
  showEnum Failure'CHANNEL_DISABLED = "CHANNEL_DISABLED"
  showEnum Failure'TEMPORARY_CHANNEL_FAILURE
    = "TEMPORARY_CHANNEL_FAILURE"
  showEnum Failure'REQUIRED_NODE_FEATURE_MISSING
    = "REQUIRED_NODE_FEATURE_MISSING"
  showEnum Failure'REQUIRED_CHANNEL_FEATURE_MISSING
    = "REQUIRED_CHANNEL_FEATURE_MISSING"
  showEnum Failure'UNKNOWN_NEXT_PEER = "UNKNOWN_NEXT_PEER"
  showEnum Failure'TEMPORARY_NODE_FAILURE = "TEMPORARY_NODE_FAILURE"
  showEnum Failure'PERMANENT_NODE_FAILURE = "PERMANENT_NODE_FAILURE"
  showEnum Failure'PERMANENT_CHANNEL_FAILURE
    = "PERMANENT_CHANNEL_FAILURE"
  showEnum Failure'EXPIRY_TOO_FAR = "EXPIRY_TOO_FAR"
  showEnum Failure'MPP_TIMEOUT = "MPP_TIMEOUT"
  showEnum Failure'INVALID_ONION_PAYLOAD = "INVALID_ONION_PAYLOAD"
  showEnum Failure'INTERNAL_FAILURE = "INTERNAL_FAILURE"
  showEnum Failure'UNKNOWN_FAILURE = "UNKNOWN_FAILURE"
  showEnum Failure'UNREADABLE_FAILURE = "UNREADABLE_FAILURE"
  showEnum
    (Failure'FailureCode'Unrecognized (Failure'FailureCode'UnrecognizedValue k))
    = Prelude.show k
  readEnum k
    | (Prelude.==) k "RESERVED" = Prelude.Just Failure'RESERVED
    | (Prelude.==) k "INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS"
    = Prelude.Just Failure'INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS
    | (Prelude.==) k "INCORRECT_PAYMENT_AMOUNT"
    = Prelude.Just Failure'INCORRECT_PAYMENT_AMOUNT
    | (Prelude.==) k "FINAL_INCORRECT_CLTV_EXPIRY"
    = Prelude.Just Failure'FINAL_INCORRECT_CLTV_EXPIRY
    | (Prelude.==) k "FINAL_INCORRECT_HTLC_AMOUNT"
    = Prelude.Just Failure'FINAL_INCORRECT_HTLC_AMOUNT
    | (Prelude.==) k "FINAL_EXPIRY_TOO_SOON"
    = Prelude.Just Failure'FINAL_EXPIRY_TOO_SOON
    | (Prelude.==) k "INVALID_REALM"
    = Prelude.Just Failure'INVALID_REALM
    | (Prelude.==) k "EXPIRY_TOO_SOON"
    = Prelude.Just Failure'EXPIRY_TOO_SOON
    | (Prelude.==) k "INVALID_ONION_VERSION"
    = Prelude.Just Failure'INVALID_ONION_VERSION
    | (Prelude.==) k "INVALID_ONION_HMAC"
    = Prelude.Just Failure'INVALID_ONION_HMAC
    | (Prelude.==) k "INVALID_ONION_KEY"
    = Prelude.Just Failure'INVALID_ONION_KEY
    | (Prelude.==) k "AMOUNT_BELOW_MINIMUM"
    = Prelude.Just Failure'AMOUNT_BELOW_MINIMUM
    | (Prelude.==) k "FEE_INSUFFICIENT"
    = Prelude.Just Failure'FEE_INSUFFICIENT
    | (Prelude.==) k "INCORRECT_CLTV_EXPIRY"
    = Prelude.Just Failure'INCORRECT_CLTV_EXPIRY
    | (Prelude.==) k "CHANNEL_DISABLED"
    = Prelude.Just Failure'CHANNEL_DISABLED
    | (Prelude.==) k "TEMPORARY_CHANNEL_FAILURE"
    = Prelude.Just Failure'TEMPORARY_CHANNEL_FAILURE
    | (Prelude.==) k "REQUIRED_NODE_FEATURE_MISSING"
    = Prelude.Just Failure'REQUIRED_NODE_FEATURE_MISSING
    | (Prelude.==) k "REQUIRED_CHANNEL_FEATURE_MISSING"
    = Prelude.Just Failure'REQUIRED_CHANNEL_FEATURE_MISSING
    | (Prelude.==) k "UNKNOWN_NEXT_PEER"
    = Prelude.Just Failure'UNKNOWN_NEXT_PEER
    | (Prelude.==) k "TEMPORARY_NODE_FAILURE"
    = Prelude.Just Failure'TEMPORARY_NODE_FAILURE
    | (Prelude.==) k "PERMANENT_NODE_FAILURE"
    = Prelude.Just Failure'PERMANENT_NODE_FAILURE
    | (Prelude.==) k "PERMANENT_CHANNEL_FAILURE"
    = Prelude.Just Failure'PERMANENT_CHANNEL_FAILURE
    | (Prelude.==) k "EXPIRY_TOO_FAR"
    = Prelude.Just Failure'EXPIRY_TOO_FAR
    | (Prelude.==) k "MPP_TIMEOUT" = Prelude.Just Failure'MPP_TIMEOUT
    | (Prelude.==) k "INVALID_ONION_PAYLOAD"
    = Prelude.Just Failure'INVALID_ONION_PAYLOAD
    | (Prelude.==) k "INTERNAL_FAILURE"
    = Prelude.Just Failure'INTERNAL_FAILURE
    | (Prelude.==) k "UNKNOWN_FAILURE"
    = Prelude.Just Failure'UNKNOWN_FAILURE
    | (Prelude.==) k "UNREADABLE_FAILURE"
    = Prelude.Just Failure'UNREADABLE_FAILURE
    | Prelude.otherwise
    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
instance Prelude.Bounded Failure'FailureCode where
  minBound = Failure'RESERVED
  maxBound = Failure'UNREADABLE_FAILURE
instance Prelude.Enum Failure'FailureCode where
  toEnum k__
    = Prelude.maybe
        (Prelude.error
           ((Prelude.++)
              "toEnum: unknown value for enum FailureCode: " (Prelude.show k__)))
        Prelude.id (Data.ProtoLens.maybeToEnum k__)
  fromEnum Failure'RESERVED = 0
  fromEnum Failure'INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS = 1
  fromEnum Failure'INCORRECT_PAYMENT_AMOUNT = 2
  fromEnum Failure'FINAL_INCORRECT_CLTV_EXPIRY = 3
  fromEnum Failure'FINAL_INCORRECT_HTLC_AMOUNT = 4
  fromEnum Failure'FINAL_EXPIRY_TOO_SOON = 5
  fromEnum Failure'INVALID_REALM = 6
  fromEnum Failure'EXPIRY_TOO_SOON = 7
  fromEnum Failure'INVALID_ONION_VERSION = 8
  fromEnum Failure'INVALID_ONION_HMAC = 9
  fromEnum Failure'INVALID_ONION_KEY = 10
  fromEnum Failure'AMOUNT_BELOW_MINIMUM = 11
  fromEnum Failure'FEE_INSUFFICIENT = 12
  fromEnum Failure'INCORRECT_CLTV_EXPIRY = 13
  fromEnum Failure'CHANNEL_DISABLED = 14
  fromEnum Failure'TEMPORARY_CHANNEL_FAILURE = 15
  fromEnum Failure'REQUIRED_NODE_FEATURE_MISSING = 16
  fromEnum Failure'REQUIRED_CHANNEL_FEATURE_MISSING = 17
  fromEnum Failure'UNKNOWN_NEXT_PEER = 18
  fromEnum Failure'TEMPORARY_NODE_FAILURE = 19
  fromEnum Failure'PERMANENT_NODE_FAILURE = 20
  fromEnum Failure'PERMANENT_CHANNEL_FAILURE = 21
  fromEnum Failure'EXPIRY_TOO_FAR = 22
  fromEnum Failure'MPP_TIMEOUT = 23
  fromEnum Failure'INVALID_ONION_PAYLOAD = 24
  fromEnum Failure'INTERNAL_FAILURE = 997
  fromEnum Failure'UNKNOWN_FAILURE = 998
  fromEnum Failure'UNREADABLE_FAILURE = 999
  fromEnum
    (Failure'FailureCode'Unrecognized (Failure'FailureCode'UnrecognizedValue k))
    = Prelude.fromIntegral k
  succ Failure'UNREADABLE_FAILURE
    = Prelude.error
        "Failure'FailureCode.succ: bad argument Failure'UNREADABLE_FAILURE. This value would be out of bounds."
  succ Failure'RESERVED
    = Failure'INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS
  succ Failure'INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS
    = Failure'INCORRECT_PAYMENT_AMOUNT
  succ Failure'INCORRECT_PAYMENT_AMOUNT
    = Failure'FINAL_INCORRECT_CLTV_EXPIRY
  succ Failure'FINAL_INCORRECT_CLTV_EXPIRY
    = Failure'FINAL_INCORRECT_HTLC_AMOUNT
  succ Failure'FINAL_INCORRECT_HTLC_AMOUNT
    = Failure'FINAL_EXPIRY_TOO_SOON
  succ Failure'FINAL_EXPIRY_TOO_SOON = Failure'INVALID_REALM
  succ Failure'INVALID_REALM = Failure'EXPIRY_TOO_SOON
  succ Failure'EXPIRY_TOO_SOON = Failure'INVALID_ONION_VERSION
  succ Failure'INVALID_ONION_VERSION = Failure'INVALID_ONION_HMAC
  succ Failure'INVALID_ONION_HMAC = Failure'INVALID_ONION_KEY
  succ Failure'INVALID_ONION_KEY = Failure'AMOUNT_BELOW_MINIMUM
  succ Failure'AMOUNT_BELOW_MINIMUM = Failure'FEE_INSUFFICIENT
  succ Failure'FEE_INSUFFICIENT = Failure'INCORRECT_CLTV_EXPIRY
  succ Failure'INCORRECT_CLTV_EXPIRY = Failure'CHANNEL_DISABLED
  succ Failure'CHANNEL_DISABLED = Failure'TEMPORARY_CHANNEL_FAILURE
  succ Failure'TEMPORARY_CHANNEL_FAILURE
    = Failure'REQUIRED_NODE_FEATURE_MISSING
  succ Failure'REQUIRED_NODE_FEATURE_MISSING
    = Failure'REQUIRED_CHANNEL_FEATURE_MISSING
  succ Failure'REQUIRED_CHANNEL_FEATURE_MISSING
    = Failure'UNKNOWN_NEXT_PEER
  succ Failure'UNKNOWN_NEXT_PEER = Failure'TEMPORARY_NODE_FAILURE
  succ Failure'TEMPORARY_NODE_FAILURE
    = Failure'PERMANENT_NODE_FAILURE
  succ Failure'PERMANENT_NODE_FAILURE
    = Failure'PERMANENT_CHANNEL_FAILURE
  succ Failure'PERMANENT_CHANNEL_FAILURE = Failure'EXPIRY_TOO_FAR
  succ Failure'EXPIRY_TOO_FAR = Failure'MPP_TIMEOUT
  succ Failure'MPP_TIMEOUT = Failure'INVALID_ONION_PAYLOAD
  succ Failure'INVALID_ONION_PAYLOAD = Failure'INTERNAL_FAILURE
  succ Failure'INTERNAL_FAILURE = Failure'UNKNOWN_FAILURE
  succ Failure'UNKNOWN_FAILURE = Failure'UNREADABLE_FAILURE
  succ (Failure'FailureCode'Unrecognized _)
    = Prelude.error
        "Failure'FailureCode.succ: bad argument: unrecognized value"
  pred Failure'RESERVED
    = Prelude.error
        "Failure'FailureCode.pred: bad argument Failure'RESERVED. This value would be out of bounds."
  pred Failure'INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS
    = Failure'RESERVED
  pred Failure'INCORRECT_PAYMENT_AMOUNT
    = Failure'INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS
  pred Failure'FINAL_INCORRECT_CLTV_EXPIRY
    = Failure'INCORRECT_PAYMENT_AMOUNT
  pred Failure'FINAL_INCORRECT_HTLC_AMOUNT
    = Failure'FINAL_INCORRECT_CLTV_EXPIRY
  pred Failure'FINAL_EXPIRY_TOO_SOON
    = Failure'FINAL_INCORRECT_HTLC_AMOUNT
  pred Failure'INVALID_REALM = Failure'FINAL_EXPIRY_TOO_SOON
  pred Failure'EXPIRY_TOO_SOON = Failure'INVALID_REALM
  pred Failure'INVALID_ONION_VERSION = Failure'EXPIRY_TOO_SOON
  pred Failure'INVALID_ONION_HMAC = Failure'INVALID_ONION_VERSION
  pred Failure'INVALID_ONION_KEY = Failure'INVALID_ONION_HMAC
  pred Failure'AMOUNT_BELOW_MINIMUM = Failure'INVALID_ONION_KEY
  pred Failure'FEE_INSUFFICIENT = Failure'AMOUNT_BELOW_MINIMUM
  pred Failure'INCORRECT_CLTV_EXPIRY = Failure'FEE_INSUFFICIENT
  pred Failure'CHANNEL_DISABLED = Failure'INCORRECT_CLTV_EXPIRY
  pred Failure'TEMPORARY_CHANNEL_FAILURE = Failure'CHANNEL_DISABLED
  pred Failure'REQUIRED_NODE_FEATURE_MISSING
    = Failure'TEMPORARY_CHANNEL_FAILURE
  pred Failure'REQUIRED_CHANNEL_FEATURE_MISSING
    = Failure'REQUIRED_NODE_FEATURE_MISSING
  pred Failure'UNKNOWN_NEXT_PEER
    = Failure'REQUIRED_CHANNEL_FEATURE_MISSING
  pred Failure'TEMPORARY_NODE_FAILURE = Failure'UNKNOWN_NEXT_PEER
  pred Failure'PERMANENT_NODE_FAILURE
    = Failure'TEMPORARY_NODE_FAILURE
  pred Failure'PERMANENT_CHANNEL_FAILURE
    = Failure'PERMANENT_NODE_FAILURE
  pred Failure'EXPIRY_TOO_FAR = Failure'PERMANENT_CHANNEL_FAILURE
  pred Failure'MPP_TIMEOUT = Failure'EXPIRY_TOO_FAR
  pred Failure'INVALID_ONION_PAYLOAD = Failure'MPP_TIMEOUT
  pred Failure'INTERNAL_FAILURE = Failure'INVALID_ONION_PAYLOAD
  pred Failure'UNKNOWN_FAILURE = Failure'INTERNAL_FAILURE
  pred Failure'UNREADABLE_FAILURE = Failure'UNKNOWN_FAILURE
  pred (Failure'FailureCode'Unrecognized _)
    = Prelude.error
        "Failure'FailureCode.pred: bad argument: unrecognized value"
  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault Failure'FailureCode where
  fieldDefault = Failure'RESERVED
instance Control.DeepSeq.NFData Failure'FailureCode where
  rnf x__ = Prelude.seq x__ ()
instance Text.PrettyPrint.GenericPretty.Out Failure'FailureCode
{- | Fields :
      -}
data FeeReportRequest
  = FeeReportRequest'_constructor {_FeeReportRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show FeeReportRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out FeeReportRequest
instance Data.ProtoLens.Message FeeReportRequest where
  messageName _ = Data.Text.pack "lnrpc.FeeReportRequest"
  packedMessageDescriptor _
    = "\n\
      \\DLEFeeReportRequest"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag = let in Data.Map.fromList []
  unknownFields
    = Lens.Family2.Unchecked.lens
        _FeeReportRequest'_unknownFields
        (\ x__ y__ -> x__ {_FeeReportRequest'_unknownFields = y__})
  defMessage
    = FeeReportRequest'_constructor
        {_FeeReportRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          FeeReportRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser FeeReportRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of {
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x) }
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "FeeReportRequest"
  buildMessage
    = \ _x
        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
instance Control.DeepSeq.NFData FeeReportRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_FeeReportRequest'_unknownFields x__) ()
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.channelFees' @:: Lens' FeeReportResponse [ChannelFeeReport]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'channelFees' @:: Lens' FeeReportResponse (Data.Vector.Vector ChannelFeeReport)@
         * 'Proto.Lnrpc.Ln1_Fields.dayFeeSum' @:: Lens' FeeReportResponse Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.weekFeeSum' @:: Lens' FeeReportResponse Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.monthFeeSum' @:: Lens' FeeReportResponse Data.Word.Word64@ -}
data FeeReportResponse
  = FeeReportResponse'_constructor {_FeeReportResponse'channelFees :: !(Data.Vector.Vector ChannelFeeReport),
                                    _FeeReportResponse'dayFeeSum :: !Data.Word.Word64,
                                    _FeeReportResponse'weekFeeSum :: !Data.Word.Word64,
                                    _FeeReportResponse'monthFeeSum :: !Data.Word.Word64,
                                    _FeeReportResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show FeeReportResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out FeeReportResponse
instance Data.ProtoLens.Field.HasField FeeReportResponse "channelFees" [ChannelFeeReport] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _FeeReportResponse'channelFees
           (\ x__ y__ -> x__ {_FeeReportResponse'channelFees = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField FeeReportResponse "vec'channelFees" (Data.Vector.Vector ChannelFeeReport) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _FeeReportResponse'channelFees
           (\ x__ y__ -> x__ {_FeeReportResponse'channelFees = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField FeeReportResponse "dayFeeSum" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _FeeReportResponse'dayFeeSum
           (\ x__ y__ -> x__ {_FeeReportResponse'dayFeeSum = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField FeeReportResponse "weekFeeSum" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _FeeReportResponse'weekFeeSum
           (\ x__ y__ -> x__ {_FeeReportResponse'weekFeeSum = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField FeeReportResponse "monthFeeSum" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _FeeReportResponse'monthFeeSum
           (\ x__ y__ -> x__ {_FeeReportResponse'monthFeeSum = y__}))
        Prelude.id
instance Data.ProtoLens.Message FeeReportResponse where
  messageName _ = Data.Text.pack "lnrpc.FeeReportResponse"
  packedMessageDescriptor _
    = "\n\
      \\DC1FeeReportResponse\DC2:\n\
      \\fchannel_fees\CAN\SOH \ETX(\v2\ETB.lnrpc.ChannelFeeReportR\vchannelFees\DC2\RS\n\
      \\vday_fee_sum\CAN\STX \SOH(\EOTR\tdayFeeSum\DC2 \n\
      \\fweek_fee_sum\CAN\ETX \SOH(\EOTR\n\
      \weekFeeSum\DC2\"\n\
      \\rmonth_fee_sum\CAN\EOT \SOH(\EOTR\vmonthFeeSum"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        channelFees__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "channel_fees"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor ChannelFeeReport)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"channelFees")) ::
              Data.ProtoLens.FieldDescriptor FeeReportResponse
        dayFeeSum__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "day_fee_sum"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"dayFeeSum")) ::
              Data.ProtoLens.FieldDescriptor FeeReportResponse
        weekFeeSum__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "week_fee_sum"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"weekFeeSum")) ::
              Data.ProtoLens.FieldDescriptor FeeReportResponse
        monthFeeSum__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "month_fee_sum"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"monthFeeSum")) ::
              Data.ProtoLens.FieldDescriptor FeeReportResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, channelFees__field_descriptor),
           (Data.ProtoLens.Tag 2, dayFeeSum__field_descriptor),
           (Data.ProtoLens.Tag 3, weekFeeSum__field_descriptor),
           (Data.ProtoLens.Tag 4, monthFeeSum__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _FeeReportResponse'_unknownFields
        (\ x__ y__ -> x__ {_FeeReportResponse'_unknownFields = y__})
  defMessage
    = FeeReportResponse'_constructor
        {_FeeReportResponse'channelFees = Data.Vector.Generic.empty,
         _FeeReportResponse'dayFeeSum = Data.ProtoLens.fieldDefault,
         _FeeReportResponse'weekFeeSum = Data.ProtoLens.fieldDefault,
         _FeeReportResponse'monthFeeSum = Data.ProtoLens.fieldDefault,
         _FeeReportResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          FeeReportResponse
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ChannelFeeReport
             -> Data.ProtoLens.Encoding.Bytes.Parser FeeReportResponse
        loop x mutable'channelFees
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'channelFees <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                              (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                 mutable'channelFees)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'channelFees") frozen'channelFees
                              x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "channel_fees"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append
                                          mutable'channelFees y)
                                loop x v
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "day_fee_sum"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"dayFeeSum") y x)
                                  mutable'channelFees
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "week_fee_sum"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"weekFeeSum") y x)
                                  mutable'channelFees
                        32
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "month_fee_sum"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"monthFeeSum") y x)
                                  mutable'channelFees
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'channelFees
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'channelFees <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'channelFees)
          "FeeReportResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v
                   -> (Data.Monoid.<>)
                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((Prelude..)
                           (\ bs
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                      (Prelude.fromIntegral (Data.ByteString.length bs)))
                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                           Data.ProtoLens.encodeMessage _v))
                (Lens.Family2.view
                   (Data.ProtoLens.Field.field @"vec'channelFees") _x))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"dayFeeSum") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view (Data.ProtoLens.Field.field @"weekFeeSum") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                   ((Data.Monoid.<>)
                      (let
                         _v
                           = Lens.Family2.view (Data.ProtoLens.Field.field @"monthFeeSum") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
instance Control.DeepSeq.NFData FeeReportResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_FeeReportResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_FeeReportResponse'channelFees x__)
                (Control.DeepSeq.deepseq
                   (_FeeReportResponse'dayFeeSum x__)
                   (Control.DeepSeq.deepseq
                      (_FeeReportResponse'weekFeeSum x__)
                      (Control.DeepSeq.deepseq
                         (_FeeReportResponse'monthFeeSum x__) ()))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.timestamp' @:: Lens' ForwardingEvent Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.chanIdIn' @:: Lens' ForwardingEvent Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.chanIdOut' @:: Lens' ForwardingEvent Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.amtIn' @:: Lens' ForwardingEvent Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.amtOut' @:: Lens' ForwardingEvent Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.fee' @:: Lens' ForwardingEvent Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.feeMsat' @:: Lens' ForwardingEvent Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.amtInMsat' @:: Lens' ForwardingEvent Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.amtOutMsat' @:: Lens' ForwardingEvent Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.timestampNs' @:: Lens' ForwardingEvent Data.Word.Word64@ -}
data ForwardingEvent
  = ForwardingEvent'_constructor {_ForwardingEvent'timestamp :: !Data.Word.Word64,
                                  _ForwardingEvent'chanIdIn :: !Data.Word.Word64,
                                  _ForwardingEvent'chanIdOut :: !Data.Word.Word64,
                                  _ForwardingEvent'amtIn :: !Data.Word.Word64,
                                  _ForwardingEvent'amtOut :: !Data.Word.Word64,
                                  _ForwardingEvent'fee :: !Data.Word.Word64,
                                  _ForwardingEvent'feeMsat :: !Data.Word.Word64,
                                  _ForwardingEvent'amtInMsat :: !Data.Word.Word64,
                                  _ForwardingEvent'amtOutMsat :: !Data.Word.Word64,
                                  _ForwardingEvent'timestampNs :: !Data.Word.Word64,
                                  _ForwardingEvent'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ForwardingEvent where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ForwardingEvent
instance Data.ProtoLens.Field.HasField ForwardingEvent "timestamp" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingEvent'timestamp
           (\ x__ y__ -> x__ {_ForwardingEvent'timestamp = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingEvent "chanIdIn" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingEvent'chanIdIn
           (\ x__ y__ -> x__ {_ForwardingEvent'chanIdIn = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingEvent "chanIdOut" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingEvent'chanIdOut
           (\ x__ y__ -> x__ {_ForwardingEvent'chanIdOut = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingEvent "amtIn" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingEvent'amtIn
           (\ x__ y__ -> x__ {_ForwardingEvent'amtIn = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingEvent "amtOut" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingEvent'amtOut
           (\ x__ y__ -> x__ {_ForwardingEvent'amtOut = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingEvent "fee" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingEvent'fee
           (\ x__ y__ -> x__ {_ForwardingEvent'fee = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingEvent "feeMsat" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingEvent'feeMsat
           (\ x__ y__ -> x__ {_ForwardingEvent'feeMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingEvent "amtInMsat" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingEvent'amtInMsat
           (\ x__ y__ -> x__ {_ForwardingEvent'amtInMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingEvent "amtOutMsat" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingEvent'amtOutMsat
           (\ x__ y__ -> x__ {_ForwardingEvent'amtOutMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingEvent "timestampNs" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingEvent'timestampNs
           (\ x__ y__ -> x__ {_ForwardingEvent'timestampNs = y__}))
        Prelude.id
instance Data.ProtoLens.Message ForwardingEvent where
  messageName _ = Data.Text.pack "lnrpc.ForwardingEvent"
  packedMessageDescriptor _
    = "\n\
      \\SIForwardingEvent\DC2 \n\
      \\ttimestamp\CAN\SOH \SOH(\EOTR\ttimestampB\STX\CAN\SOH\DC2 \n\
      \\n\
      \chan_id_in\CAN\STX \SOH(\EOTR\bchanIdInB\STX0\SOH\DC2\"\n\
      \\vchan_id_out\CAN\EOT \SOH(\EOTR\tchanIdOutB\STX0\SOH\DC2\NAK\n\
      \\ACKamt_in\CAN\ENQ \SOH(\EOTR\ENQamtIn\DC2\ETB\n\
      \\aamt_out\CAN\ACK \SOH(\EOTR\ACKamtOut\DC2\DLE\n\
      \\ETXfee\CAN\a \SOH(\EOTR\ETXfee\DC2\EM\n\
      \\bfee_msat\CAN\b \SOH(\EOTR\afeeMsat\DC2\RS\n\
      \\vamt_in_msat\CAN\t \SOH(\EOTR\tamtInMsat\DC2 \n\
      \\famt_out_msat\CAN\n\
      \ \SOH(\EOTR\n\
      \amtOutMsat\DC2!\n\
      \\ftimestamp_ns\CAN\v \SOH(\EOTR\vtimestampNs"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        timestamp__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "timestamp"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"timestamp")) ::
              Data.ProtoLens.FieldDescriptor ForwardingEvent
        chanIdIn__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_id_in"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"chanIdIn")) ::
              Data.ProtoLens.FieldDescriptor ForwardingEvent
        chanIdOut__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_id_out"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"chanIdOut")) ::
              Data.ProtoLens.FieldDescriptor ForwardingEvent
        amtIn__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "amt_in"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"amtIn")) ::
              Data.ProtoLens.FieldDescriptor ForwardingEvent
        amtOut__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "amt_out"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"amtOut")) ::
              Data.ProtoLens.FieldDescriptor ForwardingEvent
        fee__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fee"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"fee")) ::
              Data.ProtoLens.FieldDescriptor ForwardingEvent
        feeMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fee_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"feeMsat")) ::
              Data.ProtoLens.FieldDescriptor ForwardingEvent
        amtInMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "amt_in_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"amtInMsat")) ::
              Data.ProtoLens.FieldDescriptor ForwardingEvent
        amtOutMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "amt_out_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"amtOutMsat")) ::
              Data.ProtoLens.FieldDescriptor ForwardingEvent
        timestampNs__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "timestamp_ns"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"timestampNs")) ::
              Data.ProtoLens.FieldDescriptor ForwardingEvent
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, timestamp__field_descriptor),
           (Data.ProtoLens.Tag 2, chanIdIn__field_descriptor),
           (Data.ProtoLens.Tag 4, chanIdOut__field_descriptor),
           (Data.ProtoLens.Tag 5, amtIn__field_descriptor),
           (Data.ProtoLens.Tag 6, amtOut__field_descriptor),
           (Data.ProtoLens.Tag 7, fee__field_descriptor),
           (Data.ProtoLens.Tag 8, feeMsat__field_descriptor),
           (Data.ProtoLens.Tag 9, amtInMsat__field_descriptor),
           (Data.ProtoLens.Tag 10, amtOutMsat__field_descriptor),
           (Data.ProtoLens.Tag 11, timestampNs__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ForwardingEvent'_unknownFields
        (\ x__ y__ -> x__ {_ForwardingEvent'_unknownFields = y__})
  defMessage
    = ForwardingEvent'_constructor
        {_ForwardingEvent'timestamp = Data.ProtoLens.fieldDefault,
         _ForwardingEvent'chanIdIn = Data.ProtoLens.fieldDefault,
         _ForwardingEvent'chanIdOut = Data.ProtoLens.fieldDefault,
         _ForwardingEvent'amtIn = Data.ProtoLens.fieldDefault,
         _ForwardingEvent'amtOut = Data.ProtoLens.fieldDefault,
         _ForwardingEvent'fee = Data.ProtoLens.fieldDefault,
         _ForwardingEvent'feeMsat = Data.ProtoLens.fieldDefault,
         _ForwardingEvent'amtInMsat = Data.ProtoLens.fieldDefault,
         _ForwardingEvent'amtOutMsat = Data.ProtoLens.fieldDefault,
         _ForwardingEvent'timestampNs = Data.ProtoLens.fieldDefault,
         _ForwardingEvent'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ForwardingEvent
          -> Data.ProtoLens.Encoding.Bytes.Parser ForwardingEvent
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "timestamp"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"timestamp") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "chan_id_in"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"chanIdIn") y x)
                        32
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "chan_id_out"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"chanIdOut") y x)
                        40
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "amt_in"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"amtIn") y x)
                        48
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "amt_out"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"amtOut") y x)
                        56
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "fee"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"fee") y x)
                        64
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "fee_msat"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"feeMsat") y x)
                        72
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "amt_in_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"amtInMsat") y x)
                        80
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "amt_out_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"amtOutMsat") y x)
                        88
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "timestamp_ns"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"timestampNs") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ForwardingEvent"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"timestamp") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"chanIdIn") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                ((Data.Monoid.<>)
                   (let
                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"chanIdOut") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                   ((Data.Monoid.<>)
                      (let
                         _v = Lens.Family2.view (Data.ProtoLens.Field.field @"amtIn") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                      ((Data.Monoid.<>)
                         (let
                            _v = Lens.Family2.view (Data.ProtoLens.Field.field @"amtOut") _x
                          in
                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                Data.Monoid.mempty
                            else
                                (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 48)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                         ((Data.Monoid.<>)
                            (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"fee") _x
                             in
                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                   Data.Monoid.mempty
                               else
                                   (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 56)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                            ((Data.Monoid.<>)
                               (let
                                  _v = Lens.Family2.view (Data.ProtoLens.Field.field @"feeMsat") _x
                                in
                                  if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                      Data.Monoid.mempty
                                  else
                                      (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt 64)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                               ((Data.Monoid.<>)
                                  (let
                                     _v
                                       = Lens.Family2.view
                                           (Data.ProtoLens.Field.field @"amtInMsat") _x
                                   in
                                     if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                         Data.Monoid.mempty
                                     else
                                         (Data.Monoid.<>)
                                           (Data.ProtoLens.Encoding.Bytes.putVarInt 72)
                                           (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                                  ((Data.Monoid.<>)
                                     (let
                                        _v
                                          = Lens.Family2.view
                                              (Data.ProtoLens.Field.field @"amtOutMsat") _x
                                      in
                                        if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                            Data.Monoid.mempty
                                        else
                                            (Data.Monoid.<>)
                                              (Data.ProtoLens.Encoding.Bytes.putVarInt 80)
                                              (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                                     ((Data.Monoid.<>)
                                        (let
                                           _v
                                             = Lens.Family2.view
                                                 (Data.ProtoLens.Field.field @"timestampNs") _x
                                         in
                                           if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                               Data.Monoid.mempty
                                           else
                                               (Data.Monoid.<>)
                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 88)
                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                                        (Data.ProtoLens.Encoding.Wire.buildFieldSet
                                           (Lens.Family2.view
                                              Data.ProtoLens.unknownFields _x)))))))))))
instance Control.DeepSeq.NFData ForwardingEvent where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ForwardingEvent'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ForwardingEvent'timestamp x__)
                (Control.DeepSeq.deepseq
                   (_ForwardingEvent'chanIdIn x__)
                   (Control.DeepSeq.deepseq
                      (_ForwardingEvent'chanIdOut x__)
                      (Control.DeepSeq.deepseq
                         (_ForwardingEvent'amtIn x__)
                         (Control.DeepSeq.deepseq
                            (_ForwardingEvent'amtOut x__)
                            (Control.DeepSeq.deepseq
                               (_ForwardingEvent'fee x__)
                               (Control.DeepSeq.deepseq
                                  (_ForwardingEvent'feeMsat x__)
                                  (Control.DeepSeq.deepseq
                                     (_ForwardingEvent'amtInMsat x__)
                                     (Control.DeepSeq.deepseq
                                        (_ForwardingEvent'amtOutMsat x__)
                                        (Control.DeepSeq.deepseq
                                           (_ForwardingEvent'timestampNs x__) ()))))))))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.startTime' @:: Lens' ForwardingHistoryRequest Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.endTime' @:: Lens' ForwardingHistoryRequest Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.indexOffset' @:: Lens' ForwardingHistoryRequest Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.numMaxEvents' @:: Lens' ForwardingHistoryRequest Data.Word.Word32@ -}
data ForwardingHistoryRequest
  = ForwardingHistoryRequest'_constructor {_ForwardingHistoryRequest'startTime :: !Data.Word.Word64,
                                           _ForwardingHistoryRequest'endTime :: !Data.Word.Word64,
                                           _ForwardingHistoryRequest'indexOffset :: !Data.Word.Word32,
                                           _ForwardingHistoryRequest'numMaxEvents :: !Data.Word.Word32,
                                           _ForwardingHistoryRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ForwardingHistoryRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ForwardingHistoryRequest
instance Data.ProtoLens.Field.HasField ForwardingHistoryRequest "startTime" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingHistoryRequest'startTime
           (\ x__ y__ -> x__ {_ForwardingHistoryRequest'startTime = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingHistoryRequest "endTime" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingHistoryRequest'endTime
           (\ x__ y__ -> x__ {_ForwardingHistoryRequest'endTime = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingHistoryRequest "indexOffset" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingHistoryRequest'indexOffset
           (\ x__ y__ -> x__ {_ForwardingHistoryRequest'indexOffset = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingHistoryRequest "numMaxEvents" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingHistoryRequest'numMaxEvents
           (\ x__ y__ -> x__ {_ForwardingHistoryRequest'numMaxEvents = y__}))
        Prelude.id
instance Data.ProtoLens.Message ForwardingHistoryRequest where
  messageName _ = Data.Text.pack "lnrpc.ForwardingHistoryRequest"
  packedMessageDescriptor _
    = "\n\
      \\CANForwardingHistoryRequest\DC2\GS\n\
      \\n\
      \start_time\CAN\SOH \SOH(\EOTR\tstartTime\DC2\EM\n\
      \\bend_time\CAN\STX \SOH(\EOTR\aendTime\DC2!\n\
      \\findex_offset\CAN\ETX \SOH(\rR\vindexOffset\DC2$\n\
      \\SOnum_max_events\CAN\EOT \SOH(\rR\fnumMaxEvents"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        startTime__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "start_time"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"startTime")) ::
              Data.ProtoLens.FieldDescriptor ForwardingHistoryRequest
        endTime__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "end_time"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"endTime")) ::
              Data.ProtoLens.FieldDescriptor ForwardingHistoryRequest
        indexOffset__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "index_offset"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"indexOffset")) ::
              Data.ProtoLens.FieldDescriptor ForwardingHistoryRequest
        numMaxEvents__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "num_max_events"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"numMaxEvents")) ::
              Data.ProtoLens.FieldDescriptor ForwardingHistoryRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, startTime__field_descriptor),
           (Data.ProtoLens.Tag 2, endTime__field_descriptor),
           (Data.ProtoLens.Tag 3, indexOffset__field_descriptor),
           (Data.ProtoLens.Tag 4, numMaxEvents__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ForwardingHistoryRequest'_unknownFields
        (\ x__ y__ -> x__ {_ForwardingHistoryRequest'_unknownFields = y__})
  defMessage
    = ForwardingHistoryRequest'_constructor
        {_ForwardingHistoryRequest'startTime = Data.ProtoLens.fieldDefault,
         _ForwardingHistoryRequest'endTime = Data.ProtoLens.fieldDefault,
         _ForwardingHistoryRequest'indexOffset = Data.ProtoLens.fieldDefault,
         _ForwardingHistoryRequest'numMaxEvents = Data.ProtoLens.fieldDefault,
         _ForwardingHistoryRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ForwardingHistoryRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser ForwardingHistoryRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "start_time"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"startTime") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "end_time"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"endTime") y x)
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "index_offset"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"indexOffset") y x)
                        32
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "num_max_events"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"numMaxEvents") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ForwardingHistoryRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"startTime") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"endTime") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view (Data.ProtoLens.Field.field @"indexOffset") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                   ((Data.Monoid.<>)
                      (let
                         _v
                           = Lens.Family2.view (Data.ProtoLens.Field.field @"numMaxEvents") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                               ((Prelude..)
                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
instance Control.DeepSeq.NFData ForwardingHistoryRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ForwardingHistoryRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ForwardingHistoryRequest'startTime x__)
                (Control.DeepSeq.deepseq
                   (_ForwardingHistoryRequest'endTime x__)
                   (Control.DeepSeq.deepseq
                      (_ForwardingHistoryRequest'indexOffset x__)
                      (Control.DeepSeq.deepseq
                         (_ForwardingHistoryRequest'numMaxEvents x__) ()))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.forwardingEvents' @:: Lens' ForwardingHistoryResponse [ForwardingEvent]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'forwardingEvents' @:: Lens' ForwardingHistoryResponse (Data.Vector.Vector ForwardingEvent)@
         * 'Proto.Lnrpc.Ln1_Fields.lastOffsetIndex' @:: Lens' ForwardingHistoryResponse Data.Word.Word32@ -}
data ForwardingHistoryResponse
  = ForwardingHistoryResponse'_constructor {_ForwardingHistoryResponse'forwardingEvents :: !(Data.Vector.Vector ForwardingEvent),
                                            _ForwardingHistoryResponse'lastOffsetIndex :: !Data.Word.Word32,
                                            _ForwardingHistoryResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ForwardingHistoryResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ForwardingHistoryResponse
instance Data.ProtoLens.Field.HasField ForwardingHistoryResponse "forwardingEvents" [ForwardingEvent] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingHistoryResponse'forwardingEvents
           (\ x__ y__
              -> x__ {_ForwardingHistoryResponse'forwardingEvents = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField ForwardingHistoryResponse "vec'forwardingEvents" (Data.Vector.Vector ForwardingEvent) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingHistoryResponse'forwardingEvents
           (\ x__ y__
              -> x__ {_ForwardingHistoryResponse'forwardingEvents = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ForwardingHistoryResponse "lastOffsetIndex" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ForwardingHistoryResponse'lastOffsetIndex
           (\ x__ y__
              -> x__ {_ForwardingHistoryResponse'lastOffsetIndex = y__}))
        Prelude.id
instance Data.ProtoLens.Message ForwardingHistoryResponse where
  messageName _ = Data.Text.pack "lnrpc.ForwardingHistoryResponse"
  packedMessageDescriptor _
    = "\n\
      \\EMForwardingHistoryResponse\DC2C\n\
      \\DC1forwarding_events\CAN\SOH \ETX(\v2\SYN.lnrpc.ForwardingEventR\DLEforwardingEvents\DC2*\n\
      \\DC1last_offset_index\CAN\STX \SOH(\rR\SIlastOffsetIndex"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        forwardingEvents__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "forwarding_events"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor ForwardingEvent)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"forwardingEvents")) ::
              Data.ProtoLens.FieldDescriptor ForwardingHistoryResponse
        lastOffsetIndex__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "last_offset_index"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"lastOffsetIndex")) ::
              Data.ProtoLens.FieldDescriptor ForwardingHistoryResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, forwardingEvents__field_descriptor),
           (Data.ProtoLens.Tag 2, lastOffsetIndex__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ForwardingHistoryResponse'_unknownFields
        (\ x__ y__
           -> x__ {_ForwardingHistoryResponse'_unknownFields = y__})
  defMessage
    = ForwardingHistoryResponse'_constructor
        {_ForwardingHistoryResponse'forwardingEvents = Data.Vector.Generic.empty,
         _ForwardingHistoryResponse'lastOffsetIndex = Data.ProtoLens.fieldDefault,
         _ForwardingHistoryResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ForwardingHistoryResponse
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ForwardingEvent
             -> Data.ProtoLens.Encoding.Bytes.Parser ForwardingHistoryResponse
        loop x mutable'forwardingEvents
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'forwardingEvents <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                                   (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                      mutable'forwardingEvents)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'forwardingEvents")
                              frozen'forwardingEvents x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "forwarding_events"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append
                                          mutable'forwardingEvents y)
                                loop x v
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "last_offset_index"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"lastOffsetIndex") y x)
                                  mutable'forwardingEvents
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'forwardingEvents
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'forwardingEvents <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                            Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'forwardingEvents)
          "ForwardingHistoryResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v
                   -> (Data.Monoid.<>)
                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((Prelude..)
                           (\ bs
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                      (Prelude.fromIntegral (Data.ByteString.length bs)))
                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                           Data.ProtoLens.encodeMessage _v))
                (Lens.Family2.view
                   (Data.ProtoLens.Field.field @"vec'forwardingEvents") _x))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view
                         (Data.ProtoLens.Field.field @"lastOffsetIndex") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         ((Prelude..)
                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData ForwardingHistoryResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ForwardingHistoryResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ForwardingHistoryResponse'forwardingEvents x__)
                (Control.DeepSeq.deepseq
                   (_ForwardingHistoryResponse'lastOffsetIndex x__) ()))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.attemptId' @:: Lens' HTLCAttempt Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.status' @:: Lens' HTLCAttempt HTLCAttempt'HTLCStatus@
         * 'Proto.Lnrpc.Ln1_Fields.route' @:: Lens' HTLCAttempt Proto.Lnrpc.Ln0.Route@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'route' @:: Lens' HTLCAttempt (Prelude.Maybe Proto.Lnrpc.Ln0.Route)@
         * 'Proto.Lnrpc.Ln1_Fields.attemptTimeNs' @:: Lens' HTLCAttempt Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.resolveTimeNs' @:: Lens' HTLCAttempt Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.failure' @:: Lens' HTLCAttempt Failure@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'failure' @:: Lens' HTLCAttempt (Prelude.Maybe Failure)@
         * 'Proto.Lnrpc.Ln1_Fields.preimage' @:: Lens' HTLCAttempt Data.ByteString.ByteString@ -}
data HTLCAttempt
  = HTLCAttempt'_constructor {_HTLCAttempt'attemptId :: !Data.Word.Word64,
                              _HTLCAttempt'status :: !HTLCAttempt'HTLCStatus,
                              _HTLCAttempt'route :: !(Prelude.Maybe Proto.Lnrpc.Ln0.Route),
                              _HTLCAttempt'attemptTimeNs :: !Data.Int.Int64,
                              _HTLCAttempt'resolveTimeNs :: !Data.Int.Int64,
                              _HTLCAttempt'failure :: !(Prelude.Maybe Failure),
                              _HTLCAttempt'preimage :: !Data.ByteString.ByteString,
                              _HTLCAttempt'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show HTLCAttempt where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out HTLCAttempt
instance Data.ProtoLens.Field.HasField HTLCAttempt "attemptId" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _HTLCAttempt'attemptId
           (\ x__ y__ -> x__ {_HTLCAttempt'attemptId = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField HTLCAttempt "status" HTLCAttempt'HTLCStatus where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _HTLCAttempt'status (\ x__ y__ -> x__ {_HTLCAttempt'status = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField HTLCAttempt "route" Proto.Lnrpc.Ln0.Route where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _HTLCAttempt'route (\ x__ y__ -> x__ {_HTLCAttempt'route = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField HTLCAttempt "maybe'route" (Prelude.Maybe Proto.Lnrpc.Ln0.Route) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _HTLCAttempt'route (\ x__ y__ -> x__ {_HTLCAttempt'route = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField HTLCAttempt "attemptTimeNs" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _HTLCAttempt'attemptTimeNs
           (\ x__ y__ -> x__ {_HTLCAttempt'attemptTimeNs = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField HTLCAttempt "resolveTimeNs" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _HTLCAttempt'resolveTimeNs
           (\ x__ y__ -> x__ {_HTLCAttempt'resolveTimeNs = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField HTLCAttempt "failure" Failure where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _HTLCAttempt'failure
           (\ x__ y__ -> x__ {_HTLCAttempt'failure = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField HTLCAttempt "maybe'failure" (Prelude.Maybe Failure) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _HTLCAttempt'failure
           (\ x__ y__ -> x__ {_HTLCAttempt'failure = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField HTLCAttempt "preimage" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _HTLCAttempt'preimage
           (\ x__ y__ -> x__ {_HTLCAttempt'preimage = y__}))
        Prelude.id
instance Data.ProtoLens.Message HTLCAttempt where
  messageName _ = Data.Text.pack "lnrpc.HTLCAttempt"
  packedMessageDescriptor _
    = "\n\
      \\vHTLCAttempt\DC2\GS\n\
      \\n\
      \attempt_id\CAN\a \SOH(\EOTR\tattemptId\DC25\n\
      \\ACKstatus\CAN\SOH \SOH(\SO2\GS.lnrpc.HTLCAttempt.HTLCStatusR\ACKstatus\DC2\"\n\
      \\ENQroute\CAN\STX \SOH(\v2\f.lnrpc.RouteR\ENQroute\DC2&\n\
      \\SIattempt_time_ns\CAN\ETX \SOH(\ETXR\rattemptTimeNs\DC2&\n\
      \\SIresolve_time_ns\CAN\EOT \SOH(\ETXR\rresolveTimeNs\DC2(\n\
      \\afailure\CAN\ENQ \SOH(\v2\SO.lnrpc.FailureR\afailure\DC2\SUB\n\
      \\bpreimage\CAN\ACK \SOH(\fR\bpreimage\"6\n\
      \\n\
      \HTLCStatus\DC2\r\n\
      \\tIN_FLIGHT\DLE\NUL\DC2\r\n\
      \\tSUCCEEDED\DLE\SOH\DC2\n\
      \\n\
      \\ACKFAILED\DLE\STX"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        attemptId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "attempt_id"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"attemptId")) ::
              Data.ProtoLens.FieldDescriptor HTLCAttempt
        status__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "status"
              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
                 Data.ProtoLens.FieldTypeDescriptor HTLCAttempt'HTLCStatus)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"status")) ::
              Data.ProtoLens.FieldDescriptor HTLCAttempt
        route__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "route"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Lnrpc.Ln0.Route)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'route")) ::
              Data.ProtoLens.FieldDescriptor HTLCAttempt
        attemptTimeNs__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "attempt_time_ns"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"attemptTimeNs")) ::
              Data.ProtoLens.FieldDescriptor HTLCAttempt
        resolveTimeNs__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "resolve_time_ns"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"resolveTimeNs")) ::
              Data.ProtoLens.FieldDescriptor HTLCAttempt
        failure__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "failure"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Failure)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'failure")) ::
              Data.ProtoLens.FieldDescriptor HTLCAttempt
        preimage__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "preimage"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"preimage")) ::
              Data.ProtoLens.FieldDescriptor HTLCAttempt
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 7, attemptId__field_descriptor),
           (Data.ProtoLens.Tag 1, status__field_descriptor),
           (Data.ProtoLens.Tag 2, route__field_descriptor),
           (Data.ProtoLens.Tag 3, attemptTimeNs__field_descriptor),
           (Data.ProtoLens.Tag 4, resolveTimeNs__field_descriptor),
           (Data.ProtoLens.Tag 5, failure__field_descriptor),
           (Data.ProtoLens.Tag 6, preimage__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _HTLCAttempt'_unknownFields
        (\ x__ y__ -> x__ {_HTLCAttempt'_unknownFields = y__})
  defMessage
    = HTLCAttempt'_constructor
        {_HTLCAttempt'attemptId = Data.ProtoLens.fieldDefault,
         _HTLCAttempt'status = Data.ProtoLens.fieldDefault,
         _HTLCAttempt'route = Prelude.Nothing,
         _HTLCAttempt'attemptTimeNs = Data.ProtoLens.fieldDefault,
         _HTLCAttempt'resolveTimeNs = Data.ProtoLens.fieldDefault,
         _HTLCAttempt'failure = Prelude.Nothing,
         _HTLCAttempt'preimage = Data.ProtoLens.fieldDefault,
         _HTLCAttempt'_unknownFields = []}
  parseMessage
    = let
        loop ::
          HTLCAttempt -> Data.ProtoLens.Encoding.Bytes.Parser HTLCAttempt
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        56
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "attempt_id"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"attemptId") y x)
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.toEnum
                                          (Prelude.fmap
                                             Prelude.fromIntegral
                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
                                       "status"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"status") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "route"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"route") y x)
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "attempt_time_ns"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"attemptTimeNs") y x)
                        32
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "resolve_time_ns"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"resolveTimeNs") y x)
                        42
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "failure"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"failure") y x)
                        50
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "preimage"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"preimage") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "HTLCAttempt"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"attemptId") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 56)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"status") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                         ((Prelude..)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral)
                            Prelude.fromEnum _v))
                ((Data.Monoid.<>)
                   (case
                        Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'route") _x
                    of
                      Prelude.Nothing -> Data.Monoid.mempty
                      (Prelude.Just _v)
                        -> (Data.Monoid.<>)
                             (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                             ((Prelude..)
                                (\ bs
                                   -> (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
                                           (Prelude.fromIntegral (Data.ByteString.length bs)))
                                        (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                Data.ProtoLens.encodeMessage _v))
                   ((Data.Monoid.<>)
                      (let
                         _v
                           = Lens.Family2.view
                               (Data.ProtoLens.Field.field @"attemptTimeNs") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                               ((Prelude..)
                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                      ((Data.Monoid.<>)
                         (let
                            _v
                              = Lens.Family2.view
                                  (Data.ProtoLens.Field.field @"resolveTimeNs") _x
                          in
                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                Data.Monoid.mempty
                            else
                                (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                                  ((Prelude..)
                                     Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral
                                     _v))
                         ((Data.Monoid.<>)
                            (case
                                 Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'failure") _x
                             of
                               Prelude.Nothing -> Data.Monoid.mempty
                               (Prelude.Just _v)
                                 -> (Data.Monoid.<>)
                                      (Data.ProtoLens.Encoding.Bytes.putVarInt 42)
                                      ((Prelude..)
                                         (\ bs
                                            -> (Data.Monoid.<>)
                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                    (Prelude.fromIntegral
                                                       (Data.ByteString.length bs)))
                                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                         Data.ProtoLens.encodeMessage _v))
                            ((Data.Monoid.<>)
                               (let
                                  _v = Lens.Family2.view (Data.ProtoLens.Field.field @"preimage") _x
                                in
                                  if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                      Data.Monoid.mempty
                                  else
                                      (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt 50)
                                        ((\ bs
                                            -> (Data.Monoid.<>)
                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                    (Prelude.fromIntegral
                                                       (Data.ByteString.length bs)))
                                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                           _v))
                               (Data.ProtoLens.Encoding.Wire.buildFieldSet
                                  (Lens.Family2.view Data.ProtoLens.unknownFields _x))))))))
instance Control.DeepSeq.NFData HTLCAttempt where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_HTLCAttempt'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_HTLCAttempt'attemptId x__)
                (Control.DeepSeq.deepseq
                   (_HTLCAttempt'status x__)
                   (Control.DeepSeq.deepseq
                      (_HTLCAttempt'route x__)
                      (Control.DeepSeq.deepseq
                         (_HTLCAttempt'attemptTimeNs x__)
                         (Control.DeepSeq.deepseq
                            (_HTLCAttempt'resolveTimeNs x__)
                            (Control.DeepSeq.deepseq
                               (_HTLCAttempt'failure x__)
                               (Control.DeepSeq.deepseq (_HTLCAttempt'preimage x__) ())))))))
newtype HTLCAttempt'HTLCStatus'UnrecognizedValue
  = HTLCAttempt'HTLCStatus'UnrecognizedValue Data.Int.Int32
  deriving stock (Prelude.Eq,
                  Prelude.Ord,
                  Prelude.Show,
                  GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out HTLCAttempt'HTLCStatus'UnrecognizedValue
data HTLCAttempt'HTLCStatus
  = HTLCAttempt'IN_FLIGHT |
    HTLCAttempt'SUCCEEDED |
    HTLCAttempt'FAILED |
    HTLCAttempt'HTLCStatus'Unrecognized !HTLCAttempt'HTLCStatus'UnrecognizedValue
  deriving stock (Prelude.Show,
                  Prelude.Eq,
                  Prelude.Ord,
                  GHC.Generics.Generic)
instance Data.ProtoLens.MessageEnum HTLCAttempt'HTLCStatus where
  maybeToEnum 0 = Prelude.Just HTLCAttempt'IN_FLIGHT
  maybeToEnum 1 = Prelude.Just HTLCAttempt'SUCCEEDED
  maybeToEnum 2 = Prelude.Just HTLCAttempt'FAILED
  maybeToEnum k
    = Prelude.Just
        (HTLCAttempt'HTLCStatus'Unrecognized
           (HTLCAttempt'HTLCStatus'UnrecognizedValue
              (Prelude.fromIntegral k)))
  showEnum HTLCAttempt'IN_FLIGHT = "IN_FLIGHT"
  showEnum HTLCAttempt'SUCCEEDED = "SUCCEEDED"
  showEnum HTLCAttempt'FAILED = "FAILED"
  showEnum
    (HTLCAttempt'HTLCStatus'Unrecognized (HTLCAttempt'HTLCStatus'UnrecognizedValue k))
    = Prelude.show k
  readEnum k
    | (Prelude.==) k "IN_FLIGHT" = Prelude.Just HTLCAttempt'IN_FLIGHT
    | (Prelude.==) k "SUCCEEDED" = Prelude.Just HTLCAttempt'SUCCEEDED
    | (Prelude.==) k "FAILED" = Prelude.Just HTLCAttempt'FAILED
    | Prelude.otherwise
    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
instance Prelude.Bounded HTLCAttempt'HTLCStatus where
  minBound = HTLCAttempt'IN_FLIGHT
  maxBound = HTLCAttempt'FAILED
instance Prelude.Enum HTLCAttempt'HTLCStatus where
  toEnum k__
    = Prelude.maybe
        (Prelude.error
           ((Prelude.++)
              "toEnum: unknown value for enum HTLCStatus: " (Prelude.show k__)))
        Prelude.id (Data.ProtoLens.maybeToEnum k__)
  fromEnum HTLCAttempt'IN_FLIGHT = 0
  fromEnum HTLCAttempt'SUCCEEDED = 1
  fromEnum HTLCAttempt'FAILED = 2
  fromEnum
    (HTLCAttempt'HTLCStatus'Unrecognized (HTLCAttempt'HTLCStatus'UnrecognizedValue k))
    = Prelude.fromIntegral k
  succ HTLCAttempt'FAILED
    = Prelude.error
        "HTLCAttempt'HTLCStatus.succ: bad argument HTLCAttempt'FAILED. This value would be out of bounds."
  succ HTLCAttempt'IN_FLIGHT = HTLCAttempt'SUCCEEDED
  succ HTLCAttempt'SUCCEEDED = HTLCAttempt'FAILED
  succ (HTLCAttempt'HTLCStatus'Unrecognized _)
    = Prelude.error
        "HTLCAttempt'HTLCStatus.succ: bad argument: unrecognized value"
  pred HTLCAttempt'IN_FLIGHT
    = Prelude.error
        "HTLCAttempt'HTLCStatus.pred: bad argument HTLCAttempt'IN_FLIGHT. This value would be out of bounds."
  pred HTLCAttempt'SUCCEEDED = HTLCAttempt'IN_FLIGHT
  pred HTLCAttempt'FAILED = HTLCAttempt'SUCCEEDED
  pred (HTLCAttempt'HTLCStatus'Unrecognized _)
    = Prelude.error
        "HTLCAttempt'HTLCStatus.pred: bad argument: unrecognized value"
  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault HTLCAttempt'HTLCStatus where
  fieldDefault = HTLCAttempt'IN_FLIGHT
instance Control.DeepSeq.NFData HTLCAttempt'HTLCStatus where
  rnf x__ = Prelude.seq x__ ()
instance Text.PrettyPrint.GenericPretty.Out HTLCAttempt'HTLCStatus
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.error' @:: Lens' InterceptFeedback Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.replaceResponse' @:: Lens' InterceptFeedback Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.replacementSerialized' @:: Lens' InterceptFeedback Data.ByteString.ByteString@ -}
data InterceptFeedback
  = InterceptFeedback'_constructor {_InterceptFeedback'error :: !Data.Text.Text,
                                    _InterceptFeedback'replaceResponse :: !Prelude.Bool,
                                    _InterceptFeedback'replacementSerialized :: !Data.ByteString.ByteString,
                                    _InterceptFeedback'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show InterceptFeedback where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out InterceptFeedback
instance Data.ProtoLens.Field.HasField InterceptFeedback "error" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InterceptFeedback'error
           (\ x__ y__ -> x__ {_InterceptFeedback'error = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InterceptFeedback "replaceResponse" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InterceptFeedback'replaceResponse
           (\ x__ y__ -> x__ {_InterceptFeedback'replaceResponse = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InterceptFeedback "replacementSerialized" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InterceptFeedback'replacementSerialized
           (\ x__ y__
              -> x__ {_InterceptFeedback'replacementSerialized = y__}))
        Prelude.id
instance Data.ProtoLens.Message InterceptFeedback where
  messageName _ = Data.Text.pack "lnrpc.InterceptFeedback"
  packedMessageDescriptor _
    = "\n\
      \\DC1InterceptFeedback\DC2\DC4\n\
      \\ENQerror\CAN\SOH \SOH(\tR\ENQerror\DC2)\n\
      \\DLEreplace_response\CAN\STX \SOH(\bR\SIreplaceResponse\DC25\n\
      \\SYNreplacement_serialized\CAN\ETX \SOH(\fR\NAKreplacementSerialized"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        error__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "error"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"error")) ::
              Data.ProtoLens.FieldDescriptor InterceptFeedback
        replaceResponse__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "replace_response"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"replaceResponse")) ::
              Data.ProtoLens.FieldDescriptor InterceptFeedback
        replacementSerialized__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "replacement_serialized"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"replacementSerialized")) ::
              Data.ProtoLens.FieldDescriptor InterceptFeedback
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, error__field_descriptor),
           (Data.ProtoLens.Tag 2, replaceResponse__field_descriptor),
           (Data.ProtoLens.Tag 3, replacementSerialized__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _InterceptFeedback'_unknownFields
        (\ x__ y__ -> x__ {_InterceptFeedback'_unknownFields = y__})
  defMessage
    = InterceptFeedback'_constructor
        {_InterceptFeedback'error = Data.ProtoLens.fieldDefault,
         _InterceptFeedback'replaceResponse = Data.ProtoLens.fieldDefault,
         _InterceptFeedback'replacementSerialized = Data.ProtoLens.fieldDefault,
         _InterceptFeedback'_unknownFields = []}
  parseMessage
    = let
        loop ::
          InterceptFeedback
          -> Data.ProtoLens.Encoding.Bytes.Parser InterceptFeedback
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "error"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"error") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "replace_response"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"replaceResponse") y x)
                        26
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "replacement_serialized"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"replacementSerialized") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "InterceptFeedback"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"error") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view
                         (Data.ProtoLens.Field.field @"replaceResponse") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         ((Prelude..)
                            Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                            _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view
                            (Data.ProtoLens.Field.field @"replacementSerialized") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                            ((\ bs
                                -> (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                               _v))
                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
instance Control.DeepSeq.NFData InterceptFeedback where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_InterceptFeedback'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_InterceptFeedback'error x__)
                (Control.DeepSeq.deepseq
                   (_InterceptFeedback'replaceResponse x__)
                   (Control.DeepSeq.deepseq
                      (_InterceptFeedback'replacementSerialized x__) ())))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.memo' @:: Lens' Invoice Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.rPreimage' @:: Lens' Invoice Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.rHash' @:: Lens' Invoice Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.value' @:: Lens' Invoice Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.valueMsat' @:: Lens' Invoice Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.settled' @:: Lens' Invoice Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.creationDate' @:: Lens' Invoice Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.settleDate' @:: Lens' Invoice Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.paymentRequest' @:: Lens' Invoice Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.descriptionHash' @:: Lens' Invoice Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.expiry' @:: Lens' Invoice Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.fallbackAddr' @:: Lens' Invoice Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.cltvExpiry' @:: Lens' Invoice Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.routeHints' @:: Lens' Invoice [Proto.Lnrpc.Ln0.RouteHint]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'routeHints' @:: Lens' Invoice (Data.Vector.Vector Proto.Lnrpc.Ln0.RouteHint)@
         * 'Proto.Lnrpc.Ln1_Fields.private' @:: Lens' Invoice Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.addIndex' @:: Lens' Invoice Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.settleIndex' @:: Lens' Invoice Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.amtPaid' @:: Lens' Invoice Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.amtPaidSat' @:: Lens' Invoice Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.amtPaidMsat' @:: Lens' Invoice Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.state' @:: Lens' Invoice Invoice'InvoiceState@
         * 'Proto.Lnrpc.Ln1_Fields.htlcs' @:: Lens' Invoice [InvoiceHTLC]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'htlcs' @:: Lens' Invoice (Data.Vector.Vector InvoiceHTLC)@
         * 'Proto.Lnrpc.Ln1_Fields.features' @:: Lens' Invoice (Data.Map.Map Data.Word.Word32 Proto.Lnrpc.Ln0.Feature)@
         * 'Proto.Lnrpc.Ln1_Fields.isKeysend' @:: Lens' Invoice Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.paymentAddr' @:: Lens' Invoice Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.isAmp' @:: Lens' Invoice Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.ampInvoiceState' @:: Lens' Invoice (Data.Map.Map Data.Text.Text AMPInvoiceState)@ -}
data Invoice
  = Invoice'_constructor {_Invoice'memo :: !Data.Text.Text,
                          _Invoice'rPreimage :: !Data.ByteString.ByteString,
                          _Invoice'rHash :: !Data.ByteString.ByteString,
                          _Invoice'value :: !Data.Int.Int64,
                          _Invoice'valueMsat :: !Data.Int.Int64,
                          _Invoice'settled :: !Prelude.Bool,
                          _Invoice'creationDate :: !Data.Int.Int64,
                          _Invoice'settleDate :: !Data.Int.Int64,
                          _Invoice'paymentRequest :: !Data.Text.Text,
                          _Invoice'descriptionHash :: !Data.ByteString.ByteString,
                          _Invoice'expiry :: !Data.Int.Int64,
                          _Invoice'fallbackAddr :: !Data.Text.Text,
                          _Invoice'cltvExpiry :: !Data.Word.Word64,
                          _Invoice'routeHints :: !(Data.Vector.Vector Proto.Lnrpc.Ln0.RouteHint),
                          _Invoice'private :: !Prelude.Bool,
                          _Invoice'addIndex :: !Data.Word.Word64,
                          _Invoice'settleIndex :: !Data.Word.Word64,
                          _Invoice'amtPaid :: !Data.Int.Int64,
                          _Invoice'amtPaidSat :: !Data.Int.Int64,
                          _Invoice'amtPaidMsat :: !Data.Int.Int64,
                          _Invoice'state :: !Invoice'InvoiceState,
                          _Invoice'htlcs :: !(Data.Vector.Vector InvoiceHTLC),
                          _Invoice'features :: !(Data.Map.Map Data.Word.Word32 Proto.Lnrpc.Ln0.Feature),
                          _Invoice'isKeysend :: !Prelude.Bool,
                          _Invoice'paymentAddr :: !Data.ByteString.ByteString,
                          _Invoice'isAmp :: !Prelude.Bool,
                          _Invoice'ampInvoiceState :: !(Data.Map.Map Data.Text.Text AMPInvoiceState),
                          _Invoice'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show Invoice where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out Invoice
instance Data.ProtoLens.Field.HasField Invoice "memo" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'memo (\ x__ y__ -> x__ {_Invoice'memo = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "rPreimage" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'rPreimage (\ x__ y__ -> x__ {_Invoice'rPreimage = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "rHash" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'rHash (\ x__ y__ -> x__ {_Invoice'rHash = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "value" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'value (\ x__ y__ -> x__ {_Invoice'value = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "valueMsat" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'valueMsat (\ x__ y__ -> x__ {_Invoice'valueMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "settled" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'settled (\ x__ y__ -> x__ {_Invoice'settled = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "creationDate" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'creationDate
           (\ x__ y__ -> x__ {_Invoice'creationDate = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "settleDate" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'settleDate (\ x__ y__ -> x__ {_Invoice'settleDate = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "paymentRequest" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'paymentRequest
           (\ x__ y__ -> x__ {_Invoice'paymentRequest = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "descriptionHash" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'descriptionHash
           (\ x__ y__ -> x__ {_Invoice'descriptionHash = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "expiry" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'expiry (\ x__ y__ -> x__ {_Invoice'expiry = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "fallbackAddr" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'fallbackAddr
           (\ x__ y__ -> x__ {_Invoice'fallbackAddr = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "cltvExpiry" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'cltvExpiry (\ x__ y__ -> x__ {_Invoice'cltvExpiry = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "routeHints" [Proto.Lnrpc.Ln0.RouteHint] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'routeHints (\ x__ y__ -> x__ {_Invoice'routeHints = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField Invoice "vec'routeHints" (Data.Vector.Vector Proto.Lnrpc.Ln0.RouteHint) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'routeHints (\ x__ y__ -> x__ {_Invoice'routeHints = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "private" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'private (\ x__ y__ -> x__ {_Invoice'private = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "addIndex" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'addIndex (\ x__ y__ -> x__ {_Invoice'addIndex = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "settleIndex" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'settleIndex
           (\ x__ y__ -> x__ {_Invoice'settleIndex = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "amtPaid" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'amtPaid (\ x__ y__ -> x__ {_Invoice'amtPaid = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "amtPaidSat" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'amtPaidSat (\ x__ y__ -> x__ {_Invoice'amtPaidSat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "amtPaidMsat" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'amtPaidMsat
           (\ x__ y__ -> x__ {_Invoice'amtPaidMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "state" Invoice'InvoiceState where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'state (\ x__ y__ -> x__ {_Invoice'state = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "htlcs" [InvoiceHTLC] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'htlcs (\ x__ y__ -> x__ {_Invoice'htlcs = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField Invoice "vec'htlcs" (Data.Vector.Vector InvoiceHTLC) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'htlcs (\ x__ y__ -> x__ {_Invoice'htlcs = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "features" (Data.Map.Map Data.Word.Word32 Proto.Lnrpc.Ln0.Feature) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'features (\ x__ y__ -> x__ {_Invoice'features = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "isKeysend" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'isKeysend (\ x__ y__ -> x__ {_Invoice'isKeysend = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "paymentAddr" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'paymentAddr
           (\ x__ y__ -> x__ {_Invoice'paymentAddr = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "isAmp" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'isAmp (\ x__ y__ -> x__ {_Invoice'isAmp = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice "ampInvoiceState" (Data.Map.Map Data.Text.Text AMPInvoiceState) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'ampInvoiceState
           (\ x__ y__ -> x__ {_Invoice'ampInvoiceState = y__}))
        Prelude.id
instance Data.ProtoLens.Message Invoice where
  messageName _ = Data.Text.pack "lnrpc.Invoice"
  packedMessageDescriptor _
    = "\n\
      \\aInvoice\DC2\DC2\n\
      \\EOTmemo\CAN\SOH \SOH(\tR\EOTmemo\DC2\GS\n\
      \\n\
      \r_preimage\CAN\ETX \SOH(\fR\trPreimage\DC2\NAK\n\
      \\ACKr_hash\CAN\EOT \SOH(\fR\ENQrHash\DC2\DC4\n\
      \\ENQvalue\CAN\ENQ \SOH(\ETXR\ENQvalue\DC2\GS\n\
      \\n\
      \value_msat\CAN\ETB \SOH(\ETXR\tvalueMsat\DC2\FS\n\
      \\asettled\CAN\ACK \SOH(\bR\asettledB\STX\CAN\SOH\DC2#\n\
      \\rcreation_date\CAN\a \SOH(\ETXR\fcreationDate\DC2\US\n\
      \\vsettle_date\CAN\b \SOH(\ETXR\n\
      \settleDate\DC2'\n\
      \\SIpayment_request\CAN\t \SOH(\tR\SOpaymentRequest\DC2)\n\
      \\DLEdescription_hash\CAN\n\
      \ \SOH(\fR\SIdescriptionHash\DC2\SYN\n\
      \\ACKexpiry\CAN\v \SOH(\ETXR\ACKexpiry\DC2#\n\
      \\rfallback_addr\CAN\f \SOH(\tR\ffallbackAddr\DC2\US\n\
      \\vcltv_expiry\CAN\r \SOH(\EOTR\n\
      \cltvExpiry\DC21\n\
      \\vroute_hints\CAN\SO \ETX(\v2\DLE.lnrpc.RouteHintR\n\
      \routeHints\DC2\CAN\n\
      \\aprivate\CAN\SI \SOH(\bR\aprivate\DC2\ESC\n\
      \\tadd_index\CAN\DLE \SOH(\EOTR\baddIndex\DC2!\n\
      \\fsettle_index\CAN\DC1 \SOH(\EOTR\vsettleIndex\DC2\GS\n\
      \\bamt_paid\CAN\DC2 \SOH(\ETXR\aamtPaidB\STX\CAN\SOH\DC2 \n\
      \\famt_paid_sat\CAN\DC3 \SOH(\ETXR\n\
      \amtPaidSat\DC2\"\n\
      \\ramt_paid_msat\CAN\DC4 \SOH(\ETXR\vamtPaidMsat\DC21\n\
      \\ENQstate\CAN\NAK \SOH(\SO2\ESC.lnrpc.Invoice.InvoiceStateR\ENQstate\DC2(\n\
      \\ENQhtlcs\CAN\SYN \ETX(\v2\DC2.lnrpc.InvoiceHTLCR\ENQhtlcs\DC28\n\
      \\bfeatures\CAN\CAN \ETX(\v2\FS.lnrpc.Invoice.FeaturesEntryR\bfeatures\DC2\GS\n\
      \\n\
      \is_keysend\CAN\EM \SOH(\bR\tisKeysend\DC2!\n\
      \\fpayment_addr\CAN\SUB \SOH(\fR\vpaymentAddr\DC2\NAK\n\
      \\ACKis_amp\CAN\ESC \SOH(\bR\ENQisAmp\DC2O\n\
      \\DC1amp_invoice_state\CAN\FS \ETX(\v2#.lnrpc.Invoice.AmpInvoiceStateEntryR\SIampInvoiceState\SUBK\n\
      \\rFeaturesEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC2$\n\
      \\ENQvalue\CAN\STX \SOH(\v2\SO.lnrpc.FeatureR\ENQvalue:\STX8\SOH\SUBZ\n\
      \\DC4AmpInvoiceStateEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2,\n\
      \\ENQvalue\CAN\STX \SOH(\v2\SYN.lnrpc.AMPInvoiceStateR\ENQvalue:\STX8\SOH\"A\n\
      \\fInvoiceState\DC2\b\n\
      \\EOTOPEN\DLE\NUL\DC2\v\n\
      \\aSETTLED\DLE\SOH\DC2\f\n\
      \\bCANCELED\DLE\STX\DC2\f\n\
      \\bACCEPTED\DLE\ETXJ\EOT\b\STX\DLE\ETX"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        memo__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "memo"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"memo")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        rPreimage__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "r_preimage"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"rPreimage")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        rHash__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "r_hash"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"rHash")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        value__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "value"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        valueMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "value_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"valueMsat")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        settled__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "settled"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"settled")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        creationDate__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "creation_date"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"creationDate")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        settleDate__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "settle_date"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"settleDate")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        paymentRequest__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payment_request"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"paymentRequest")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        descriptionHash__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "description_hash"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"descriptionHash")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        expiry__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "expiry"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"expiry")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        fallbackAddr__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fallback_addr"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"fallbackAddr")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        cltvExpiry__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "cltv_expiry"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"cltvExpiry")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        routeHints__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "route_hints"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Lnrpc.Ln0.RouteHint)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"routeHints")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        private__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "private"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"private")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        addIndex__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "add_index"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"addIndex")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        settleIndex__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "settle_index"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"settleIndex")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        amtPaid__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "amt_paid"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"amtPaid")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        amtPaidSat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "amt_paid_sat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"amtPaidSat")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        amtPaidMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "amt_paid_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"amtPaidMsat")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        state__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "state"
              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
                 Data.ProtoLens.FieldTypeDescriptor Invoice'InvoiceState)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"state")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        htlcs__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "htlcs"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor InvoiceHTLC)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"htlcs")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        features__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "features"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Invoice'FeaturesEntry)
              (Data.ProtoLens.MapField
                 (Data.ProtoLens.Field.field @"key")
                 (Data.ProtoLens.Field.field @"value")
                 (Data.ProtoLens.Field.field @"features")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        isKeysend__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "is_keysend"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"isKeysend")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        paymentAddr__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payment_addr"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"paymentAddr")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        isAmp__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "is_amp"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"isAmp")) ::
              Data.ProtoLens.FieldDescriptor Invoice
        ampInvoiceState__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "amp_invoice_state"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Invoice'AmpInvoiceStateEntry)
              (Data.ProtoLens.MapField
                 (Data.ProtoLens.Field.field @"key")
                 (Data.ProtoLens.Field.field @"value")
                 (Data.ProtoLens.Field.field @"ampInvoiceState")) ::
              Data.ProtoLens.FieldDescriptor Invoice
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, memo__field_descriptor),
           (Data.ProtoLens.Tag 3, rPreimage__field_descriptor),
           (Data.ProtoLens.Tag 4, rHash__field_descriptor),
           (Data.ProtoLens.Tag 5, value__field_descriptor),
           (Data.ProtoLens.Tag 23, valueMsat__field_descriptor),
           (Data.ProtoLens.Tag 6, settled__field_descriptor),
           (Data.ProtoLens.Tag 7, creationDate__field_descriptor),
           (Data.ProtoLens.Tag 8, settleDate__field_descriptor),
           (Data.ProtoLens.Tag 9, paymentRequest__field_descriptor),
           (Data.ProtoLens.Tag 10, descriptionHash__field_descriptor),
           (Data.ProtoLens.Tag 11, expiry__field_descriptor),
           (Data.ProtoLens.Tag 12, fallbackAddr__field_descriptor),
           (Data.ProtoLens.Tag 13, cltvExpiry__field_descriptor),
           (Data.ProtoLens.Tag 14, routeHints__field_descriptor),
           (Data.ProtoLens.Tag 15, private__field_descriptor),
           (Data.ProtoLens.Tag 16, addIndex__field_descriptor),
           (Data.ProtoLens.Tag 17, settleIndex__field_descriptor),
           (Data.ProtoLens.Tag 18, amtPaid__field_descriptor),
           (Data.ProtoLens.Tag 19, amtPaidSat__field_descriptor),
           (Data.ProtoLens.Tag 20, amtPaidMsat__field_descriptor),
           (Data.ProtoLens.Tag 21, state__field_descriptor),
           (Data.ProtoLens.Tag 22, htlcs__field_descriptor),
           (Data.ProtoLens.Tag 24, features__field_descriptor),
           (Data.ProtoLens.Tag 25, isKeysend__field_descriptor),
           (Data.ProtoLens.Tag 26, paymentAddr__field_descriptor),
           (Data.ProtoLens.Tag 27, isAmp__field_descriptor),
           (Data.ProtoLens.Tag 28, ampInvoiceState__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _Invoice'_unknownFields
        (\ x__ y__ -> x__ {_Invoice'_unknownFields = y__})
  defMessage
    = Invoice'_constructor
        {_Invoice'memo = Data.ProtoLens.fieldDefault,
         _Invoice'rPreimage = Data.ProtoLens.fieldDefault,
         _Invoice'rHash = Data.ProtoLens.fieldDefault,
         _Invoice'value = Data.ProtoLens.fieldDefault,
         _Invoice'valueMsat = Data.ProtoLens.fieldDefault,
         _Invoice'settled = Data.ProtoLens.fieldDefault,
         _Invoice'creationDate = Data.ProtoLens.fieldDefault,
         _Invoice'settleDate = Data.ProtoLens.fieldDefault,
         _Invoice'paymentRequest = Data.ProtoLens.fieldDefault,
         _Invoice'descriptionHash = Data.ProtoLens.fieldDefault,
         _Invoice'expiry = Data.ProtoLens.fieldDefault,
         _Invoice'fallbackAddr = Data.ProtoLens.fieldDefault,
         _Invoice'cltvExpiry = Data.ProtoLens.fieldDefault,
         _Invoice'routeHints = Data.Vector.Generic.empty,
         _Invoice'private = Data.ProtoLens.fieldDefault,
         _Invoice'addIndex = Data.ProtoLens.fieldDefault,
         _Invoice'settleIndex = Data.ProtoLens.fieldDefault,
         _Invoice'amtPaid = Data.ProtoLens.fieldDefault,
         _Invoice'amtPaidSat = Data.ProtoLens.fieldDefault,
         _Invoice'amtPaidMsat = Data.ProtoLens.fieldDefault,
         _Invoice'state = Data.ProtoLens.fieldDefault,
         _Invoice'htlcs = Data.Vector.Generic.empty,
         _Invoice'features = Data.Map.empty,
         _Invoice'isKeysend = Data.ProtoLens.fieldDefault,
         _Invoice'paymentAddr = Data.ProtoLens.fieldDefault,
         _Invoice'isAmp = Data.ProtoLens.fieldDefault,
         _Invoice'ampInvoiceState = Data.Map.empty,
         _Invoice'_unknownFields = []}
  parseMessage
    = let
        loop ::
          Invoice
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld InvoiceHTLC
             -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.Lnrpc.Ln0.RouteHint
                -> Data.ProtoLens.Encoding.Bytes.Parser Invoice
        loop x mutable'htlcs mutable'routeHints
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'htlcs <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                        (Data.ProtoLens.Encoding.Growing.unsafeFreeze mutable'htlcs)
                      frozen'routeHints <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                             (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                mutable'routeHints)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'htlcs") frozen'htlcs
                              (Lens.Family2.set
                                 (Data.ProtoLens.Field.field @"vec'routeHints") frozen'routeHints
                                 x)))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "memo"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"memo") y x)
                                  mutable'htlcs mutable'routeHints
                        26
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "r_preimage"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"rPreimage") y x)
                                  mutable'htlcs mutable'routeHints
                        34
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "r_hash"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"rHash") y x)
                                  mutable'htlcs mutable'routeHints
                        40
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "value"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
                                  mutable'htlcs mutable'routeHints
                        184
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "value_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"valueMsat") y x)
                                  mutable'htlcs mutable'routeHints
                        48
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "settled"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"settled") y x)
                                  mutable'htlcs mutable'routeHints
                        56
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "creation_date"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"creationDate") y x)
                                  mutable'htlcs mutable'routeHints
                        64
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "settle_date"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"settleDate") y x)
                                  mutable'htlcs mutable'routeHints
                        74
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "payment_request"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"paymentRequest") y x)
                                  mutable'htlcs mutable'routeHints
                        82
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "description_hash"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"descriptionHash") y x)
                                  mutable'htlcs mutable'routeHints
                        88
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "expiry"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"expiry") y x)
                                  mutable'htlcs mutable'routeHints
                        98
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "fallback_addr"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"fallbackAddr") y x)
                                  mutable'htlcs mutable'routeHints
                        104
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "cltv_expiry"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"cltvExpiry") y x)
                                  mutable'htlcs mutable'routeHints
                        114
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "route_hints"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append mutable'routeHints y)
                                loop x mutable'htlcs v
                        120
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "private"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"private") y x)
                                  mutable'htlcs mutable'routeHints
                        128
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "add_index"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"addIndex") y x)
                                  mutable'htlcs mutable'routeHints
                        136
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "settle_index"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"settleIndex") y x)
                                  mutable'htlcs mutable'routeHints
                        144
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "amt_paid"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"amtPaid") y x)
                                  mutable'htlcs mutable'routeHints
                        152
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "amt_paid_sat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"amtPaidSat") y x)
                                  mutable'htlcs mutable'routeHints
                        160
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "amt_paid_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"amtPaidMsat") y x)
                                  mutable'htlcs mutable'routeHints
                        168
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.toEnum
                                          (Prelude.fmap
                                             Prelude.fromIntegral
                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
                                       "state"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"state") y x)
                                  mutable'htlcs mutable'routeHints
                        178
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "htlcs"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append mutable'htlcs y)
                                loop x v mutable'routeHints
                        194
                          -> do !(entry :: Invoice'FeaturesEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                                           Data.ProtoLens.Encoding.Bytes.isolate
                                                                             (Prelude.fromIntegral
                                                                                len)
                                                                             Data.ProtoLens.parseMessage)
                                                                       "features"
                                (let
                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
                                   value
                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
                                 in
                                   loop
                                     (Lens.Family2.over
                                        (Data.ProtoLens.Field.field @"features")
                                        (\ !t -> Data.Map.insert key value t) x)
                                     mutable'htlcs mutable'routeHints)
                        200
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "is_keysend"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"isKeysend") y x)
                                  mutable'htlcs mutable'routeHints
                        210
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "payment_addr"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"paymentAddr") y x)
                                  mutable'htlcs mutable'routeHints
                        216
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "is_amp"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"isAmp") y x)
                                  mutable'htlcs mutable'routeHints
                        226
                          -> do !(entry :: Invoice'AmpInvoiceStateEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                                                              (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                                                  Data.ProtoLens.Encoding.Bytes.isolate
                                                                                    (Prelude.fromIntegral
                                                                                       len)
                                                                                    Data.ProtoLens.parseMessage)
                                                                              "amp_invoice_state"
                                (let
                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
                                   value
                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
                                 in
                                   loop
                                     (Lens.Family2.over
                                        (Data.ProtoLens.Field.field @"ampInvoiceState")
                                        (\ !t -> Data.Map.insert key value t) x)
                                     mutable'htlcs mutable'routeHints)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'htlcs mutable'routeHints
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'htlcs <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                 Data.ProtoLens.Encoding.Growing.new
              mutable'routeHints <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                      Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'htlcs mutable'routeHints)
          "Invoice"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"memo") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"rPreimage") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                         ((\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            _v))
                ((Data.Monoid.<>)
                   (let
                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"rHash") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 34)
                            ((\ bs
                                -> (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                               _v))
                   ((Data.Monoid.<>)
                      (let
                         _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
                               ((Prelude..)
                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                      ((Data.Monoid.<>)
                         (let
                            _v = Lens.Family2.view (Data.ProtoLens.Field.field @"valueMsat") _x
                          in
                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                Data.Monoid.mempty
                            else
                                (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 184)
                                  ((Prelude..)
                                     Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral
                                     _v))
                         ((Data.Monoid.<>)
                            (let
                               _v = Lens.Family2.view (Data.ProtoLens.Field.field @"settled") _x
                             in
                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                   Data.Monoid.mempty
                               else
                                   (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 48)
                                     ((Prelude..)
                                        Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (\ b -> if b then 1 else 0) _v))
                            ((Data.Monoid.<>)
                               (let
                                  _v
                                    = Lens.Family2.view
                                        (Data.ProtoLens.Field.field @"creationDate") _x
                                in
                                  if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                      Data.Monoid.mempty
                                  else
                                      (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt 56)
                                        ((Prelude..)
                                           Data.ProtoLens.Encoding.Bytes.putVarInt
                                           Prelude.fromIntegral _v))
                               ((Data.Monoid.<>)
                                  (let
                                     _v
                                       = Lens.Family2.view
                                           (Data.ProtoLens.Field.field @"settleDate") _x
                                   in
                                     if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                         Data.Monoid.mempty
                                     else
                                         (Data.Monoid.<>)
                                           (Data.ProtoLens.Encoding.Bytes.putVarInt 64)
                                           ((Prelude..)
                                              Data.ProtoLens.Encoding.Bytes.putVarInt
                                              Prelude.fromIntegral _v))
                                  ((Data.Monoid.<>)
                                     (let
                                        _v
                                          = Lens.Family2.view
                                              (Data.ProtoLens.Field.field @"paymentRequest") _x
                                      in
                                        if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                            Data.Monoid.mempty
                                        else
                                            (Data.Monoid.<>)
                                              (Data.ProtoLens.Encoding.Bytes.putVarInt 74)
                                              ((Prelude..)
                                                 (\ bs
                                                    -> (Data.Monoid.<>)
                                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                            (Prelude.fromIntegral
                                                               (Data.ByteString.length bs)))
                                                         (Data.ProtoLens.Encoding.Bytes.putBytes
                                                            bs))
                                                 Data.Text.Encoding.encodeUtf8 _v))
                                     ((Data.Monoid.<>)
                                        (let
                                           _v
                                             = Lens.Family2.view
                                                 (Data.ProtoLens.Field.field @"descriptionHash") _x
                                         in
                                           if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                               Data.Monoid.mempty
                                           else
                                               (Data.Monoid.<>)
                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 82)
                                                 ((\ bs
                                                     -> (Data.Monoid.<>)
                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                             (Prelude.fromIntegral
                                                                (Data.ByteString.length bs)))
                                                          (Data.ProtoLens.Encoding.Bytes.putBytes
                                                             bs))
                                                    _v))
                                        ((Data.Monoid.<>)
                                           (let
                                              _v
                                                = Lens.Family2.view
                                                    (Data.ProtoLens.Field.field @"expiry") _x
                                            in
                                              if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                                  Data.Monoid.mempty
                                              else
                                                  (Data.Monoid.<>)
                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt 88)
                                                    ((Prelude..)
                                                       Data.ProtoLens.Encoding.Bytes.putVarInt
                                                       Prelude.fromIntegral _v))
                                           ((Data.Monoid.<>)
                                              (let
                                                 _v
                                                   = Lens.Family2.view
                                                       (Data.ProtoLens.Field.field @"fallbackAddr")
                                                       _x
                                               in
                                                 if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                                     Data.Monoid.mempty
                                                 else
                                                     (Data.Monoid.<>)
                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt 98)
                                                       ((Prelude..)
                                                          (\ bs
                                                             -> (Data.Monoid.<>)
                                                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                     (Prelude.fromIntegral
                                                                        (Data.ByteString.length
                                                                           bs)))
                                                                  (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                     bs))
                                                          Data.Text.Encoding.encodeUtf8 _v))
                                              ((Data.Monoid.<>)
                                                 (let
                                                    _v
                                                      = Lens.Family2.view
                                                          (Data.ProtoLens.Field.field @"cltvExpiry")
                                                          _x
                                                  in
                                                    if (Prelude.==)
                                                         _v Data.ProtoLens.fieldDefault then
                                                        Data.Monoid.mempty
                                                    else
                                                        (Data.Monoid.<>)
                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                             104)
                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                             _v))
                                                 ((Data.Monoid.<>)
                                                    (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                                                       (\ _v
                                                          -> (Data.Monoid.<>)
                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                  114)
                                                               ((Prelude..)
                                                                  (\ bs
                                                                     -> (Data.Monoid.<>)
                                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                             (Prelude.fromIntegral
                                                                                (Data.ByteString.length
                                                                                   bs)))
                                                                          (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                             bs))
                                                                  Data.ProtoLens.encodeMessage _v))
                                                       (Lens.Family2.view
                                                          (Data.ProtoLens.Field.field
                                                             @"vec'routeHints")
                                                          _x))
                                                    ((Data.Monoid.<>)
                                                       (let
                                                          _v
                                                            = Lens.Family2.view
                                                                (Data.ProtoLens.Field.field
                                                                   @"private")
                                                                _x
                                                        in
                                                          if (Prelude.==)
                                                               _v Data.ProtoLens.fieldDefault then
                                                              Data.Monoid.mempty
                                                          else
                                                              (Data.Monoid.<>)
                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                   120)
                                                                ((Prelude..)
                                                                   Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                   (\ b -> if b then 1 else 0) _v))
                                                       ((Data.Monoid.<>)
                                                          (let
                                                             _v
                                                               = Lens.Family2.view
                                                                   (Data.ProtoLens.Field.field
                                                                      @"addIndex")
                                                                   _x
                                                           in
                                                             if (Prelude.==)
                                                                  _v
                                                                  Data.ProtoLens.fieldDefault then
                                                                 Data.Monoid.mempty
                                                             else
                                                                 (Data.Monoid.<>)
                                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                      128)
                                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                      _v))
                                                          ((Data.Monoid.<>)
                                                             (let
                                                                _v
                                                                  = Lens.Family2.view
                                                                      (Data.ProtoLens.Field.field
                                                                         @"settleIndex")
                                                                      _x
                                                              in
                                                                if (Prelude.==)
                                                                     _v
                                                                     Data.ProtoLens.fieldDefault then
                                                                    Data.Monoid.mempty
                                                                else
                                                                    (Data.Monoid.<>)
                                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                         136)
                                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                         _v))
                                                             ((Data.Monoid.<>)
                                                                (let
                                                                   _v
                                                                     = Lens.Family2.view
                                                                         (Data.ProtoLens.Field.field
                                                                            @"amtPaid")
                                                                         _x
                                                                 in
                                                                   if (Prelude.==)
                                                                        _v
                                                                        Data.ProtoLens.fieldDefault then
                                                                       Data.Monoid.mempty
                                                                   else
                                                                       (Data.Monoid.<>)
                                                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                            144)
                                                                         ((Prelude..)
                                                                            Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                            Prelude.fromIntegral
                                                                            _v))
                                                                ((Data.Monoid.<>)
                                                                   (let
                                                                      _v
                                                                        = Lens.Family2.view
                                                                            (Data.ProtoLens.Field.field
                                                                               @"amtPaidSat")
                                                                            _x
                                                                    in
                                                                      if (Prelude.==)
                                                                           _v
                                                                           Data.ProtoLens.fieldDefault then
                                                                          Data.Monoid.mempty
                                                                      else
                                                                          (Data.Monoid.<>)
                                                                            (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                               152)
                                                                            ((Prelude..)
                                                                               Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                               Prelude.fromIntegral
                                                                               _v))
                                                                   ((Data.Monoid.<>)
                                                                      (let
                                                                         _v
                                                                           = Lens.Family2.view
                                                                               (Data.ProtoLens.Field.field
                                                                                  @"amtPaidMsat")
                                                                               _x
                                                                       in
                                                                         if (Prelude.==)
                                                                              _v
                                                                              Data.ProtoLens.fieldDefault then
                                                                             Data.Monoid.mempty
                                                                         else
                                                                             (Data.Monoid.<>)
                                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                  160)
                                                                               ((Prelude..)
                                                                                  Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                  Prelude.fromIntegral
                                                                                  _v))
                                                                      ((Data.Monoid.<>)
                                                                         (let
                                                                            _v
                                                                              = Lens.Family2.view
                                                                                  (Data.ProtoLens.Field.field
                                                                                     @"state")
                                                                                  _x
                                                                          in
                                                                            if (Prelude.==)
                                                                                 _v
                                                                                 Data.ProtoLens.fieldDefault then
                                                                                Data.Monoid.mempty
                                                                            else
                                                                                (Data.Monoid.<>)
                                                                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                     168)
                                                                                  ((Prelude..)
                                                                                     ((Prelude..)
                                                                                        Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                        Prelude.fromIntegral)
                                                                                     Prelude.fromEnum
                                                                                     _v))
                                                                         ((Data.Monoid.<>)
                                                                            (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                                                                               (\ _v
                                                                                  -> (Data.Monoid.<>)
                                                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                          178)
                                                                                       ((Prelude..)
                                                                                          (\ bs
                                                                                             -> (Data.Monoid.<>)
                                                                                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                                     (Prelude.fromIntegral
                                                                                                        (Data.ByteString.length
                                                                                                           bs)))
                                                                                                  (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                                                     bs))
                                                                                          Data.ProtoLens.encodeMessage
                                                                                          _v))
                                                                               (Lens.Family2.view
                                                                                  (Data.ProtoLens.Field.field
                                                                                     @"vec'htlcs")
                                                                                  _x))
                                                                            ((Data.Monoid.<>)
                                                                               (Data.Monoid.mconcat
                                                                                  (Prelude.map
                                                                                     (\ _v
                                                                                        -> (Data.Monoid.<>)
                                                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                                194)
                                                                                             ((Prelude..)
                                                                                                (\ bs
                                                                                                   -> (Data.Monoid.<>)
                                                                                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                                           (Prelude.fromIntegral
                                                                                                              (Data.ByteString.length
                                                                                                                 bs)))
                                                                                                        (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                                                           bs))
                                                                                                Data.ProtoLens.encodeMessage
                                                                                                (Lens.Family2.set
                                                                                                   (Data.ProtoLens.Field.field
                                                                                                      @"key")
                                                                                                   (Prelude.fst
                                                                                                      _v)
                                                                                                   (Lens.Family2.set
                                                                                                      (Data.ProtoLens.Field.field
                                                                                                         @"value")
                                                                                                      (Prelude.snd
                                                                                                         _v)
                                                                                                      (Data.ProtoLens.defMessage ::
                                                                                                         Invoice'FeaturesEntry)))))
                                                                                     (Data.Map.toList
                                                                                        (Lens.Family2.view
                                                                                           (Data.ProtoLens.Field.field
                                                                                              @"features")
                                                                                           _x))))
                                                                               ((Data.Monoid.<>)
                                                                                  (let
                                                                                     _v
                                                                                       = Lens.Family2.view
                                                                                           (Data.ProtoLens.Field.field
                                                                                              @"isKeysend")
                                                                                           _x
                                                                                   in
                                                                                     if (Prelude.==)
                                                                                          _v
                                                                                          Data.ProtoLens.fieldDefault then
                                                                                         Data.Monoid.mempty
                                                                                     else
                                                                                         (Data.Monoid.<>)
                                                                                           (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                              200)
                                                                                           ((Prelude..)
                                                                                              Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                              (\ b
                                                                                                 -> if b then
                                                                                                        1
                                                                                                    else
                                                                                                        0)
                                                                                              _v))
                                                                                  ((Data.Monoid.<>)
                                                                                     (let
                                                                                        _v
                                                                                          = Lens.Family2.view
                                                                                              (Data.ProtoLens.Field.field
                                                                                                 @"paymentAddr")
                                                                                              _x
                                                                                      in
                                                                                        if (Prelude.==)
                                                                                             _v
                                                                                             Data.ProtoLens.fieldDefault then
                                                                                            Data.Monoid.mempty
                                                                                        else
                                                                                            (Data.Monoid.<>)
                                                                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                                 210)
                                                                                              ((\ bs
                                                                                                  -> (Data.Monoid.<>)
                                                                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                                          (Prelude.fromIntegral
                                                                                                             (Data.ByteString.length
                                                                                                                bs)))
                                                                                                       (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                                                          bs))
                                                                                                 _v))
                                                                                     ((Data.Monoid.<>)
                                                                                        (let
                                                                                           _v
                                                                                             = Lens.Family2.view
                                                                                                 (Data.ProtoLens.Field.field
                                                                                                    @"isAmp")
                                                                                                 _x
                                                                                         in
                                                                                           if (Prelude.==)
                                                                                                _v
                                                                                                Data.ProtoLens.fieldDefault then
                                                                                               Data.Monoid.mempty
                                                                                           else
                                                                                               (Data.Monoid.<>)
                                                                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                                    216)
                                                                                                 ((Prelude..)
                                                                                                    Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                                    (\ b
                                                                                                       -> if b then
                                                                                                              1
                                                                                                          else
                                                                                                              0)
                                                                                                    _v))
                                                                                        ((Data.Monoid.<>)
                                                                                           (Data.Monoid.mconcat
                                                                                              (Prelude.map
                                                                                                 (\ _v
                                                                                                    -> (Data.Monoid.<>)
                                                                                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                                            226)
                                                                                                         ((Prelude..)
                                                                                                            (\ bs
                                                                                                               -> (Data.Monoid.<>)
                                                                                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                                                                       (Prelude.fromIntegral
                                                                                                                          (Data.ByteString.length
                                                                                                                             bs)))
                                                                                                                    (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                                                                       bs))
                                                                                                            Data.ProtoLens.encodeMessage
                                                                                                            (Lens.Family2.set
                                                                                                               (Data.ProtoLens.Field.field
                                                                                                                  @"key")
                                                                                                               (Prelude.fst
                                                                                                                  _v)
                                                                                                               (Lens.Family2.set
                                                                                                                  (Data.ProtoLens.Field.field
                                                                                                                     @"value")
                                                                                                                  (Prelude.snd
                                                                                                                     _v)
                                                                                                                  (Data.ProtoLens.defMessage ::
                                                                                                                     Invoice'AmpInvoiceStateEntry)))))
                                                                                                 (Data.Map.toList
                                                                                                    (Lens.Family2.view
                                                                                                       (Data.ProtoLens.Field.field
                                                                                                          @"ampInvoiceState")
                                                                                                       _x))))
                                                                                           (Data.ProtoLens.Encoding.Wire.buildFieldSet
                                                                                              (Lens.Family2.view
                                                                                                 Data.ProtoLens.unknownFields
                                                                                                 _x))))))))))))))))))))))))))))
instance Control.DeepSeq.NFData Invoice where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_Invoice'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_Invoice'memo x__)
                (Control.DeepSeq.deepseq
                   (_Invoice'rPreimage x__)
                   (Control.DeepSeq.deepseq
                      (_Invoice'rHash x__)
                      (Control.DeepSeq.deepseq
                         (_Invoice'value x__)
                         (Control.DeepSeq.deepseq
                            (_Invoice'valueMsat x__)
                            (Control.DeepSeq.deepseq
                               (_Invoice'settled x__)
                               (Control.DeepSeq.deepseq
                                  (_Invoice'creationDate x__)
                                  (Control.DeepSeq.deepseq
                                     (_Invoice'settleDate x__)
                                     (Control.DeepSeq.deepseq
                                        (_Invoice'paymentRequest x__)
                                        (Control.DeepSeq.deepseq
                                           (_Invoice'descriptionHash x__)
                                           (Control.DeepSeq.deepseq
                                              (_Invoice'expiry x__)
                                              (Control.DeepSeq.deepseq
                                                 (_Invoice'fallbackAddr x__)
                                                 (Control.DeepSeq.deepseq
                                                    (_Invoice'cltvExpiry x__)
                                                    (Control.DeepSeq.deepseq
                                                       (_Invoice'routeHints x__)
                                                       (Control.DeepSeq.deepseq
                                                          (_Invoice'private x__)
                                                          (Control.DeepSeq.deepseq
                                                             (_Invoice'addIndex x__)
                                                             (Control.DeepSeq.deepseq
                                                                (_Invoice'settleIndex x__)
                                                                (Control.DeepSeq.deepseq
                                                                   (_Invoice'amtPaid x__)
                                                                   (Control.DeepSeq.deepseq
                                                                      (_Invoice'amtPaidSat x__)
                                                                      (Control.DeepSeq.deepseq
                                                                         (_Invoice'amtPaidMsat x__)
                                                                         (Control.DeepSeq.deepseq
                                                                            (_Invoice'state x__)
                                                                            (Control.DeepSeq.deepseq
                                                                               (_Invoice'htlcs x__)
                                                                               (Control.DeepSeq.deepseq
                                                                                  (_Invoice'features
                                                                                     x__)
                                                                                  (Control.DeepSeq.deepseq
                                                                                     (_Invoice'isKeysend
                                                                                        x__)
                                                                                     (Control.DeepSeq.deepseq
                                                                                        (_Invoice'paymentAddr
                                                                                           x__)
                                                                                        (Control.DeepSeq.deepseq
                                                                                           (_Invoice'isAmp
                                                                                              x__)
                                                                                           (Control.DeepSeq.deepseq
                                                                                              (_Invoice'ampInvoiceState
                                                                                                 x__)
                                                                                              ())))))))))))))))))))))))))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.key' @:: Lens' Invoice'AmpInvoiceStateEntry Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.value' @:: Lens' Invoice'AmpInvoiceStateEntry AMPInvoiceState@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'value' @:: Lens' Invoice'AmpInvoiceStateEntry (Prelude.Maybe AMPInvoiceState)@ -}
data Invoice'AmpInvoiceStateEntry
  = Invoice'AmpInvoiceStateEntry'_constructor {_Invoice'AmpInvoiceStateEntry'key :: !Data.Text.Text,
                                               _Invoice'AmpInvoiceStateEntry'value :: !(Prelude.Maybe AMPInvoiceState),
                                               _Invoice'AmpInvoiceStateEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show Invoice'AmpInvoiceStateEntry where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out Invoice'AmpInvoiceStateEntry
instance Data.ProtoLens.Field.HasField Invoice'AmpInvoiceStateEntry "key" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'AmpInvoiceStateEntry'key
           (\ x__ y__ -> x__ {_Invoice'AmpInvoiceStateEntry'key = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice'AmpInvoiceStateEntry "value" AMPInvoiceState where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'AmpInvoiceStateEntry'value
           (\ x__ y__ -> x__ {_Invoice'AmpInvoiceStateEntry'value = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Invoice'AmpInvoiceStateEntry "maybe'value" (Prelude.Maybe AMPInvoiceState) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'AmpInvoiceStateEntry'value
           (\ x__ y__ -> x__ {_Invoice'AmpInvoiceStateEntry'value = y__}))
        Prelude.id
instance Data.ProtoLens.Message Invoice'AmpInvoiceStateEntry where
  messageName _ = Data.Text.pack "lnrpc.Invoice.AmpInvoiceStateEntry"
  packedMessageDescriptor _
    = "\n\
      \\DC4AmpInvoiceStateEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2,\n\
      \\ENQvalue\CAN\STX \SOH(\v2\SYN.lnrpc.AMPInvoiceStateR\ENQvalue:\STX8\SOH"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        key__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "key"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor Invoice'AmpInvoiceStateEntry
        value__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "value"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor AMPInvoiceState)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'value")) ::
              Data.ProtoLens.FieldDescriptor Invoice'AmpInvoiceStateEntry
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, key__field_descriptor),
           (Data.ProtoLens.Tag 2, value__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _Invoice'AmpInvoiceStateEntry'_unknownFields
        (\ x__ y__
           -> x__ {_Invoice'AmpInvoiceStateEntry'_unknownFields = y__})
  defMessage
    = Invoice'AmpInvoiceStateEntry'_constructor
        {_Invoice'AmpInvoiceStateEntry'key = Data.ProtoLens.fieldDefault,
         _Invoice'AmpInvoiceStateEntry'value = Prelude.Nothing,
         _Invoice'AmpInvoiceStateEntry'_unknownFields = []}
  parseMessage
    = let
        loop ::
          Invoice'AmpInvoiceStateEntry
          -> Data.ProtoLens.Encoding.Bytes.Parser Invoice'AmpInvoiceStateEntry
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "key"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "value"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "AmpInvoiceStateEntry"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             ((Data.Monoid.<>)
                (case
                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'value") _x
                 of
                   Prelude.Nothing -> Data.Monoid.mempty
                   (Prelude.Just _v)
                     -> (Data.Monoid.<>)
                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((Prelude..)
                             (\ bs
                                -> (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                             Data.ProtoLens.encodeMessage _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData Invoice'AmpInvoiceStateEntry where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_Invoice'AmpInvoiceStateEntry'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_Invoice'AmpInvoiceStateEntry'key x__)
                (Control.DeepSeq.deepseq
                   (_Invoice'AmpInvoiceStateEntry'value x__) ()))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.key' @:: Lens' Invoice'FeaturesEntry Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.value' @:: Lens' Invoice'FeaturesEntry Proto.Lnrpc.Ln0.Feature@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'value' @:: Lens' Invoice'FeaturesEntry (Prelude.Maybe Proto.Lnrpc.Ln0.Feature)@ -}
data Invoice'FeaturesEntry
  = Invoice'FeaturesEntry'_constructor {_Invoice'FeaturesEntry'key :: !Data.Word.Word32,
                                        _Invoice'FeaturesEntry'value :: !(Prelude.Maybe Proto.Lnrpc.Ln0.Feature),
                                        _Invoice'FeaturesEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show Invoice'FeaturesEntry where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out Invoice'FeaturesEntry
instance Data.ProtoLens.Field.HasField Invoice'FeaturesEntry "key" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'FeaturesEntry'key
           (\ x__ y__ -> x__ {_Invoice'FeaturesEntry'key = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Invoice'FeaturesEntry "value" Proto.Lnrpc.Ln0.Feature where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'FeaturesEntry'value
           (\ x__ y__ -> x__ {_Invoice'FeaturesEntry'value = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Invoice'FeaturesEntry "maybe'value" (Prelude.Maybe Proto.Lnrpc.Ln0.Feature) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Invoice'FeaturesEntry'value
           (\ x__ y__ -> x__ {_Invoice'FeaturesEntry'value = y__}))
        Prelude.id
instance Data.ProtoLens.Message Invoice'FeaturesEntry where
  messageName _ = Data.Text.pack "lnrpc.Invoice.FeaturesEntry"
  packedMessageDescriptor _
    = "\n\
      \\rFeaturesEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC2$\n\
      \\ENQvalue\CAN\STX \SOH(\v2\SO.lnrpc.FeatureR\ENQvalue:\STX8\SOH"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        key__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "key"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor Invoice'FeaturesEntry
        value__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "value"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Lnrpc.Ln0.Feature)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'value")) ::
              Data.ProtoLens.FieldDescriptor Invoice'FeaturesEntry
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, key__field_descriptor),
           (Data.ProtoLens.Tag 2, value__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _Invoice'FeaturesEntry'_unknownFields
        (\ x__ y__ -> x__ {_Invoice'FeaturesEntry'_unknownFields = y__})
  defMessage
    = Invoice'FeaturesEntry'_constructor
        {_Invoice'FeaturesEntry'key = Data.ProtoLens.fieldDefault,
         _Invoice'FeaturesEntry'value = Prelude.Nothing,
         _Invoice'FeaturesEntry'_unknownFields = []}
  parseMessage
    = let
        loop ::
          Invoice'FeaturesEntry
          -> Data.ProtoLens.Encoding.Bytes.Parser Invoice'FeaturesEntry
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "key"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "value"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "FeaturesEntry"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Prelude..)
                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
             ((Data.Monoid.<>)
                (case
                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'value") _x
                 of
                   Prelude.Nothing -> Data.Monoid.mempty
                   (Prelude.Just _v)
                     -> (Data.Monoid.<>)
                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((Prelude..)
                             (\ bs
                                -> (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                             Data.ProtoLens.encodeMessage _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData Invoice'FeaturesEntry where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_Invoice'FeaturesEntry'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_Invoice'FeaturesEntry'key x__)
                (Control.DeepSeq.deepseq (_Invoice'FeaturesEntry'value x__) ()))
newtype Invoice'InvoiceState'UnrecognizedValue
  = Invoice'InvoiceState'UnrecognizedValue Data.Int.Int32
  deriving stock (Prelude.Eq,
                  Prelude.Ord,
                  Prelude.Show,
                  GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out Invoice'InvoiceState'UnrecognizedValue
data Invoice'InvoiceState
  = Invoice'OPEN |
    Invoice'SETTLED |
    Invoice'CANCELED |
    Invoice'ACCEPTED |
    Invoice'InvoiceState'Unrecognized !Invoice'InvoiceState'UnrecognizedValue
  deriving stock (Prelude.Show,
                  Prelude.Eq,
                  Prelude.Ord,
                  GHC.Generics.Generic)
instance Data.ProtoLens.MessageEnum Invoice'InvoiceState where
  maybeToEnum 0 = Prelude.Just Invoice'OPEN
  maybeToEnum 1 = Prelude.Just Invoice'SETTLED
  maybeToEnum 2 = Prelude.Just Invoice'CANCELED
  maybeToEnum 3 = Prelude.Just Invoice'ACCEPTED
  maybeToEnum k
    = Prelude.Just
        (Invoice'InvoiceState'Unrecognized
           (Invoice'InvoiceState'UnrecognizedValue (Prelude.fromIntegral k)))
  showEnum Invoice'OPEN = "OPEN"
  showEnum Invoice'SETTLED = "SETTLED"
  showEnum Invoice'CANCELED = "CANCELED"
  showEnum Invoice'ACCEPTED = "ACCEPTED"
  showEnum
    (Invoice'InvoiceState'Unrecognized (Invoice'InvoiceState'UnrecognizedValue k))
    = Prelude.show k
  readEnum k
    | (Prelude.==) k "OPEN" = Prelude.Just Invoice'OPEN
    | (Prelude.==) k "SETTLED" = Prelude.Just Invoice'SETTLED
    | (Prelude.==) k "CANCELED" = Prelude.Just Invoice'CANCELED
    | (Prelude.==) k "ACCEPTED" = Prelude.Just Invoice'ACCEPTED
    | Prelude.otherwise
    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
instance Prelude.Bounded Invoice'InvoiceState where
  minBound = Invoice'OPEN
  maxBound = Invoice'ACCEPTED
instance Prelude.Enum Invoice'InvoiceState where
  toEnum k__
    = Prelude.maybe
        (Prelude.error
           ((Prelude.++)
              "toEnum: unknown value for enum InvoiceState: "
              (Prelude.show k__)))
        Prelude.id (Data.ProtoLens.maybeToEnum k__)
  fromEnum Invoice'OPEN = 0
  fromEnum Invoice'SETTLED = 1
  fromEnum Invoice'CANCELED = 2
  fromEnum Invoice'ACCEPTED = 3
  fromEnum
    (Invoice'InvoiceState'Unrecognized (Invoice'InvoiceState'UnrecognizedValue k))
    = Prelude.fromIntegral k
  succ Invoice'ACCEPTED
    = Prelude.error
        "Invoice'InvoiceState.succ: bad argument Invoice'ACCEPTED. This value would be out of bounds."
  succ Invoice'OPEN = Invoice'SETTLED
  succ Invoice'SETTLED = Invoice'CANCELED
  succ Invoice'CANCELED = Invoice'ACCEPTED
  succ (Invoice'InvoiceState'Unrecognized _)
    = Prelude.error
        "Invoice'InvoiceState.succ: bad argument: unrecognized value"
  pred Invoice'OPEN
    = Prelude.error
        "Invoice'InvoiceState.pred: bad argument Invoice'OPEN. This value would be out of bounds."
  pred Invoice'SETTLED = Invoice'OPEN
  pred Invoice'CANCELED = Invoice'SETTLED
  pred Invoice'ACCEPTED = Invoice'CANCELED
  pred (Invoice'InvoiceState'Unrecognized _)
    = Prelude.error
        "Invoice'InvoiceState.pred: bad argument: unrecognized value"
  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault Invoice'InvoiceState where
  fieldDefault = Invoice'OPEN
instance Control.DeepSeq.NFData Invoice'InvoiceState where
  rnf x__ = Prelude.seq x__ ()
instance Text.PrettyPrint.GenericPretty.Out Invoice'InvoiceState
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.chanId' @:: Lens' InvoiceHTLC Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.htlcIndex' @:: Lens' InvoiceHTLC Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.amtMsat' @:: Lens' InvoiceHTLC Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.acceptHeight' @:: Lens' InvoiceHTLC Data.Int.Int32@
         * 'Proto.Lnrpc.Ln1_Fields.acceptTime' @:: Lens' InvoiceHTLC Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.resolveTime' @:: Lens' InvoiceHTLC Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.expiryHeight' @:: Lens' InvoiceHTLC Data.Int.Int32@
         * 'Proto.Lnrpc.Ln1_Fields.state' @:: Lens' InvoiceHTLC InvoiceHTLCState@
         * 'Proto.Lnrpc.Ln1_Fields.customRecords' @:: Lens' InvoiceHTLC (Data.Map.Map Data.Word.Word64 Data.ByteString.ByteString)@
         * 'Proto.Lnrpc.Ln1_Fields.mppTotalAmtMsat' @:: Lens' InvoiceHTLC Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.amp' @:: Lens' InvoiceHTLC AMP@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'amp' @:: Lens' InvoiceHTLC (Prelude.Maybe AMP)@ -}
data InvoiceHTLC
  = InvoiceHTLC'_constructor {_InvoiceHTLC'chanId :: !Data.Word.Word64,
                              _InvoiceHTLC'htlcIndex :: !Data.Word.Word64,
                              _InvoiceHTLC'amtMsat :: !Data.Word.Word64,
                              _InvoiceHTLC'acceptHeight :: !Data.Int.Int32,
                              _InvoiceHTLC'acceptTime :: !Data.Int.Int64,
                              _InvoiceHTLC'resolveTime :: !Data.Int.Int64,
                              _InvoiceHTLC'expiryHeight :: !Data.Int.Int32,
                              _InvoiceHTLC'state :: !InvoiceHTLCState,
                              _InvoiceHTLC'customRecords :: !(Data.Map.Map Data.Word.Word64 Data.ByteString.ByteString),
                              _InvoiceHTLC'mppTotalAmtMsat :: !Data.Word.Word64,
                              _InvoiceHTLC'amp :: !(Prelude.Maybe AMP),
                              _InvoiceHTLC'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show InvoiceHTLC where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out InvoiceHTLC
instance Data.ProtoLens.Field.HasField InvoiceHTLC "chanId" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'chanId (\ x__ y__ -> x__ {_InvoiceHTLC'chanId = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceHTLC "htlcIndex" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'htlcIndex
           (\ x__ y__ -> x__ {_InvoiceHTLC'htlcIndex = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceHTLC "amtMsat" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'amtMsat
           (\ x__ y__ -> x__ {_InvoiceHTLC'amtMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceHTLC "acceptHeight" Data.Int.Int32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'acceptHeight
           (\ x__ y__ -> x__ {_InvoiceHTLC'acceptHeight = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceHTLC "acceptTime" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'acceptTime
           (\ x__ y__ -> x__ {_InvoiceHTLC'acceptTime = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceHTLC "resolveTime" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'resolveTime
           (\ x__ y__ -> x__ {_InvoiceHTLC'resolveTime = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceHTLC "expiryHeight" Data.Int.Int32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'expiryHeight
           (\ x__ y__ -> x__ {_InvoiceHTLC'expiryHeight = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceHTLC "state" InvoiceHTLCState where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'state (\ x__ y__ -> x__ {_InvoiceHTLC'state = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceHTLC "customRecords" (Data.Map.Map Data.Word.Word64 Data.ByteString.ByteString) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'customRecords
           (\ x__ y__ -> x__ {_InvoiceHTLC'customRecords = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceHTLC "mppTotalAmtMsat" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'mppTotalAmtMsat
           (\ x__ y__ -> x__ {_InvoiceHTLC'mppTotalAmtMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceHTLC "amp" AMP where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'amp (\ x__ y__ -> x__ {_InvoiceHTLC'amp = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField InvoiceHTLC "maybe'amp" (Prelude.Maybe AMP) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'amp (\ x__ y__ -> x__ {_InvoiceHTLC'amp = y__}))
        Prelude.id
instance Data.ProtoLens.Message InvoiceHTLC where
  messageName _ = Data.Text.pack "lnrpc.InvoiceHTLC"
  packedMessageDescriptor _
    = "\n\
      \\vInvoiceHTLC\DC2\ESC\n\
      \\achan_id\CAN\SOH \SOH(\EOTR\ACKchanIdB\STX0\SOH\DC2\GS\n\
      \\n\
      \htlc_index\CAN\STX \SOH(\EOTR\thtlcIndex\DC2\EM\n\
      \\bamt_msat\CAN\ETX \SOH(\EOTR\aamtMsat\DC2#\n\
      \\raccept_height\CAN\EOT \SOH(\ENQR\facceptHeight\DC2\US\n\
      \\vaccept_time\CAN\ENQ \SOH(\ETXR\n\
      \acceptTime\DC2!\n\
      \\fresolve_time\CAN\ACK \SOH(\ETXR\vresolveTime\DC2#\n\
      \\rexpiry_height\CAN\a \SOH(\ENQR\fexpiryHeight\DC2-\n\
      \\ENQstate\CAN\b \SOH(\SO2\ETB.lnrpc.InvoiceHTLCStateR\ENQstate\DC2L\n\
      \\SOcustom_records\CAN\t \ETX(\v2%.lnrpc.InvoiceHTLC.CustomRecordsEntryR\rcustomRecords\DC2+\n\
      \\DC2mpp_total_amt_msat\CAN\n\
      \ \SOH(\EOTR\SImppTotalAmtMsat\DC2\FS\n\
      \\ETXamp\CAN\v \SOH(\v2\n\
      \.lnrpc.AMPR\ETXamp\SUB@\n\
      \\DC2CustomRecordsEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\EOTR\ETXkey\DC2\DC4\n\
      \\ENQvalue\CAN\STX \SOH(\fR\ENQvalue:\STX8\SOH"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        chanId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_id"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"chanId")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC
        htlcIndex__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "htlc_index"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"htlcIndex")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC
        amtMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "amt_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"amtMsat")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC
        acceptHeight__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "accept_height"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"acceptHeight")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC
        acceptTime__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "accept_time"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"acceptTime")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC
        resolveTime__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "resolve_time"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"resolveTime")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC
        expiryHeight__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "expiry_height"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"expiryHeight")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC
        state__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "state"
              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
                 Data.ProtoLens.FieldTypeDescriptor InvoiceHTLCState)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"state")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC
        customRecords__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "custom_records"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor InvoiceHTLC'CustomRecordsEntry)
              (Data.ProtoLens.MapField
                 (Data.ProtoLens.Field.field @"key")
                 (Data.ProtoLens.Field.field @"value")
                 (Data.ProtoLens.Field.field @"customRecords")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC
        mppTotalAmtMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "mpp_total_amt_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"mppTotalAmtMsat")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC
        amp__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "amp"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor AMP)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'amp")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, chanId__field_descriptor),
           (Data.ProtoLens.Tag 2, htlcIndex__field_descriptor),
           (Data.ProtoLens.Tag 3, amtMsat__field_descriptor),
           (Data.ProtoLens.Tag 4, acceptHeight__field_descriptor),
           (Data.ProtoLens.Tag 5, acceptTime__field_descriptor),
           (Data.ProtoLens.Tag 6, resolveTime__field_descriptor),
           (Data.ProtoLens.Tag 7, expiryHeight__field_descriptor),
           (Data.ProtoLens.Tag 8, state__field_descriptor),
           (Data.ProtoLens.Tag 9, customRecords__field_descriptor),
           (Data.ProtoLens.Tag 10, mppTotalAmtMsat__field_descriptor),
           (Data.ProtoLens.Tag 11, amp__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _InvoiceHTLC'_unknownFields
        (\ x__ y__ -> x__ {_InvoiceHTLC'_unknownFields = y__})
  defMessage
    = InvoiceHTLC'_constructor
        {_InvoiceHTLC'chanId = Data.ProtoLens.fieldDefault,
         _InvoiceHTLC'htlcIndex = Data.ProtoLens.fieldDefault,
         _InvoiceHTLC'amtMsat = Data.ProtoLens.fieldDefault,
         _InvoiceHTLC'acceptHeight = Data.ProtoLens.fieldDefault,
         _InvoiceHTLC'acceptTime = Data.ProtoLens.fieldDefault,
         _InvoiceHTLC'resolveTime = Data.ProtoLens.fieldDefault,
         _InvoiceHTLC'expiryHeight = Data.ProtoLens.fieldDefault,
         _InvoiceHTLC'state = Data.ProtoLens.fieldDefault,
         _InvoiceHTLC'customRecords = Data.Map.empty,
         _InvoiceHTLC'mppTotalAmtMsat = Data.ProtoLens.fieldDefault,
         _InvoiceHTLC'amp = Prelude.Nothing,
         _InvoiceHTLC'_unknownFields = []}
  parseMessage
    = let
        loop ::
          InvoiceHTLC -> Data.ProtoLens.Encoding.Bytes.Parser InvoiceHTLC
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "chan_id"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"chanId") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "htlc_index"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"htlcIndex") y x)
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "amt_msat"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"amtMsat") y x)
                        32
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "accept_height"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"acceptHeight") y x)
                        40
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "accept_time"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"acceptTime") y x)
                        48
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "resolve_time"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"resolveTime") y x)
                        56
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "expiry_height"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"expiryHeight") y x)
                        64
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.toEnum
                                          (Prelude.fmap
                                             Prelude.fromIntegral
                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
                                       "state"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"state") y x)
                        74
                          -> do !(entry :: InvoiceHTLC'CustomRecordsEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                                                                (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                                                    Data.ProtoLens.Encoding.Bytes.isolate
                                                                                      (Prelude.fromIntegral
                                                                                         len)
                                                                                      Data.ProtoLens.parseMessage)
                                                                                "custom_records"
                                (let
                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
                                   value
                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
                                 in
                                   loop
                                     (Lens.Family2.over
                                        (Data.ProtoLens.Field.field @"customRecords")
                                        (\ !t -> Data.Map.insert key value t) x))
                        80
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "mpp_total_amt_msat"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"mppTotalAmtMsat") y x)
                        90
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "amp"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"amp") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "InvoiceHTLC"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"chanId") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"htlcIndex") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                ((Data.Monoid.<>)
                   (let
                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"amtMsat") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                   ((Data.Monoid.<>)
                      (let
                         _v
                           = Lens.Family2.view (Data.ProtoLens.Field.field @"acceptHeight") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                               ((Prelude..)
                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                      ((Data.Monoid.<>)
                         (let
                            _v
                              = Lens.Family2.view (Data.ProtoLens.Field.field @"acceptTime") _x
                          in
                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                Data.Monoid.mempty
                            else
                                (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
                                  ((Prelude..)
                                     Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral
                                     _v))
                         ((Data.Monoid.<>)
                            (let
                               _v
                                 = Lens.Family2.view (Data.ProtoLens.Field.field @"resolveTime") _x
                             in
                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                   Data.Monoid.mempty
                               else
                                   (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 48)
                                     ((Prelude..)
                                        Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral
                                        _v))
                            ((Data.Monoid.<>)
                               (let
                                  _v
                                    = Lens.Family2.view
                                        (Data.ProtoLens.Field.field @"expiryHeight") _x
                                in
                                  if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                      Data.Monoid.mempty
                                  else
                                      (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt 56)
                                        ((Prelude..)
                                           Data.ProtoLens.Encoding.Bytes.putVarInt
                                           Prelude.fromIntegral _v))
                               ((Data.Monoid.<>)
                                  (let
                                     _v = Lens.Family2.view (Data.ProtoLens.Field.field @"state") _x
                                   in
                                     if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                         Data.Monoid.mempty
                                     else
                                         (Data.Monoid.<>)
                                           (Data.ProtoLens.Encoding.Bytes.putVarInt 64)
                                           ((Prelude..)
                                              ((Prelude..)
                                                 Data.ProtoLens.Encoding.Bytes.putVarInt
                                                 Prelude.fromIntegral)
                                              Prelude.fromEnum _v))
                                  ((Data.Monoid.<>)
                                     (Data.Monoid.mconcat
                                        (Prelude.map
                                           (\ _v
                                              -> (Data.Monoid.<>)
                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt 74)
                                                   ((Prelude..)
                                                      (\ bs
                                                         -> (Data.Monoid.<>)
                                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                 (Prelude.fromIntegral
                                                                    (Data.ByteString.length bs)))
                                                              (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                 bs))
                                                      Data.ProtoLens.encodeMessage
                                                      (Lens.Family2.set
                                                         (Data.ProtoLens.Field.field @"key")
                                                         (Prelude.fst _v)
                                                         (Lens.Family2.set
                                                            (Data.ProtoLens.Field.field @"value")
                                                            (Prelude.snd _v)
                                                            (Data.ProtoLens.defMessage ::
                                                               InvoiceHTLC'CustomRecordsEntry)))))
                                           (Data.Map.toList
                                              (Lens.Family2.view
                                                 (Data.ProtoLens.Field.field @"customRecords")
                                                 _x))))
                                     ((Data.Monoid.<>)
                                        (let
                                           _v
                                             = Lens.Family2.view
                                                 (Data.ProtoLens.Field.field @"mppTotalAmtMsat") _x
                                         in
                                           if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                               Data.Monoid.mempty
                                           else
                                               (Data.Monoid.<>)
                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 80)
                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                                        ((Data.Monoid.<>)
                                           (case
                                                Lens.Family2.view
                                                  (Data.ProtoLens.Field.field @"maybe'amp") _x
                                            of
                                              Prelude.Nothing -> Data.Monoid.mempty
                                              (Prelude.Just _v)
                                                -> (Data.Monoid.<>)
                                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 90)
                                                     ((Prelude..)
                                                        (\ bs
                                                           -> (Data.Monoid.<>)
                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                   (Prelude.fromIntegral
                                                                      (Data.ByteString.length bs)))
                                                                (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                   bs))
                                                        Data.ProtoLens.encodeMessage _v))
                                           (Data.ProtoLens.Encoding.Wire.buildFieldSet
                                              (Lens.Family2.view
                                                 Data.ProtoLens.unknownFields _x))))))))))))
instance Control.DeepSeq.NFData InvoiceHTLC where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_InvoiceHTLC'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_InvoiceHTLC'chanId x__)
                (Control.DeepSeq.deepseq
                   (_InvoiceHTLC'htlcIndex x__)
                   (Control.DeepSeq.deepseq
                      (_InvoiceHTLC'amtMsat x__)
                      (Control.DeepSeq.deepseq
                         (_InvoiceHTLC'acceptHeight x__)
                         (Control.DeepSeq.deepseq
                            (_InvoiceHTLC'acceptTime x__)
                            (Control.DeepSeq.deepseq
                               (_InvoiceHTLC'resolveTime x__)
                               (Control.DeepSeq.deepseq
                                  (_InvoiceHTLC'expiryHeight x__)
                                  (Control.DeepSeq.deepseq
                                     (_InvoiceHTLC'state x__)
                                     (Control.DeepSeq.deepseq
                                        (_InvoiceHTLC'customRecords x__)
                                        (Control.DeepSeq.deepseq
                                           (_InvoiceHTLC'mppTotalAmtMsat x__)
                                           (Control.DeepSeq.deepseq
                                              (_InvoiceHTLC'amp x__) ())))))))))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.key' @:: Lens' InvoiceHTLC'CustomRecordsEntry Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.value' @:: Lens' InvoiceHTLC'CustomRecordsEntry Data.ByteString.ByteString@ -}
data InvoiceHTLC'CustomRecordsEntry
  = InvoiceHTLC'CustomRecordsEntry'_constructor {_InvoiceHTLC'CustomRecordsEntry'key :: !Data.Word.Word64,
                                                 _InvoiceHTLC'CustomRecordsEntry'value :: !Data.ByteString.ByteString,
                                                 _InvoiceHTLC'CustomRecordsEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show InvoiceHTLC'CustomRecordsEntry where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out InvoiceHTLC'CustomRecordsEntry
instance Data.ProtoLens.Field.HasField InvoiceHTLC'CustomRecordsEntry "key" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'CustomRecordsEntry'key
           (\ x__ y__ -> x__ {_InvoiceHTLC'CustomRecordsEntry'key = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceHTLC'CustomRecordsEntry "value" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceHTLC'CustomRecordsEntry'value
           (\ x__ y__ -> x__ {_InvoiceHTLC'CustomRecordsEntry'value = y__}))
        Prelude.id
instance Data.ProtoLens.Message InvoiceHTLC'CustomRecordsEntry where
  messageName _
    = Data.Text.pack "lnrpc.InvoiceHTLC.CustomRecordsEntry"
  packedMessageDescriptor _
    = "\n\
      \\DC2CustomRecordsEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\EOTR\ETXkey\DC2\DC4\n\
      \\ENQvalue\CAN\STX \SOH(\fR\ENQvalue:\STX8\SOH"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        key__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "key"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC'CustomRecordsEntry
        value__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "value"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
              Data.ProtoLens.FieldDescriptor InvoiceHTLC'CustomRecordsEntry
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, key__field_descriptor),
           (Data.ProtoLens.Tag 2, value__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _InvoiceHTLC'CustomRecordsEntry'_unknownFields
        (\ x__ y__
           -> x__ {_InvoiceHTLC'CustomRecordsEntry'_unknownFields = y__})
  defMessage
    = InvoiceHTLC'CustomRecordsEntry'_constructor
        {_InvoiceHTLC'CustomRecordsEntry'key = Data.ProtoLens.fieldDefault,
         _InvoiceHTLC'CustomRecordsEntry'value = Data.ProtoLens.fieldDefault,
         _InvoiceHTLC'CustomRecordsEntry'_unknownFields = []}
  parseMessage
    = let
        loop ::
          InvoiceHTLC'CustomRecordsEntry
          -> Data.ProtoLens.Encoding.Bytes.Parser InvoiceHTLC'CustomRecordsEntry
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "key"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "value"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "CustomRecordsEntry"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData InvoiceHTLC'CustomRecordsEntry where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_InvoiceHTLC'CustomRecordsEntry'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_InvoiceHTLC'CustomRecordsEntry'key x__)
                (Control.DeepSeq.deepseq
                   (_InvoiceHTLC'CustomRecordsEntry'value x__) ()))
newtype InvoiceHTLCState'UnrecognizedValue
  = InvoiceHTLCState'UnrecognizedValue Data.Int.Int32
  deriving stock (Prelude.Eq,
                  Prelude.Ord,
                  Prelude.Show,
                  GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out InvoiceHTLCState'UnrecognizedValue
data InvoiceHTLCState
  = ACCEPTED |
    SETTLED |
    CANCELED |
    InvoiceHTLCState'Unrecognized !InvoiceHTLCState'UnrecognizedValue
  deriving stock (Prelude.Show,
                  Prelude.Eq,
                  Prelude.Ord,
                  GHC.Generics.Generic)
instance Data.ProtoLens.MessageEnum InvoiceHTLCState where
  maybeToEnum 0 = Prelude.Just ACCEPTED
  maybeToEnum 1 = Prelude.Just SETTLED
  maybeToEnum 2 = Prelude.Just CANCELED
  maybeToEnum k
    = Prelude.Just
        (InvoiceHTLCState'Unrecognized
           (InvoiceHTLCState'UnrecognizedValue (Prelude.fromIntegral k)))
  showEnum ACCEPTED = "ACCEPTED"
  showEnum SETTLED = "SETTLED"
  showEnum CANCELED = "CANCELED"
  showEnum
    (InvoiceHTLCState'Unrecognized (InvoiceHTLCState'UnrecognizedValue k))
    = Prelude.show k
  readEnum k
    | (Prelude.==) k "ACCEPTED" = Prelude.Just ACCEPTED
    | (Prelude.==) k "SETTLED" = Prelude.Just SETTLED
    | (Prelude.==) k "CANCELED" = Prelude.Just CANCELED
    | Prelude.otherwise
    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
instance Prelude.Bounded InvoiceHTLCState where
  minBound = ACCEPTED
  maxBound = CANCELED
instance Prelude.Enum InvoiceHTLCState where
  toEnum k__
    = Prelude.maybe
        (Prelude.error
           ((Prelude.++)
              "toEnum: unknown value for enum InvoiceHTLCState: "
              (Prelude.show k__)))
        Prelude.id (Data.ProtoLens.maybeToEnum k__)
  fromEnum ACCEPTED = 0
  fromEnum SETTLED = 1
  fromEnum CANCELED = 2
  fromEnum
    (InvoiceHTLCState'Unrecognized (InvoiceHTLCState'UnrecognizedValue k))
    = Prelude.fromIntegral k
  succ CANCELED
    = Prelude.error
        "InvoiceHTLCState.succ: bad argument CANCELED. This value would be out of bounds."
  succ ACCEPTED = SETTLED
  succ SETTLED = CANCELED
  succ (InvoiceHTLCState'Unrecognized _)
    = Prelude.error
        "InvoiceHTLCState.succ: bad argument: unrecognized value"
  pred ACCEPTED
    = Prelude.error
        "InvoiceHTLCState.pred: bad argument ACCEPTED. This value would be out of bounds."
  pred SETTLED = ACCEPTED
  pred CANCELED = SETTLED
  pred (InvoiceHTLCState'Unrecognized _)
    = Prelude.error
        "InvoiceHTLCState.pred: bad argument: unrecognized value"
  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault InvoiceHTLCState where
  fieldDefault = ACCEPTED
instance Control.DeepSeq.NFData InvoiceHTLCState where
  rnf x__ = Prelude.seq x__ ()
instance Text.PrettyPrint.GenericPretty.Out InvoiceHTLCState
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.addIndex' @:: Lens' InvoiceSubscription Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.settleIndex' @:: Lens' InvoiceSubscription Data.Word.Word64@ -}
data InvoiceSubscription
  = InvoiceSubscription'_constructor {_InvoiceSubscription'addIndex :: !Data.Word.Word64,
                                      _InvoiceSubscription'settleIndex :: !Data.Word.Word64,
                                      _InvoiceSubscription'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show InvoiceSubscription where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out InvoiceSubscription
instance Data.ProtoLens.Field.HasField InvoiceSubscription "addIndex" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceSubscription'addIndex
           (\ x__ y__ -> x__ {_InvoiceSubscription'addIndex = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField InvoiceSubscription "settleIndex" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _InvoiceSubscription'settleIndex
           (\ x__ y__ -> x__ {_InvoiceSubscription'settleIndex = y__}))
        Prelude.id
instance Data.ProtoLens.Message InvoiceSubscription where
  messageName _ = Data.Text.pack "lnrpc.InvoiceSubscription"
  packedMessageDescriptor _
    = "\n\
      \\DC3InvoiceSubscription\DC2\ESC\n\
      \\tadd_index\CAN\SOH \SOH(\EOTR\baddIndex\DC2!\n\
      \\fsettle_index\CAN\STX \SOH(\EOTR\vsettleIndex"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        addIndex__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "add_index"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"addIndex")) ::
              Data.ProtoLens.FieldDescriptor InvoiceSubscription
        settleIndex__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "settle_index"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"settleIndex")) ::
              Data.ProtoLens.FieldDescriptor InvoiceSubscription
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, addIndex__field_descriptor),
           (Data.ProtoLens.Tag 2, settleIndex__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _InvoiceSubscription'_unknownFields
        (\ x__ y__ -> x__ {_InvoiceSubscription'_unknownFields = y__})
  defMessage
    = InvoiceSubscription'_constructor
        {_InvoiceSubscription'addIndex = Data.ProtoLens.fieldDefault,
         _InvoiceSubscription'settleIndex = Data.ProtoLens.fieldDefault,
         _InvoiceSubscription'_unknownFields = []}
  parseMessage
    = let
        loop ::
          InvoiceSubscription
          -> Data.ProtoLens.Encoding.Bytes.Parser InvoiceSubscription
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "add_index"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"addIndex") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "settle_index"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"settleIndex") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "InvoiceSubscription"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"addIndex") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view (Data.ProtoLens.Field.field @"settleIndex") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData InvoiceSubscription where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_InvoiceSubscription'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_InvoiceSubscription'addIndex x__)
                (Control.DeepSeq.deepseq
                   (_InvoiceSubscription'settleIndex x__) ()))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.pendingOnly' @:: Lens' ListInvoiceRequest Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.indexOffset' @:: Lens' ListInvoiceRequest Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.numMaxInvoices' @:: Lens' ListInvoiceRequest Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.reversed' @:: Lens' ListInvoiceRequest Prelude.Bool@ -}
data ListInvoiceRequest
  = ListInvoiceRequest'_constructor {_ListInvoiceRequest'pendingOnly :: !Prelude.Bool,
                                     _ListInvoiceRequest'indexOffset :: !Data.Word.Word64,
                                     _ListInvoiceRequest'numMaxInvoices :: !Data.Word.Word64,
                                     _ListInvoiceRequest'reversed :: !Prelude.Bool,
                                     _ListInvoiceRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ListInvoiceRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ListInvoiceRequest
instance Data.ProtoLens.Field.HasField ListInvoiceRequest "pendingOnly" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListInvoiceRequest'pendingOnly
           (\ x__ y__ -> x__ {_ListInvoiceRequest'pendingOnly = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ListInvoiceRequest "indexOffset" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListInvoiceRequest'indexOffset
           (\ x__ y__ -> x__ {_ListInvoiceRequest'indexOffset = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ListInvoiceRequest "numMaxInvoices" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListInvoiceRequest'numMaxInvoices
           (\ x__ y__ -> x__ {_ListInvoiceRequest'numMaxInvoices = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ListInvoiceRequest "reversed" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListInvoiceRequest'reversed
           (\ x__ y__ -> x__ {_ListInvoiceRequest'reversed = y__}))
        Prelude.id
instance Data.ProtoLens.Message ListInvoiceRequest where
  messageName _ = Data.Text.pack "lnrpc.ListInvoiceRequest"
  packedMessageDescriptor _
    = "\n\
      \\DC2ListInvoiceRequest\DC2!\n\
      \\fpending_only\CAN\SOH \SOH(\bR\vpendingOnly\DC2!\n\
      \\findex_offset\CAN\EOT \SOH(\EOTR\vindexOffset\DC2(\n\
      \\DLEnum_max_invoices\CAN\ENQ \SOH(\EOTR\SOnumMaxInvoices\DC2\SUB\n\
      \\breversed\CAN\ACK \SOH(\bR\breversed"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        pendingOnly__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "pending_only"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"pendingOnly")) ::
              Data.ProtoLens.FieldDescriptor ListInvoiceRequest
        indexOffset__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "index_offset"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"indexOffset")) ::
              Data.ProtoLens.FieldDescriptor ListInvoiceRequest
        numMaxInvoices__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "num_max_invoices"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"numMaxInvoices")) ::
              Data.ProtoLens.FieldDescriptor ListInvoiceRequest
        reversed__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "reversed"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"reversed")) ::
              Data.ProtoLens.FieldDescriptor ListInvoiceRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, pendingOnly__field_descriptor),
           (Data.ProtoLens.Tag 4, indexOffset__field_descriptor),
           (Data.ProtoLens.Tag 5, numMaxInvoices__field_descriptor),
           (Data.ProtoLens.Tag 6, reversed__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ListInvoiceRequest'_unknownFields
        (\ x__ y__ -> x__ {_ListInvoiceRequest'_unknownFields = y__})
  defMessage
    = ListInvoiceRequest'_constructor
        {_ListInvoiceRequest'pendingOnly = Data.ProtoLens.fieldDefault,
         _ListInvoiceRequest'indexOffset = Data.ProtoLens.fieldDefault,
         _ListInvoiceRequest'numMaxInvoices = Data.ProtoLens.fieldDefault,
         _ListInvoiceRequest'reversed = Data.ProtoLens.fieldDefault,
         _ListInvoiceRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ListInvoiceRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser ListInvoiceRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "pending_only"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"pendingOnly") y x)
                        32
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "index_offset"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"indexOffset") y x)
                        40
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "num_max_invoices"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"numMaxInvoices") y x)
                        48
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "reversed"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"reversed") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ListInvoiceRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v
                  = Lens.Family2.view (Data.ProtoLens.Field.field @"pendingOnly") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Prelude..)
                         Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                         _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view (Data.ProtoLens.Field.field @"indexOffset") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view
                            (Data.ProtoLens.Field.field @"numMaxInvoices") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                   ((Data.Monoid.<>)
                      (let
                         _v = Lens.Family2.view (Data.ProtoLens.Field.field @"reversed") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 48)
                               ((Prelude..)
                                  Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (\ b -> if b then 1 else 0) _v))
                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
instance Control.DeepSeq.NFData ListInvoiceRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ListInvoiceRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ListInvoiceRequest'pendingOnly x__)
                (Control.DeepSeq.deepseq
                   (_ListInvoiceRequest'indexOffset x__)
                   (Control.DeepSeq.deepseq
                      (_ListInvoiceRequest'numMaxInvoices x__)
                      (Control.DeepSeq.deepseq (_ListInvoiceRequest'reversed x__) ()))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.invoices' @:: Lens' ListInvoiceResponse [Invoice]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'invoices' @:: Lens' ListInvoiceResponse (Data.Vector.Vector Invoice)@
         * 'Proto.Lnrpc.Ln1_Fields.lastIndexOffset' @:: Lens' ListInvoiceResponse Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.firstIndexOffset' @:: Lens' ListInvoiceResponse Data.Word.Word64@ -}
data ListInvoiceResponse
  = ListInvoiceResponse'_constructor {_ListInvoiceResponse'invoices :: !(Data.Vector.Vector Invoice),
                                      _ListInvoiceResponse'lastIndexOffset :: !Data.Word.Word64,
                                      _ListInvoiceResponse'firstIndexOffset :: !Data.Word.Word64,
                                      _ListInvoiceResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ListInvoiceResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ListInvoiceResponse
instance Data.ProtoLens.Field.HasField ListInvoiceResponse "invoices" [Invoice] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListInvoiceResponse'invoices
           (\ x__ y__ -> x__ {_ListInvoiceResponse'invoices = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField ListInvoiceResponse "vec'invoices" (Data.Vector.Vector Invoice) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListInvoiceResponse'invoices
           (\ x__ y__ -> x__ {_ListInvoiceResponse'invoices = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ListInvoiceResponse "lastIndexOffset" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListInvoiceResponse'lastIndexOffset
           (\ x__ y__ -> x__ {_ListInvoiceResponse'lastIndexOffset = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ListInvoiceResponse "firstIndexOffset" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListInvoiceResponse'firstIndexOffset
           (\ x__ y__ -> x__ {_ListInvoiceResponse'firstIndexOffset = y__}))
        Prelude.id
instance Data.ProtoLens.Message ListInvoiceResponse where
  messageName _ = Data.Text.pack "lnrpc.ListInvoiceResponse"
  packedMessageDescriptor _
    = "\n\
      \\DC3ListInvoiceResponse\DC2*\n\
      \\binvoices\CAN\SOH \ETX(\v2\SO.lnrpc.InvoiceR\binvoices\DC2*\n\
      \\DC1last_index_offset\CAN\STX \SOH(\EOTR\SIlastIndexOffset\DC2,\n\
      \\DC2first_index_offset\CAN\ETX \SOH(\EOTR\DLEfirstIndexOffset"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        invoices__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "invoices"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Invoice)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"invoices")) ::
              Data.ProtoLens.FieldDescriptor ListInvoiceResponse
        lastIndexOffset__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "last_index_offset"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"lastIndexOffset")) ::
              Data.ProtoLens.FieldDescriptor ListInvoiceResponse
        firstIndexOffset__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "first_index_offset"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"firstIndexOffset")) ::
              Data.ProtoLens.FieldDescriptor ListInvoiceResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, invoices__field_descriptor),
           (Data.ProtoLens.Tag 2, lastIndexOffset__field_descriptor),
           (Data.ProtoLens.Tag 3, firstIndexOffset__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ListInvoiceResponse'_unknownFields
        (\ x__ y__ -> x__ {_ListInvoiceResponse'_unknownFields = y__})
  defMessage
    = ListInvoiceResponse'_constructor
        {_ListInvoiceResponse'invoices = Data.Vector.Generic.empty,
         _ListInvoiceResponse'lastIndexOffset = Data.ProtoLens.fieldDefault,
         _ListInvoiceResponse'firstIndexOffset = Data.ProtoLens.fieldDefault,
         _ListInvoiceResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ListInvoiceResponse
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Invoice
             -> Data.ProtoLens.Encoding.Bytes.Parser ListInvoiceResponse
        loop x mutable'invoices
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'invoices <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                           (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                              mutable'invoices)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'invoices") frozen'invoices x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "invoices"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append mutable'invoices y)
                                loop x v
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "last_index_offset"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"lastIndexOffset") y x)
                                  mutable'invoices
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "first_index_offset"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"firstIndexOffset") y x)
                                  mutable'invoices
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'invoices
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'invoices <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                    Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'invoices)
          "ListInvoiceResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v
                   -> (Data.Monoid.<>)
                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((Prelude..)
                           (\ bs
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                      (Prelude.fromIntegral (Data.ByteString.length bs)))
                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                           Data.ProtoLens.encodeMessage _v))
                (Lens.Family2.view
                   (Data.ProtoLens.Field.field @"vec'invoices") _x))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view
                         (Data.ProtoLens.Field.field @"lastIndexOffset") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view
                            (Data.ProtoLens.Field.field @"firstIndexOffset") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
instance Control.DeepSeq.NFData ListInvoiceResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ListInvoiceResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ListInvoiceResponse'invoices x__)
                (Control.DeepSeq.deepseq
                   (_ListInvoiceResponse'lastIndexOffset x__)
                   (Control.DeepSeq.deepseq
                      (_ListInvoiceResponse'firstIndexOffset x__) ())))
{- | Fields :
      -}
data ListMacaroonIDsRequest
  = ListMacaroonIDsRequest'_constructor {_ListMacaroonIDsRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ListMacaroonIDsRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ListMacaroonIDsRequest
instance Data.ProtoLens.Message ListMacaroonIDsRequest where
  messageName _ = Data.Text.pack "lnrpc.ListMacaroonIDsRequest"
  packedMessageDescriptor _
    = "\n\
      \\SYNListMacaroonIDsRequest"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag = let in Data.Map.fromList []
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ListMacaroonIDsRequest'_unknownFields
        (\ x__ y__ -> x__ {_ListMacaroonIDsRequest'_unknownFields = y__})
  defMessage
    = ListMacaroonIDsRequest'_constructor
        {_ListMacaroonIDsRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ListMacaroonIDsRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser ListMacaroonIDsRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of {
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x) }
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ListMacaroonIDsRequest"
  buildMessage
    = \ _x
        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
instance Control.DeepSeq.NFData ListMacaroonIDsRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ListMacaroonIDsRequest'_unknownFields x__) ()
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.rootKeyIds' @:: Lens' ListMacaroonIDsResponse [Data.Word.Word64]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'rootKeyIds' @:: Lens' ListMacaroonIDsResponse (Data.Vector.Unboxed.Vector Data.Word.Word64)@ -}
data ListMacaroonIDsResponse
  = ListMacaroonIDsResponse'_constructor {_ListMacaroonIDsResponse'rootKeyIds :: !(Data.Vector.Unboxed.Vector Data.Word.Word64),
                                          _ListMacaroonIDsResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ListMacaroonIDsResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ListMacaroonIDsResponse
instance Data.ProtoLens.Field.HasField ListMacaroonIDsResponse "rootKeyIds" [Data.Word.Word64] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListMacaroonIDsResponse'rootKeyIds
           (\ x__ y__ -> x__ {_ListMacaroonIDsResponse'rootKeyIds = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField ListMacaroonIDsResponse "vec'rootKeyIds" (Data.Vector.Unboxed.Vector Data.Word.Word64) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListMacaroonIDsResponse'rootKeyIds
           (\ x__ y__ -> x__ {_ListMacaroonIDsResponse'rootKeyIds = y__}))
        Prelude.id
instance Data.ProtoLens.Message ListMacaroonIDsResponse where
  messageName _ = Data.Text.pack "lnrpc.ListMacaroonIDsResponse"
  packedMessageDescriptor _
    = "\n\
      \\ETBListMacaroonIDsResponse\DC2 \n\
      \\froot_key_ids\CAN\SOH \ETX(\EOTR\n\
      \rootKeyIds"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        rootKeyIds__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "root_key_ids"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Packed
                 (Data.ProtoLens.Field.field @"rootKeyIds")) ::
              Data.ProtoLens.FieldDescriptor ListMacaroonIDsResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, rootKeyIds__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ListMacaroonIDsResponse'_unknownFields
        (\ x__ y__ -> x__ {_ListMacaroonIDsResponse'_unknownFields = y__})
  defMessage
    = ListMacaroonIDsResponse'_constructor
        {_ListMacaroonIDsResponse'rootKeyIds = Data.Vector.Generic.empty,
         _ListMacaroonIDsResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ListMacaroonIDsResponse
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Word.Word64
             -> Data.ProtoLens.Encoding.Bytes.Parser ListMacaroonIDsResponse
        loop x mutable'rootKeyIds
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'rootKeyIds <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                             (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                mutable'rootKeyIds)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'rootKeyIds") frozen'rootKeyIds
                              x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        Data.ProtoLens.Encoding.Bytes.getVarInt "root_key_ids"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append mutable'rootKeyIds y)
                                loop x v
                        10
                          -> do y <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                        Data.ProtoLens.Encoding.Bytes.isolate
                                          (Prelude.fromIntegral len)
                                          ((let
                                              ploop qs
                                                = do packedEnd <- Data.ProtoLens.Encoding.Bytes.atEnd
                                                     if packedEnd then
                                                         Prelude.return qs
                                                     else
                                                         do !q <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                                                    Data.ProtoLens.Encoding.Bytes.getVarInt
                                                                    "root_key_ids"
                                                            qs' <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                                                     (Data.ProtoLens.Encoding.Growing.append
                                                                        qs q)
                                                            ploop qs'
                                            in ploop)
                                             mutable'rootKeyIds)
                                loop x y
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'rootKeyIds
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'rootKeyIds <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                      Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'rootKeyIds)
          "ListMacaroonIDsResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                p = Lens.Family2.view
                      (Data.ProtoLens.Field.field @"vec'rootKeyIds") _x
              in
                if Data.Vector.Generic.null p then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs
                          -> (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         (Data.ProtoLens.Encoding.Bytes.runBuilder
                            (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                               Data.ProtoLens.Encoding.Bytes.putVarInt p))))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData ListMacaroonIDsResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ListMacaroonIDsResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ListMacaroonIDsResponse'rootKeyIds x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.includeIncomplete' @:: Lens' ListPaymentsRequest Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.indexOffset' @:: Lens' ListPaymentsRequest Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.maxPayments' @:: Lens' ListPaymentsRequest Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.reversed' @:: Lens' ListPaymentsRequest Prelude.Bool@ -}
data ListPaymentsRequest
  = ListPaymentsRequest'_constructor {_ListPaymentsRequest'includeIncomplete :: !Prelude.Bool,
                                      _ListPaymentsRequest'indexOffset :: !Data.Word.Word64,
                                      _ListPaymentsRequest'maxPayments :: !Data.Word.Word64,
                                      _ListPaymentsRequest'reversed :: !Prelude.Bool,
                                      _ListPaymentsRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ListPaymentsRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ListPaymentsRequest
instance Data.ProtoLens.Field.HasField ListPaymentsRequest "includeIncomplete" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPaymentsRequest'includeIncomplete
           (\ x__ y__ -> x__ {_ListPaymentsRequest'includeIncomplete = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ListPaymentsRequest "indexOffset" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPaymentsRequest'indexOffset
           (\ x__ y__ -> x__ {_ListPaymentsRequest'indexOffset = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ListPaymentsRequest "maxPayments" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPaymentsRequest'maxPayments
           (\ x__ y__ -> x__ {_ListPaymentsRequest'maxPayments = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ListPaymentsRequest "reversed" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPaymentsRequest'reversed
           (\ x__ y__ -> x__ {_ListPaymentsRequest'reversed = y__}))
        Prelude.id
instance Data.ProtoLens.Message ListPaymentsRequest where
  messageName _ = Data.Text.pack "lnrpc.ListPaymentsRequest"
  packedMessageDescriptor _
    = "\n\
      \\DC3ListPaymentsRequest\DC2-\n\
      \\DC2include_incomplete\CAN\SOH \SOH(\bR\DC1includeIncomplete\DC2!\n\
      \\findex_offset\CAN\STX \SOH(\EOTR\vindexOffset\DC2!\n\
      \\fmax_payments\CAN\ETX \SOH(\EOTR\vmaxPayments\DC2\SUB\n\
      \\breversed\CAN\EOT \SOH(\bR\breversed"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        includeIncomplete__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "include_incomplete"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"includeIncomplete")) ::
              Data.ProtoLens.FieldDescriptor ListPaymentsRequest
        indexOffset__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "index_offset"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"indexOffset")) ::
              Data.ProtoLens.FieldDescriptor ListPaymentsRequest
        maxPayments__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "max_payments"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"maxPayments")) ::
              Data.ProtoLens.FieldDescriptor ListPaymentsRequest
        reversed__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "reversed"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"reversed")) ::
              Data.ProtoLens.FieldDescriptor ListPaymentsRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, includeIncomplete__field_descriptor),
           (Data.ProtoLens.Tag 2, indexOffset__field_descriptor),
           (Data.ProtoLens.Tag 3, maxPayments__field_descriptor),
           (Data.ProtoLens.Tag 4, reversed__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ListPaymentsRequest'_unknownFields
        (\ x__ y__ -> x__ {_ListPaymentsRequest'_unknownFields = y__})
  defMessage
    = ListPaymentsRequest'_constructor
        {_ListPaymentsRequest'includeIncomplete = Data.ProtoLens.fieldDefault,
         _ListPaymentsRequest'indexOffset = Data.ProtoLens.fieldDefault,
         _ListPaymentsRequest'maxPayments = Data.ProtoLens.fieldDefault,
         _ListPaymentsRequest'reversed = Data.ProtoLens.fieldDefault,
         _ListPaymentsRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ListPaymentsRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser ListPaymentsRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "include_incomplete"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"includeIncomplete") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "index_offset"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"indexOffset") y x)
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "max_payments"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"maxPayments") y x)
                        32
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "reversed"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"reversed") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ListPaymentsRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v
                  = Lens.Family2.view
                      (Data.ProtoLens.Field.field @"includeIncomplete") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Prelude..)
                         Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                         _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view (Data.ProtoLens.Field.field @"indexOffset") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view (Data.ProtoLens.Field.field @"maxPayments") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                   ((Data.Monoid.<>)
                      (let
                         _v = Lens.Family2.view (Data.ProtoLens.Field.field @"reversed") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                               ((Prelude..)
                                  Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (\ b -> if b then 1 else 0) _v))
                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
instance Control.DeepSeq.NFData ListPaymentsRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ListPaymentsRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ListPaymentsRequest'includeIncomplete x__)
                (Control.DeepSeq.deepseq
                   (_ListPaymentsRequest'indexOffset x__)
                   (Control.DeepSeq.deepseq
                      (_ListPaymentsRequest'maxPayments x__)
                      (Control.DeepSeq.deepseq (_ListPaymentsRequest'reversed x__) ()))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.payments' @:: Lens' ListPaymentsResponse [Payment]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'payments' @:: Lens' ListPaymentsResponse (Data.Vector.Vector Payment)@
         * 'Proto.Lnrpc.Ln1_Fields.firstIndexOffset' @:: Lens' ListPaymentsResponse Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.lastIndexOffset' @:: Lens' ListPaymentsResponse Data.Word.Word64@ -}
data ListPaymentsResponse
  = ListPaymentsResponse'_constructor {_ListPaymentsResponse'payments :: !(Data.Vector.Vector Payment),
                                       _ListPaymentsResponse'firstIndexOffset :: !Data.Word.Word64,
                                       _ListPaymentsResponse'lastIndexOffset :: !Data.Word.Word64,
                                       _ListPaymentsResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ListPaymentsResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ListPaymentsResponse
instance Data.ProtoLens.Field.HasField ListPaymentsResponse "payments" [Payment] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPaymentsResponse'payments
           (\ x__ y__ -> x__ {_ListPaymentsResponse'payments = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField ListPaymentsResponse "vec'payments" (Data.Vector.Vector Payment) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPaymentsResponse'payments
           (\ x__ y__ -> x__ {_ListPaymentsResponse'payments = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ListPaymentsResponse "firstIndexOffset" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPaymentsResponse'firstIndexOffset
           (\ x__ y__ -> x__ {_ListPaymentsResponse'firstIndexOffset = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ListPaymentsResponse "lastIndexOffset" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPaymentsResponse'lastIndexOffset
           (\ x__ y__ -> x__ {_ListPaymentsResponse'lastIndexOffset = y__}))
        Prelude.id
instance Data.ProtoLens.Message ListPaymentsResponse where
  messageName _ = Data.Text.pack "lnrpc.ListPaymentsResponse"
  packedMessageDescriptor _
    = "\n\
      \\DC4ListPaymentsResponse\DC2*\n\
      \\bpayments\CAN\SOH \ETX(\v2\SO.lnrpc.PaymentR\bpayments\DC2,\n\
      \\DC2first_index_offset\CAN\STX \SOH(\EOTR\DLEfirstIndexOffset\DC2*\n\
      \\DC1last_index_offset\CAN\ETX \SOH(\EOTR\SIlastIndexOffset"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        payments__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payments"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Payment)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"payments")) ::
              Data.ProtoLens.FieldDescriptor ListPaymentsResponse
        firstIndexOffset__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "first_index_offset"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"firstIndexOffset")) ::
              Data.ProtoLens.FieldDescriptor ListPaymentsResponse
        lastIndexOffset__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "last_index_offset"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"lastIndexOffset")) ::
              Data.ProtoLens.FieldDescriptor ListPaymentsResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, payments__field_descriptor),
           (Data.ProtoLens.Tag 2, firstIndexOffset__field_descriptor),
           (Data.ProtoLens.Tag 3, lastIndexOffset__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ListPaymentsResponse'_unknownFields
        (\ x__ y__ -> x__ {_ListPaymentsResponse'_unknownFields = y__})
  defMessage
    = ListPaymentsResponse'_constructor
        {_ListPaymentsResponse'payments = Data.Vector.Generic.empty,
         _ListPaymentsResponse'firstIndexOffset = Data.ProtoLens.fieldDefault,
         _ListPaymentsResponse'lastIndexOffset = Data.ProtoLens.fieldDefault,
         _ListPaymentsResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ListPaymentsResponse
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Payment
             -> Data.ProtoLens.Encoding.Bytes.Parser ListPaymentsResponse
        loop x mutable'payments
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'payments <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                           (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                              mutable'payments)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'payments") frozen'payments x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "payments"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append mutable'payments y)
                                loop x v
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "first_index_offset"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"firstIndexOffset") y x)
                                  mutable'payments
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "last_index_offset"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"lastIndexOffset") y x)
                                  mutable'payments
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'payments
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'payments <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                    Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'payments)
          "ListPaymentsResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v
                   -> (Data.Monoid.<>)
                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((Prelude..)
                           (\ bs
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                      (Prelude.fromIntegral (Data.ByteString.length bs)))
                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                           Data.ProtoLens.encodeMessage _v))
                (Lens.Family2.view
                   (Data.ProtoLens.Field.field @"vec'payments") _x))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view
                         (Data.ProtoLens.Field.field @"firstIndexOffset") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view
                            (Data.ProtoLens.Field.field @"lastIndexOffset") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
instance Control.DeepSeq.NFData ListPaymentsResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ListPaymentsResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ListPaymentsResponse'payments x__)
                (Control.DeepSeq.deepseq
                   (_ListPaymentsResponse'firstIndexOffset x__)
                   (Control.DeepSeq.deepseq
                      (_ListPaymentsResponse'lastIndexOffset x__) ())))
{- | Fields :
      -}
data ListPermissionsRequest
  = ListPermissionsRequest'_constructor {_ListPermissionsRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ListPermissionsRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ListPermissionsRequest
instance Data.ProtoLens.Message ListPermissionsRequest where
  messageName _ = Data.Text.pack "lnrpc.ListPermissionsRequest"
  packedMessageDescriptor _
    = "\n\
      \\SYNListPermissionsRequest"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag = let in Data.Map.fromList []
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ListPermissionsRequest'_unknownFields
        (\ x__ y__ -> x__ {_ListPermissionsRequest'_unknownFields = y__})
  defMessage
    = ListPermissionsRequest'_constructor
        {_ListPermissionsRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ListPermissionsRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser ListPermissionsRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of {
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x) }
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ListPermissionsRequest"
  buildMessage
    = \ _x
        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
instance Control.DeepSeq.NFData ListPermissionsRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ListPermissionsRequest'_unknownFields x__) ()
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.methodPermissions' @:: Lens' ListPermissionsResponse (Data.Map.Map Data.Text.Text MacaroonPermissionList)@ -}
data ListPermissionsResponse
  = ListPermissionsResponse'_constructor {_ListPermissionsResponse'methodPermissions :: !(Data.Map.Map Data.Text.Text MacaroonPermissionList),
                                          _ListPermissionsResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ListPermissionsResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ListPermissionsResponse
instance Data.ProtoLens.Field.HasField ListPermissionsResponse "methodPermissions" (Data.Map.Map Data.Text.Text MacaroonPermissionList) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPermissionsResponse'methodPermissions
           (\ x__ y__
              -> x__ {_ListPermissionsResponse'methodPermissions = y__}))
        Prelude.id
instance Data.ProtoLens.Message ListPermissionsResponse where
  messageName _ = Data.Text.pack "lnrpc.ListPermissionsResponse"
  packedMessageDescriptor _
    = "\n\
      \\ETBListPermissionsResponse\DC2d\n\
      \\DC2method_permissions\CAN\SOH \ETX(\v25.lnrpc.ListPermissionsResponse.MethodPermissionsEntryR\DC1methodPermissions\SUBc\n\
      \\SYNMethodPermissionsEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC23\n\
      \\ENQvalue\CAN\STX \SOH(\v2\GS.lnrpc.MacaroonPermissionListR\ENQvalue:\STX8\SOH"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        methodPermissions__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "method_permissions"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor ListPermissionsResponse'MethodPermissionsEntry)
              (Data.ProtoLens.MapField
                 (Data.ProtoLens.Field.field @"key")
                 (Data.ProtoLens.Field.field @"value")
                 (Data.ProtoLens.Field.field @"methodPermissions")) ::
              Data.ProtoLens.FieldDescriptor ListPermissionsResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, methodPermissions__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ListPermissionsResponse'_unknownFields
        (\ x__ y__ -> x__ {_ListPermissionsResponse'_unknownFields = y__})
  defMessage
    = ListPermissionsResponse'_constructor
        {_ListPermissionsResponse'methodPermissions = Data.Map.empty,
         _ListPermissionsResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ListPermissionsResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser ListPermissionsResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do !(entry :: ListPermissionsResponse'MethodPermissionsEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                                                                                (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                                                                    Data.ProtoLens.Encoding.Bytes.isolate
                                                                                                      (Prelude.fromIntegral
                                                                                                         len)
                                                                                                      Data.ProtoLens.parseMessage)
                                                                                                "method_permissions"
                                (let
                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
                                   value
                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
                                 in
                                   loop
                                     (Lens.Family2.over
                                        (Data.ProtoLens.Field.field @"methodPermissions")
                                        (\ !t -> Data.Map.insert key value t) x))
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "ListPermissionsResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (Data.Monoid.mconcat
                (Prelude.map
                   (\ _v
                      -> (Data.Monoid.<>)
                           (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                           ((Prelude..)
                              (\ bs
                                 -> (Data.Monoid.<>)
                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
                                         (Prelude.fromIntegral (Data.ByteString.length bs)))
                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                              Data.ProtoLens.encodeMessage
                              (Lens.Family2.set
                                 (Data.ProtoLens.Field.field @"key") (Prelude.fst _v)
                                 (Lens.Family2.set
                                    (Data.ProtoLens.Field.field @"value") (Prelude.snd _v)
                                    (Data.ProtoLens.defMessage ::
                                       ListPermissionsResponse'MethodPermissionsEntry)))))
                   (Data.Map.toList
                      (Lens.Family2.view
                         (Data.ProtoLens.Field.field @"methodPermissions") _x))))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData ListPermissionsResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ListPermissionsResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_ListPermissionsResponse'methodPermissions x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.key' @:: Lens' ListPermissionsResponse'MethodPermissionsEntry Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.value' @:: Lens' ListPermissionsResponse'MethodPermissionsEntry MacaroonPermissionList@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'value' @:: Lens' ListPermissionsResponse'MethodPermissionsEntry (Prelude.Maybe MacaroonPermissionList)@ -}
data ListPermissionsResponse'MethodPermissionsEntry
  = ListPermissionsResponse'MethodPermissionsEntry'_constructor {_ListPermissionsResponse'MethodPermissionsEntry'key :: !Data.Text.Text,
                                                                 _ListPermissionsResponse'MethodPermissionsEntry'value :: !(Prelude.Maybe MacaroonPermissionList),
                                                                 _ListPermissionsResponse'MethodPermissionsEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show ListPermissionsResponse'MethodPermissionsEntry where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out ListPermissionsResponse'MethodPermissionsEntry
instance Data.ProtoLens.Field.HasField ListPermissionsResponse'MethodPermissionsEntry "key" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPermissionsResponse'MethodPermissionsEntry'key
           (\ x__ y__
              -> x__
                   {_ListPermissionsResponse'MethodPermissionsEntry'key = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField ListPermissionsResponse'MethodPermissionsEntry "value" MacaroonPermissionList where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPermissionsResponse'MethodPermissionsEntry'value
           (\ x__ y__
              -> x__
                   {_ListPermissionsResponse'MethodPermissionsEntry'value = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ListPermissionsResponse'MethodPermissionsEntry "maybe'value" (Prelude.Maybe MacaroonPermissionList) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _ListPermissionsResponse'MethodPermissionsEntry'value
           (\ x__ y__
              -> x__
                   {_ListPermissionsResponse'MethodPermissionsEntry'value = y__}))
        Prelude.id
instance Data.ProtoLens.Message ListPermissionsResponse'MethodPermissionsEntry where
  messageName _
    = Data.Text.pack
        "lnrpc.ListPermissionsResponse.MethodPermissionsEntry"
  packedMessageDescriptor _
    = "\n\
      \\SYNMethodPermissionsEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC23\n\
      \\ENQvalue\CAN\STX \SOH(\v2\GS.lnrpc.MacaroonPermissionListR\ENQvalue:\STX8\SOH"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        key__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "key"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor ListPermissionsResponse'MethodPermissionsEntry
        value__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "value"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor MacaroonPermissionList)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'value")) ::
              Data.ProtoLens.FieldDescriptor ListPermissionsResponse'MethodPermissionsEntry
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, key__field_descriptor),
           (Data.ProtoLens.Tag 2, value__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _ListPermissionsResponse'MethodPermissionsEntry'_unknownFields
        (\ x__ y__
           -> x__
                {_ListPermissionsResponse'MethodPermissionsEntry'_unknownFields = y__})
  defMessage
    = ListPermissionsResponse'MethodPermissionsEntry'_constructor
        {_ListPermissionsResponse'MethodPermissionsEntry'key = Data.ProtoLens.fieldDefault,
         _ListPermissionsResponse'MethodPermissionsEntry'value = Prelude.Nothing,
         _ListPermissionsResponse'MethodPermissionsEntry'_unknownFields = []}
  parseMessage
    = let
        loop ::
          ListPermissionsResponse'MethodPermissionsEntry
          -> Data.ProtoLens.Encoding.Bytes.Parser ListPermissionsResponse'MethodPermissionsEntry
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "key"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "value"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "MethodPermissionsEntry"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             ((Data.Monoid.<>)
                (case
                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'value") _x
                 of
                   Prelude.Nothing -> Data.Monoid.mempty
                   (Prelude.Just _v)
                     -> (Data.Monoid.<>)
                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((Prelude..)
                             (\ bs
                                -> (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                             Data.ProtoLens.encodeMessage _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData ListPermissionsResponse'MethodPermissionsEntry where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_ListPermissionsResponse'MethodPermissionsEntry'_unknownFields
                x__)
             (Control.DeepSeq.deepseq
                (_ListPermissionsResponse'MethodPermissionsEntry'key x__)
                (Control.DeepSeq.deepseq
                   (_ListPermissionsResponse'MethodPermissionsEntry'value x__) ()))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.nonce' @:: Lens' MacaroonId Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.storageId' @:: Lens' MacaroonId Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.ops' @:: Lens' MacaroonId [Op]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'ops' @:: Lens' MacaroonId (Data.Vector.Vector Op)@ -}
data MacaroonId
  = MacaroonId'_constructor {_MacaroonId'nonce :: !Data.ByteString.ByteString,
                             _MacaroonId'storageId :: !Data.ByteString.ByteString,
                             _MacaroonId'ops :: !(Data.Vector.Vector Op),
                             _MacaroonId'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show MacaroonId where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out MacaroonId
instance Data.ProtoLens.Field.HasField MacaroonId "nonce" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MacaroonId'nonce (\ x__ y__ -> x__ {_MacaroonId'nonce = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField MacaroonId "storageId" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MacaroonId'storageId
           (\ x__ y__ -> x__ {_MacaroonId'storageId = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField MacaroonId "ops" [Op] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MacaroonId'ops (\ x__ y__ -> x__ {_MacaroonId'ops = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField MacaroonId "vec'ops" (Data.Vector.Vector Op) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MacaroonId'ops (\ x__ y__ -> x__ {_MacaroonId'ops = y__}))
        Prelude.id
instance Data.ProtoLens.Message MacaroonId where
  messageName _ = Data.Text.pack "lnrpc.MacaroonId"
  packedMessageDescriptor _
    = "\n\
      \\n\
      \MacaroonId\DC2\DC4\n\
      \\ENQnonce\CAN\SOH \SOH(\fR\ENQnonce\DC2\FS\n\
      \\tstorageId\CAN\STX \SOH(\fR\tstorageId\DC2\ESC\n\
      \\ETXops\CAN\ETX \ETX(\v2\t.lnrpc.OpR\ETXops"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        nonce__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "nonce"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"nonce")) ::
              Data.ProtoLens.FieldDescriptor MacaroonId
        storageId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "storageId"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"storageId")) ::
              Data.ProtoLens.FieldDescriptor MacaroonId
        ops__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "ops"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Op)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"ops")) ::
              Data.ProtoLens.FieldDescriptor MacaroonId
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, nonce__field_descriptor),
           (Data.ProtoLens.Tag 2, storageId__field_descriptor),
           (Data.ProtoLens.Tag 3, ops__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _MacaroonId'_unknownFields
        (\ x__ y__ -> x__ {_MacaroonId'_unknownFields = y__})
  defMessage
    = MacaroonId'_constructor
        {_MacaroonId'nonce = Data.ProtoLens.fieldDefault,
         _MacaroonId'storageId = Data.ProtoLens.fieldDefault,
         _MacaroonId'ops = Data.Vector.Generic.empty,
         _MacaroonId'_unknownFields = []}
  parseMessage
    = let
        loop ::
          MacaroonId
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Op
             -> Data.ProtoLens.Encoding.Bytes.Parser MacaroonId
        loop x mutable'ops
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'ops <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                      (Data.ProtoLens.Encoding.Growing.unsafeFreeze mutable'ops)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'ops") frozen'ops x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "nonce"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"nonce") y x)
                                  mutable'ops
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "storageId"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"storageId") y x)
                                  mutable'ops
                        26
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "ops"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append mutable'ops y)
                                loop x v
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'ops
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'ops <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                               Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'ops)
          "MacaroonId"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"nonce") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs
                          -> (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"storageId") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            _v))
                ((Data.Monoid.<>)
                   (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                      (\ _v
                         -> (Data.Monoid.<>)
                              (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                              ((Prelude..)
                                 (\ bs
                                    -> (Data.Monoid.<>)
                                         (Data.ProtoLens.Encoding.Bytes.putVarInt
                                            (Prelude.fromIntegral (Data.ByteString.length bs)))
                                         (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                 Data.ProtoLens.encodeMessage _v))
                      (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'ops") _x))
                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
instance Control.DeepSeq.NFData MacaroonId where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_MacaroonId'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_MacaroonId'nonce x__)
                (Control.DeepSeq.deepseq
                   (_MacaroonId'storageId x__)
                   (Control.DeepSeq.deepseq (_MacaroonId'ops x__) ())))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.entity' @:: Lens' MacaroonPermission Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.action' @:: Lens' MacaroonPermission Data.Text.Text@ -}
data MacaroonPermission
  = MacaroonPermission'_constructor {_MacaroonPermission'entity :: !Data.Text.Text,
                                     _MacaroonPermission'action :: !Data.Text.Text,
                                     _MacaroonPermission'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show MacaroonPermission where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out MacaroonPermission
instance Data.ProtoLens.Field.HasField MacaroonPermission "entity" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MacaroonPermission'entity
           (\ x__ y__ -> x__ {_MacaroonPermission'entity = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField MacaroonPermission "action" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MacaroonPermission'action
           (\ x__ y__ -> x__ {_MacaroonPermission'action = y__}))
        Prelude.id
instance Data.ProtoLens.Message MacaroonPermission where
  messageName _ = Data.Text.pack "lnrpc.MacaroonPermission"
  packedMessageDescriptor _
    = "\n\
      \\DC2MacaroonPermission\DC2\SYN\n\
      \\ACKentity\CAN\SOH \SOH(\tR\ACKentity\DC2\SYN\n\
      \\ACKaction\CAN\STX \SOH(\tR\ACKaction"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        entity__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "entity"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"entity")) ::
              Data.ProtoLens.FieldDescriptor MacaroonPermission
        action__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "action"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"action")) ::
              Data.ProtoLens.FieldDescriptor MacaroonPermission
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, entity__field_descriptor),
           (Data.ProtoLens.Tag 2, action__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _MacaroonPermission'_unknownFields
        (\ x__ y__ -> x__ {_MacaroonPermission'_unknownFields = y__})
  defMessage
    = MacaroonPermission'_constructor
        {_MacaroonPermission'entity = Data.ProtoLens.fieldDefault,
         _MacaroonPermission'action = Data.ProtoLens.fieldDefault,
         _MacaroonPermission'_unknownFields = []}
  parseMessage
    = let
        loop ::
          MacaroonPermission
          -> Data.ProtoLens.Encoding.Bytes.Parser MacaroonPermission
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "entity"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"entity") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "action"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"action") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "MacaroonPermission"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"entity") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"action") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((Prelude..)
                            (\ bs
                               -> (Data.Monoid.<>)
                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            Data.Text.Encoding.encodeUtf8 _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData MacaroonPermission where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_MacaroonPermission'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_MacaroonPermission'entity x__)
                (Control.DeepSeq.deepseq (_MacaroonPermission'action x__) ()))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.permissions' @:: Lens' MacaroonPermissionList [MacaroonPermission]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'permissions' @:: Lens' MacaroonPermissionList (Data.Vector.Vector MacaroonPermission)@ -}
data MacaroonPermissionList
  = MacaroonPermissionList'_constructor {_MacaroonPermissionList'permissions :: !(Data.Vector.Vector MacaroonPermission),
                                         _MacaroonPermissionList'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show MacaroonPermissionList where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out MacaroonPermissionList
instance Data.ProtoLens.Field.HasField MacaroonPermissionList "permissions" [MacaroonPermission] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MacaroonPermissionList'permissions
           (\ x__ y__ -> x__ {_MacaroonPermissionList'permissions = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField MacaroonPermissionList "vec'permissions" (Data.Vector.Vector MacaroonPermission) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MacaroonPermissionList'permissions
           (\ x__ y__ -> x__ {_MacaroonPermissionList'permissions = y__}))
        Prelude.id
instance Data.ProtoLens.Message MacaroonPermissionList where
  messageName _ = Data.Text.pack "lnrpc.MacaroonPermissionList"
  packedMessageDescriptor _
    = "\n\
      \\SYNMacaroonPermissionList\DC2;\n\
      \\vpermissions\CAN\SOH \ETX(\v2\EM.lnrpc.MacaroonPermissionR\vpermissions"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        permissions__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "permissions"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor MacaroonPermission)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"permissions")) ::
              Data.ProtoLens.FieldDescriptor MacaroonPermissionList
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, permissions__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _MacaroonPermissionList'_unknownFields
        (\ x__ y__ -> x__ {_MacaroonPermissionList'_unknownFields = y__})
  defMessage
    = MacaroonPermissionList'_constructor
        {_MacaroonPermissionList'permissions = Data.Vector.Generic.empty,
         _MacaroonPermissionList'_unknownFields = []}
  parseMessage
    = let
        loop ::
          MacaroonPermissionList
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld MacaroonPermission
             -> Data.ProtoLens.Encoding.Bytes.Parser MacaroonPermissionList
        loop x mutable'permissions
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'permissions <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                              (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                 mutable'permissions)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'permissions") frozen'permissions
                              x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "permissions"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append
                                          mutable'permissions y)
                                loop x v
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'permissions
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'permissions <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'permissions)
          "MacaroonPermissionList"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v
                   -> (Data.Monoid.<>)
                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((Prelude..)
                           (\ bs
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                      (Prelude.fromIntegral (Data.ByteString.length bs)))
                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                           Data.ProtoLens.encodeMessage _v))
                (Lens.Family2.view
                   (Data.ProtoLens.Field.field @"vec'permissions") _x))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData MacaroonPermissionList where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_MacaroonPermissionList'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_MacaroonPermissionList'permissions x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.middlewareName' @:: Lens' MiddlewareRegistration Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.customMacaroonCaveatName' @:: Lens' MiddlewareRegistration Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.readOnlyMode' @:: Lens' MiddlewareRegistration Prelude.Bool@ -}
data MiddlewareRegistration
  = MiddlewareRegistration'_constructor {_MiddlewareRegistration'middlewareName :: !Data.Text.Text,
                                         _MiddlewareRegistration'customMacaroonCaveatName :: !Data.Text.Text,
                                         _MiddlewareRegistration'readOnlyMode :: !Prelude.Bool,
                                         _MiddlewareRegistration'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show MiddlewareRegistration where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out MiddlewareRegistration
instance Data.ProtoLens.Field.HasField MiddlewareRegistration "middlewareName" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MiddlewareRegistration'middlewareName
           (\ x__ y__ -> x__ {_MiddlewareRegistration'middlewareName = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField MiddlewareRegistration "customMacaroonCaveatName" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MiddlewareRegistration'customMacaroonCaveatName
           (\ x__ y__
              -> x__ {_MiddlewareRegistration'customMacaroonCaveatName = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField MiddlewareRegistration "readOnlyMode" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MiddlewareRegistration'readOnlyMode
           (\ x__ y__ -> x__ {_MiddlewareRegistration'readOnlyMode = y__}))
        Prelude.id
instance Data.ProtoLens.Message MiddlewareRegistration where
  messageName _ = Data.Text.pack "lnrpc.MiddlewareRegistration"
  packedMessageDescriptor _
    = "\n\
      \\SYNMiddlewareRegistration\DC2'\n\
      \\SImiddleware_name\CAN\SOH \SOH(\tR\SOmiddlewareName\DC2=\n\
      \\ESCcustom_macaroon_caveat_name\CAN\STX \SOH(\tR\CANcustomMacaroonCaveatName\DC2$\n\
      \\SOread_only_mode\CAN\ETX \SOH(\bR\freadOnlyMode"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        middlewareName__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "middleware_name"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"middlewareName")) ::
              Data.ProtoLens.FieldDescriptor MiddlewareRegistration
        customMacaroonCaveatName__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "custom_macaroon_caveat_name"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"customMacaroonCaveatName")) ::
              Data.ProtoLens.FieldDescriptor MiddlewareRegistration
        readOnlyMode__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "read_only_mode"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"readOnlyMode")) ::
              Data.ProtoLens.FieldDescriptor MiddlewareRegistration
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, middlewareName__field_descriptor),
           (Data.ProtoLens.Tag 2, customMacaroonCaveatName__field_descriptor),
           (Data.ProtoLens.Tag 3, readOnlyMode__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _MiddlewareRegistration'_unknownFields
        (\ x__ y__ -> x__ {_MiddlewareRegistration'_unknownFields = y__})
  defMessage
    = MiddlewareRegistration'_constructor
        {_MiddlewareRegistration'middlewareName = Data.ProtoLens.fieldDefault,
         _MiddlewareRegistration'customMacaroonCaveatName = Data.ProtoLens.fieldDefault,
         _MiddlewareRegistration'readOnlyMode = Data.ProtoLens.fieldDefault,
         _MiddlewareRegistration'_unknownFields = []}
  parseMessage
    = let
        loop ::
          MiddlewareRegistration
          -> Data.ProtoLens.Encoding.Bytes.Parser MiddlewareRegistration
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "middleware_name"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"middlewareName") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "custom_macaroon_caveat_name"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"customMacaroonCaveatName") y x)
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "read_only_mode"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"readOnlyMode") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "MiddlewareRegistration"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v
                  = Lens.Family2.view
                      (Data.ProtoLens.Field.field @"middlewareName") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view
                         (Data.ProtoLens.Field.field @"customMacaroonCaveatName") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((Prelude..)
                            (\ bs
                               -> (Data.Monoid.<>)
                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            Data.Text.Encoding.encodeUtf8 _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view (Data.ProtoLens.Field.field @"readOnlyMode") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                               _v))
                   (Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (Lens.Family2.view Data.ProtoLens.unknownFields _x))))
instance Control.DeepSeq.NFData MiddlewareRegistration where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_MiddlewareRegistration'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_MiddlewareRegistration'middlewareName x__)
                (Control.DeepSeq.deepseq
                   (_MiddlewareRegistration'customMacaroonCaveatName x__)
                   (Control.DeepSeq.deepseq
                      (_MiddlewareRegistration'readOnlyMode x__) ())))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.chanPoints' @:: Lens' MultiChanBackup [Proto.Lnrpc.Ln0.ChannelPoint]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'chanPoints' @:: Lens' MultiChanBackup (Data.Vector.Vector Proto.Lnrpc.Ln0.ChannelPoint)@
         * 'Proto.Lnrpc.Ln1_Fields.multiChanBackup' @:: Lens' MultiChanBackup Data.ByteString.ByteString@ -}
data MultiChanBackup
  = MultiChanBackup'_constructor {_MultiChanBackup'chanPoints :: !(Data.Vector.Vector Proto.Lnrpc.Ln0.ChannelPoint),
                                  _MultiChanBackup'multiChanBackup :: !Data.ByteString.ByteString,
                                  _MultiChanBackup'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show MultiChanBackup where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out MultiChanBackup
instance Data.ProtoLens.Field.HasField MultiChanBackup "chanPoints" [Proto.Lnrpc.Ln0.ChannelPoint] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MultiChanBackup'chanPoints
           (\ x__ y__ -> x__ {_MultiChanBackup'chanPoints = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField MultiChanBackup "vec'chanPoints" (Data.Vector.Vector Proto.Lnrpc.Ln0.ChannelPoint) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MultiChanBackup'chanPoints
           (\ x__ y__ -> x__ {_MultiChanBackup'chanPoints = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField MultiChanBackup "multiChanBackup" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _MultiChanBackup'multiChanBackup
           (\ x__ y__ -> x__ {_MultiChanBackup'multiChanBackup = y__}))
        Prelude.id
instance Data.ProtoLens.Message MultiChanBackup where
  messageName _ = Data.Text.pack "lnrpc.MultiChanBackup"
  packedMessageDescriptor _
    = "\n\
      \\SIMultiChanBackup\DC24\n\
      \\vchan_points\CAN\SOH \ETX(\v2\DC3.lnrpc.ChannelPointR\n\
      \chanPoints\DC2*\n\
      \\DC1multi_chan_backup\CAN\STX \SOH(\fR\SImultiChanBackup"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        chanPoints__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_points"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Lnrpc.Ln0.ChannelPoint)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"chanPoints")) ::
              Data.ProtoLens.FieldDescriptor MultiChanBackup
        multiChanBackup__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "multi_chan_backup"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"multiChanBackup")) ::
              Data.ProtoLens.FieldDescriptor MultiChanBackup
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, chanPoints__field_descriptor),
           (Data.ProtoLens.Tag 2, multiChanBackup__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _MultiChanBackup'_unknownFields
        (\ x__ y__ -> x__ {_MultiChanBackup'_unknownFields = y__})
  defMessage
    = MultiChanBackup'_constructor
        {_MultiChanBackup'chanPoints = Data.Vector.Generic.empty,
         _MultiChanBackup'multiChanBackup = Data.ProtoLens.fieldDefault,
         _MultiChanBackup'_unknownFields = []}
  parseMessage
    = let
        loop ::
          MultiChanBackup
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.Lnrpc.Ln0.ChannelPoint
             -> Data.ProtoLens.Encoding.Bytes.Parser MultiChanBackup
        loop x mutable'chanPoints
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'chanPoints <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                             (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                mutable'chanPoints)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'chanPoints") frozen'chanPoints
                              x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "chan_points"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append mutable'chanPoints y)
                                loop x v
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "multi_chan_backup"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"multiChanBackup") y x)
                                  mutable'chanPoints
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'chanPoints
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'chanPoints <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                      Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'chanPoints)
          "MultiChanBackup"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v
                   -> (Data.Monoid.<>)
                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((Prelude..)
                           (\ bs
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                      (Prelude.fromIntegral (Data.ByteString.length bs)))
                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                           Data.ProtoLens.encodeMessage _v))
                (Lens.Family2.view
                   (Data.ProtoLens.Field.field @"vec'chanPoints") _x))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view
                         (Data.ProtoLens.Field.field @"multiChanBackup") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData MultiChanBackup where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_MultiChanBackup'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_MultiChanBackup'chanPoints x__)
                (Control.DeepSeq.deepseq
                   (_MultiChanBackup'multiChanBackup x__) ()))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.entity' @:: Lens' Op Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.actions' @:: Lens' Op [Data.Text.Text]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'actions' @:: Lens' Op (Data.Vector.Vector Data.Text.Text)@ -}
data Op
  = Op'_constructor {_Op'entity :: !Data.Text.Text,
                     _Op'actions :: !(Data.Vector.Vector Data.Text.Text),
                     _Op'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show Op where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out Op
instance Data.ProtoLens.Field.HasField Op "entity" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Op'entity (\ x__ y__ -> x__ {_Op'entity = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Op "actions" [Data.Text.Text] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Op'actions (\ x__ y__ -> x__ {_Op'actions = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField Op "vec'actions" (Data.Vector.Vector Data.Text.Text) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Op'actions (\ x__ y__ -> x__ {_Op'actions = y__}))
        Prelude.id
instance Data.ProtoLens.Message Op where
  messageName _ = Data.Text.pack "lnrpc.Op"
  packedMessageDescriptor _
    = "\n\
      \\STXOp\DC2\SYN\n\
      \\ACKentity\CAN\SOH \SOH(\tR\ACKentity\DC2\CAN\n\
      \\aactions\CAN\STX \ETX(\tR\aactions"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        entity__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "entity"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"entity")) ::
              Data.ProtoLens.FieldDescriptor Op
        actions__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "actions"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"actions")) ::
              Data.ProtoLens.FieldDescriptor Op
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, entity__field_descriptor),
           (Data.ProtoLens.Tag 2, actions__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _Op'_unknownFields (\ x__ y__ -> x__ {_Op'_unknownFields = y__})
  defMessage
    = Op'_constructor
        {_Op'entity = Data.ProtoLens.fieldDefault,
         _Op'actions = Data.Vector.Generic.empty, _Op'_unknownFields = []}
  parseMessage
    = let
        loop ::
          Op
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Text.Text
             -> Data.ProtoLens.Encoding.Bytes.Parser Op
        loop x mutable'actions
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'actions <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                          (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                             mutable'actions)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'actions") frozen'actions x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "entity"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"entity") y x)
                                  mutable'actions
                        18
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                        Data.ProtoLens.Encoding.Bytes.getBytes
                                                          (Prelude.fromIntegral len)
                                            Data.ProtoLens.Encoding.Bytes.runEither
                                              (case Data.Text.Encoding.decodeUtf8' value of
                                                 (Prelude.Left err)
                                                   -> Prelude.Left (Prelude.show err)
                                                 (Prelude.Right r) -> Prelude.Right r))
                                        "actions"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append mutable'actions y)
                                loop x v
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'actions
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'actions <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                   Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'actions)
          "Op"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"entity") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             ((Data.Monoid.<>)
                (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                   (\ _v
                      -> (Data.Monoid.<>)
                           (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                           ((Prelude..)
                              (\ bs
                                 -> (Data.Monoid.<>)
                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
                                         (Prelude.fromIntegral (Data.ByteString.length bs)))
                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                              Data.Text.Encoding.encodeUtf8 _v))
                   (Lens.Family2.view (Data.ProtoLens.Field.field @"vec'actions") _x))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData Op where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_Op'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_Op'entity x__) (Control.DeepSeq.deepseq (_Op'actions x__) ()))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.destination' @:: Lens' PayReq Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.paymentHash' @:: Lens' PayReq Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.numSatoshis' @:: Lens' PayReq Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.timestamp' @:: Lens' PayReq Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.expiry' @:: Lens' PayReq Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.description' @:: Lens' PayReq Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.descriptionHash' @:: Lens' PayReq Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.fallbackAddr' @:: Lens' PayReq Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.cltvExpiry' @:: Lens' PayReq Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.routeHints' @:: Lens' PayReq [Proto.Lnrpc.Ln0.RouteHint]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'routeHints' @:: Lens' PayReq (Data.Vector.Vector Proto.Lnrpc.Ln0.RouteHint)@
         * 'Proto.Lnrpc.Ln1_Fields.paymentAddr' @:: Lens' PayReq Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.numMsat' @:: Lens' PayReq Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.features' @:: Lens' PayReq (Data.Map.Map Data.Word.Word32 Proto.Lnrpc.Ln0.Feature)@ -}
data PayReq
  = PayReq'_constructor {_PayReq'destination :: !Data.Text.Text,
                         _PayReq'paymentHash :: !Data.Text.Text,
                         _PayReq'numSatoshis :: !Data.Int.Int64,
                         _PayReq'timestamp :: !Data.Int.Int64,
                         _PayReq'expiry :: !Data.Int.Int64,
                         _PayReq'description :: !Data.Text.Text,
                         _PayReq'descriptionHash :: !Data.Text.Text,
                         _PayReq'fallbackAddr :: !Data.Text.Text,
                         _PayReq'cltvExpiry :: !Data.Int.Int64,
                         _PayReq'routeHints :: !(Data.Vector.Vector Proto.Lnrpc.Ln0.RouteHint),
                         _PayReq'paymentAddr :: !Data.ByteString.ByteString,
                         _PayReq'numMsat :: !Data.Int.Int64,
                         _PayReq'features :: !(Data.Map.Map Data.Word.Word32 Proto.Lnrpc.Ln0.Feature),
                         _PayReq'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show PayReq where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out PayReq
instance Data.ProtoLens.Field.HasField PayReq "destination" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'destination (\ x__ y__ -> x__ {_PayReq'destination = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "paymentHash" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'paymentHash (\ x__ y__ -> x__ {_PayReq'paymentHash = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "numSatoshis" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'numSatoshis (\ x__ y__ -> x__ {_PayReq'numSatoshis = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "timestamp" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'timestamp (\ x__ y__ -> x__ {_PayReq'timestamp = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "expiry" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'expiry (\ x__ y__ -> x__ {_PayReq'expiry = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "description" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'description (\ x__ y__ -> x__ {_PayReq'description = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "descriptionHash" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'descriptionHash
           (\ x__ y__ -> x__ {_PayReq'descriptionHash = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "fallbackAddr" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'fallbackAddr
           (\ x__ y__ -> x__ {_PayReq'fallbackAddr = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "cltvExpiry" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'cltvExpiry (\ x__ y__ -> x__ {_PayReq'cltvExpiry = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "routeHints" [Proto.Lnrpc.Ln0.RouteHint] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'routeHints (\ x__ y__ -> x__ {_PayReq'routeHints = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField PayReq "vec'routeHints" (Data.Vector.Vector Proto.Lnrpc.Ln0.RouteHint) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'routeHints (\ x__ y__ -> x__ {_PayReq'routeHints = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "paymentAddr" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'paymentAddr (\ x__ y__ -> x__ {_PayReq'paymentAddr = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "numMsat" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'numMsat (\ x__ y__ -> x__ {_PayReq'numMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq "features" (Data.Map.Map Data.Word.Word32 Proto.Lnrpc.Ln0.Feature) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'features (\ x__ y__ -> x__ {_PayReq'features = y__}))
        Prelude.id
instance Data.ProtoLens.Message PayReq where
  messageName _ = Data.Text.pack "lnrpc.PayReq"
  packedMessageDescriptor _
    = "\n\
      \\ACKPayReq\DC2 \n\
      \\vdestination\CAN\SOH \SOH(\tR\vdestination\DC2!\n\
      \\fpayment_hash\CAN\STX \SOH(\tR\vpaymentHash\DC2!\n\
      \\fnum_satoshis\CAN\ETX \SOH(\ETXR\vnumSatoshis\DC2\FS\n\
      \\ttimestamp\CAN\EOT \SOH(\ETXR\ttimestamp\DC2\SYN\n\
      \\ACKexpiry\CAN\ENQ \SOH(\ETXR\ACKexpiry\DC2 \n\
      \\vdescription\CAN\ACK \SOH(\tR\vdescription\DC2)\n\
      \\DLEdescription_hash\CAN\a \SOH(\tR\SIdescriptionHash\DC2#\n\
      \\rfallback_addr\CAN\b \SOH(\tR\ffallbackAddr\DC2\US\n\
      \\vcltv_expiry\CAN\t \SOH(\ETXR\n\
      \cltvExpiry\DC21\n\
      \\vroute_hints\CAN\n\
      \ \ETX(\v2\DLE.lnrpc.RouteHintR\n\
      \routeHints\DC2!\n\
      \\fpayment_addr\CAN\v \SOH(\fR\vpaymentAddr\DC2\EM\n\
      \\bnum_msat\CAN\f \SOH(\ETXR\anumMsat\DC27\n\
      \\bfeatures\CAN\r \ETX(\v2\ESC.lnrpc.PayReq.FeaturesEntryR\bfeatures\SUBK\n\
      \\rFeaturesEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC2$\n\
      \\ENQvalue\CAN\STX \SOH(\v2\SO.lnrpc.FeatureR\ENQvalue:\STX8\SOH"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        destination__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "destination"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"destination")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        paymentHash__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payment_hash"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"paymentHash")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        numSatoshis__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "num_satoshis"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"numSatoshis")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        timestamp__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "timestamp"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"timestamp")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        expiry__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "expiry"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"expiry")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        description__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "description"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"description")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        descriptionHash__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "description_hash"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"descriptionHash")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        fallbackAddr__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fallback_addr"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"fallbackAddr")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        cltvExpiry__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "cltv_expiry"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"cltvExpiry")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        routeHints__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "route_hints"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Lnrpc.Ln0.RouteHint)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"routeHints")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        paymentAddr__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payment_addr"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"paymentAddr")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        numMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "num_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"numMsat")) ::
              Data.ProtoLens.FieldDescriptor PayReq
        features__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "features"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor PayReq'FeaturesEntry)
              (Data.ProtoLens.MapField
                 (Data.ProtoLens.Field.field @"key")
                 (Data.ProtoLens.Field.field @"value")
                 (Data.ProtoLens.Field.field @"features")) ::
              Data.ProtoLens.FieldDescriptor PayReq
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, destination__field_descriptor),
           (Data.ProtoLens.Tag 2, paymentHash__field_descriptor),
           (Data.ProtoLens.Tag 3, numSatoshis__field_descriptor),
           (Data.ProtoLens.Tag 4, timestamp__field_descriptor),
           (Data.ProtoLens.Tag 5, expiry__field_descriptor),
           (Data.ProtoLens.Tag 6, description__field_descriptor),
           (Data.ProtoLens.Tag 7, descriptionHash__field_descriptor),
           (Data.ProtoLens.Tag 8, fallbackAddr__field_descriptor),
           (Data.ProtoLens.Tag 9, cltvExpiry__field_descriptor),
           (Data.ProtoLens.Tag 10, routeHints__field_descriptor),
           (Data.ProtoLens.Tag 11, paymentAddr__field_descriptor),
           (Data.ProtoLens.Tag 12, numMsat__field_descriptor),
           (Data.ProtoLens.Tag 13, features__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _PayReq'_unknownFields
        (\ x__ y__ -> x__ {_PayReq'_unknownFields = y__})
  defMessage
    = PayReq'_constructor
        {_PayReq'destination = Data.ProtoLens.fieldDefault,
         _PayReq'paymentHash = Data.ProtoLens.fieldDefault,
         _PayReq'numSatoshis = Data.ProtoLens.fieldDefault,
         _PayReq'timestamp = Data.ProtoLens.fieldDefault,
         _PayReq'expiry = Data.ProtoLens.fieldDefault,
         _PayReq'description = Data.ProtoLens.fieldDefault,
         _PayReq'descriptionHash = Data.ProtoLens.fieldDefault,
         _PayReq'fallbackAddr = Data.ProtoLens.fieldDefault,
         _PayReq'cltvExpiry = Data.ProtoLens.fieldDefault,
         _PayReq'routeHints = Data.Vector.Generic.empty,
         _PayReq'paymentAddr = Data.ProtoLens.fieldDefault,
         _PayReq'numMsat = Data.ProtoLens.fieldDefault,
         _PayReq'features = Data.Map.empty, _PayReq'_unknownFields = []}
  parseMessage
    = let
        loop ::
          PayReq
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.Lnrpc.Ln0.RouteHint
             -> Data.ProtoLens.Encoding.Bytes.Parser PayReq
        loop x mutable'routeHints
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'routeHints <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                             (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                mutable'routeHints)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'routeHints") frozen'routeHints
                              x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "destination"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"destination") y x)
                                  mutable'routeHints
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "payment_hash"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"paymentHash") y x)
                                  mutable'routeHints
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "num_satoshis"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"numSatoshis") y x)
                                  mutable'routeHints
                        32
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "timestamp"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"timestamp") y x)
                                  mutable'routeHints
                        40
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "expiry"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"expiry") y x)
                                  mutable'routeHints
                        50
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "description"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"description") y x)
                                  mutable'routeHints
                        58
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "description_hash"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"descriptionHash") y x)
                                  mutable'routeHints
                        66
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "fallback_addr"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"fallbackAddr") y x)
                                  mutable'routeHints
                        72
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "cltv_expiry"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"cltvExpiry") y x)
                                  mutable'routeHints
                        82
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "route_hints"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append mutable'routeHints y)
                                loop x v
                        90
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "payment_addr"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"paymentAddr") y x)
                                  mutable'routeHints
                        96
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "num_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"numMsat") y x)
                                  mutable'routeHints
                        106
                          -> do !(entry :: PayReq'FeaturesEntry) <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                                                      (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                                          Data.ProtoLens.Encoding.Bytes.isolate
                                                                            (Prelude.fromIntegral
                                                                               len)
                                                                            Data.ProtoLens.parseMessage)
                                                                      "features"
                                (let
                                   key = Lens.Family2.view (Data.ProtoLens.Field.field @"key") entry
                                   value
                                     = Lens.Family2.view (Data.ProtoLens.Field.field @"value") entry
                                 in
                                   loop
                                     (Lens.Family2.over
                                        (Data.ProtoLens.Field.field @"features")
                                        (\ !t -> Data.Map.insert key value t) x)
                                     mutable'routeHints)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'routeHints
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'routeHints <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                      Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'routeHints)
          "PayReq"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v
                  = Lens.Family2.view (Data.ProtoLens.Field.field @"destination") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view (Data.ProtoLens.Field.field @"paymentHash") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((Prelude..)
                            (\ bs
                               -> (Data.Monoid.<>)
                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
                                       (Prelude.fromIntegral (Data.ByteString.length bs)))
                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            Data.Text.Encoding.encodeUtf8 _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view (Data.ProtoLens.Field.field @"numSatoshis") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                   ((Data.Monoid.<>)
                      (let
                         _v = Lens.Family2.view (Data.ProtoLens.Field.field @"timestamp") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                               ((Prelude..)
                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                      ((Data.Monoid.<>)
                         (let
                            _v = Lens.Family2.view (Data.ProtoLens.Field.field @"expiry") _x
                          in
                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                Data.Monoid.mempty
                            else
                                (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
                                  ((Prelude..)
                                     Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral
                                     _v))
                         ((Data.Monoid.<>)
                            (let
                               _v
                                 = Lens.Family2.view (Data.ProtoLens.Field.field @"description") _x
                             in
                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                   Data.Monoid.mempty
                               else
                                   (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 50)
                                     ((Prelude..)
                                        (\ bs
                                           -> (Data.Monoid.<>)
                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                   (Prelude.fromIntegral
                                                      (Data.ByteString.length bs)))
                                                (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                        Data.Text.Encoding.encodeUtf8 _v))
                            ((Data.Monoid.<>)
                               (let
                                  _v
                                    = Lens.Family2.view
                                        (Data.ProtoLens.Field.field @"descriptionHash") _x
                                in
                                  if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                      Data.Monoid.mempty
                                  else
                                      (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt 58)
                                        ((Prelude..)
                                           (\ bs
                                              -> (Data.Monoid.<>)
                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                      (Prelude.fromIntegral
                                                         (Data.ByteString.length bs)))
                                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                           Data.Text.Encoding.encodeUtf8 _v))
                               ((Data.Monoid.<>)
                                  (let
                                     _v
                                       = Lens.Family2.view
                                           (Data.ProtoLens.Field.field @"fallbackAddr") _x
                                   in
                                     if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                         Data.Monoid.mempty
                                     else
                                         (Data.Monoid.<>)
                                           (Data.ProtoLens.Encoding.Bytes.putVarInt 66)
                                           ((Prelude..)
                                              (\ bs
                                                 -> (Data.Monoid.<>)
                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                         (Prelude.fromIntegral
                                                            (Data.ByteString.length bs)))
                                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                              Data.Text.Encoding.encodeUtf8 _v))
                                  ((Data.Monoid.<>)
                                     (let
                                        _v
                                          = Lens.Family2.view
                                              (Data.ProtoLens.Field.field @"cltvExpiry") _x
                                      in
                                        if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                            Data.Monoid.mempty
                                        else
                                            (Data.Monoid.<>)
                                              (Data.ProtoLens.Encoding.Bytes.putVarInt 72)
                                              ((Prelude..)
                                                 Data.ProtoLens.Encoding.Bytes.putVarInt
                                                 Prelude.fromIntegral _v))
                                     ((Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                                           (\ _v
                                              -> (Data.Monoid.<>)
                                                   (Data.ProtoLens.Encoding.Bytes.putVarInt 82)
                                                   ((Prelude..)
                                                      (\ bs
                                                         -> (Data.Monoid.<>)
                                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                 (Prelude.fromIntegral
                                                                    (Data.ByteString.length bs)))
                                                              (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                 bs))
                                                      Data.ProtoLens.encodeMessage _v))
                                           (Lens.Family2.view
                                              (Data.ProtoLens.Field.field @"vec'routeHints") _x))
                                        ((Data.Monoid.<>)
                                           (let
                                              _v
                                                = Lens.Family2.view
                                                    (Data.ProtoLens.Field.field @"paymentAddr") _x
                                            in
                                              if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                                  Data.Monoid.mempty
                                              else
                                                  (Data.Monoid.<>)
                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt 90)
                                                    ((\ bs
                                                        -> (Data.Monoid.<>)
                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                (Prelude.fromIntegral
                                                                   (Data.ByteString.length bs)))
                                                             (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                bs))
                                                       _v))
                                           ((Data.Monoid.<>)
                                              (let
                                                 _v
                                                   = Lens.Family2.view
                                                       (Data.ProtoLens.Field.field @"numMsat") _x
                                               in
                                                 if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                                     Data.Monoid.mempty
                                                 else
                                                     (Data.Monoid.<>)
                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt 96)
                                                       ((Prelude..)
                                                          Data.ProtoLens.Encoding.Bytes.putVarInt
                                                          Prelude.fromIntegral _v))
                                              ((Data.Monoid.<>)
                                                 (Data.Monoid.mconcat
                                                    (Prelude.map
                                                       (\ _v
                                                          -> (Data.Monoid.<>)
                                                               (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                  106)
                                                               ((Prelude..)
                                                                  (\ bs
                                                                     -> (Data.Monoid.<>)
                                                                          (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                             (Prelude.fromIntegral
                                                                                (Data.ByteString.length
                                                                                   bs)))
                                                                          (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                             bs))
                                                                  Data.ProtoLens.encodeMessage
                                                                  (Lens.Family2.set
                                                                     (Data.ProtoLens.Field.field
                                                                        @"key")
                                                                     (Prelude.fst _v)
                                                                     (Lens.Family2.set
                                                                        (Data.ProtoLens.Field.field
                                                                           @"value")
                                                                        (Prelude.snd _v)
                                                                        (Data.ProtoLens.defMessage ::
                                                                           PayReq'FeaturesEntry)))))
                                                       (Data.Map.toList
                                                          (Lens.Family2.view
                                                             (Data.ProtoLens.Field.field
                                                                @"features")
                                                             _x))))
                                                 (Data.ProtoLens.Encoding.Wire.buildFieldSet
                                                    (Lens.Family2.view
                                                       Data.ProtoLens.unknownFields _x))))))))))))))
instance Control.DeepSeq.NFData PayReq where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_PayReq'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_PayReq'destination x__)
                (Control.DeepSeq.deepseq
                   (_PayReq'paymentHash x__)
                   (Control.DeepSeq.deepseq
                      (_PayReq'numSatoshis x__)
                      (Control.DeepSeq.deepseq
                         (_PayReq'timestamp x__)
                         (Control.DeepSeq.deepseq
                            (_PayReq'expiry x__)
                            (Control.DeepSeq.deepseq
                               (_PayReq'description x__)
                               (Control.DeepSeq.deepseq
                                  (_PayReq'descriptionHash x__)
                                  (Control.DeepSeq.deepseq
                                     (_PayReq'fallbackAddr x__)
                                     (Control.DeepSeq.deepseq
                                        (_PayReq'cltvExpiry x__)
                                        (Control.DeepSeq.deepseq
                                           (_PayReq'routeHints x__)
                                           (Control.DeepSeq.deepseq
                                              (_PayReq'paymentAddr x__)
                                              (Control.DeepSeq.deepseq
                                                 (_PayReq'numMsat x__)
                                                 (Control.DeepSeq.deepseq
                                                    (_PayReq'features x__) ())))))))))))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.key' @:: Lens' PayReq'FeaturesEntry Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.value' @:: Lens' PayReq'FeaturesEntry Proto.Lnrpc.Ln0.Feature@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'value' @:: Lens' PayReq'FeaturesEntry (Prelude.Maybe Proto.Lnrpc.Ln0.Feature)@ -}
data PayReq'FeaturesEntry
  = PayReq'FeaturesEntry'_constructor {_PayReq'FeaturesEntry'key :: !Data.Word.Word32,
                                       _PayReq'FeaturesEntry'value :: !(Prelude.Maybe Proto.Lnrpc.Ln0.Feature),
                                       _PayReq'FeaturesEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show PayReq'FeaturesEntry where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out PayReq'FeaturesEntry
instance Data.ProtoLens.Field.HasField PayReq'FeaturesEntry "key" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'FeaturesEntry'key
           (\ x__ y__ -> x__ {_PayReq'FeaturesEntry'key = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PayReq'FeaturesEntry "value" Proto.Lnrpc.Ln0.Feature where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'FeaturesEntry'value
           (\ x__ y__ -> x__ {_PayReq'FeaturesEntry'value = y__}))
        (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField PayReq'FeaturesEntry "maybe'value" (Prelude.Maybe Proto.Lnrpc.Ln0.Feature) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReq'FeaturesEntry'value
           (\ x__ y__ -> x__ {_PayReq'FeaturesEntry'value = y__}))
        Prelude.id
instance Data.ProtoLens.Message PayReq'FeaturesEntry where
  messageName _ = Data.Text.pack "lnrpc.PayReq.FeaturesEntry"
  packedMessageDescriptor _
    = "\n\
      \\rFeaturesEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC2$\n\
      \\ENQvalue\CAN\STX \SOH(\v2\SO.lnrpc.FeatureR\ENQvalue:\STX8\SOH"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        key__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "key"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"key")) ::
              Data.ProtoLens.FieldDescriptor PayReq'FeaturesEntry
        value__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "value"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Lnrpc.Ln0.Feature)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'value")) ::
              Data.ProtoLens.FieldDescriptor PayReq'FeaturesEntry
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, key__field_descriptor),
           (Data.ProtoLens.Tag 2, value__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _PayReq'FeaturesEntry'_unknownFields
        (\ x__ y__ -> x__ {_PayReq'FeaturesEntry'_unknownFields = y__})
  defMessage
    = PayReq'FeaturesEntry'_constructor
        {_PayReq'FeaturesEntry'key = Data.ProtoLens.fieldDefault,
         _PayReq'FeaturesEntry'value = Prelude.Nothing,
         _PayReq'FeaturesEntry'_unknownFields = []}
  parseMessage
    = let
        loop ::
          PayReq'FeaturesEntry
          -> Data.ProtoLens.Encoding.Bytes.Parser PayReq'FeaturesEntry
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "key"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"key") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "value"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "FeaturesEntry"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"key") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Prelude..)
                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
             ((Data.Monoid.<>)
                (case
                     Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'value") _x
                 of
                   Prelude.Nothing -> Data.Monoid.mempty
                   (Prelude.Just _v)
                     -> (Data.Monoid.<>)
                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((Prelude..)
                             (\ bs
                                -> (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                             Data.ProtoLens.encodeMessage _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData PayReq'FeaturesEntry where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_PayReq'FeaturesEntry'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_PayReq'FeaturesEntry'key x__)
                (Control.DeepSeq.deepseq (_PayReq'FeaturesEntry'value x__) ()))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.payReq' @:: Lens' PayReqString Data.Text.Text@ -}
data PayReqString
  = PayReqString'_constructor {_PayReqString'payReq :: !Data.Text.Text,
                               _PayReqString'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show PayReqString where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out PayReqString
instance Data.ProtoLens.Field.HasField PayReqString "payReq" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PayReqString'payReq
           (\ x__ y__ -> x__ {_PayReqString'payReq = y__}))
        Prelude.id
instance Data.ProtoLens.Message PayReqString where
  messageName _ = Data.Text.pack "lnrpc.PayReqString"
  packedMessageDescriptor _
    = "\n\
      \\fPayReqString\DC2\ETB\n\
      \\apay_req\CAN\SOH \SOH(\tR\ACKpayReq"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        payReq__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "pay_req"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"payReq")) ::
              Data.ProtoLens.FieldDescriptor PayReqString
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, payReq__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _PayReqString'_unknownFields
        (\ x__ y__ -> x__ {_PayReqString'_unknownFields = y__})
  defMessage
    = PayReqString'_constructor
        {_PayReqString'payReq = Data.ProtoLens.fieldDefault,
         _PayReqString'_unknownFields = []}
  parseMessage
    = let
        loop ::
          PayReqString -> Data.ProtoLens.Encoding.Bytes.Parser PayReqString
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "pay_req"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"payReq") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "PayReqString"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"payReq") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData PayReqString where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_PayReqString'_unknownFields x__)
             (Control.DeepSeq.deepseq (_PayReqString'payReq x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.paymentHash' @:: Lens' Payment Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.value' @:: Lens' Payment Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.creationDate' @:: Lens' Payment Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.fee' @:: Lens' Payment Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.paymentPreimage' @:: Lens' Payment Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.valueSat' @:: Lens' Payment Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.valueMsat' @:: Lens' Payment Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.paymentRequest' @:: Lens' Payment Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.status' @:: Lens' Payment Payment'PaymentStatus@
         * 'Proto.Lnrpc.Ln1_Fields.feeSat' @:: Lens' Payment Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.feeMsat' @:: Lens' Payment Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.creationTimeNs' @:: Lens' Payment Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.htlcs' @:: Lens' Payment [HTLCAttempt]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'htlcs' @:: Lens' Payment (Data.Vector.Vector HTLCAttempt)@
         * 'Proto.Lnrpc.Ln1_Fields.paymentIndex' @:: Lens' Payment Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.failureReason' @:: Lens' Payment PaymentFailureReason@ -}
data Payment
  = Payment'_constructor {_Payment'paymentHash :: !Data.Text.Text,
                          _Payment'value :: !Data.Int.Int64,
                          _Payment'creationDate :: !Data.Int.Int64,
                          _Payment'fee :: !Data.Int.Int64,
                          _Payment'paymentPreimage :: !Data.Text.Text,
                          _Payment'valueSat :: !Data.Int.Int64,
                          _Payment'valueMsat :: !Data.Int.Int64,
                          _Payment'paymentRequest :: !Data.Text.Text,
                          _Payment'status :: !Payment'PaymentStatus,
                          _Payment'feeSat :: !Data.Int.Int64,
                          _Payment'feeMsat :: !Data.Int.Int64,
                          _Payment'creationTimeNs :: !Data.Int.Int64,
                          _Payment'htlcs :: !(Data.Vector.Vector HTLCAttempt),
                          _Payment'paymentIndex :: !Data.Word.Word64,
                          _Payment'failureReason :: !PaymentFailureReason,
                          _Payment'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show Payment where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out Payment
instance Data.ProtoLens.Field.HasField Payment "paymentHash" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'paymentHash
           (\ x__ y__ -> x__ {_Payment'paymentHash = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "value" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'value (\ x__ y__ -> x__ {_Payment'value = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "creationDate" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'creationDate
           (\ x__ y__ -> x__ {_Payment'creationDate = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "fee" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'fee (\ x__ y__ -> x__ {_Payment'fee = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "paymentPreimage" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'paymentPreimage
           (\ x__ y__ -> x__ {_Payment'paymentPreimage = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "valueSat" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'valueSat (\ x__ y__ -> x__ {_Payment'valueSat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "valueMsat" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'valueMsat (\ x__ y__ -> x__ {_Payment'valueMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "paymentRequest" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'paymentRequest
           (\ x__ y__ -> x__ {_Payment'paymentRequest = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "status" Payment'PaymentStatus where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'status (\ x__ y__ -> x__ {_Payment'status = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "feeSat" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'feeSat (\ x__ y__ -> x__ {_Payment'feeSat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "feeMsat" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'feeMsat (\ x__ y__ -> x__ {_Payment'feeMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "creationTimeNs" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'creationTimeNs
           (\ x__ y__ -> x__ {_Payment'creationTimeNs = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "htlcs" [HTLCAttempt] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'htlcs (\ x__ y__ -> x__ {_Payment'htlcs = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField Payment "vec'htlcs" (Data.Vector.Vector HTLCAttempt) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'htlcs (\ x__ y__ -> x__ {_Payment'htlcs = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "paymentIndex" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'paymentIndex
           (\ x__ y__ -> x__ {_Payment'paymentIndex = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField Payment "failureReason" PaymentFailureReason where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _Payment'failureReason
           (\ x__ y__ -> x__ {_Payment'failureReason = y__}))
        Prelude.id
instance Data.ProtoLens.Message Payment where
  messageName _ = Data.Text.pack "lnrpc.Payment"
  packedMessageDescriptor _
    = "\n\
      \\aPayment\DC2!\n\
      \\fpayment_hash\CAN\SOH \SOH(\tR\vpaymentHash\DC2\CAN\n\
      \\ENQvalue\CAN\STX \SOH(\ETXR\ENQvalueB\STX\CAN\SOH\DC2'\n\
      \\rcreation_date\CAN\ETX \SOH(\ETXR\fcreationDateB\STX\CAN\SOH\DC2\DC4\n\
      \\ETXfee\CAN\ENQ \SOH(\ETXR\ETXfeeB\STX\CAN\SOH\DC2)\n\
      \\DLEpayment_preimage\CAN\ACK \SOH(\tR\SIpaymentPreimage\DC2\ESC\n\
      \\tvalue_sat\CAN\a \SOH(\ETXR\bvalueSat\DC2\GS\n\
      \\n\
      \value_msat\CAN\b \SOH(\ETXR\tvalueMsat\DC2'\n\
      \\SIpayment_request\CAN\t \SOH(\tR\SOpaymentRequest\DC24\n\
      \\ACKstatus\CAN\n\
      \ \SOH(\SO2\FS.lnrpc.Payment.PaymentStatusR\ACKstatus\DC2\ETB\n\
      \\afee_sat\CAN\v \SOH(\ETXR\ACKfeeSat\DC2\EM\n\
      \\bfee_msat\CAN\f \SOH(\ETXR\afeeMsat\DC2(\n\
      \\DLEcreation_time_ns\CAN\r \SOH(\ETXR\SOcreationTimeNs\DC2(\n\
      \\ENQhtlcs\CAN\SO \ETX(\v2\DC2.lnrpc.HTLCAttemptR\ENQhtlcs\DC2#\n\
      \\rpayment_index\CAN\SI \SOH(\EOTR\fpaymentIndex\DC2B\n\
      \\SOfailure_reason\CAN\DLE \SOH(\SO2\ESC.lnrpc.PaymentFailureReasonR\rfailureReason\"F\n\
      \\rPaymentStatus\DC2\v\n\
      \\aUNKNOWN\DLE\NUL\DC2\r\n\
      \\tIN_FLIGHT\DLE\SOH\DC2\r\n\
      \\tSUCCEEDED\DLE\STX\DC2\n\
      \\n\
      \\ACKFAILED\DLE\ETXJ\EOT\b\EOT\DLE\ENQ"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        paymentHash__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payment_hash"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"paymentHash")) ::
              Data.ProtoLens.FieldDescriptor Payment
        value__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "value"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"value")) ::
              Data.ProtoLens.FieldDescriptor Payment
        creationDate__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "creation_date"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"creationDate")) ::
              Data.ProtoLens.FieldDescriptor Payment
        fee__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fee"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"fee")) ::
              Data.ProtoLens.FieldDescriptor Payment
        paymentPreimage__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payment_preimage"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"paymentPreimage")) ::
              Data.ProtoLens.FieldDescriptor Payment
        valueSat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "value_sat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"valueSat")) ::
              Data.ProtoLens.FieldDescriptor Payment
        valueMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "value_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"valueMsat")) ::
              Data.ProtoLens.FieldDescriptor Payment
        paymentRequest__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payment_request"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"paymentRequest")) ::
              Data.ProtoLens.FieldDescriptor Payment
        status__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "status"
              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
                 Data.ProtoLens.FieldTypeDescriptor Payment'PaymentStatus)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"status")) ::
              Data.ProtoLens.FieldDescriptor Payment
        feeSat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fee_sat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"feeSat")) ::
              Data.ProtoLens.FieldDescriptor Payment
        feeMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fee_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"feeMsat")) ::
              Data.ProtoLens.FieldDescriptor Payment
        creationTimeNs__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "creation_time_ns"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"creationTimeNs")) ::
              Data.ProtoLens.FieldDescriptor Payment
        htlcs__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "htlcs"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor HTLCAttempt)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked (Data.ProtoLens.Field.field @"htlcs")) ::
              Data.ProtoLens.FieldDescriptor Payment
        paymentIndex__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "payment_index"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"paymentIndex")) ::
              Data.ProtoLens.FieldDescriptor Payment
        failureReason__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "failure_reason"
              (Data.ProtoLens.ScalarField Data.ProtoLens.EnumField ::
                 Data.ProtoLens.FieldTypeDescriptor PaymentFailureReason)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"failureReason")) ::
              Data.ProtoLens.FieldDescriptor Payment
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, paymentHash__field_descriptor),
           (Data.ProtoLens.Tag 2, value__field_descriptor),
           (Data.ProtoLens.Tag 3, creationDate__field_descriptor),
           (Data.ProtoLens.Tag 5, fee__field_descriptor),
           (Data.ProtoLens.Tag 6, paymentPreimage__field_descriptor),
           (Data.ProtoLens.Tag 7, valueSat__field_descriptor),
           (Data.ProtoLens.Tag 8, valueMsat__field_descriptor),
           (Data.ProtoLens.Tag 9, paymentRequest__field_descriptor),
           (Data.ProtoLens.Tag 10, status__field_descriptor),
           (Data.ProtoLens.Tag 11, feeSat__field_descriptor),
           (Data.ProtoLens.Tag 12, feeMsat__field_descriptor),
           (Data.ProtoLens.Tag 13, creationTimeNs__field_descriptor),
           (Data.ProtoLens.Tag 14, htlcs__field_descriptor),
           (Data.ProtoLens.Tag 15, paymentIndex__field_descriptor),
           (Data.ProtoLens.Tag 16, failureReason__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _Payment'_unknownFields
        (\ x__ y__ -> x__ {_Payment'_unknownFields = y__})
  defMessage
    = Payment'_constructor
        {_Payment'paymentHash = Data.ProtoLens.fieldDefault,
         _Payment'value = Data.ProtoLens.fieldDefault,
         _Payment'creationDate = Data.ProtoLens.fieldDefault,
         _Payment'fee = Data.ProtoLens.fieldDefault,
         _Payment'paymentPreimage = Data.ProtoLens.fieldDefault,
         _Payment'valueSat = Data.ProtoLens.fieldDefault,
         _Payment'valueMsat = Data.ProtoLens.fieldDefault,
         _Payment'paymentRequest = Data.ProtoLens.fieldDefault,
         _Payment'status = Data.ProtoLens.fieldDefault,
         _Payment'feeSat = Data.ProtoLens.fieldDefault,
         _Payment'feeMsat = Data.ProtoLens.fieldDefault,
         _Payment'creationTimeNs = Data.ProtoLens.fieldDefault,
         _Payment'htlcs = Data.Vector.Generic.empty,
         _Payment'paymentIndex = Data.ProtoLens.fieldDefault,
         _Payment'failureReason = Data.ProtoLens.fieldDefault,
         _Payment'_unknownFields = []}
  parseMessage
    = let
        loop ::
          Payment
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld HTLCAttempt
             -> Data.ProtoLens.Encoding.Bytes.Parser Payment
        loop x mutable'htlcs
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'htlcs <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                        (Data.ProtoLens.Encoding.Growing.unsafeFreeze mutable'htlcs)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'htlcs") frozen'htlcs x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "payment_hash"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"paymentHash") y x)
                                  mutable'htlcs
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "value"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"value") y x)
                                  mutable'htlcs
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "creation_date"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"creationDate") y x)
                                  mutable'htlcs
                        40
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "fee"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"fee") y x)
                                  mutable'htlcs
                        50
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "payment_preimage"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"paymentPreimage") y x)
                                  mutable'htlcs
                        56
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "value_sat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"valueSat") y x)
                                  mutable'htlcs
                        64
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "value_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"valueMsat") y x)
                                  mutable'htlcs
                        74
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "payment_request"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"paymentRequest") y x)
                                  mutable'htlcs
                        80
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.toEnum
                                          (Prelude.fmap
                                             Prelude.fromIntegral
                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
                                       "status"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"status") y x)
                                  mutable'htlcs
                        88
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "fee_sat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"feeSat") y x)
                                  mutable'htlcs
                        96
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "fee_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"feeMsat") y x)
                                  mutable'htlcs
                        104
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "creation_time_ns"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"creationTimeNs") y x)
                                  mutable'htlcs
                        114
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "htlcs"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append mutable'htlcs y)
                                loop x v
                        120
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "payment_index"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"paymentIndex") y x)
                                  mutable'htlcs
                        128
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.toEnum
                                          (Prelude.fmap
                                             Prelude.fromIntegral
                                             Data.ProtoLens.Encoding.Bytes.getVarInt))
                                       "failure_reason"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"failureReason") y x)
                                  mutable'htlcs
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'htlcs
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'htlcs <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                 Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'htlcs)
          "Payment"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v
                  = Lens.Family2.view (Data.ProtoLens.Field.field @"paymentHash") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"value") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         ((Prelude..)
                            Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view (Data.ProtoLens.Field.field @"creationDate") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                   ((Data.Monoid.<>)
                      (let _v = Lens.Family2.view (Data.ProtoLens.Field.field @"fee") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
                               ((Prelude..)
                                  Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                      ((Data.Monoid.<>)
                         (let
                            _v
                              = Lens.Family2.view
                                  (Data.ProtoLens.Field.field @"paymentPreimage") _x
                          in
                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                Data.Monoid.mempty
                            else
                                (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 50)
                                  ((Prelude..)
                                     (\ bs
                                        -> (Data.Monoid.<>)
                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                (Prelude.fromIntegral (Data.ByteString.length bs)))
                                             (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                     Data.Text.Encoding.encodeUtf8 _v))
                         ((Data.Monoid.<>)
                            (let
                               _v = Lens.Family2.view (Data.ProtoLens.Field.field @"valueSat") _x
                             in
                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                   Data.Monoid.mempty
                               else
                                   (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 56)
                                     ((Prelude..)
                                        Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral
                                        _v))
                            ((Data.Monoid.<>)
                               (let
                                  _v
                                    = Lens.Family2.view (Data.ProtoLens.Field.field @"valueMsat") _x
                                in
                                  if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                      Data.Monoid.mempty
                                  else
                                      (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt 64)
                                        ((Prelude..)
                                           Data.ProtoLens.Encoding.Bytes.putVarInt
                                           Prelude.fromIntegral _v))
                               ((Data.Monoid.<>)
                                  (let
                                     _v
                                       = Lens.Family2.view
                                           (Data.ProtoLens.Field.field @"paymentRequest") _x
                                   in
                                     if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                         Data.Monoid.mempty
                                     else
                                         (Data.Monoid.<>)
                                           (Data.ProtoLens.Encoding.Bytes.putVarInt 74)
                                           ((Prelude..)
                                              (\ bs
                                                 -> (Data.Monoid.<>)
                                                      (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                         (Prelude.fromIntegral
                                                            (Data.ByteString.length bs)))
                                                      (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                              Data.Text.Encoding.encodeUtf8 _v))
                                  ((Data.Monoid.<>)
                                     (let
                                        _v
                                          = Lens.Family2.view
                                              (Data.ProtoLens.Field.field @"status") _x
                                      in
                                        if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                            Data.Monoid.mempty
                                        else
                                            (Data.Monoid.<>)
                                              (Data.ProtoLens.Encoding.Bytes.putVarInt 80)
                                              ((Prelude..)
                                                 ((Prelude..)
                                                    Data.ProtoLens.Encoding.Bytes.putVarInt
                                                    Prelude.fromIntegral)
                                                 Prelude.fromEnum _v))
                                     ((Data.Monoid.<>)
                                        (let
                                           _v
                                             = Lens.Family2.view
                                                 (Data.ProtoLens.Field.field @"feeSat") _x
                                         in
                                           if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                               Data.Monoid.mempty
                                           else
                                               (Data.Monoid.<>)
                                                 (Data.ProtoLens.Encoding.Bytes.putVarInt 88)
                                                 ((Prelude..)
                                                    Data.ProtoLens.Encoding.Bytes.putVarInt
                                                    Prelude.fromIntegral _v))
                                        ((Data.Monoid.<>)
                                           (let
                                              _v
                                                = Lens.Family2.view
                                                    (Data.ProtoLens.Field.field @"feeMsat") _x
                                            in
                                              if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                                  Data.Monoid.mempty
                                              else
                                                  (Data.Monoid.<>)
                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt 96)
                                                    ((Prelude..)
                                                       Data.ProtoLens.Encoding.Bytes.putVarInt
                                                       Prelude.fromIntegral _v))
                                           ((Data.Monoid.<>)
                                              (let
                                                 _v
                                                   = Lens.Family2.view
                                                       (Data.ProtoLens.Field.field
                                                          @"creationTimeNs")
                                                       _x
                                               in
                                                 if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                                     Data.Monoid.mempty
                                                 else
                                                     (Data.Monoid.<>)
                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt 104)
                                                       ((Prelude..)
                                                          Data.ProtoLens.Encoding.Bytes.putVarInt
                                                          Prelude.fromIntegral _v))
                                              ((Data.Monoid.<>)
                                                 (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                                                    (\ _v
                                                       -> (Data.Monoid.<>)
                                                            (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                               114)
                                                            ((Prelude..)
                                                               (\ bs
                                                                  -> (Data.Monoid.<>)
                                                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                          (Prelude.fromIntegral
                                                                             (Data.ByteString.length
                                                                                bs)))
                                                                       (Data.ProtoLens.Encoding.Bytes.putBytes
                                                                          bs))
                                                               Data.ProtoLens.encodeMessage _v))
                                                    (Lens.Family2.view
                                                       (Data.ProtoLens.Field.field @"vec'htlcs")
                                                       _x))
                                                 ((Data.Monoid.<>)
                                                    (let
                                                       _v
                                                         = Lens.Family2.view
                                                             (Data.ProtoLens.Field.field
                                                                @"paymentIndex")
                                                             _x
                                                     in
                                                       if (Prelude.==)
                                                            _v Data.ProtoLens.fieldDefault then
                                                           Data.Monoid.mempty
                                                       else
                                                           (Data.Monoid.<>)
                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                120)
                                                             (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                _v))
                                                    ((Data.Monoid.<>)
                                                       (let
                                                          _v
                                                            = Lens.Family2.view
                                                                (Data.ProtoLens.Field.field
                                                                   @"failureReason")
                                                                _x
                                                        in
                                                          if (Prelude.==)
                                                               _v Data.ProtoLens.fieldDefault then
                                                              Data.Monoid.mempty
                                                          else
                                                              (Data.Monoid.<>)
                                                                (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                   128)
                                                                ((Prelude..)
                                                                   ((Prelude..)
                                                                      Data.ProtoLens.Encoding.Bytes.putVarInt
                                                                      Prelude.fromIntegral)
                                                                   Prelude.fromEnum _v))
                                                       (Data.ProtoLens.Encoding.Wire.buildFieldSet
                                                          (Lens.Family2.view
                                                             Data.ProtoLens.unknownFields
                                                             _x))))))))))))))))
instance Control.DeepSeq.NFData Payment where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_Payment'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_Payment'paymentHash x__)
                (Control.DeepSeq.deepseq
                   (_Payment'value x__)
                   (Control.DeepSeq.deepseq
                      (_Payment'creationDate x__)
                      (Control.DeepSeq.deepseq
                         (_Payment'fee x__)
                         (Control.DeepSeq.deepseq
                            (_Payment'paymentPreimage x__)
                            (Control.DeepSeq.deepseq
                               (_Payment'valueSat x__)
                               (Control.DeepSeq.deepseq
                                  (_Payment'valueMsat x__)
                                  (Control.DeepSeq.deepseq
                                     (_Payment'paymentRequest x__)
                                     (Control.DeepSeq.deepseq
                                        (_Payment'status x__)
                                        (Control.DeepSeq.deepseq
                                           (_Payment'feeSat x__)
                                           (Control.DeepSeq.deepseq
                                              (_Payment'feeMsat x__)
                                              (Control.DeepSeq.deepseq
                                                 (_Payment'creationTimeNs x__)
                                                 (Control.DeepSeq.deepseq
                                                    (_Payment'htlcs x__)
                                                    (Control.DeepSeq.deepseq
                                                       (_Payment'paymentIndex x__)
                                                       (Control.DeepSeq.deepseq
                                                          (_Payment'failureReason x__)
                                                          ())))))))))))))))
newtype Payment'PaymentStatus'UnrecognizedValue
  = Payment'PaymentStatus'UnrecognizedValue Data.Int.Int32
  deriving stock (Prelude.Eq,
                  Prelude.Ord,
                  Prelude.Show,
                  GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out Payment'PaymentStatus'UnrecognizedValue
data Payment'PaymentStatus
  = Payment'UNKNOWN |
    Payment'IN_FLIGHT |
    Payment'SUCCEEDED |
    Payment'FAILED |
    Payment'PaymentStatus'Unrecognized !Payment'PaymentStatus'UnrecognizedValue
  deriving stock (Prelude.Show,
                  Prelude.Eq,
                  Prelude.Ord,
                  GHC.Generics.Generic)
instance Data.ProtoLens.MessageEnum Payment'PaymentStatus where
  maybeToEnum 0 = Prelude.Just Payment'UNKNOWN
  maybeToEnum 1 = Prelude.Just Payment'IN_FLIGHT
  maybeToEnum 2 = Prelude.Just Payment'SUCCEEDED
  maybeToEnum 3 = Prelude.Just Payment'FAILED
  maybeToEnum k
    = Prelude.Just
        (Payment'PaymentStatus'Unrecognized
           (Payment'PaymentStatus'UnrecognizedValue (Prelude.fromIntegral k)))
  showEnum Payment'UNKNOWN = "UNKNOWN"
  showEnum Payment'IN_FLIGHT = "IN_FLIGHT"
  showEnum Payment'SUCCEEDED = "SUCCEEDED"
  showEnum Payment'FAILED = "FAILED"
  showEnum
    (Payment'PaymentStatus'Unrecognized (Payment'PaymentStatus'UnrecognizedValue k))
    = Prelude.show k
  readEnum k
    | (Prelude.==) k "UNKNOWN" = Prelude.Just Payment'UNKNOWN
    | (Prelude.==) k "IN_FLIGHT" = Prelude.Just Payment'IN_FLIGHT
    | (Prelude.==) k "SUCCEEDED" = Prelude.Just Payment'SUCCEEDED
    | (Prelude.==) k "FAILED" = Prelude.Just Payment'FAILED
    | Prelude.otherwise
    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
instance Prelude.Bounded Payment'PaymentStatus where
  minBound = Payment'UNKNOWN
  maxBound = Payment'FAILED
instance Prelude.Enum Payment'PaymentStatus where
  toEnum k__
    = Prelude.maybe
        (Prelude.error
           ((Prelude.++)
              "toEnum: unknown value for enum PaymentStatus: "
              (Prelude.show k__)))
        Prelude.id (Data.ProtoLens.maybeToEnum k__)
  fromEnum Payment'UNKNOWN = 0
  fromEnum Payment'IN_FLIGHT = 1
  fromEnum Payment'SUCCEEDED = 2
  fromEnum Payment'FAILED = 3
  fromEnum
    (Payment'PaymentStatus'Unrecognized (Payment'PaymentStatus'UnrecognizedValue k))
    = Prelude.fromIntegral k
  succ Payment'FAILED
    = Prelude.error
        "Payment'PaymentStatus.succ: bad argument Payment'FAILED. This value would be out of bounds."
  succ Payment'UNKNOWN = Payment'IN_FLIGHT
  succ Payment'IN_FLIGHT = Payment'SUCCEEDED
  succ Payment'SUCCEEDED = Payment'FAILED
  succ (Payment'PaymentStatus'Unrecognized _)
    = Prelude.error
        "Payment'PaymentStatus.succ: bad argument: unrecognized value"
  pred Payment'UNKNOWN
    = Prelude.error
        "Payment'PaymentStatus.pred: bad argument Payment'UNKNOWN. This value would be out of bounds."
  pred Payment'IN_FLIGHT = Payment'UNKNOWN
  pred Payment'SUCCEEDED = Payment'IN_FLIGHT
  pred Payment'FAILED = Payment'SUCCEEDED
  pred (Payment'PaymentStatus'Unrecognized _)
    = Prelude.error
        "Payment'PaymentStatus.pred: bad argument: unrecognized value"
  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault Payment'PaymentStatus where
  fieldDefault = Payment'UNKNOWN
instance Control.DeepSeq.NFData Payment'PaymentStatus where
  rnf x__ = Prelude.seq x__ ()
instance Text.PrettyPrint.GenericPretty.Out Payment'PaymentStatus
newtype PaymentFailureReason'UnrecognizedValue
  = PaymentFailureReason'UnrecognizedValue Data.Int.Int32
  deriving stock (Prelude.Eq,
                  Prelude.Ord,
                  Prelude.Show,
                  GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out PaymentFailureReason'UnrecognizedValue
data PaymentFailureReason
  = FAILURE_REASON_NONE |
    FAILURE_REASON_TIMEOUT |
    FAILURE_REASON_NO_ROUTE |
    FAILURE_REASON_ERROR |
    FAILURE_REASON_INCORRECT_PAYMENT_DETAILS |
    FAILURE_REASON_INSUFFICIENT_BALANCE |
    PaymentFailureReason'Unrecognized !PaymentFailureReason'UnrecognizedValue
  deriving stock (Prelude.Show,
                  Prelude.Eq,
                  Prelude.Ord,
                  GHC.Generics.Generic)
instance Data.ProtoLens.MessageEnum PaymentFailureReason where
  maybeToEnum 0 = Prelude.Just FAILURE_REASON_NONE
  maybeToEnum 1 = Prelude.Just FAILURE_REASON_TIMEOUT
  maybeToEnum 2 = Prelude.Just FAILURE_REASON_NO_ROUTE
  maybeToEnum 3 = Prelude.Just FAILURE_REASON_ERROR
  maybeToEnum 4
    = Prelude.Just FAILURE_REASON_INCORRECT_PAYMENT_DETAILS
  maybeToEnum 5 = Prelude.Just FAILURE_REASON_INSUFFICIENT_BALANCE
  maybeToEnum k
    = Prelude.Just
        (PaymentFailureReason'Unrecognized
           (PaymentFailureReason'UnrecognizedValue (Prelude.fromIntegral k)))
  showEnum FAILURE_REASON_NONE = "FAILURE_REASON_NONE"
  showEnum FAILURE_REASON_TIMEOUT = "FAILURE_REASON_TIMEOUT"
  showEnum FAILURE_REASON_NO_ROUTE = "FAILURE_REASON_NO_ROUTE"
  showEnum FAILURE_REASON_ERROR = "FAILURE_REASON_ERROR"
  showEnum FAILURE_REASON_INCORRECT_PAYMENT_DETAILS
    = "FAILURE_REASON_INCORRECT_PAYMENT_DETAILS"
  showEnum FAILURE_REASON_INSUFFICIENT_BALANCE
    = "FAILURE_REASON_INSUFFICIENT_BALANCE"
  showEnum
    (PaymentFailureReason'Unrecognized (PaymentFailureReason'UnrecognizedValue k))
    = Prelude.show k
  readEnum k
    | (Prelude.==) k "FAILURE_REASON_NONE"
    = Prelude.Just FAILURE_REASON_NONE
    | (Prelude.==) k "FAILURE_REASON_TIMEOUT"
    = Prelude.Just FAILURE_REASON_TIMEOUT
    | (Prelude.==) k "FAILURE_REASON_NO_ROUTE"
    = Prelude.Just FAILURE_REASON_NO_ROUTE
    | (Prelude.==) k "FAILURE_REASON_ERROR"
    = Prelude.Just FAILURE_REASON_ERROR
    | (Prelude.==) k "FAILURE_REASON_INCORRECT_PAYMENT_DETAILS"
    = Prelude.Just FAILURE_REASON_INCORRECT_PAYMENT_DETAILS
    | (Prelude.==) k "FAILURE_REASON_INSUFFICIENT_BALANCE"
    = Prelude.Just FAILURE_REASON_INSUFFICIENT_BALANCE
    | Prelude.otherwise
    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
instance Prelude.Bounded PaymentFailureReason where
  minBound = FAILURE_REASON_NONE
  maxBound = FAILURE_REASON_INSUFFICIENT_BALANCE
instance Prelude.Enum PaymentFailureReason where
  toEnum k__
    = Prelude.maybe
        (Prelude.error
           ((Prelude.++)
              "toEnum: unknown value for enum PaymentFailureReason: "
              (Prelude.show k__)))
        Prelude.id (Data.ProtoLens.maybeToEnum k__)
  fromEnum FAILURE_REASON_NONE = 0
  fromEnum FAILURE_REASON_TIMEOUT = 1
  fromEnum FAILURE_REASON_NO_ROUTE = 2
  fromEnum FAILURE_REASON_ERROR = 3
  fromEnum FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 4
  fromEnum FAILURE_REASON_INSUFFICIENT_BALANCE = 5
  fromEnum
    (PaymentFailureReason'Unrecognized (PaymentFailureReason'UnrecognizedValue k))
    = Prelude.fromIntegral k
  succ FAILURE_REASON_INSUFFICIENT_BALANCE
    = Prelude.error
        "PaymentFailureReason.succ: bad argument FAILURE_REASON_INSUFFICIENT_BALANCE. This value would be out of bounds."
  succ FAILURE_REASON_NONE = FAILURE_REASON_TIMEOUT
  succ FAILURE_REASON_TIMEOUT = FAILURE_REASON_NO_ROUTE
  succ FAILURE_REASON_NO_ROUTE = FAILURE_REASON_ERROR
  succ FAILURE_REASON_ERROR
    = FAILURE_REASON_INCORRECT_PAYMENT_DETAILS
  succ FAILURE_REASON_INCORRECT_PAYMENT_DETAILS
    = FAILURE_REASON_INSUFFICIENT_BALANCE
  succ (PaymentFailureReason'Unrecognized _)
    = Prelude.error
        "PaymentFailureReason.succ: bad argument: unrecognized value"
  pred FAILURE_REASON_NONE
    = Prelude.error
        "PaymentFailureReason.pred: bad argument FAILURE_REASON_NONE. This value would be out of bounds."
  pred FAILURE_REASON_TIMEOUT = FAILURE_REASON_NONE
  pred FAILURE_REASON_NO_ROUTE = FAILURE_REASON_TIMEOUT
  pred FAILURE_REASON_ERROR = FAILURE_REASON_NO_ROUTE
  pred FAILURE_REASON_INCORRECT_PAYMENT_DETAILS
    = FAILURE_REASON_ERROR
  pred FAILURE_REASON_INSUFFICIENT_BALANCE
    = FAILURE_REASON_INCORRECT_PAYMENT_DETAILS
  pred (PaymentFailureReason'Unrecognized _)
    = Prelude.error
        "PaymentFailureReason.pred: bad argument: unrecognized value"
  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault PaymentFailureReason where
  fieldDefault = FAILURE_REASON_NONE
instance Control.DeepSeq.NFData PaymentFailureReason where
  rnf x__ = Prelude.seq x__ ()
instance Text.PrettyPrint.GenericPretty.Out PaymentFailureReason
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.rHashStr' @:: Lens' PaymentHash Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.rHash' @:: Lens' PaymentHash Data.ByteString.ByteString@ -}
data PaymentHash
  = PaymentHash'_constructor {_PaymentHash'rHashStr :: !Data.Text.Text,
                              _PaymentHash'rHash :: !Data.ByteString.ByteString,
                              _PaymentHash'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show PaymentHash where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out PaymentHash
instance Data.ProtoLens.Field.HasField PaymentHash "rHashStr" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PaymentHash'rHashStr
           (\ x__ y__ -> x__ {_PaymentHash'rHashStr = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PaymentHash "rHash" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PaymentHash'rHash (\ x__ y__ -> x__ {_PaymentHash'rHash = y__}))
        Prelude.id
instance Data.ProtoLens.Message PaymentHash where
  messageName _ = Data.Text.pack "lnrpc.PaymentHash"
  packedMessageDescriptor _
    = "\n\
      \\vPaymentHash\DC2 \n\
      \\n\
      \r_hash_str\CAN\SOH \SOH(\tR\brHashStrB\STX\CAN\SOH\DC2\NAK\n\
      \\ACKr_hash\CAN\STX \SOH(\fR\ENQrHash"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        rHashStr__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "r_hash_str"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"rHashStr")) ::
              Data.ProtoLens.FieldDescriptor PaymentHash
        rHash__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "r_hash"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"rHash")) ::
              Data.ProtoLens.FieldDescriptor PaymentHash
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, rHashStr__field_descriptor),
           (Data.ProtoLens.Tag 2, rHash__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _PaymentHash'_unknownFields
        (\ x__ y__ -> x__ {_PaymentHash'_unknownFields = y__})
  defMessage
    = PaymentHash'_constructor
        {_PaymentHash'rHashStr = Data.ProtoLens.fieldDefault,
         _PaymentHash'rHash = Data.ProtoLens.fieldDefault,
         _PaymentHash'_unknownFields = []}
  parseMessage
    = let
        loop ::
          PaymentHash -> Data.ProtoLens.Encoding.Bytes.Parser PaymentHash
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "r_hash_str"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"rHashStr") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "r_hash"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"rHash") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "PaymentHash"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"rHashStr") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"rHash") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            _v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData PaymentHash where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_PaymentHash'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_PaymentHash'rHashStr x__)
                (Control.DeepSeq.deepseq (_PaymentHash'rHash x__) ()))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.baseFeeMsat' @:: Lens' PolicyUpdateRequest Data.Int.Int64@
         * 'Proto.Lnrpc.Ln1_Fields.feeRate' @:: Lens' PolicyUpdateRequest Prelude.Double@
         * 'Proto.Lnrpc.Ln1_Fields.timeLockDelta' @:: Lens' PolicyUpdateRequest Data.Word.Word32@
         * 'Proto.Lnrpc.Ln1_Fields.maxHtlcMsat' @:: Lens' PolicyUpdateRequest Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.minHtlcMsat' @:: Lens' PolicyUpdateRequest Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.minHtlcMsatSpecified' @:: Lens' PolicyUpdateRequest Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'scope' @:: Lens' PolicyUpdateRequest (Prelude.Maybe PolicyUpdateRequest'Scope)@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'global' @:: Lens' PolicyUpdateRequest (Prelude.Maybe Prelude.Bool)@
         * 'Proto.Lnrpc.Ln1_Fields.global' @:: Lens' PolicyUpdateRequest Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'chanPoint' @:: Lens' PolicyUpdateRequest (Prelude.Maybe Proto.Lnrpc.Ln0.ChannelPoint)@
         * 'Proto.Lnrpc.Ln1_Fields.chanPoint' @:: Lens' PolicyUpdateRequest Proto.Lnrpc.Ln0.ChannelPoint@ -}
data PolicyUpdateRequest
  = PolicyUpdateRequest'_constructor {_PolicyUpdateRequest'baseFeeMsat :: !Data.Int.Int64,
                                      _PolicyUpdateRequest'feeRate :: !Prelude.Double,
                                      _PolicyUpdateRequest'timeLockDelta :: !Data.Word.Word32,
                                      _PolicyUpdateRequest'maxHtlcMsat :: !Data.Word.Word64,
                                      _PolicyUpdateRequest'minHtlcMsat :: !Data.Word.Word64,
                                      _PolicyUpdateRequest'minHtlcMsatSpecified :: !Prelude.Bool,
                                      _PolicyUpdateRequest'scope :: !(Prelude.Maybe PolicyUpdateRequest'Scope),
                                      _PolicyUpdateRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show PolicyUpdateRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out PolicyUpdateRequest
data PolicyUpdateRequest'Scope
  = PolicyUpdateRequest'Global !Prelude.Bool |
    PolicyUpdateRequest'ChanPoint !Proto.Lnrpc.Ln0.ChannelPoint
  deriving stock (Prelude.Show,
                  Prelude.Eq,
                  Prelude.Ord,
                  GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out PolicyUpdateRequest'Scope
instance Data.ProtoLens.Field.HasField PolicyUpdateRequest "baseFeeMsat" Data.Int.Int64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateRequest'baseFeeMsat
           (\ x__ y__ -> x__ {_PolicyUpdateRequest'baseFeeMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PolicyUpdateRequest "feeRate" Prelude.Double where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateRequest'feeRate
           (\ x__ y__ -> x__ {_PolicyUpdateRequest'feeRate = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PolicyUpdateRequest "timeLockDelta" Data.Word.Word32 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateRequest'timeLockDelta
           (\ x__ y__ -> x__ {_PolicyUpdateRequest'timeLockDelta = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PolicyUpdateRequest "maxHtlcMsat" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateRequest'maxHtlcMsat
           (\ x__ y__ -> x__ {_PolicyUpdateRequest'maxHtlcMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PolicyUpdateRequest "minHtlcMsat" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateRequest'minHtlcMsat
           (\ x__ y__ -> x__ {_PolicyUpdateRequest'minHtlcMsat = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PolicyUpdateRequest "minHtlcMsatSpecified" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateRequest'minHtlcMsatSpecified
           (\ x__ y__
              -> x__ {_PolicyUpdateRequest'minHtlcMsatSpecified = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PolicyUpdateRequest "maybe'scope" (Prelude.Maybe PolicyUpdateRequest'Scope) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateRequest'scope
           (\ x__ y__ -> x__ {_PolicyUpdateRequest'scope = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField PolicyUpdateRequest "maybe'global" (Prelude.Maybe Prelude.Bool) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateRequest'scope
           (\ x__ y__ -> x__ {_PolicyUpdateRequest'scope = y__}))
        (Lens.Family2.Unchecked.lens
           (\ x__
              -> case x__ of
                   (Prelude.Just (PolicyUpdateRequest'Global x__val))
                     -> Prelude.Just x__val
                   _otherwise -> Prelude.Nothing)
           (\ _ y__ -> Prelude.fmap PolicyUpdateRequest'Global y__))
instance Data.ProtoLens.Field.HasField PolicyUpdateRequest "global" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateRequest'scope
           (\ x__ y__ -> x__ {_PolicyUpdateRequest'scope = y__}))
        ((Prelude..)
           (Lens.Family2.Unchecked.lens
              (\ x__
                 -> case x__ of
                      (Prelude.Just (PolicyUpdateRequest'Global x__val))
                        -> Prelude.Just x__val
                      _otherwise -> Prelude.Nothing)
              (\ _ y__ -> Prelude.fmap PolicyUpdateRequest'Global y__))
           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
instance Data.ProtoLens.Field.HasField PolicyUpdateRequest "maybe'chanPoint" (Prelude.Maybe Proto.Lnrpc.Ln0.ChannelPoint) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateRequest'scope
           (\ x__ y__ -> x__ {_PolicyUpdateRequest'scope = y__}))
        (Lens.Family2.Unchecked.lens
           (\ x__
              -> case x__ of
                   (Prelude.Just (PolicyUpdateRequest'ChanPoint x__val))
                     -> Prelude.Just x__val
                   _otherwise -> Prelude.Nothing)
           (\ _ y__ -> Prelude.fmap PolicyUpdateRequest'ChanPoint y__))
instance Data.ProtoLens.Field.HasField PolicyUpdateRequest "chanPoint" Proto.Lnrpc.Ln0.ChannelPoint where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateRequest'scope
           (\ x__ y__ -> x__ {_PolicyUpdateRequest'scope = y__}))
        ((Prelude..)
           (Lens.Family2.Unchecked.lens
              (\ x__
                 -> case x__ of
                      (Prelude.Just (PolicyUpdateRequest'ChanPoint x__val))
                        -> Prelude.Just x__val
                      _otherwise -> Prelude.Nothing)
              (\ _ y__ -> Prelude.fmap PolicyUpdateRequest'ChanPoint y__))
           (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message PolicyUpdateRequest where
  messageName _ = Data.Text.pack "lnrpc.PolicyUpdateRequest"
  packedMessageDescriptor _
    = "\n\
      \\DC3PolicyUpdateRequest\DC2\CAN\n\
      \\ACKglobal\CAN\SOH \SOH(\bH\NULR\ACKglobal\DC24\n\
      \\n\
      \chan_point\CAN\STX \SOH(\v2\DC3.lnrpc.ChannelPointH\NULR\tchanPoint\DC2\"\n\
      \\rbase_fee_msat\CAN\ETX \SOH(\ETXR\vbaseFeeMsat\DC2\EM\n\
      \\bfee_rate\CAN\EOT \SOH(\SOHR\afeeRate\DC2&\n\
      \\SItime_lock_delta\CAN\ENQ \SOH(\rR\rtimeLockDelta\DC2\"\n\
      \\rmax_htlc_msat\CAN\ACK \SOH(\EOTR\vmaxHtlcMsat\DC2\"\n\
      \\rmin_htlc_msat\CAN\a \SOH(\EOTR\vminHtlcMsat\DC25\n\
      \\ETBmin_htlc_msat_specified\CAN\b \SOH(\bR\DC4minHtlcMsatSpecifiedB\a\n\
      \\ENQscope"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        baseFeeMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "base_fee_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"baseFeeMsat")) ::
              Data.ProtoLens.FieldDescriptor PolicyUpdateRequest
        feeRate__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "fee_rate"
              (Data.ProtoLens.ScalarField Data.ProtoLens.DoubleField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"feeRate")) ::
              Data.ProtoLens.FieldDescriptor PolicyUpdateRequest
        timeLockDelta__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "time_lock_delta"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt32Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"timeLockDelta")) ::
              Data.ProtoLens.FieldDescriptor PolicyUpdateRequest
        maxHtlcMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "max_htlc_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"maxHtlcMsat")) ::
              Data.ProtoLens.FieldDescriptor PolicyUpdateRequest
        minHtlcMsat__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "min_htlc_msat"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"minHtlcMsat")) ::
              Data.ProtoLens.FieldDescriptor PolicyUpdateRequest
        minHtlcMsatSpecified__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "min_htlc_msat_specified"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"minHtlcMsatSpecified")) ::
              Data.ProtoLens.FieldDescriptor PolicyUpdateRequest
        global__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "global"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'global")) ::
              Data.ProtoLens.FieldDescriptor PolicyUpdateRequest
        chanPoint__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_point"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Lnrpc.Ln0.ChannelPoint)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'chanPoint")) ::
              Data.ProtoLens.FieldDescriptor PolicyUpdateRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 3, baseFeeMsat__field_descriptor),
           (Data.ProtoLens.Tag 4, feeRate__field_descriptor),
           (Data.ProtoLens.Tag 5, timeLockDelta__field_descriptor),
           (Data.ProtoLens.Tag 6, maxHtlcMsat__field_descriptor),
           (Data.ProtoLens.Tag 7, minHtlcMsat__field_descriptor),
           (Data.ProtoLens.Tag 8, minHtlcMsatSpecified__field_descriptor),
           (Data.ProtoLens.Tag 1, global__field_descriptor),
           (Data.ProtoLens.Tag 2, chanPoint__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _PolicyUpdateRequest'_unknownFields
        (\ x__ y__ -> x__ {_PolicyUpdateRequest'_unknownFields = y__})
  defMessage
    = PolicyUpdateRequest'_constructor
        {_PolicyUpdateRequest'baseFeeMsat = Data.ProtoLens.fieldDefault,
         _PolicyUpdateRequest'feeRate = Data.ProtoLens.fieldDefault,
         _PolicyUpdateRequest'timeLockDelta = Data.ProtoLens.fieldDefault,
         _PolicyUpdateRequest'maxHtlcMsat = Data.ProtoLens.fieldDefault,
         _PolicyUpdateRequest'minHtlcMsat = Data.ProtoLens.fieldDefault,
         _PolicyUpdateRequest'minHtlcMsatSpecified = Data.ProtoLens.fieldDefault,
         _PolicyUpdateRequest'scope = Prelude.Nothing,
         _PolicyUpdateRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          PolicyUpdateRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser PolicyUpdateRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        24
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "base_fee_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"baseFeeMsat") y x)
                        33
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Data.ProtoLens.Encoding.Bytes.wordToDouble
                                          Data.ProtoLens.Encoding.Bytes.getFixed64)
                                       "fee_rate"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"feeRate") y x)
                        40
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          Prelude.fromIntegral
                                          Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "time_lock_delta"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"timeLockDelta") y x)
                        48
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "max_htlc_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"maxHtlcMsat") y x)
                        56
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "min_htlc_msat"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"minHtlcMsat") y x)
                        64
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "min_htlc_msat_specified"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"minHtlcMsatSpecified") y x)
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "global"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"global") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "chan_point"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"chanPoint") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "PolicyUpdateRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v
                  = Lens.Family2.view (Data.ProtoLens.Field.field @"baseFeeMsat") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 24)
                      ((Prelude..)
                         Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"feeRate") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 33)
                         ((Prelude..)
                            Data.ProtoLens.Encoding.Bytes.putFixed64
                            Data.ProtoLens.Encoding.Bytes.doubleToWord _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view
                            (Data.ProtoLens.Field.field @"timeLockDelta") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 40)
                            ((Prelude..)
                               Data.ProtoLens.Encoding.Bytes.putVarInt Prelude.fromIntegral _v))
                   ((Data.Monoid.<>)
                      (let
                         _v
                           = Lens.Family2.view (Data.ProtoLens.Field.field @"maxHtlcMsat") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 48)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                      ((Data.Monoid.<>)
                         (let
                            _v
                              = Lens.Family2.view (Data.ProtoLens.Field.field @"minHtlcMsat") _x
                          in
                            if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                Data.Monoid.mempty
                            else
                                (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt 56)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                         ((Data.Monoid.<>)
                            (let
                               _v
                                 = Lens.Family2.view
                                     (Data.ProtoLens.Field.field @"minHtlcMsatSpecified") _x
                             in
                               if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                                   Data.Monoid.mempty
                               else
                                   (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt 64)
                                     ((Prelude..)
                                        Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (\ b -> if b then 1 else 0) _v))
                            ((Data.Monoid.<>)
                               (case
                                    Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'scope") _x
                                of
                                  Prelude.Nothing -> Data.Monoid.mempty
                                  (Prelude.Just (PolicyUpdateRequest'Global v))
                                    -> (Data.Monoid.<>)
                                         (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                                         ((Prelude..)
                                            Data.ProtoLens.Encoding.Bytes.putVarInt
                                            (\ b -> if b then 1 else 0) v)
                                  (Prelude.Just (PolicyUpdateRequest'ChanPoint v))
                                    -> (Data.Monoid.<>)
                                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                                         ((Prelude..)
                                            (\ bs
                                               -> (Data.Monoid.<>)
                                                    (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                       (Prelude.fromIntegral
                                                          (Data.ByteString.length bs)))
                                                    (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                            Data.ProtoLens.encodeMessage v))
                               (Data.ProtoLens.Encoding.Wire.buildFieldSet
                                  (Lens.Family2.view Data.ProtoLens.unknownFields _x))))))))
instance Control.DeepSeq.NFData PolicyUpdateRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_PolicyUpdateRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_PolicyUpdateRequest'baseFeeMsat x__)
                (Control.DeepSeq.deepseq
                   (_PolicyUpdateRequest'feeRate x__)
                   (Control.DeepSeq.deepseq
                      (_PolicyUpdateRequest'timeLockDelta x__)
                      (Control.DeepSeq.deepseq
                         (_PolicyUpdateRequest'maxHtlcMsat x__)
                         (Control.DeepSeq.deepseq
                            (_PolicyUpdateRequest'minHtlcMsat x__)
                            (Control.DeepSeq.deepseq
                               (_PolicyUpdateRequest'minHtlcMsatSpecified x__)
                               (Control.DeepSeq.deepseq (_PolicyUpdateRequest'scope x__) ())))))))
instance Control.DeepSeq.NFData PolicyUpdateRequest'Scope where
  rnf (PolicyUpdateRequest'Global x__) = Control.DeepSeq.rnf x__
  rnf (PolicyUpdateRequest'ChanPoint x__) = Control.DeepSeq.rnf x__
_PolicyUpdateRequest'Global ::
  Data.ProtoLens.Prism.Prism' PolicyUpdateRequest'Scope Prelude.Bool
_PolicyUpdateRequest'Global
  = Data.ProtoLens.Prism.prism'
      PolicyUpdateRequest'Global
      (\ p__
         -> case p__ of
              (PolicyUpdateRequest'Global p__val) -> Prelude.Just p__val
              _otherwise -> Prelude.Nothing)
_PolicyUpdateRequest'ChanPoint ::
  Data.ProtoLens.Prism.Prism' PolicyUpdateRequest'Scope Proto.Lnrpc.Ln0.ChannelPoint
_PolicyUpdateRequest'ChanPoint
  = Data.ProtoLens.Prism.prism'
      PolicyUpdateRequest'ChanPoint
      (\ p__
         -> case p__ of
              (PolicyUpdateRequest'ChanPoint p__val) -> Prelude.Just p__val
              _otherwise -> Prelude.Nothing)
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.failedUpdates' @:: Lens' PolicyUpdateResponse [FailedUpdate]@
         * 'Proto.Lnrpc.Ln1_Fields.vec'failedUpdates' @:: Lens' PolicyUpdateResponse (Data.Vector.Vector FailedUpdate)@ -}
data PolicyUpdateResponse
  = PolicyUpdateResponse'_constructor {_PolicyUpdateResponse'failedUpdates :: !(Data.Vector.Vector FailedUpdate),
                                       _PolicyUpdateResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show PolicyUpdateResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out PolicyUpdateResponse
instance Data.ProtoLens.Field.HasField PolicyUpdateResponse "failedUpdates" [FailedUpdate] where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateResponse'failedUpdates
           (\ x__ y__ -> x__ {_PolicyUpdateResponse'failedUpdates = y__}))
        (Lens.Family2.Unchecked.lens
           Data.Vector.Generic.toList
           (\ _ y__ -> Data.Vector.Generic.fromList y__))
instance Data.ProtoLens.Field.HasField PolicyUpdateResponse "vec'failedUpdates" (Data.Vector.Vector FailedUpdate) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _PolicyUpdateResponse'failedUpdates
           (\ x__ y__ -> x__ {_PolicyUpdateResponse'failedUpdates = y__}))
        Prelude.id
instance Data.ProtoLens.Message PolicyUpdateResponse where
  messageName _ = Data.Text.pack "lnrpc.PolicyUpdateResponse"
  packedMessageDescriptor _
    = "\n\
      \\DC4PolicyUpdateResponse\DC2:\n\
      \\SOfailed_updates\CAN\SOH \ETX(\v2\DC3.lnrpc.FailedUpdateR\rfailedUpdates"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        failedUpdates__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "failed_updates"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor FailedUpdate)
              (Data.ProtoLens.RepeatedField
                 Data.ProtoLens.Unpacked
                 (Data.ProtoLens.Field.field @"failedUpdates")) ::
              Data.ProtoLens.FieldDescriptor PolicyUpdateResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, failedUpdates__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _PolicyUpdateResponse'_unknownFields
        (\ x__ y__ -> x__ {_PolicyUpdateResponse'_unknownFields = y__})
  defMessage
    = PolicyUpdateResponse'_constructor
        {_PolicyUpdateResponse'failedUpdates = Data.Vector.Generic.empty,
         _PolicyUpdateResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          PolicyUpdateResponse
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld FailedUpdate
             -> Data.ProtoLens.Encoding.Bytes.Parser PolicyUpdateResponse
        loop x mutable'failedUpdates
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do frozen'failedUpdates <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                                (Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                   mutable'failedUpdates)
                      (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t)
                           (Lens.Family2.set
                              (Data.ProtoLens.Field.field @"vec'failedUpdates")
                              frozen'failedUpdates x))
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do !y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Data.ProtoLens.Encoding.Bytes.isolate
                                              (Prelude.fromIntegral len)
                                              Data.ProtoLens.parseMessage)
                                        "failed_updates"
                                v <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Data.ProtoLens.Encoding.Growing.append
                                          mutable'failedUpdates y)
                                loop x v
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
                                  mutable'failedUpdates
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do mutable'failedUpdates <- Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                         Data.ProtoLens.Encoding.Growing.new
              loop Data.ProtoLens.defMessage mutable'failedUpdates)
          "PolicyUpdateResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v
                   -> (Data.Monoid.<>)
                        (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((Prelude..)
                           (\ bs
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt
                                      (Prelude.fromIntegral (Data.ByteString.length bs)))
                                   (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                           Data.ProtoLens.encodeMessage _v))
                (Lens.Family2.view
                   (Data.ProtoLens.Field.field @"vec'failedUpdates") _x))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData PolicyUpdateResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_PolicyUpdateResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_PolicyUpdateResponse'failedUpdates x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.methodFullUri' @:: Lens' RPCMessage Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.streamRpc' @:: Lens' RPCMessage Prelude.Bool@
         * 'Proto.Lnrpc.Ln1_Fields.typeName' @:: Lens' RPCMessage Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.serialized' @:: Lens' RPCMessage Data.ByteString.ByteString@ -}
data RPCMessage
  = RPCMessage'_constructor {_RPCMessage'methodFullUri :: !Data.Text.Text,
                             _RPCMessage'streamRpc :: !Prelude.Bool,
                             _RPCMessage'typeName :: !Data.Text.Text,
                             _RPCMessage'serialized :: !Data.ByteString.ByteString,
                             _RPCMessage'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show RPCMessage where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out RPCMessage
instance Data.ProtoLens.Field.HasField RPCMessage "methodFullUri" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMessage'methodFullUri
           (\ x__ y__ -> x__ {_RPCMessage'methodFullUri = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField RPCMessage "streamRpc" Prelude.Bool where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMessage'streamRpc
           (\ x__ y__ -> x__ {_RPCMessage'streamRpc = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField RPCMessage "typeName" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMessage'typeName
           (\ x__ y__ -> x__ {_RPCMessage'typeName = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField RPCMessage "serialized" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMessage'serialized
           (\ x__ y__ -> x__ {_RPCMessage'serialized = y__}))
        Prelude.id
instance Data.ProtoLens.Message RPCMessage where
  messageName _ = Data.Text.pack "lnrpc.RPCMessage"
  packedMessageDescriptor _
    = "\n\
      \\n\
      \RPCMessage\DC2&\n\
      \\SImethod_full_uri\CAN\SOH \SOH(\tR\rmethodFullUri\DC2\GS\n\
      \\n\
      \stream_rpc\CAN\STX \SOH(\bR\tstreamRpc\DC2\ESC\n\
      \\ttype_name\CAN\ETX \SOH(\tR\btypeName\DC2\RS\n\
      \\n\
      \serialized\CAN\EOT \SOH(\fR\n\
      \serialized"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        methodFullUri__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "method_full_uri"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"methodFullUri")) ::
              Data.ProtoLens.FieldDescriptor RPCMessage
        streamRpc__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "stream_rpc"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BoolField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"streamRpc")) ::
              Data.ProtoLens.FieldDescriptor RPCMessage
        typeName__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "type_name"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"typeName")) ::
              Data.ProtoLens.FieldDescriptor RPCMessage
        serialized__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "serialized"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"serialized")) ::
              Data.ProtoLens.FieldDescriptor RPCMessage
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, methodFullUri__field_descriptor),
           (Data.ProtoLens.Tag 2, streamRpc__field_descriptor),
           (Data.ProtoLens.Tag 3, typeName__field_descriptor),
           (Data.ProtoLens.Tag 4, serialized__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _RPCMessage'_unknownFields
        (\ x__ y__ -> x__ {_RPCMessage'_unknownFields = y__})
  defMessage
    = RPCMessage'_constructor
        {_RPCMessage'methodFullUri = Data.ProtoLens.fieldDefault,
         _RPCMessage'streamRpc = Data.ProtoLens.fieldDefault,
         _RPCMessage'typeName = Data.ProtoLens.fieldDefault,
         _RPCMessage'serialized = Data.ProtoLens.fieldDefault,
         _RPCMessage'_unknownFields = []}
  parseMessage
    = let
        loop ::
          RPCMessage -> Data.ProtoLens.Encoding.Bytes.Parser RPCMessage
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "method_full_uri"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"methodFullUri") y x)
                        16
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (Prelude.fmap
                                          ((Prelude./=) 0) Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "stream_rpc"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"streamRpc") y x)
                        26
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "type_name"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"typeName") y x)
                        34
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "serialized"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"serialized") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "RPCMessage"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v
                  = Lens.Family2.view
                      (Data.ProtoLens.Field.field @"methodFullUri") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             ((Data.Monoid.<>)
                (let
                   _v = Lens.Family2.view (Data.ProtoLens.Field.field @"streamRpc") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 16)
                         ((Prelude..)
                            Data.ProtoLens.Encoding.Bytes.putVarInt (\ b -> if b then 1 else 0)
                            _v))
                ((Data.Monoid.<>)
                   (let
                      _v = Lens.Family2.view (Data.ProtoLens.Field.field @"typeName") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                            ((Prelude..)
                               (\ bs
                                  -> (Data.Monoid.<>)
                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
                                          (Prelude.fromIntegral (Data.ByteString.length bs)))
                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                               Data.Text.Encoding.encodeUtf8 _v))
                   ((Data.Monoid.<>)
                      (let
                         _v
                           = Lens.Family2.view (Data.ProtoLens.Field.field @"serialized") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 34)
                               ((\ bs
                                   -> (Data.Monoid.<>)
                                        (Data.ProtoLens.Encoding.Bytes.putVarInt
                                           (Prelude.fromIntegral (Data.ByteString.length bs)))
                                        (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                  _v))
                      (Data.ProtoLens.Encoding.Wire.buildFieldSet
                         (Lens.Family2.view Data.ProtoLens.unknownFields _x)))))
instance Control.DeepSeq.NFData RPCMessage where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_RPCMessage'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_RPCMessage'methodFullUri x__)
                (Control.DeepSeq.deepseq
                   (_RPCMessage'streamRpc x__)
                   (Control.DeepSeq.deepseq
                      (_RPCMessage'typeName x__)
                      (Control.DeepSeq.deepseq (_RPCMessage'serialized x__) ()))))
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.requestId' @:: Lens' RPCMiddlewareRequest Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.rawMacaroon' @:: Lens' RPCMiddlewareRequest Data.ByteString.ByteString@
         * 'Proto.Lnrpc.Ln1_Fields.customCaveatCondition' @:: Lens' RPCMiddlewareRequest Data.Text.Text@
         * 'Proto.Lnrpc.Ln1_Fields.msgId' @:: Lens' RPCMiddlewareRequest Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'interceptType' @:: Lens' RPCMiddlewareRequest (Prelude.Maybe RPCMiddlewareRequest'InterceptType)@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'streamAuth' @:: Lens' RPCMiddlewareRequest (Prelude.Maybe StreamAuth)@
         * 'Proto.Lnrpc.Ln1_Fields.streamAuth' @:: Lens' RPCMiddlewareRequest StreamAuth@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'request' @:: Lens' RPCMiddlewareRequest (Prelude.Maybe RPCMessage)@
         * 'Proto.Lnrpc.Ln1_Fields.request' @:: Lens' RPCMiddlewareRequest RPCMessage@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'response' @:: Lens' RPCMiddlewareRequest (Prelude.Maybe RPCMessage)@
         * 'Proto.Lnrpc.Ln1_Fields.response' @:: Lens' RPCMiddlewareRequest RPCMessage@ -}
data RPCMiddlewareRequest
  = RPCMiddlewareRequest'_constructor {_RPCMiddlewareRequest'requestId :: !Data.Word.Word64,
                                       _RPCMiddlewareRequest'rawMacaroon :: !Data.ByteString.ByteString,
                                       _RPCMiddlewareRequest'customCaveatCondition :: !Data.Text.Text,
                                       _RPCMiddlewareRequest'msgId :: !Data.Word.Word64,
                                       _RPCMiddlewareRequest'interceptType :: !(Prelude.Maybe RPCMiddlewareRequest'InterceptType),
                                       _RPCMiddlewareRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show RPCMiddlewareRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out RPCMiddlewareRequest
data RPCMiddlewareRequest'InterceptType
  = RPCMiddlewareRequest'StreamAuth !StreamAuth |
    RPCMiddlewareRequest'Request !RPCMessage |
    RPCMiddlewareRequest'Response !RPCMessage
  deriving stock (Prelude.Show,
                  Prelude.Eq,
                  Prelude.Ord,
                  GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out RPCMiddlewareRequest'InterceptType
instance Data.ProtoLens.Field.HasField RPCMiddlewareRequest "requestId" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareRequest'requestId
           (\ x__ y__ -> x__ {_RPCMiddlewareRequest'requestId = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField RPCMiddlewareRequest "rawMacaroon" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareRequest'rawMacaroon
           (\ x__ y__ -> x__ {_RPCMiddlewareRequest'rawMacaroon = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField RPCMiddlewareRequest "customCaveatCondition" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareRequest'customCaveatCondition
           (\ x__ y__
              -> x__ {_RPCMiddlewareRequest'customCaveatCondition = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField RPCMiddlewareRequest "msgId" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareRequest'msgId
           (\ x__ y__ -> x__ {_RPCMiddlewareRequest'msgId = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField RPCMiddlewareRequest "maybe'interceptType" (Prelude.Maybe RPCMiddlewareRequest'InterceptType) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareRequest'interceptType
           (\ x__ y__ -> x__ {_RPCMiddlewareRequest'interceptType = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField RPCMiddlewareRequest "maybe'streamAuth" (Prelude.Maybe StreamAuth) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareRequest'interceptType
           (\ x__ y__ -> x__ {_RPCMiddlewareRequest'interceptType = y__}))
        (Lens.Family2.Unchecked.lens
           (\ x__
              -> case x__ of
                   (Prelude.Just (RPCMiddlewareRequest'StreamAuth x__val))
                     -> Prelude.Just x__val
                   _otherwise -> Prelude.Nothing)
           (\ _ y__ -> Prelude.fmap RPCMiddlewareRequest'StreamAuth y__))
instance Data.ProtoLens.Field.HasField RPCMiddlewareRequest "streamAuth" StreamAuth where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareRequest'interceptType
           (\ x__ y__ -> x__ {_RPCMiddlewareRequest'interceptType = y__}))
        ((Prelude..)
           (Lens.Family2.Unchecked.lens
              (\ x__
                 -> case x__ of
                      (Prelude.Just (RPCMiddlewareRequest'StreamAuth x__val))
                        -> Prelude.Just x__val
                      _otherwise -> Prelude.Nothing)
              (\ _ y__ -> Prelude.fmap RPCMiddlewareRequest'StreamAuth y__))
           (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField RPCMiddlewareRequest "maybe'request" (Prelude.Maybe RPCMessage) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareRequest'interceptType
           (\ x__ y__ -> x__ {_RPCMiddlewareRequest'interceptType = y__}))
        (Lens.Family2.Unchecked.lens
           (\ x__
              -> case x__ of
                   (Prelude.Just (RPCMiddlewareRequest'Request x__val))
                     -> Prelude.Just x__val
                   _otherwise -> Prelude.Nothing)
           (\ _ y__ -> Prelude.fmap RPCMiddlewareRequest'Request y__))
instance Data.ProtoLens.Field.HasField RPCMiddlewareRequest "request" RPCMessage where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareRequest'interceptType
           (\ x__ y__ -> x__ {_RPCMiddlewareRequest'interceptType = y__}))
        ((Prelude..)
           (Lens.Family2.Unchecked.lens
              (\ x__
                 -> case x__ of
                      (Prelude.Just (RPCMiddlewareRequest'Request x__val))
                        -> Prelude.Just x__val
                      _otherwise -> Prelude.Nothing)
              (\ _ y__ -> Prelude.fmap RPCMiddlewareRequest'Request y__))
           (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField RPCMiddlewareRequest "maybe'response" (Prelude.Maybe RPCMessage) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareRequest'interceptType
           (\ x__ y__ -> x__ {_RPCMiddlewareRequest'interceptType = y__}))
        (Lens.Family2.Unchecked.lens
           (\ x__
              -> case x__ of
                   (Prelude.Just (RPCMiddlewareRequest'Response x__val))
                     -> Prelude.Just x__val
                   _otherwise -> Prelude.Nothing)
           (\ _ y__ -> Prelude.fmap RPCMiddlewareRequest'Response y__))
instance Data.ProtoLens.Field.HasField RPCMiddlewareRequest "response" RPCMessage where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareRequest'interceptType
           (\ x__ y__ -> x__ {_RPCMiddlewareRequest'interceptType = y__}))
        ((Prelude..)
           (Lens.Family2.Unchecked.lens
              (\ x__
                 -> case x__ of
                      (Prelude.Just (RPCMiddlewareRequest'Response x__val))
                        -> Prelude.Just x__val
                      _otherwise -> Prelude.Nothing)
              (\ _ y__ -> Prelude.fmap RPCMiddlewareRequest'Response y__))
           (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message RPCMiddlewareRequest where
  messageName _ = Data.Text.pack "lnrpc.RPCMiddlewareRequest"
  packedMessageDescriptor _
    = "\n\
      \\DC4RPCMiddlewareRequest\DC2\GS\n\
      \\n\
      \request_id\CAN\SOH \SOH(\EOTR\trequestId\DC2!\n\
      \\fraw_macaroon\CAN\STX \SOH(\fR\vrawMacaroon\DC26\n\
      \\ETBcustom_caveat_condition\CAN\ETX \SOH(\tR\NAKcustomCaveatCondition\DC24\n\
      \\vstream_auth\CAN\EOT \SOH(\v2\DC1.lnrpc.StreamAuthH\NULR\n\
      \streamAuth\DC2-\n\
      \\arequest\CAN\ENQ \SOH(\v2\DC1.lnrpc.RPCMessageH\NULR\arequest\DC2/\n\
      \\bresponse\CAN\ACK \SOH(\v2\DC1.lnrpc.RPCMessageH\NULR\bresponse\DC2\NAK\n\
      \\ACKmsg_id\CAN\a \SOH(\EOTR\ENQmsgIdB\DLE\n\
      \\SOintercept_type"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        requestId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "request_id"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"requestId")) ::
              Data.ProtoLens.FieldDescriptor RPCMiddlewareRequest
        rawMacaroon__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "raw_macaroon"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"rawMacaroon")) ::
              Data.ProtoLens.FieldDescriptor RPCMiddlewareRequest
        customCaveatCondition__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "custom_caveat_condition"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"customCaveatCondition")) ::
              Data.ProtoLens.FieldDescriptor RPCMiddlewareRequest
        msgId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "msg_id"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"msgId")) ::
              Data.ProtoLens.FieldDescriptor RPCMiddlewareRequest
        streamAuth__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "stream_auth"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor StreamAuth)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'streamAuth")) ::
              Data.ProtoLens.FieldDescriptor RPCMiddlewareRequest
        request__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "request"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor RPCMessage)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'request")) ::
              Data.ProtoLens.FieldDescriptor RPCMiddlewareRequest
        response__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "response"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor RPCMessage)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'response")) ::
              Data.ProtoLens.FieldDescriptor RPCMiddlewareRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, requestId__field_descriptor),
           (Data.ProtoLens.Tag 2, rawMacaroon__field_descriptor),
           (Data.ProtoLens.Tag 3, customCaveatCondition__field_descriptor),
           (Data.ProtoLens.Tag 7, msgId__field_descriptor),
           (Data.ProtoLens.Tag 4, streamAuth__field_descriptor),
           (Data.ProtoLens.Tag 5, request__field_descriptor),
           (Data.ProtoLens.Tag 6, response__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _RPCMiddlewareRequest'_unknownFields
        (\ x__ y__ -> x__ {_RPCMiddlewareRequest'_unknownFields = y__})
  defMessage
    = RPCMiddlewareRequest'_constructor
        {_RPCMiddlewareRequest'requestId = Data.ProtoLens.fieldDefault,
         _RPCMiddlewareRequest'rawMacaroon = Data.ProtoLens.fieldDefault,
         _RPCMiddlewareRequest'customCaveatCondition = Data.ProtoLens.fieldDefault,
         _RPCMiddlewareRequest'msgId = Data.ProtoLens.fieldDefault,
         _RPCMiddlewareRequest'interceptType = Prelude.Nothing,
         _RPCMiddlewareRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          RPCMiddlewareRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser RPCMiddlewareRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "request_id"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"requestId") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "raw_macaroon"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"rawMacaroon") y x)
                        26
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "custom_caveat_condition"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"customCaveatCondition") y x)
                        56
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "msg_id"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"msgId") y x)
                        34
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "stream_auth"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"streamAuth") y x)
                        42
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "request"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"request") y x)
                        50
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "response"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"response") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "RPCMiddlewareRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"requestId") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
             ((Data.Monoid.<>)
                (let
                   _v
                     = Lens.Family2.view (Data.ProtoLens.Field.field @"rawMacaroon") _x
                 in
                   if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                       Data.Monoid.mempty
                   else
                       (Data.Monoid.<>)
                         (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                            _v))
                ((Data.Monoid.<>)
                   (let
                      _v
                        = Lens.Family2.view
                            (Data.ProtoLens.Field.field @"customCaveatCondition") _x
                    in
                      if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                          Data.Monoid.mempty
                      else
                          (Data.Monoid.<>)
                            (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                            ((Prelude..)
                               (\ bs
                                  -> (Data.Monoid.<>)
                                       (Data.ProtoLens.Encoding.Bytes.putVarInt
                                          (Prelude.fromIntegral (Data.ByteString.length bs)))
                                       (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                               Data.Text.Encoding.encodeUtf8 _v))
                   ((Data.Monoid.<>)
                      (let
                         _v = Lens.Family2.view (Data.ProtoLens.Field.field @"msgId") _x
                       in
                         if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                             Data.Monoid.mempty
                         else
                             (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt 56)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
                      ((Data.Monoid.<>)
                         (case
                              Lens.Family2.view
                                (Data.ProtoLens.Field.field @"maybe'interceptType") _x
                          of
                            Prelude.Nothing -> Data.Monoid.mempty
                            (Prelude.Just (RPCMiddlewareRequest'StreamAuth v))
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt 34)
                                   ((Prelude..)
                                      (\ bs
                                         -> (Data.Monoid.<>)
                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                 (Prelude.fromIntegral (Data.ByteString.length bs)))
                                              (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                      Data.ProtoLens.encodeMessage v)
                            (Prelude.Just (RPCMiddlewareRequest'Request v))
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt 42)
                                   ((Prelude..)
                                      (\ bs
                                         -> (Data.Monoid.<>)
                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                 (Prelude.fromIntegral (Data.ByteString.length bs)))
                                              (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                      Data.ProtoLens.encodeMessage v)
                            (Prelude.Just (RPCMiddlewareRequest'Response v))
                              -> (Data.Monoid.<>)
                                   (Data.ProtoLens.Encoding.Bytes.putVarInt 50)
                                   ((Prelude..)
                                      (\ bs
                                         -> (Data.Monoid.<>)
                                              (Data.ProtoLens.Encoding.Bytes.putVarInt
                                                 (Prelude.fromIntegral (Data.ByteString.length bs)))
                                              (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                                      Data.ProtoLens.encodeMessage v))
                         (Data.ProtoLens.Encoding.Wire.buildFieldSet
                            (Lens.Family2.view Data.ProtoLens.unknownFields _x))))))
instance Control.DeepSeq.NFData RPCMiddlewareRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_RPCMiddlewareRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_RPCMiddlewareRequest'requestId x__)
                (Control.DeepSeq.deepseq
                   (_RPCMiddlewareRequest'rawMacaroon x__)
                   (Control.DeepSeq.deepseq
                      (_RPCMiddlewareRequest'customCaveatCondition x__)
                      (Control.DeepSeq.deepseq
                         (_RPCMiddlewareRequest'msgId x__)
                         (Control.DeepSeq.deepseq
                            (_RPCMiddlewareRequest'interceptType x__) ())))))
instance Control.DeepSeq.NFData RPCMiddlewareRequest'InterceptType where
  rnf (RPCMiddlewareRequest'StreamAuth x__) = Control.DeepSeq.rnf x__
  rnf (RPCMiddlewareRequest'Request x__) = Control.DeepSeq.rnf x__
  rnf (RPCMiddlewareRequest'Response x__) = Control.DeepSeq.rnf x__
_RPCMiddlewareRequest'StreamAuth ::
  Data.ProtoLens.Prism.Prism' RPCMiddlewareRequest'InterceptType StreamAuth
_RPCMiddlewareRequest'StreamAuth
  = Data.ProtoLens.Prism.prism'
      RPCMiddlewareRequest'StreamAuth
      (\ p__
         -> case p__ of
              (RPCMiddlewareRequest'StreamAuth p__val) -> Prelude.Just p__val
              _otherwise -> Prelude.Nothing)
_RPCMiddlewareRequest'Request ::
  Data.ProtoLens.Prism.Prism' RPCMiddlewareRequest'InterceptType RPCMessage
_RPCMiddlewareRequest'Request
  = Data.ProtoLens.Prism.prism'
      RPCMiddlewareRequest'Request
      (\ p__
         -> case p__ of
              (RPCMiddlewareRequest'Request p__val) -> Prelude.Just p__val
              _otherwise -> Prelude.Nothing)
_RPCMiddlewareRequest'Response ::
  Data.ProtoLens.Prism.Prism' RPCMiddlewareRequest'InterceptType RPCMessage
_RPCMiddlewareRequest'Response
  = Data.ProtoLens.Prism.prism'
      RPCMiddlewareRequest'Response
      (\ p__
         -> case p__ of
              (RPCMiddlewareRequest'Response p__val) -> Prelude.Just p__val
              _otherwise -> Prelude.Nothing)
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.refMsgId' @:: Lens' RPCMiddlewareResponse Data.Word.Word64@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'middlewareMessage' @:: Lens' RPCMiddlewareResponse (Prelude.Maybe RPCMiddlewareResponse'MiddlewareMessage)@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'register' @:: Lens' RPCMiddlewareResponse (Prelude.Maybe MiddlewareRegistration)@
         * 'Proto.Lnrpc.Ln1_Fields.register' @:: Lens' RPCMiddlewareResponse MiddlewareRegistration@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'feedback' @:: Lens' RPCMiddlewareResponse (Prelude.Maybe InterceptFeedback)@
         * 'Proto.Lnrpc.Ln1_Fields.feedback' @:: Lens' RPCMiddlewareResponse InterceptFeedback@ -}
data RPCMiddlewareResponse
  = RPCMiddlewareResponse'_constructor {_RPCMiddlewareResponse'refMsgId :: !Data.Word.Word64,
                                        _RPCMiddlewareResponse'middlewareMessage :: !(Prelude.Maybe RPCMiddlewareResponse'MiddlewareMessage),
                                        _RPCMiddlewareResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show RPCMiddlewareResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out RPCMiddlewareResponse
data RPCMiddlewareResponse'MiddlewareMessage
  = RPCMiddlewareResponse'Register !MiddlewareRegistration |
    RPCMiddlewareResponse'Feedback !InterceptFeedback
  deriving stock (Prelude.Show,
                  Prelude.Eq,
                  Prelude.Ord,
                  GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out RPCMiddlewareResponse'MiddlewareMessage
instance Data.ProtoLens.Field.HasField RPCMiddlewareResponse "refMsgId" Data.Word.Word64 where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareResponse'refMsgId
           (\ x__ y__ -> x__ {_RPCMiddlewareResponse'refMsgId = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField RPCMiddlewareResponse "maybe'middlewareMessage" (Prelude.Maybe RPCMiddlewareResponse'MiddlewareMessage) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareResponse'middlewareMessage
           (\ x__ y__
              -> x__ {_RPCMiddlewareResponse'middlewareMessage = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField RPCMiddlewareResponse "maybe'register" (Prelude.Maybe MiddlewareRegistration) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareResponse'middlewareMessage
           (\ x__ y__
              -> x__ {_RPCMiddlewareResponse'middlewareMessage = y__}))
        (Lens.Family2.Unchecked.lens
           (\ x__
              -> case x__ of
                   (Prelude.Just (RPCMiddlewareResponse'Register x__val))
                     -> Prelude.Just x__val
                   _otherwise -> Prelude.Nothing)
           (\ _ y__ -> Prelude.fmap RPCMiddlewareResponse'Register y__))
instance Data.ProtoLens.Field.HasField RPCMiddlewareResponse "register" MiddlewareRegistration where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareResponse'middlewareMessage
           (\ x__ y__
              -> x__ {_RPCMiddlewareResponse'middlewareMessage = y__}))
        ((Prelude..)
           (Lens.Family2.Unchecked.lens
              (\ x__
                 -> case x__ of
                      (Prelude.Just (RPCMiddlewareResponse'Register x__val))
                        -> Prelude.Just x__val
                      _otherwise -> Prelude.Nothing)
              (\ _ y__ -> Prelude.fmap RPCMiddlewareResponse'Register y__))
           (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField RPCMiddlewareResponse "maybe'feedback" (Prelude.Maybe InterceptFeedback) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareResponse'middlewareMessage
           (\ x__ y__
              -> x__ {_RPCMiddlewareResponse'middlewareMessage = y__}))
        (Lens.Family2.Unchecked.lens
           (\ x__
              -> case x__ of
                   (Prelude.Just (RPCMiddlewareResponse'Feedback x__val))
                     -> Prelude.Just x__val
                   _otherwise -> Prelude.Nothing)
           (\ _ y__ -> Prelude.fmap RPCMiddlewareResponse'Feedback y__))
instance Data.ProtoLens.Field.HasField RPCMiddlewareResponse "feedback" InterceptFeedback where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RPCMiddlewareResponse'middlewareMessage
           (\ x__ y__
              -> x__ {_RPCMiddlewareResponse'middlewareMessage = y__}))
        ((Prelude..)
           (Lens.Family2.Unchecked.lens
              (\ x__
                 -> case x__ of
                      (Prelude.Just (RPCMiddlewareResponse'Feedback x__val))
                        -> Prelude.Just x__val
                      _otherwise -> Prelude.Nothing)
              (\ _ y__ -> Prelude.fmap RPCMiddlewareResponse'Feedback y__))
           (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message RPCMiddlewareResponse where
  messageName _ = Data.Text.pack "lnrpc.RPCMiddlewareResponse"
  packedMessageDescriptor _
    = "\n\
      \\NAKRPCMiddlewareResponse\DC2\FS\n\
      \\n\
      \ref_msg_id\CAN\SOH \SOH(\EOTR\brefMsgId\DC2;\n\
      \\bregister\CAN\STX \SOH(\v2\GS.lnrpc.MiddlewareRegistrationH\NULR\bregister\DC26\n\
      \\bfeedback\CAN\ETX \SOH(\v2\CAN.lnrpc.InterceptFeedbackH\NULR\bfeedbackB\DC4\n\
      \\DC2middleware_message"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        refMsgId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "ref_msg_id"
              (Data.ProtoLens.ScalarField Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"refMsgId")) ::
              Data.ProtoLens.FieldDescriptor RPCMiddlewareResponse
        register__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "register"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor MiddlewareRegistration)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'register")) ::
              Data.ProtoLens.FieldDescriptor RPCMiddlewareResponse
        feedback__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "feedback"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor InterceptFeedback)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'feedback")) ::
              Data.ProtoLens.FieldDescriptor RPCMiddlewareResponse
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, refMsgId__field_descriptor),
           (Data.ProtoLens.Tag 2, register__field_descriptor),
           (Data.ProtoLens.Tag 3, feedback__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _RPCMiddlewareResponse'_unknownFields
        (\ x__ y__ -> x__ {_RPCMiddlewareResponse'_unknownFields = y__})
  defMessage
    = RPCMiddlewareResponse'_constructor
        {_RPCMiddlewareResponse'refMsgId = Data.ProtoLens.fieldDefault,
         _RPCMiddlewareResponse'middlewareMessage = Prelude.Nothing,
         _RPCMiddlewareResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          RPCMiddlewareResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser RPCMiddlewareResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        8 -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       Data.ProtoLens.Encoding.Bytes.getVarInt "ref_msg_id"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"refMsgId") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "register"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"register") y x)
                        26
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "feedback"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"feedback") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "RPCMiddlewareResponse"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"refMsgId") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt _v))
             ((Data.Monoid.<>)
                (case
                     Lens.Family2.view
                       (Data.ProtoLens.Field.field @"maybe'middlewareMessage") _x
                 of
                   Prelude.Nothing -> Data.Monoid.mempty
                   (Prelude.Just (RPCMiddlewareResponse'Register v))
                     -> (Data.Monoid.<>)
                          (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((Prelude..)
                             (\ bs
                                -> (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                             Data.ProtoLens.encodeMessage v)
                   (Prelude.Just (RPCMiddlewareResponse'Feedback v))
                     -> (Data.Monoid.<>)
                          (Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                          ((Prelude..)
                             (\ bs
                                -> (Data.Monoid.<>)
                                     (Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Prelude.fromIntegral (Data.ByteString.length bs)))
                                     (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                             Data.ProtoLens.encodeMessage v))
                (Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (Lens.Family2.view Data.ProtoLens.unknownFields _x)))
instance Control.DeepSeq.NFData RPCMiddlewareResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_RPCMiddlewareResponse'_unknownFields x__)
             (Control.DeepSeq.deepseq
                (_RPCMiddlewareResponse'refMsgId x__)
                (Control.DeepSeq.deepseq
                   (_RPCMiddlewareResponse'middlewareMessage x__) ()))
instance Control.DeepSeq.NFData RPCMiddlewareResponse'MiddlewareMessage where
  rnf (RPCMiddlewareResponse'Register x__) = Control.DeepSeq.rnf x__
  rnf (RPCMiddlewareResponse'Feedback x__) = Control.DeepSeq.rnf x__
_RPCMiddlewareResponse'Register ::
  Data.ProtoLens.Prism.Prism' RPCMiddlewareResponse'MiddlewareMessage MiddlewareRegistration
_RPCMiddlewareResponse'Register
  = Data.ProtoLens.Prism.prism'
      RPCMiddlewareResponse'Register
      (\ p__
         -> case p__ of
              (RPCMiddlewareResponse'Register p__val) -> Prelude.Just p__val
              _otherwise -> Prelude.Nothing)
_RPCMiddlewareResponse'Feedback ::
  Data.ProtoLens.Prism.Prism' RPCMiddlewareResponse'MiddlewareMessage InterceptFeedback
_RPCMiddlewareResponse'Feedback
  = Data.ProtoLens.Prism.prism'
      RPCMiddlewareResponse'Feedback
      (\ p__
         -> case p__ of
              (RPCMiddlewareResponse'Feedback p__val) -> Prelude.Just p__val
              _otherwise -> Prelude.Nothing)
{- | Fields :
      -}
data RestoreBackupResponse
  = RestoreBackupResponse'_constructor {_RestoreBackupResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show RestoreBackupResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out RestoreBackupResponse
instance Data.ProtoLens.Message RestoreBackupResponse where
  messageName _ = Data.Text.pack "lnrpc.RestoreBackupResponse"
  packedMessageDescriptor _
    = "\n\
      \\NAKRestoreBackupResponse"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag = let in Data.Map.fromList []
  unknownFields
    = Lens.Family2.Unchecked.lens
        _RestoreBackupResponse'_unknownFields
        (\ x__ y__ -> x__ {_RestoreBackupResponse'_unknownFields = y__})
  defMessage
    = RestoreBackupResponse'_constructor
        {_RestoreBackupResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          RestoreBackupResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser RestoreBackupResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of {
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x) }
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "RestoreBackupResponse"
  buildMessage
    = \ _x
        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
instance Control.DeepSeq.NFData RestoreBackupResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_RestoreBackupResponse'_unknownFields x__) ()
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.maybe'backup' @:: Lens' RestoreChanBackupRequest (Prelude.Maybe RestoreChanBackupRequest'Backup)@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'chanBackups' @:: Lens' RestoreChanBackupRequest (Prelude.Maybe ChannelBackups)@
         * 'Proto.Lnrpc.Ln1_Fields.chanBackups' @:: Lens' RestoreChanBackupRequest ChannelBackups@
         * 'Proto.Lnrpc.Ln1_Fields.maybe'multiChanBackup' @:: Lens' RestoreChanBackupRequest (Prelude.Maybe Data.ByteString.ByteString)@
         * 'Proto.Lnrpc.Ln1_Fields.multiChanBackup' @:: Lens' RestoreChanBackupRequest Data.ByteString.ByteString@ -}
data RestoreChanBackupRequest
  = RestoreChanBackupRequest'_constructor {_RestoreChanBackupRequest'backup :: !(Prelude.Maybe RestoreChanBackupRequest'Backup),
                                           _RestoreChanBackupRequest'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show RestoreChanBackupRequest where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out RestoreChanBackupRequest
data RestoreChanBackupRequest'Backup
  = RestoreChanBackupRequest'ChanBackups !ChannelBackups |
    RestoreChanBackupRequest'MultiChanBackup !Data.ByteString.ByteString
  deriving stock (Prelude.Show,
                  Prelude.Eq,
                  Prelude.Ord,
                  GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out RestoreChanBackupRequest'Backup
instance Data.ProtoLens.Field.HasField RestoreChanBackupRequest "maybe'backup" (Prelude.Maybe RestoreChanBackupRequest'Backup) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RestoreChanBackupRequest'backup
           (\ x__ y__ -> x__ {_RestoreChanBackupRequest'backup = y__}))
        Prelude.id
instance Data.ProtoLens.Field.HasField RestoreChanBackupRequest "maybe'chanBackups" (Prelude.Maybe ChannelBackups) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RestoreChanBackupRequest'backup
           (\ x__ y__ -> x__ {_RestoreChanBackupRequest'backup = y__}))
        (Lens.Family2.Unchecked.lens
           (\ x__
              -> case x__ of
                   (Prelude.Just (RestoreChanBackupRequest'ChanBackups x__val))
                     -> Prelude.Just x__val
                   _otherwise -> Prelude.Nothing)
           (\ _ y__ -> Prelude.fmap RestoreChanBackupRequest'ChanBackups y__))
instance Data.ProtoLens.Field.HasField RestoreChanBackupRequest "chanBackups" ChannelBackups where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RestoreChanBackupRequest'backup
           (\ x__ y__ -> x__ {_RestoreChanBackupRequest'backup = y__}))
        ((Prelude..)
           (Lens.Family2.Unchecked.lens
              (\ x__
                 -> case x__ of
                      (Prelude.Just (RestoreChanBackupRequest'ChanBackups x__val))
                        -> Prelude.Just x__val
                      _otherwise -> Prelude.Nothing)
              (\ _ y__ -> Prelude.fmap RestoreChanBackupRequest'ChanBackups y__))
           (Data.ProtoLens.maybeLens Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField RestoreChanBackupRequest "maybe'multiChanBackup" (Prelude.Maybe Data.ByteString.ByteString) where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RestoreChanBackupRequest'backup
           (\ x__ y__ -> x__ {_RestoreChanBackupRequest'backup = y__}))
        (Lens.Family2.Unchecked.lens
           (\ x__
              -> case x__ of
                   (Prelude.Just (RestoreChanBackupRequest'MultiChanBackup x__val))
                     -> Prelude.Just x__val
                   _otherwise -> Prelude.Nothing)
           (\ _ y__
              -> Prelude.fmap RestoreChanBackupRequest'MultiChanBackup y__))
instance Data.ProtoLens.Field.HasField RestoreChanBackupRequest "multiChanBackup" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _RestoreChanBackupRequest'backup
           (\ x__ y__ -> x__ {_RestoreChanBackupRequest'backup = y__}))
        ((Prelude..)
           (Lens.Family2.Unchecked.lens
              (\ x__
                 -> case x__ of
                      (Prelude.Just (RestoreChanBackupRequest'MultiChanBackup x__val))
                        -> Prelude.Just x__val
                      _otherwise -> Prelude.Nothing)
              (\ _ y__
                 -> Prelude.fmap RestoreChanBackupRequest'MultiChanBackup y__))
           (Data.ProtoLens.maybeLens Data.ProtoLens.fieldDefault))
instance Data.ProtoLens.Message RestoreChanBackupRequest where
  messageName _ = Data.Text.pack "lnrpc.RestoreChanBackupRequest"
  packedMessageDescriptor _
    = "\n\
      \\CANRestoreChanBackupRequest\DC2:\n\
      \\fchan_backups\CAN\SOH \SOH(\v2\NAK.lnrpc.ChannelBackupsH\NULR\vchanBackups\DC2,\n\
      \\DC1multi_chan_backup\CAN\STX \SOH(\fH\NULR\SImultiChanBackupB\b\n\
      \\ACKbackup"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        chanBackups__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "chan_backups"
              (Data.ProtoLens.MessageField Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor ChannelBackups)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'chanBackups")) ::
              Data.ProtoLens.FieldDescriptor RestoreChanBackupRequest
        multiChanBackup__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "multi_chan_backup"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.OptionalField
                 (Data.ProtoLens.Field.field @"maybe'multiChanBackup")) ::
              Data.ProtoLens.FieldDescriptor RestoreChanBackupRequest
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, chanBackups__field_descriptor),
           (Data.ProtoLens.Tag 2, multiChanBackup__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _RestoreChanBackupRequest'_unknownFields
        (\ x__ y__ -> x__ {_RestoreChanBackupRequest'_unknownFields = y__})
  defMessage
    = RestoreChanBackupRequest'_constructor
        {_RestoreChanBackupRequest'backup = Prelude.Nothing,
         _RestoreChanBackupRequest'_unknownFields = []}
  parseMessage
    = let
        loop ::
          RestoreChanBackupRequest
          -> Data.ProtoLens.Encoding.Bytes.Parser RestoreChanBackupRequest
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.isolate
                                             (Prelude.fromIntegral len) Data.ProtoLens.parseMessage)
                                       "chan_backups"
                                loop
                                  (Lens.Family2.set (Data.ProtoLens.Field.field @"chanBackups") y x)
                        18
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "multi_chan_backup"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"multiChanBackup") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "RestoreChanBackupRequest"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (case
                  Lens.Family2.view (Data.ProtoLens.Field.field @"maybe'backup") _x
              of
                Prelude.Nothing -> Data.Monoid.mempty
                (Prelude.Just (RestoreChanBackupRequest'ChanBackups v))
                  -> (Data.Monoid.<>)
                       (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                       ((Prelude..)
                          (\ bs
                             -> (Data.Monoid.<>)
                                  (Data.ProtoLens.Encoding.Bytes.putVarInt
                                     (Prelude.fromIntegral (Data.ByteString.length bs)))
                                  (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                          Data.ProtoLens.encodeMessage v)
                (Prelude.Just (RestoreChanBackupRequest'MultiChanBackup v))
                  -> (Data.Monoid.<>)
                       (Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                       ((\ bs
                           -> (Data.Monoid.<>)
                                (Data.ProtoLens.Encoding.Bytes.putVarInt
                                   (Prelude.fromIntegral (Data.ByteString.length bs)))
                                (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                          v))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData RestoreChanBackupRequest where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_RestoreChanBackupRequest'_unknownFields x__)
             (Control.DeepSeq.deepseq (_RestoreChanBackupRequest'backup x__) ())
instance Control.DeepSeq.NFData RestoreChanBackupRequest'Backup where
  rnf (RestoreChanBackupRequest'ChanBackups x__)
    = Control.DeepSeq.rnf x__
  rnf (RestoreChanBackupRequest'MultiChanBackup x__)
    = Control.DeepSeq.rnf x__
_RestoreChanBackupRequest'ChanBackups ::
  Data.ProtoLens.Prism.Prism' RestoreChanBackupRequest'Backup ChannelBackups
_RestoreChanBackupRequest'ChanBackups
  = Data.ProtoLens.Prism.prism'
      RestoreChanBackupRequest'ChanBackups
      (\ p__
         -> case p__ of
              (RestoreChanBackupRequest'ChanBackups p__val)
                -> Prelude.Just p__val
              _otherwise -> Prelude.Nothing)
_RestoreChanBackupRequest'MultiChanBackup ::
  Data.ProtoLens.Prism.Prism' RestoreChanBackupRequest'Backup Data.ByteString.ByteString
_RestoreChanBackupRequest'MultiChanBackup
  = Data.ProtoLens.Prism.prism'
      RestoreChanBackupRequest'MultiChanBackup
      (\ p__
         -> case p__ of
              (RestoreChanBackupRequest'MultiChanBackup p__val)
                -> Prelude.Just p__val
              _otherwise -> Prelude.Nothing)
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.setId' @:: Lens' SetID Data.ByteString.ByteString@ -}
data SetID
  = SetID'_constructor {_SetID'setId :: !Data.ByteString.ByteString,
                        _SetID'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show SetID where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out SetID
instance Data.ProtoLens.Field.HasField SetID "setId" Data.ByteString.ByteString where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _SetID'setId (\ x__ y__ -> x__ {_SetID'setId = y__}))
        Prelude.id
instance Data.ProtoLens.Message SetID where
  messageName _ = Data.Text.pack "lnrpc.SetID"
  packedMessageDescriptor _
    = "\n\
      \\ENQSetID\DC2\NAK\n\
      \\ACKset_id\CAN\SOH \SOH(\fR\ENQsetId"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        setId__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "set_id"
              (Data.ProtoLens.ScalarField Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional (Data.ProtoLens.Field.field @"setId")) ::
              Data.ProtoLens.FieldDescriptor SetID
      in
        Data.Map.fromList [(Data.ProtoLens.Tag 1, setId__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _SetID'_unknownFields
        (\ x__ y__ -> x__ {_SetID'_unknownFields = y__})
  defMessage
    = SetID'_constructor
        {_SetID'setId = Data.ProtoLens.fieldDefault,
         _SetID'_unknownFields = []}
  parseMessage
    = let
        loop :: SetID -> Data.ProtoLens.Encoding.Bytes.Parser SetID
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Data.ProtoLens.Encoding.Bytes.getBytes
                                             (Prelude.fromIntegral len))
                                       "set_id"
                                loop (Lens.Family2.set (Data.ProtoLens.Field.field @"setId") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "SetID"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v = Lens.Family2.view (Data.ProtoLens.Field.field @"setId") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs
                          -> (Data.Monoid.<>)
                               (Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Prelude.fromIntegral (Data.ByteString.length bs)))
                               (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         _v))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData SetID where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_SetID'_unknownFields x__)
             (Control.DeepSeq.deepseq (_SetID'setId x__) ())
{- | Fields :
     
         * 'Proto.Lnrpc.Ln1_Fields.methodFullUri' @:: Lens' StreamAuth Data.Text.Text@ -}
data StreamAuth
  = StreamAuth'_constructor {_StreamAuth'methodFullUri :: !Data.Text.Text,
                             _StreamAuth'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show StreamAuth where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out StreamAuth
instance Data.ProtoLens.Field.HasField StreamAuth "methodFullUri" Data.Text.Text where
  fieldOf _
    = (Prelude..)
        (Lens.Family2.Unchecked.lens
           _StreamAuth'methodFullUri
           (\ x__ y__ -> x__ {_StreamAuth'methodFullUri = y__}))
        Prelude.id
instance Data.ProtoLens.Message StreamAuth where
  messageName _ = Data.Text.pack "lnrpc.StreamAuth"
  packedMessageDescriptor _
    = "\n\
      \\n\
      \StreamAuth\DC2&\n\
      \\SImethod_full_uri\CAN\SOH \SOH(\tR\rmethodFullUri"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag
    = let
        methodFullUri__field_descriptor
          = Data.ProtoLens.FieldDescriptor
              "method_full_uri"
              (Data.ProtoLens.ScalarField Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (Data.ProtoLens.PlainField
                 Data.ProtoLens.Optional
                 (Data.ProtoLens.Field.field @"methodFullUri")) ::
              Data.ProtoLens.FieldDescriptor StreamAuth
      in
        Data.Map.fromList
          [(Data.ProtoLens.Tag 1, methodFullUri__field_descriptor)]
  unknownFields
    = Lens.Family2.Unchecked.lens
        _StreamAuth'_unknownFields
        (\ x__ y__ -> x__ {_StreamAuth'_unknownFields = y__})
  defMessage
    = StreamAuth'_constructor
        {_StreamAuth'methodFullUri = Data.ProtoLens.fieldDefault,
         _StreamAuth'_unknownFields = []}
  parseMessage
    = let
        loop ::
          StreamAuth -> Data.ProtoLens.Encoding.Bytes.Parser StreamAuth
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of
                        10
                          -> do y <- (Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do value <- do len <- Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Prelude.fromIntegral len)
                                           Data.ProtoLens.Encoding.Bytes.runEither
                                             (case Data.Text.Encoding.decodeUtf8' value of
                                                (Prelude.Left err)
                                                  -> Prelude.Left (Prelude.show err)
                                                (Prelude.Right r) -> Prelude.Right r))
                                       "method_full_uri"
                                loop
                                  (Lens.Family2.set
                                     (Data.ProtoLens.Field.field @"methodFullUri") y x)
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x)
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "StreamAuth"
  buildMessage
    = \ _x
        -> (Data.Monoid.<>)
             (let
                _v
                  = Lens.Family2.view
                      (Data.ProtoLens.Field.field @"methodFullUri") _x
              in
                if (Prelude.==) _v Data.ProtoLens.fieldDefault then
                    Data.Monoid.mempty
                else
                    (Data.Monoid.<>)
                      (Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((Prelude..)
                         (\ bs
                            -> (Data.Monoid.<>)
                                 (Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Prelude.fromIntegral (Data.ByteString.length bs)))
                                 (Data.ProtoLens.Encoding.Bytes.putBytes bs))
                         Data.Text.Encoding.encodeUtf8 _v))
             (Data.ProtoLens.Encoding.Wire.buildFieldSet
                (Lens.Family2.view Data.ProtoLens.unknownFields _x))
instance Control.DeepSeq.NFData StreamAuth where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_StreamAuth'_unknownFields x__)
             (Control.DeepSeq.deepseq (_StreamAuth'methodFullUri x__) ())
newtype UpdateFailure'UnrecognizedValue
  = UpdateFailure'UnrecognizedValue Data.Int.Int32
  deriving stock (Prelude.Eq,
                  Prelude.Ord,
                  Prelude.Show,
                  GHC.Generics.Generic)
instance Text.PrettyPrint.GenericPretty.Out UpdateFailure'UnrecognizedValue
data UpdateFailure
  = UPDATE_FAILURE_UNKNOWN |
    UPDATE_FAILURE_PENDING |
    UPDATE_FAILURE_NOT_FOUND |
    UPDATE_FAILURE_INTERNAL_ERR |
    UPDATE_FAILURE_INVALID_PARAMETER |
    UpdateFailure'Unrecognized !UpdateFailure'UnrecognizedValue
  deriving stock (Prelude.Show,
                  Prelude.Eq,
                  Prelude.Ord,
                  GHC.Generics.Generic)
instance Data.ProtoLens.MessageEnum UpdateFailure where
  maybeToEnum 0 = Prelude.Just UPDATE_FAILURE_UNKNOWN
  maybeToEnum 1 = Prelude.Just UPDATE_FAILURE_PENDING
  maybeToEnum 2 = Prelude.Just UPDATE_FAILURE_NOT_FOUND
  maybeToEnum 3 = Prelude.Just UPDATE_FAILURE_INTERNAL_ERR
  maybeToEnum 4 = Prelude.Just UPDATE_FAILURE_INVALID_PARAMETER
  maybeToEnum k
    = Prelude.Just
        (UpdateFailure'Unrecognized
           (UpdateFailure'UnrecognizedValue (Prelude.fromIntegral k)))
  showEnum UPDATE_FAILURE_UNKNOWN = "UPDATE_FAILURE_UNKNOWN"
  showEnum UPDATE_FAILURE_PENDING = "UPDATE_FAILURE_PENDING"
  showEnum UPDATE_FAILURE_NOT_FOUND = "UPDATE_FAILURE_NOT_FOUND"
  showEnum UPDATE_FAILURE_INTERNAL_ERR
    = "UPDATE_FAILURE_INTERNAL_ERR"
  showEnum UPDATE_FAILURE_INVALID_PARAMETER
    = "UPDATE_FAILURE_INVALID_PARAMETER"
  showEnum
    (UpdateFailure'Unrecognized (UpdateFailure'UnrecognizedValue k))
    = Prelude.show k
  readEnum k
    | (Prelude.==) k "UPDATE_FAILURE_UNKNOWN"
    = Prelude.Just UPDATE_FAILURE_UNKNOWN
    | (Prelude.==) k "UPDATE_FAILURE_PENDING"
    = Prelude.Just UPDATE_FAILURE_PENDING
    | (Prelude.==) k "UPDATE_FAILURE_NOT_FOUND"
    = Prelude.Just UPDATE_FAILURE_NOT_FOUND
    | (Prelude.==) k "UPDATE_FAILURE_INTERNAL_ERR"
    = Prelude.Just UPDATE_FAILURE_INTERNAL_ERR
    | (Prelude.==) k "UPDATE_FAILURE_INVALID_PARAMETER"
    = Prelude.Just UPDATE_FAILURE_INVALID_PARAMETER
    | Prelude.otherwise
    = (Prelude.>>=) (Text.Read.readMaybe k) Data.ProtoLens.maybeToEnum
instance Prelude.Bounded UpdateFailure where
  minBound = UPDATE_FAILURE_UNKNOWN
  maxBound = UPDATE_FAILURE_INVALID_PARAMETER
instance Prelude.Enum UpdateFailure where
  toEnum k__
    = Prelude.maybe
        (Prelude.error
           ((Prelude.++)
              "toEnum: unknown value for enum UpdateFailure: "
              (Prelude.show k__)))
        Prelude.id (Data.ProtoLens.maybeToEnum k__)
  fromEnum UPDATE_FAILURE_UNKNOWN = 0
  fromEnum UPDATE_FAILURE_PENDING = 1
  fromEnum UPDATE_FAILURE_NOT_FOUND = 2
  fromEnum UPDATE_FAILURE_INTERNAL_ERR = 3
  fromEnum UPDATE_FAILURE_INVALID_PARAMETER = 4
  fromEnum
    (UpdateFailure'Unrecognized (UpdateFailure'UnrecognizedValue k))
    = Prelude.fromIntegral k
  succ UPDATE_FAILURE_INVALID_PARAMETER
    = Prelude.error
        "UpdateFailure.succ: bad argument UPDATE_FAILURE_INVALID_PARAMETER. This value would be out of bounds."
  succ UPDATE_FAILURE_UNKNOWN = UPDATE_FAILURE_PENDING
  succ UPDATE_FAILURE_PENDING = UPDATE_FAILURE_NOT_FOUND
  succ UPDATE_FAILURE_NOT_FOUND = UPDATE_FAILURE_INTERNAL_ERR
  succ UPDATE_FAILURE_INTERNAL_ERR = UPDATE_FAILURE_INVALID_PARAMETER
  succ (UpdateFailure'Unrecognized _)
    = Prelude.error
        "UpdateFailure.succ: bad argument: unrecognized value"
  pred UPDATE_FAILURE_UNKNOWN
    = Prelude.error
        "UpdateFailure.pred: bad argument UPDATE_FAILURE_UNKNOWN. This value would be out of bounds."
  pred UPDATE_FAILURE_PENDING = UPDATE_FAILURE_UNKNOWN
  pred UPDATE_FAILURE_NOT_FOUND = UPDATE_FAILURE_PENDING
  pred UPDATE_FAILURE_INTERNAL_ERR = UPDATE_FAILURE_NOT_FOUND
  pred UPDATE_FAILURE_INVALID_PARAMETER = UPDATE_FAILURE_INTERNAL_ERR
  pred (UpdateFailure'Unrecognized _)
    = Prelude.error
        "UpdateFailure.pred: bad argument: unrecognized value"
  enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom
  enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo
  enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen
  enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault UpdateFailure where
  fieldDefault = UPDATE_FAILURE_UNKNOWN
instance Control.DeepSeq.NFData UpdateFailure where
  rnf x__ = Prelude.seq x__ ()
instance Text.PrettyPrint.GenericPretty.Out UpdateFailure
{- | Fields :
      -}
data VerifyChanBackupResponse
  = VerifyChanBackupResponse'_constructor {_VerifyChanBackupResponse'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Prelude.Eq, Prelude.Ord, GHC.Generics.Generic)
instance Prelude.Show VerifyChanBackupResponse where
  showsPrec _ __x __s
    = Prelude.showChar
        '{'
        (Prelude.showString
           (Data.ProtoLens.showMessageShort __x) (Prelude.showChar '}' __s))
instance Text.PrettyPrint.GenericPretty.Out VerifyChanBackupResponse
instance Data.ProtoLens.Message VerifyChanBackupResponse where
  messageName _ = Data.Text.pack "lnrpc.VerifyChanBackupResponse"
  packedMessageDescriptor _
    = "\n\
      \\CANVerifyChanBackupResponse"
  packedFileDescriptor _ = packedFileDescriptor
  fieldsByTag = let in Data.Map.fromList []
  unknownFields
    = Lens.Family2.Unchecked.lens
        _VerifyChanBackupResponse'_unknownFields
        (\ x__ y__ -> x__ {_VerifyChanBackupResponse'_unknownFields = y__})
  defMessage
    = VerifyChanBackupResponse'_constructor
        {_VerifyChanBackupResponse'_unknownFields = []}
  parseMessage
    = let
        loop ::
          VerifyChanBackupResponse
          -> Data.ProtoLens.Encoding.Bytes.Parser VerifyChanBackupResponse
        loop x
          = do end <- Data.ProtoLens.Encoding.Bytes.atEnd
               if end then
                   do (let missing = []
                       in
                         if Prelude.null missing then
                             Prelude.return ()
                         else
                             Prelude.fail
                               ((Prelude.++)
                                  "Missing required fields: "
                                  (Prelude.show (missing :: [Prelude.String]))))
                      Prelude.return
                        (Lens.Family2.over
                           Data.ProtoLens.unknownFields (\ !t -> Prelude.reverse t) x)
               else
                   do tag <- Data.ProtoLens.Encoding.Bytes.getVarInt
                      case tag of {
                        wire
                          -> do !y <- Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        wire
                                loop
                                  (Lens.Family2.over
                                     Data.ProtoLens.unknownFields (\ !t -> (:) y t) x) }
      in
        (Data.ProtoLens.Encoding.Bytes.<?>)
          (do loop Data.ProtoLens.defMessage) "VerifyChanBackupResponse"
  buildMessage
    = \ _x
        -> Data.ProtoLens.Encoding.Wire.buildFieldSet
             (Lens.Family2.view Data.ProtoLens.unknownFields _x)
instance Control.DeepSeq.NFData VerifyChanBackupResponse where
  rnf
    = \ x__
        -> Control.DeepSeq.deepseq
             (_VerifyChanBackupResponse'_unknownFields x__) ()
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor
  = "\n\
    \\SIlnrpc/ln1.proto\DC2\ENQlnrpc\SUB\SIlnrpc/ln0.proto\"\RS\n\
    \\ENQSetID\DC2\NAK\n\
    \\ACKset_id\CAN\SOH \SOH(\fR\ENQsetId\"\168\SOH\n\
    \\SIAMPInvoiceState\DC2-\n\
    \\ENQstate\CAN\SOH \SOH(\SO2\ETB.lnrpc.InvoiceHTLCStateR\ENQstate\DC2!\n\
    \\fsettle_index\CAN\STX \SOH(\EOTR\vsettleIndex\DC2\US\n\
    \\vsettle_time\CAN\ETX \SOH(\ETXR\n\
    \settleTime\DC2\"\n\
    \\ramt_paid_msat\CAN\ENQ \SOH(\ETXR\vamtPaidMsat\"\195\t\n\
    \\aInvoice\DC2\DC2\n\
    \\EOTmemo\CAN\SOH \SOH(\tR\EOTmemo\DC2\GS\n\
    \\n\
    \r_preimage\CAN\ETX \SOH(\fR\trPreimage\DC2\NAK\n\
    \\ACKr_hash\CAN\EOT \SOH(\fR\ENQrHash\DC2\DC4\n\
    \\ENQvalue\CAN\ENQ \SOH(\ETXR\ENQvalue\DC2\GS\n\
    \\n\
    \value_msat\CAN\ETB \SOH(\ETXR\tvalueMsat\DC2\FS\n\
    \\asettled\CAN\ACK \SOH(\bR\asettledB\STX\CAN\SOH\DC2#\n\
    \\rcreation_date\CAN\a \SOH(\ETXR\fcreationDate\DC2\US\n\
    \\vsettle_date\CAN\b \SOH(\ETXR\n\
    \settleDate\DC2'\n\
    \\SIpayment_request\CAN\t \SOH(\tR\SOpaymentRequest\DC2)\n\
    \\DLEdescription_hash\CAN\n\
    \ \SOH(\fR\SIdescriptionHash\DC2\SYN\n\
    \\ACKexpiry\CAN\v \SOH(\ETXR\ACKexpiry\DC2#\n\
    \\rfallback_addr\CAN\f \SOH(\tR\ffallbackAddr\DC2\US\n\
    \\vcltv_expiry\CAN\r \SOH(\EOTR\n\
    \cltvExpiry\DC21\n\
    \\vroute_hints\CAN\SO \ETX(\v2\DLE.lnrpc.RouteHintR\n\
    \routeHints\DC2\CAN\n\
    \\aprivate\CAN\SI \SOH(\bR\aprivate\DC2\ESC\n\
    \\tadd_index\CAN\DLE \SOH(\EOTR\baddIndex\DC2!\n\
    \\fsettle_index\CAN\DC1 \SOH(\EOTR\vsettleIndex\DC2\GS\n\
    \\bamt_paid\CAN\DC2 \SOH(\ETXR\aamtPaidB\STX\CAN\SOH\DC2 \n\
    \\famt_paid_sat\CAN\DC3 \SOH(\ETXR\n\
    \amtPaidSat\DC2\"\n\
    \\ramt_paid_msat\CAN\DC4 \SOH(\ETXR\vamtPaidMsat\DC21\n\
    \\ENQstate\CAN\NAK \SOH(\SO2\ESC.lnrpc.Invoice.InvoiceStateR\ENQstate\DC2(\n\
    \\ENQhtlcs\CAN\SYN \ETX(\v2\DC2.lnrpc.InvoiceHTLCR\ENQhtlcs\DC28\n\
    \\bfeatures\CAN\CAN \ETX(\v2\FS.lnrpc.Invoice.FeaturesEntryR\bfeatures\DC2\GS\n\
    \\n\
    \is_keysend\CAN\EM \SOH(\bR\tisKeysend\DC2!\n\
    \\fpayment_addr\CAN\SUB \SOH(\fR\vpaymentAddr\DC2\NAK\n\
    \\ACKis_amp\CAN\ESC \SOH(\bR\ENQisAmp\DC2O\n\
    \\DC1amp_invoice_state\CAN\FS \ETX(\v2#.lnrpc.Invoice.AmpInvoiceStateEntryR\SIampInvoiceState\SUBK\n\
    \\rFeaturesEntry\DC2\DLE\n\
    \\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC2$\n\
    \\ENQvalue\CAN\STX \SOH(\v2\SO.lnrpc.FeatureR\ENQvalue:\STX8\SOH\SUBZ\n\
    \\DC4AmpInvoiceStateEntry\DC2\DLE\n\
    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2,\n\
    \\ENQvalue\CAN\STX \SOH(\v2\SYN.lnrpc.AMPInvoiceStateR\ENQvalue:\STX8\SOH\"A\n\
    \\fInvoiceState\DC2\b\n\
    \\EOTOPEN\DLE\NUL\DC2\v\n\
    \\aSETTLED\DLE\SOH\DC2\f\n\
    \\bCANCELED\DLE\STX\DC2\f\n\
    \\bACCEPTED\DLE\ETXJ\EOT\b\STX\DLE\ETX\"\252\ETX\n\
    \\vInvoiceHTLC\DC2\ESC\n\
    \\achan_id\CAN\SOH \SOH(\EOTR\ACKchanIdB\STX0\SOH\DC2\GS\n\
    \\n\
    \htlc_index\CAN\STX \SOH(\EOTR\thtlcIndex\DC2\EM\n\
    \\bamt_msat\CAN\ETX \SOH(\EOTR\aamtMsat\DC2#\n\
    \\raccept_height\CAN\EOT \SOH(\ENQR\facceptHeight\DC2\US\n\
    \\vaccept_time\CAN\ENQ \SOH(\ETXR\n\
    \acceptTime\DC2!\n\
    \\fresolve_time\CAN\ACK \SOH(\ETXR\vresolveTime\DC2#\n\
    \\rexpiry_height\CAN\a \SOH(\ENQR\fexpiryHeight\DC2-\n\
    \\ENQstate\CAN\b \SOH(\SO2\ETB.lnrpc.InvoiceHTLCStateR\ENQstate\DC2L\n\
    \\SOcustom_records\CAN\t \ETX(\v2%.lnrpc.InvoiceHTLC.CustomRecordsEntryR\rcustomRecords\DC2+\n\
    \\DC2mpp_total_amt_msat\CAN\n\
    \ \SOH(\EOTR\SImppTotalAmtMsat\DC2\FS\n\
    \\ETXamp\CAN\v \SOH(\v2\n\
    \.lnrpc.AMPR\ETXamp\SUB@\n\
    \\DC2CustomRecordsEntry\DC2\DLE\n\
    \\ETXkey\CAN\SOH \SOH(\EOTR\ETXkey\DC2\DC4\n\
    \\ENQvalue\CAN\STX \SOH(\fR\ENQvalue:\STX8\SOH\"\140\SOH\n\
    \\ETXAMP\DC2\GS\n\
    \\n\
    \root_share\CAN\SOH \SOH(\fR\trootShare\DC2\NAK\n\
    \\ACKset_id\CAN\STX \SOH(\fR\ENQsetId\DC2\US\n\
    \\vchild_index\CAN\ETX \SOH(\rR\n\
    \childIndex\DC2\DC2\n\
    \\EOThash\CAN\EOT \SOH(\fR\EOThash\DC2\SUB\n\
    \\bpreimage\CAN\ENQ \SOH(\fR\bpreimage\"\148\SOH\n\
    \\DC2AddInvoiceResponse\DC2\NAK\n\
    \\ACKr_hash\CAN\SOH \SOH(\fR\ENQrHash\DC2'\n\
    \\SIpayment_request\CAN\STX \SOH(\tR\SOpaymentRequest\DC2\ESC\n\
    \\tadd_index\CAN\DLE \SOH(\EOTR\baddIndex\DC2!\n\
    \\fpayment_addr\CAN\DC1 \SOH(\fR\vpaymentAddr\"F\n\
    \\vPaymentHash\DC2 \n\
    \\n\
    \r_hash_str\CAN\SOH \SOH(\tR\brHashStrB\STX\CAN\SOH\DC2\NAK\n\
    \\ACKr_hash\CAN\STX \SOH(\fR\ENQrHash\"\160\SOH\n\
    \\DC2ListInvoiceRequest\DC2!\n\
    \\fpending_only\CAN\SOH \SOH(\bR\vpendingOnly\DC2!\n\
    \\findex_offset\CAN\EOT \SOH(\EOTR\vindexOffset\DC2(\n\
    \\DLEnum_max_invoices\CAN\ENQ \SOH(\EOTR\SOnumMaxInvoices\DC2\SUB\n\
    \\breversed\CAN\ACK \SOH(\bR\breversed\"\155\SOH\n\
    \\DC3ListInvoiceResponse\DC2*\n\
    \\binvoices\CAN\SOH \ETX(\v2\SO.lnrpc.InvoiceR\binvoices\DC2*\n\
    \\DC1last_index_offset\CAN\STX \SOH(\EOTR\SIlastIndexOffset\DC2,\n\
    \\DC2first_index_offset\CAN\ETX \SOH(\EOTR\DLEfirstIndexOffset\"U\n\
    \\DC3InvoiceSubscription\DC2\ESC\n\
    \\tadd_index\CAN\SOH \SOH(\EOTR\baddIndex\DC2!\n\
    \\fsettle_index\CAN\STX \SOH(\EOTR\vsettleIndex\"\138\ENQ\n\
    \\aPayment\DC2!\n\
    \\fpayment_hash\CAN\SOH \SOH(\tR\vpaymentHash\DC2\CAN\n\
    \\ENQvalue\CAN\STX \SOH(\ETXR\ENQvalueB\STX\CAN\SOH\DC2'\n\
    \\rcreation_date\CAN\ETX \SOH(\ETXR\fcreationDateB\STX\CAN\SOH\DC2\DC4\n\
    \\ETXfee\CAN\ENQ \SOH(\ETXR\ETXfeeB\STX\CAN\SOH\DC2)\n\
    \\DLEpayment_preimage\CAN\ACK \SOH(\tR\SIpaymentPreimage\DC2\ESC\n\
    \\tvalue_sat\CAN\a \SOH(\ETXR\bvalueSat\DC2\GS\n\
    \\n\
    \value_msat\CAN\b \SOH(\ETXR\tvalueMsat\DC2'\n\
    \\SIpayment_request\CAN\t \SOH(\tR\SOpaymentRequest\DC24\n\
    \\ACKstatus\CAN\n\
    \ \SOH(\SO2\FS.lnrpc.Payment.PaymentStatusR\ACKstatus\DC2\ETB\n\
    \\afee_sat\CAN\v \SOH(\ETXR\ACKfeeSat\DC2\EM\n\
    \\bfee_msat\CAN\f \SOH(\ETXR\afeeMsat\DC2(\n\
    \\DLEcreation_time_ns\CAN\r \SOH(\ETXR\SOcreationTimeNs\DC2(\n\
    \\ENQhtlcs\CAN\SO \ETX(\v2\DC2.lnrpc.HTLCAttemptR\ENQhtlcs\DC2#\n\
    \\rpayment_index\CAN\SI \SOH(\EOTR\fpaymentIndex\DC2B\n\
    \\SOfailure_reason\CAN\DLE \SOH(\SO2\ESC.lnrpc.PaymentFailureReasonR\rfailureReason\"F\n\
    \\rPaymentStatus\DC2\v\n\
    \\aUNKNOWN\DLE\NUL\DC2\r\n\
    \\tIN_FLIGHT\DLE\SOH\DC2\r\n\
    \\tSUCCEEDED\DLE\STX\DC2\n\
    \\n\
    \\ACKFAILED\DLE\ETXJ\EOT\b\EOT\DLE\ENQ\"\213\STX\n\
    \\vHTLCAttempt\DC2\GS\n\
    \\n\
    \attempt_id\CAN\a \SOH(\EOTR\tattemptId\DC25\n\
    \\ACKstatus\CAN\SOH \SOH(\SO2\GS.lnrpc.HTLCAttempt.HTLCStatusR\ACKstatus\DC2\"\n\
    \\ENQroute\CAN\STX \SOH(\v2\f.lnrpc.RouteR\ENQroute\DC2&\n\
    \\SIattempt_time_ns\CAN\ETX \SOH(\ETXR\rattemptTimeNs\DC2&\n\
    \\SIresolve_time_ns\CAN\EOT \SOH(\ETXR\rresolveTimeNs\DC2(\n\
    \\afailure\CAN\ENQ \SOH(\v2\SO.lnrpc.FailureR\afailure\DC2\SUB\n\
    \\bpreimage\CAN\ACK \SOH(\fR\bpreimage\"6\n\
    \\n\
    \HTLCStatus\DC2\r\n\
    \\tIN_FLIGHT\DLE\NUL\DC2\r\n\
    \\tSUCCEEDED\DLE\SOH\DC2\n\
    \\n\
    \\ACKFAILED\DLE\STX\"\166\SOH\n\
    \\DC3ListPaymentsRequest\DC2-\n\
    \\DC2include_incomplete\CAN\SOH \SOH(\bR\DC1includeIncomplete\DC2!\n\
    \\findex_offset\CAN\STX \SOH(\EOTR\vindexOffset\DC2!\n\
    \\fmax_payments\CAN\ETX \SOH(\EOTR\vmaxPayments\DC2\SUB\n\
    \\breversed\CAN\EOT \SOH(\bR\breversed\"\156\SOH\n\
    \\DC4ListPaymentsResponse\DC2*\n\
    \\bpayments\CAN\SOH \ETX(\v2\SO.lnrpc.PaymentR\bpayments\DC2,\n\
    \\DC2first_index_offset\CAN\STX \SOH(\EOTR\DLEfirstIndexOffset\DC2*\n\
    \\DC1last_index_offset\CAN\ETX \SOH(\EOTR\SIlastIndexOffset\"e\n\
    \\DC4DeletePaymentRequest\DC2!\n\
    \\fpayment_hash\CAN\SOH \SOH(\fR\vpaymentHash\DC2*\n\
    \\DC1failed_htlcs_only\CAN\STX \SOH(\bR\SIfailedHtlcsOnly\"x\n\
    \\CANDeleteAllPaymentsRequest\DC20\n\
    \\DC4failed_payments_only\CAN\SOH \SOH(\bR\DC2failedPaymentsOnly\DC2*\n\
    \\DC1failed_htlcs_only\CAN\STX \SOH(\bR\SIfailedHtlcsOnly\"\ETB\n\
    \\NAKDeletePaymentResponse\"\ESC\n\
    \\EMDeleteAllPaymentsResponse\"\191\SOH\n\
    \\NAKAbandonChannelRequest\DC28\n\
    \\rchannel_point\CAN\SOH \SOH(\v2\DC3.lnrpc.ChannelPointR\fchannelPoint\DC29\n\
    \\EMpending_funding_shim_only\CAN\STX \SOH(\bR\SYNpendingFundingShimOnly\DC21\n\
    \\SYNi_know_what_i_am_doing\CAN\ETX \SOH(\bR\DC1iKnowWhatIAmDoing\"\CAN\n\
    \\SYNAbandonChannelResponse\"F\n\
    \\DC1DebugLevelRequest\DC2\DC2\n\
    \\EOTshow\CAN\SOH \SOH(\bR\EOTshow\DC2\GS\n\
    \\n\
    \level_spec\CAN\STX \SOH(\tR\tlevelSpec\"5\n\
    \\DC2DebugLevelResponse\DC2\US\n\
    \\vsub_systems\CAN\SOH \SOH(\tR\n\
    \subSystems\"'\n\
    \\fPayReqString\DC2\ETB\n\
    \\apay_req\CAN\SOH \SOH(\tR\ACKpayReq\"\176\EOT\n\
    \\ACKPayReq\DC2 \n\
    \\vdestination\CAN\SOH \SOH(\tR\vdestination\DC2!\n\
    \\fpayment_hash\CAN\STX \SOH(\tR\vpaymentHash\DC2!\n\
    \\fnum_satoshis\CAN\ETX \SOH(\ETXR\vnumSatoshis\DC2\FS\n\
    \\ttimestamp\CAN\EOT \SOH(\ETXR\ttimestamp\DC2\SYN\n\
    \\ACKexpiry\CAN\ENQ \SOH(\ETXR\ACKexpiry\DC2 \n\
    \\vdescription\CAN\ACK \SOH(\tR\vdescription\DC2)\n\
    \\DLEdescription_hash\CAN\a \SOH(\tR\SIdescriptionHash\DC2#\n\
    \\rfallback_addr\CAN\b \SOH(\tR\ffallbackAddr\DC2\US\n\
    \\vcltv_expiry\CAN\t \SOH(\ETXR\n\
    \cltvExpiry\DC21\n\
    \\vroute_hints\CAN\n\
    \ \ETX(\v2\DLE.lnrpc.RouteHintR\n\
    \routeHints\DC2!\n\
    \\fpayment_addr\CAN\v \SOH(\fR\vpaymentAddr\DC2\EM\n\
    \\bnum_msat\CAN\f \SOH(\ETXR\anumMsat\DC27\n\
    \\bfeatures\CAN\r \ETX(\v2\ESC.lnrpc.PayReq.FeaturesEntryR\bfeatures\SUBK\n\
    \\rFeaturesEntry\DC2\DLE\n\
    \\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC2$\n\
    \\ENQvalue\CAN\STX \SOH(\v2\SO.lnrpc.FeatureR\ENQvalue:\STX8\SOH\"\DC2\n\
    \\DLEFeeReportRequest\"\179\SOH\n\
    \\DLEChannelFeeReport\DC2\ESC\n\
    \\achan_id\CAN\ENQ \SOH(\EOTR\ACKchanIdB\STX0\SOH\DC2#\n\
    \\rchannel_point\CAN\SOH \SOH(\tR\fchannelPoint\DC2\"\n\
    \\rbase_fee_msat\CAN\STX \SOH(\ETXR\vbaseFeeMsat\DC2\RS\n\
    \\vfee_per_mil\CAN\ETX \SOH(\ETXR\tfeePerMil\DC2\EM\n\
    \\bfee_rate\CAN\EOT \SOH(\SOHR\afeeRate\"\181\SOH\n\
    \\DC1FeeReportResponse\DC2:\n\
    \\fchannel_fees\CAN\SOH \ETX(\v2\ETB.lnrpc.ChannelFeeReportR\vchannelFees\DC2\RS\n\
    \\vday_fee_sum\CAN\STX \SOH(\EOTR\tdayFeeSum\DC2 \n\
    \\fweek_fee_sum\CAN\ETX \SOH(\EOTR\n\
    \weekFeeSum\DC2\"\n\
    \\rmonth_fee_sum\CAN\EOT \SOH(\EOTR\vmonthFeeSum\"\212\STX\n\
    \\DC3PolicyUpdateRequest\DC2\CAN\n\
    \\ACKglobal\CAN\SOH \SOH(\bH\NULR\ACKglobal\DC24\n\
    \\n\
    \chan_point\CAN\STX \SOH(\v2\DC3.lnrpc.ChannelPointH\NULR\tchanPoint\DC2\"\n\
    \\rbase_fee_msat\CAN\ETX \SOH(\ETXR\vbaseFeeMsat\DC2\EM\n\
    \\bfee_rate\CAN\EOT \SOH(\SOHR\afeeRate\DC2&\n\
    \\SItime_lock_delta\CAN\ENQ \SOH(\rR\rtimeLockDelta\DC2\"\n\
    \\rmax_htlc_msat\CAN\ACK \SOH(\EOTR\vmaxHtlcMsat\DC2\"\n\
    \\rmin_htlc_msat\CAN\a \SOH(\EOTR\vminHtlcMsat\DC25\n\
    \\ETBmin_htlc_msat_specified\CAN\b \SOH(\bR\DC4minHtlcMsatSpecifiedB\a\n\
    \\ENQscope\"\140\SOH\n\
    \\fFailedUpdate\DC2+\n\
    \\boutpoint\CAN\SOH \SOH(\v2\SI.lnrpc.OutPointR\boutpoint\DC2,\n\
    \\ACKreason\CAN\STX \SOH(\SO2\DC4.lnrpc.UpdateFailureR\ACKreason\DC2!\n\
    \\fupdate_error\CAN\ETX \SOH(\tR\vupdateError\"R\n\
    \\DC4PolicyUpdateResponse\DC2:\n\
    \\SOfailed_updates\CAN\SOH \ETX(\v2\DC3.lnrpc.FailedUpdateR\rfailedUpdates\"\157\SOH\n\
    \\CANForwardingHistoryRequest\DC2\GS\n\
    \\n\
    \start_time\CAN\SOH \SOH(\EOTR\tstartTime\DC2\EM\n\
    \\bend_time\CAN\STX \SOH(\EOTR\aendTime\DC2!\n\
    \\findex_offset\CAN\ETX \SOH(\rR\vindexOffset\DC2$\n\
    \\SOnum_max_events\CAN\EOT \SOH(\rR\fnumMaxEvents\"\187\STX\n\
    \\SIForwardingEvent\DC2 \n\
    \\ttimestamp\CAN\SOH \SOH(\EOTR\ttimestampB\STX\CAN\SOH\DC2 \n\
    \\n\
    \chan_id_in\CAN\STX \SOH(\EOTR\bchanIdInB\STX0\SOH\DC2\"\n\
    \\vchan_id_out\CAN\EOT \SOH(\EOTR\tchanIdOutB\STX0\SOH\DC2\NAK\n\
    \\ACKamt_in\CAN\ENQ \SOH(\EOTR\ENQamtIn\DC2\ETB\n\
    \\aamt_out\CAN\ACK \SOH(\EOTR\ACKamtOut\DC2\DLE\n\
    \\ETXfee\CAN\a \SOH(\EOTR\ETXfee\DC2\EM\n\
    \\bfee_msat\CAN\b \SOH(\EOTR\afeeMsat\DC2\RS\n\
    \\vamt_in_msat\CAN\t \SOH(\EOTR\tamtInMsat\DC2 \n\
    \\famt_out_msat\CAN\n\
    \ \SOH(\EOTR\n\
    \amtOutMsat\DC2!\n\
    \\ftimestamp_ns\CAN\v \SOH(\EOTR\vtimestampNs\"\140\SOH\n\
    \\EMForwardingHistoryResponse\DC2C\n\
    \\DC1forwarding_events\CAN\SOH \ETX(\v2\SYN.lnrpc.ForwardingEventR\DLEforwardingEvents\DC2*\n\
    \\DC1last_offset_index\CAN\STX \SOH(\rR\SIlastOffsetIndex\"P\n\
    \\SUBExportChannelBackupRequest\DC22\n\
    \\n\
    \chan_point\CAN\SOH \SOH(\v2\DC3.lnrpc.ChannelPointR\tchanPoint\"d\n\
    \\rChannelBackup\DC22\n\
    \\n\
    \chan_point\CAN\SOH \SOH(\v2\DC3.lnrpc.ChannelPointR\tchanPoint\DC2\US\n\
    \\vchan_backup\CAN\STX \SOH(\fR\n\
    \chanBackup\"s\n\
    \\SIMultiChanBackup\DC24\n\
    \\vchan_points\CAN\SOH \ETX(\v2\DC3.lnrpc.ChannelPointR\n\
    \chanPoints\DC2*\n\
    \\DC1multi_chan_backup\CAN\STX \SOH(\fR\SImultiChanBackup\"\EM\n\
    \\ETBChanBackupExportRequest\"\159\SOH\n\
    \\DC2ChanBackupSnapshot\DC2E\n\
    \\DC3single_chan_backups\CAN\SOH \SOH(\v2\NAK.lnrpc.ChannelBackupsR\DC1singleChanBackups\DC2B\n\
    \\DC1multi_chan_backup\CAN\STX \SOH(\v2\SYN.lnrpc.MultiChanBackupR\SImultiChanBackup\"I\n\
    \\SOChannelBackups\DC27\n\
    \\fchan_backups\CAN\SOH \ETX(\v2\DC4.lnrpc.ChannelBackupR\vchanBackups\"\142\SOH\n\
    \\CANRestoreChanBackupRequest\DC2:\n\
    \\fchan_backups\CAN\SOH \SOH(\v2\NAK.lnrpc.ChannelBackupsH\NULR\vchanBackups\DC2,\n\
    \\DC1multi_chan_backup\CAN\STX \SOH(\fH\NULR\SImultiChanBackupB\b\n\
    \\ACKbackup\"\ETB\n\
    \\NAKRestoreBackupResponse\"\ESC\n\
    \\EMChannelBackupSubscription\"\SUB\n\
    \\CANVerifyChanBackupResponse\"D\n\
    \\DC2MacaroonPermission\DC2\SYN\n\
    \\ACKentity\CAN\SOH \SOH(\tR\ACKentity\DC2\SYN\n\
    \\ACKaction\CAN\STX \SOH(\tR\ACKaction\"\176\SOH\n\
    \\DC3BakeMacaroonRequest\DC2;\n\
    \\vpermissions\CAN\SOH \ETX(\v2\EM.lnrpc.MacaroonPermissionR\vpermissions\DC2\RS\n\
    \\vroot_key_id\CAN\STX \SOH(\EOTR\trootKeyId\DC2<\n\
    \\SUBallow_external_permissions\CAN\ETX \SOH(\bR\CANallowExternalPermissions\"2\n\
    \\DC4BakeMacaroonResponse\DC2\SUB\n\
    \\bmacaroon\CAN\SOH \SOH(\tR\bmacaroon\"\CAN\n\
    \\SYNListMacaroonIDsRequest\";\n\
    \\ETBListMacaroonIDsResponse\DC2 \n\
    \\froot_key_ids\CAN\SOH \ETX(\EOTR\n\
    \rootKeyIds\"9\n\
    \\ETBDeleteMacaroonIDRequest\DC2\RS\n\
    \\vroot_key_id\CAN\SOH \SOH(\EOTR\trootKeyId\"4\n\
    \\CANDeleteMacaroonIDResponse\DC2\CAN\n\
    \\adeleted\CAN\SOH \SOH(\bR\adeleted\"U\n\
    \\SYNMacaroonPermissionList\DC2;\n\
    \\vpermissions\CAN\SOH \ETX(\v2\EM.lnrpc.MacaroonPermissionR\vpermissions\"\CAN\n\
    \\SYNListPermissionsRequest\"\228\SOH\n\
    \\ETBListPermissionsResponse\DC2d\n\
    \\DC2method_permissions\CAN\SOH \ETX(\v25.lnrpc.ListPermissionsResponse.MethodPermissionsEntryR\DC1methodPermissions\SUBc\n\
    \\SYNMethodPermissionsEntry\DC2\DLE\n\
    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC23\n\
    \\ENQvalue\CAN\STX \SOH(\v2\GS.lnrpc.MacaroonPermissionListR\ENQvalue:\STX8\SOH\"\176\b\n\
    \\aFailure\DC2.\n\
    \\EOTcode\CAN\SOH \SOH(\SO2\SUB.lnrpc.Failure.FailureCodeR\EOTcode\DC2;\n\
    \\SOchannel_update\CAN\ETX \SOH(\v2\DC4.lnrpc.ChannelUpdateR\rchannelUpdate\DC2\ESC\n\
    \\thtlc_msat\CAN\EOT \SOH(\EOTR\bhtlcMsat\DC2\"\n\
    \\ronion_sha_256\CAN\ENQ \SOH(\fR\vonionSha256\DC2\US\n\
    \\vcltv_expiry\CAN\ACK \SOH(\rR\n\
    \cltvExpiry\DC2\DC4\n\
    \\ENQflags\CAN\a \SOH(\rR\ENQflags\DC20\n\
    \\DC4failure_source_index\CAN\b \SOH(\rR\DC2failureSourceIndex\DC2\SYN\n\
    \\ACKheight\CAN\t \SOH(\rR\ACKheight\"\239\ENQ\n\
    \\vFailureCode\DC2\f\n\
    \\bRESERVED\DLE\NUL\DC2(\n\
    \$INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS\DLE\SOH\DC2\FS\n\
    \\CANINCORRECT_PAYMENT_AMOUNT\DLE\STX\DC2\US\n\
    \\ESCFINAL_INCORRECT_CLTV_EXPIRY\DLE\ETX\DC2\US\n\
    \\ESCFINAL_INCORRECT_HTLC_AMOUNT\DLE\EOT\DC2\EM\n\
    \\NAKFINAL_EXPIRY_TOO_SOON\DLE\ENQ\DC2\DC1\n\
    \\rINVALID_REALM\DLE\ACK\DC2\DC3\n\
    \\SIEXPIRY_TOO_SOON\DLE\a\DC2\EM\n\
    \\NAKINVALID_ONION_VERSION\DLE\b\DC2\SYN\n\
    \\DC2INVALID_ONION_HMAC\DLE\t\DC2\NAK\n\
    \\DC1INVALID_ONION_KEY\DLE\n\
    \\DC2\CAN\n\
    \\DC4AMOUNT_BELOW_MINIMUM\DLE\v\DC2\DC4\n\
    \\DLEFEE_INSUFFICIENT\DLE\f\DC2\EM\n\
    \\NAKINCORRECT_CLTV_EXPIRY\DLE\r\DC2\DC4\n\
    \\DLECHANNEL_DISABLED\DLE\SO\DC2\GS\n\
    \\EMTEMPORARY_CHANNEL_FAILURE\DLE\SI\DC2!\n\
    \\GSREQUIRED_NODE_FEATURE_MISSING\DLE\DLE\DC2$\n\
    \ REQUIRED_CHANNEL_FEATURE_MISSING\DLE\DC1\DC2\NAK\n\
    \\DC1UNKNOWN_NEXT_PEER\DLE\DC2\DC2\SUB\n\
    \\SYNTEMPORARY_NODE_FAILURE\DLE\DC3\DC2\SUB\n\
    \\SYNPERMANENT_NODE_FAILURE\DLE\DC4\DC2\GS\n\
    \\EMPERMANENT_CHANNEL_FAILURE\DLE\NAK\DC2\DC2\n\
    \\SOEXPIRY_TOO_FAR\DLE\SYN\DC2\SI\n\
    \\vMPP_TIMEOUT\DLE\ETB\DC2\EM\n\
    \\NAKINVALID_ONION_PAYLOAD\DLE\CAN\DC2\NAK\n\
    \\DLEINTERNAL_FAILURE\DLE\229\a\DC2\DC4\n\
    \\SIUNKNOWN_FAILURE\DLE\230\a\DC2\ETB\n\
    \\DC2UNREADABLE_FAILURE\DLE\231\aJ\EOT\b\STX\DLE\ETX\"\179\ETX\n\
    \\rChannelUpdate\DC2\FS\n\
    \\tsignature\CAN\SOH \SOH(\fR\tsignature\DC2\GS\n\
    \\n\
    \chain_hash\CAN\STX \SOH(\fR\tchainHash\DC2\ESC\n\
    \\achan_id\CAN\ETX \SOH(\EOTR\ACKchanIdB\STX0\SOH\DC2\FS\n\
    \\ttimestamp\CAN\EOT \SOH(\rR\ttimestamp\DC2#\n\
    \\rmessage_flags\CAN\n\
    \ \SOH(\rR\fmessageFlags\DC2#\n\
    \\rchannel_flags\CAN\ENQ \SOH(\rR\fchannelFlags\DC2&\n\
    \\SItime_lock_delta\CAN\ACK \SOH(\rR\rtimeLockDelta\DC2*\n\
    \\DC1htlc_minimum_msat\CAN\a \SOH(\EOTR\SIhtlcMinimumMsat\DC2\EM\n\
    \\bbase_fee\CAN\b \SOH(\rR\abaseFee\DC2\EM\n\
    \\bfee_rate\CAN\t \SOH(\rR\afeeRate\DC2*\n\
    \\DC1htlc_maximum_msat\CAN\v \SOH(\EOTR\SIhtlcMaximumMsat\DC2*\n\
    \\DC1extra_opaque_data\CAN\f \SOH(\fR\SIextraOpaqueData\"]\n\
    \\n\
    \MacaroonId\DC2\DC4\n\
    \\ENQnonce\CAN\SOH \SOH(\fR\ENQnonce\DC2\FS\n\
    \\tstorageId\CAN\STX \SOH(\fR\tstorageId\DC2\ESC\n\
    \\ETXops\CAN\ETX \ETX(\v2\t.lnrpc.OpR\ETXops\"6\n\
    \\STXOp\DC2\SYN\n\
    \\ACKentity\CAN\SOH \SOH(\tR\ACKentity\DC2\CAN\n\
    \\aactions\CAN\STX \ETX(\tR\aactions\"\142\SOH\n\
    \\DC3CheckMacPermRequest\DC2\SUB\n\
    \\bmacaroon\CAN\SOH \SOH(\fR\bmacaroon\DC2;\n\
    \\vpermissions\CAN\STX \ETX(\v2\EM.lnrpc.MacaroonPermissionR\vpermissions\DC2\RS\n\
    \\n\
    \fullMethod\CAN\ETX \SOH(\tR\n\
    \fullMethod\",\n\
    \\DC4CheckMacPermResponse\DC2\DC4\n\
    \\ENQvalid\CAN\SOH \SOH(\bR\ENQvalid\"\207\STX\n\
    \\DC4RPCMiddlewareRequest\DC2\GS\n\
    \\n\
    \request_id\CAN\SOH \SOH(\EOTR\trequestId\DC2!\n\
    \\fraw_macaroon\CAN\STX \SOH(\fR\vrawMacaroon\DC26\n\
    \\ETBcustom_caveat_condition\CAN\ETX \SOH(\tR\NAKcustomCaveatCondition\DC24\n\
    \\vstream_auth\CAN\EOT \SOH(\v2\DC1.lnrpc.StreamAuthH\NULR\n\
    \streamAuth\DC2-\n\
    \\arequest\CAN\ENQ \SOH(\v2\DC1.lnrpc.RPCMessageH\NULR\arequest\DC2/\n\
    \\bresponse\CAN\ACK \SOH(\v2\DC1.lnrpc.RPCMessageH\NULR\bresponse\DC2\NAK\n\
    \\ACKmsg_id\CAN\a \SOH(\EOTR\ENQmsgIdB\DLE\n\
    \\SOintercept_type\"4\n\
    \\n\
    \StreamAuth\DC2&\n\
    \\SImethod_full_uri\CAN\SOH \SOH(\tR\rmethodFullUri\"\144\SOH\n\
    \\n\
    \RPCMessage\DC2&\n\
    \\SImethod_full_uri\CAN\SOH \SOH(\tR\rmethodFullUri\DC2\GS\n\
    \\n\
    \stream_rpc\CAN\STX \SOH(\bR\tstreamRpc\DC2\ESC\n\
    \\ttype_name\CAN\ETX \SOH(\tR\btypeName\DC2\RS\n\
    \\n\
    \serialized\CAN\EOT \SOH(\fR\n\
    \serialized\"\192\SOH\n\
    \\NAKRPCMiddlewareResponse\DC2\FS\n\
    \\n\
    \ref_msg_id\CAN\SOH \SOH(\EOTR\brefMsgId\DC2;\n\
    \\bregister\CAN\STX \SOH(\v2\GS.lnrpc.MiddlewareRegistrationH\NULR\bregister\DC26\n\
    \\bfeedback\CAN\ETX \SOH(\v2\CAN.lnrpc.InterceptFeedbackH\NULR\bfeedbackB\DC4\n\
    \\DC2middleware_message\"\166\SOH\n\
    \\SYNMiddlewareRegistration\DC2'\n\
    \\SImiddleware_name\CAN\SOH \SOH(\tR\SOmiddlewareName\DC2=\n\
    \\ESCcustom_macaroon_caveat_name\CAN\STX \SOH(\tR\CANcustomMacaroonCaveatName\DC2$\n\
    \\SOread_only_mode\CAN\ETX \SOH(\bR\freadOnlyMode\"\139\SOH\n\
    \\DC1InterceptFeedback\DC2\DC4\n\
    \\ENQerror\CAN\SOH \SOH(\tR\ENQerror\DC2)\n\
    \\DLEreplace_response\CAN\STX \SOH(\bR\SIreplaceResponse\DC25\n\
    \\SYNreplacement_serialized\CAN\ETX \SOH(\fR\NAKreplacementSerialized*;\n\
    \\DLEInvoiceHTLCState\DC2\f\n\
    \\bACCEPTED\DLE\NUL\DC2\v\n\
    \\aSETTLED\DLE\SOH\DC2\f\n\
    \\bCANCELED\DLE\STX*\217\SOH\n\
    \\DC4PaymentFailureReason\DC2\ETB\n\
    \\DC3FAILURE_REASON_NONE\DLE\NUL\DC2\SUB\n\
    \\SYNFAILURE_REASON_TIMEOUT\DLE\SOH\DC2\ESC\n\
    \\ETBFAILURE_REASON_NO_ROUTE\DLE\STX\DC2\CAN\n\
    \\DC4FAILURE_REASON_ERROR\DLE\ETX\DC2,\n\
    \(FAILURE_REASON_INCORRECT_PAYMENT_DETAILS\DLE\EOT\DC2'\n\
    \#FAILURE_REASON_INSUFFICIENT_BALANCE\DLE\ENQ*\172\SOH\n\
    \\rUpdateFailure\DC2\SUB\n\
    \\SYNUPDATE_FAILURE_UNKNOWN\DLE\NUL\DC2\SUB\n\
    \\SYNUPDATE_FAILURE_PENDING\DLE\SOH\DC2\FS\n\
    \\CANUPDATE_FAILURE_NOT_FOUND\DLE\STX\DC2\US\n\
    \\ESCUPDATE_FAILURE_INTERNAL_ERR\DLE\ETX\DC2$\n\
    \ UPDATE_FAILURE_INVALID_PARAMETER\DLE\EOTB'Z%github.com/lightningnetwork/lnd/lnrpcJ\229\206\STX\n\
    \\a\DC2\ENQ\NUL\NUL\254\t\SOH\n\
    \\b\n\
    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\
    \\t\n\
    \\STX\ETX\NUL\DC2\ETX\STX\NUL\EM\n\
    \\b\n\
    \\SOH\STX\DC2\ETX\EOT\NUL\SO\n\
    \\b\n\
    \\SOH\b\DC2\ETX\ACK\NUL<\n\
    \\t\n\
    \\STX\b\v\DC2\ETX\ACK\NUL<\n\
    \\n\
    \\n\
    \\STX\EOT\NUL\DC2\EOT\b\NUL\n\
    \\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\SOH\DC2\ETX\b\b\r\n\
    \\v\n\
    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\t\EOT\NAK\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\t\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\t\n\
    \\DLE\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\t\DC3\DC4\n\
    \\n\
    \\n\
    \\STX\EOT\SOH\DC2\EOT\f\NUL\CAN\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\SOH\SOH\DC2\ETX\f\b\ETB\n\
    \E\n\
    \\EOT\EOT\SOH\STX\NUL\DC2\ETX\SO\EOT\US\SUB8 The state the HTLCs associated with this setID are in.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ACK\DC2\ETX\SO\EOT\DC4\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\SO\NAK\SUB\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\SO\GS\RS\n\
    \R\n\
    \\EOT\EOT\SOH\STX\SOH\DC2\ETX\DC1\EOT\FS\SUBE The settle index of this HTLC set, if the invoice state is settled.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\SOH\ENQ\DC2\ETX\DC1\EOT\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\SOH\SOH\DC2\ETX\DC1\v\ETB\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\SOH\ETX\DC2\ETX\DC1\SUB\ESC\n\
    \J\n\
    \\EOT\EOT\SOH\STX\STX\DC2\ETX\DC4\EOT\SUB\SUB= The time this HTLC set was settled expressed in unix epoch.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\STX\ENQ\DC2\ETX\DC4\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\STX\SOH\DC2\ETX\DC4\n\
    \\NAK\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\STX\ETX\DC2\ETX\DC4\CAN\EM\n\
    \U\n\
    \\EOT\EOT\SOH\STX\ETX\DC2\ETX\ETB\EOT\FS\SUBH The total amount paid for the sub-invoice expressed in milli satoshis.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\ETX\ENQ\DC2\ETX\ETB\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\ETX\SOH\DC2\ETX\ETB\n\
    \\ETB\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\ETX\ETX\DC2\ETX\ETB\SUB\ESC\n\
    \\v\n\
    \\STX\EOT\STX\DC2\ENQ\SUB\NUL\190\SOH\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\STX\SOH\DC2\ETX\SUB\b\SI\n\
    \\252\SOH\n\
    \\EOT\EOT\STX\STX\NUL\DC2\ETX!\EOT\DC4\SUB\238\SOH\n\
    \An optional memo to attach along with the invoice. Used for record keeping\n\
    \purposes for the invoice's creator, and will also be set in the description\n\
    \field of the encoded payment request if the description_hash field is not\n\
    \being used.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETX!\EOT\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX!\v\SI\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX!\DC2\DC3\n\
    \\n\
    \\n\
    \\ETX\EOT\STX\t\DC2\ETX#\EOT\SI\n\
    \\v\n\
    \\EOT\EOT\STX\t\NUL\DC2\ETX#\r\SO\n\
    \\f\n\
    \\ENQ\EOT\STX\t\NUL\SOH\DC2\ETX#\r\SO\n\
    \\f\n\
    \\ENQ\EOT\STX\t\NUL\STX\DC2\ETX#\r\SO\n\
    \\174\SOH\n\
    \\EOT\EOT\STX\STX\SOH\DC2\ETX*\EOT\EM\SUB\160\SOH\n\
    \The hex-encoded preimage (32 byte) which will allow settling an incoming\n\
    \HTLC payable to this preimage. When using REST, this field must be encoded\n\
    \as base64.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SOH\ENQ\DC2\ETX*\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SOH\SOH\DC2\ETX*\n\
    \\DC4\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SOH\ETX\DC2\ETX*\ETB\CAN\n\
    \_\n\
    \\EOT\EOT\STX\STX\STX\DC2\ETX0\EOT\NAK\SUBR\n\
    \The hash of the preimage. When using REST, this field must be encoded as\n\
    \base64.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\STX\ENQ\DC2\ETX0\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\STX\SOH\DC2\ETX0\n\
    \\DLE\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\STX\ETX\DC2\ETX0\DC3\DC4\n\
    \m\n\
    \\EOT\EOT\STX\STX\ETX\DC2\ETX7\EOT\DC4\SUB`\n\
    \The value of this invoice in satoshis\n\
    \\n\
    \The fields value and value_msat are mutually exclusive.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ETX\ENQ\DC2\ETX7\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ETX\SOH\DC2\ETX7\n\
    \\SI\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ETX\ETX\DC2\ETX7\DC2\DC3\n\
    \r\n\
    \\EOT\EOT\STX\STX\EOT\DC2\ETX>\EOT\SUB\SUBe\n\
    \The value of this invoice in millisatoshis\n\
    \\n\
    \The fields value and value_msat are mutually exclusive.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\EOT\ENQ\DC2\ETX>\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\EOT\SOH\DC2\ETX>\n\
    \\DC4\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\EOT\ETX\DC2\ETX>\ETB\EM\n\
    \6\n\
    \\EOT\EOT\STX\STX\ENQ\DC2\ETXA\EOT)\SUB) Whether this invoice has been fulfilled\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ENQ\ENQ\DC2\ETXA\EOT\b\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ENQ\SOH\DC2\ETXA\t\DLE\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ENQ\ETX\DC2\ETXA\DC3\DC4\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ENQ\b\DC2\ETXA\NAK(\n\
    \\r\n\
    \\ACK\EOT\STX\STX\ENQ\b\ETX\DC2\ETXA\SYN'\n\
    \,\n\
    \\EOT\EOT\STX\STX\ACK\DC2\ETXD\EOT\FS\SUB\US When this invoice was created\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ACK\ENQ\DC2\ETXD\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ACK\SOH\DC2\ETXD\n\
    \\ETB\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\ACK\ETX\DC2\ETXD\SUB\ESC\n\
    \,\n\
    \\EOT\EOT\STX\STX\a\DC2\ETXG\EOT\SUB\SUB\US When this invoice was settled\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\a\ENQ\DC2\ETXG\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\a\SOH\DC2\ETXG\n\
    \\NAK\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\a\ETX\DC2\ETXG\CAN\EM\n\
    \\187\SOH\n\
    \\EOT\EOT\STX\STX\b\DC2\ETXN\EOT\US\SUB\173\SOH\n\
    \A bare-bones invoice for a payment within the Lightning Network. With the\n\
    \details of the invoice, the sender has all the data necessary to send a\n\
    \payment to the recipient.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\b\ENQ\DC2\ETXN\EOT\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\b\SOH\DC2\ETXN\v\SUB\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\b\ETX\DC2\ETXN\GS\RS\n\
    \\249\SOH\n\
    \\EOT\EOT\STX\STX\t\DC2\ETXV\EOT \SUB\235\SOH\n\
    \Hash (SHA-256) of a description of the payment. Used if the description of\n\
    \payment (memo) is too long to naturally fit within the description field\n\
    \of an encoded payment request. When using REST, this field must be encoded\n\
    \as base64.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\t\ENQ\DC2\ETXV\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\t\SOH\DC2\ETXV\n\
    \\SUB\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\t\ETX\DC2\ETXV\GS\US\n\
    \P\n\
    \\EOT\EOT\STX\STX\n\
    \\DC2\ETXY\EOT\SYN\SUBC Payment request expiry time in seconds. Default is 3600 (1 hour).\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\n\
    \\ENQ\DC2\ETXY\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\n\
    \\SOH\DC2\ETXY\n\
    \\DLE\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\n\
    \\ETX\DC2\ETXY\DC3\NAK\n\
    \)\n\
    \\EOT\EOT\STX\STX\v\DC2\ETX\\\EOT\RS\SUB\FS Fallback on-chain address.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\v\ENQ\DC2\ETX\\\EOT\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\v\SOH\DC2\ETX\\\v\CAN\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\v\ETX\DC2\ETX\\\ESC\GS\n\
    \T\n\
    \\EOT\EOT\STX\STX\f\DC2\ETX_\EOT\FS\SUBG Delta to use for the time-lock of the CLTV extended to the final hop.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\f\ENQ\DC2\ETX_\EOT\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\f\SOH\DC2\ETX_\v\SYN\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\f\ETX\DC2\ETX_\EM\ESC\n\
    \n\n\
    \\EOT\EOT\STX\STX\r\DC2\ETXe\EOT(\SUBa\n\
    \Route hints that can each be individually used to assist in reaching the\n\
    \invoice's destination.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\r\EOT\DC2\ETXe\EOT\f\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\r\ACK\DC2\ETXe\r\SYN\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\r\SOH\DC2\ETXe\ETB\"\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\r\ETX\DC2\ETXe%'\n\
    \V\n\
    \\EOT\EOT\STX\STX\SO\DC2\ETXh\EOT\SYN\SUBI Whether this invoice should include routing hints for private channels.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SO\ENQ\DC2\ETXh\EOT\b\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SO\SOH\DC2\ETXh\t\DLE\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SO\ETX\DC2\ETXh\DC3\NAK\n\
    \\149\STX\n\
    \\EOT\EOT\STX\STX\SI\DC2\ETXp\EOT\SUB\SUB\135\STX\n\
    \The \"add\" index of this invoice. Each newly created invoice will increment\n\
    \this index making it monotonically increasing. Callers to the\n\
    \SubscribeInvoices call can use this to instantly get notified of all added\n\
    \invoices with an add_index greater than this one.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SI\ENQ\DC2\ETXp\EOT\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SI\SOH\DC2\ETXp\v\DC4\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\SI\ETX\DC2\ETXp\ETB\EM\n\
    \\157\STX\n\
    \\EOT\EOT\STX\STX\DLE\DC2\ETXx\EOT\GS\SUB\143\STX\n\
    \The \"settle\" index of this invoice. Each newly settled invoice will\n\
    \increment this index making it monotonically increasing. Callers to the\n\
    \SubscribeInvoices call can use this to instantly get notified of all\n\
    \settled invoices with an settle_index greater than this one.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\DLE\ENQ\DC2\ETXx\EOT\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\DLE\SOH\DC2\ETXx\v\ETB\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\DLE\ETX\DC2\ETXx\SUB\FS\n\
    \=\n\
    \\EOT\EOT\STX\STX\DC1\DC2\ETX{\EOT,\SUB0 Deprecated, use amt_paid_sat or amt_paid_msat.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\DC1\ENQ\DC2\ETX{\EOT\t\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\DC1\SOH\DC2\ETX{\n\
    \\DC2\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\DC1\ETX\DC2\ETX{\NAK\ETB\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\DC1\b\DC2\ETX{\CAN+\n\
    \\r\n\
    \\ACK\EOT\STX\STX\DC1\b\ETX\DC2\ETX{\EM*\n\
    \\140\ETX\n\
    \\EOT\EOT\STX\STX\DC2\DC2\EOT\133\SOH\EOT\FS\SUB\253\STX\n\
    \The amount that was accepted for this invoice, in satoshis. This will ONLY\n\
    \be set if this invoice has been settled. We provide this field as if the\n\
    \invoice was created with a zero value, then we need to record what amount\n\
    \was ultimately accepted. Additionally, it's possible that the sender paid\n\
    \MORE that was specified in the original invoice. So we'll record that here\n\
    \as well.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\DC2\ENQ\DC2\EOT\133\SOH\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\DC2\SOH\DC2\EOT\133\SOH\n\
    \\SYN\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\DC2\ETX\DC2\EOT\133\SOH\EM\ESC\n\
    \\145\ETX\n\
    \\EOT\EOT\STX\STX\DC3\DC2\EOT\143\SOH\EOT\GS\SUB\130\ETX\n\
    \The amount that was accepted for this invoice, in millisatoshis. This will\n\
    \ONLY be set if this invoice has been settled. We provide this field as if\n\
    \the invoice was created with a zero value, then we need to record what\n\
    \amount was ultimately accepted. Additionally, it's possible that the sender\n\
    \paid MORE that was specified in the original invoice. So we'll record that\n\
    \here as well.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\DC3\ENQ\DC2\EOT\143\SOH\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\DC3\SOH\DC2\EOT\143\SOH\n\
    \\ETB\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\DC3\ETX\DC2\EOT\143\SOH\SUB\FS\n\
    \\SO\n\
    \\EOT\EOT\STX\EOT\NUL\DC2\ACK\145\SOH\EOT\150\SOH\ENQ\n\
    \\r\n\
    \\ENQ\EOT\STX\EOT\NUL\SOH\DC2\EOT\145\SOH\t\NAK\n\
    \\SO\n\
    \\ACK\EOT\STX\EOT\NUL\STX\NUL\DC2\EOT\146\SOH\b\DC1\n\
    \\SI\n\
    \\a\EOT\STX\EOT\NUL\STX\NUL\SOH\DC2\EOT\146\SOH\b\f\n\
    \\SI\n\
    \\a\EOT\STX\EOT\NUL\STX\NUL\STX\DC2\EOT\146\SOH\SI\DLE\n\
    \\SO\n\
    \\ACK\EOT\STX\EOT\NUL\STX\SOH\DC2\EOT\147\SOH\b\DC4\n\
    \\SI\n\
    \\a\EOT\STX\EOT\NUL\STX\SOH\SOH\DC2\EOT\147\SOH\b\SI\n\
    \\SI\n\
    \\a\EOT\STX\EOT\NUL\STX\SOH\STX\DC2\EOT\147\SOH\DC2\DC3\n\
    \\SO\n\
    \\ACK\EOT\STX\EOT\NUL\STX\STX\DC2\EOT\148\SOH\b\NAK\n\
    \\SI\n\
    \\a\EOT\STX\EOT\NUL\STX\STX\SOH\DC2\EOT\148\SOH\b\DLE\n\
    \\SI\n\
    \\a\EOT\STX\EOT\NUL\STX\STX\STX\DC2\EOT\148\SOH\DC3\DC4\n\
    \\SO\n\
    \\ACK\EOT\STX\EOT\NUL\STX\ETX\DC2\EOT\149\SOH\b\NAK\n\
    \\SI\n\
    \\a\EOT\STX\EOT\NUL\STX\ETX\SOH\DC2\EOT\149\SOH\b\DLE\n\
    \\SI\n\
    \\a\EOT\STX\EOT\NUL\STX\ETX\STX\DC2\EOT\149\SOH\DC3\DC4\n\
    \,\n\
    \\EOT\EOT\STX\STX\DC4\DC2\EOT\155\SOH\EOT\FS\SUB\RS\n\
    \The state the invoice is in.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\DC4\ACK\DC2\EOT\155\SOH\EOT\DLE\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\DC4\SOH\DC2\EOT\155\SOH\DC1\SYN\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\DC4\ETX\DC2\EOT\155\SOH\EM\ESC\n\
    \D\n\
    \\EOT\EOT\STX\STX\NAK\DC2\EOT\158\SOH\EOT$\SUB6 List of HTLCs paying to this invoice [EXPERIMENTAL].\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\NAK\EOT\DC2\EOT\158\SOH\EOT\f\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\NAK\ACK\DC2\EOT\158\SOH\r\CAN\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\NAK\SOH\DC2\EOT\158\SOH\EM\RS\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\NAK\ETX\DC2\EOT\158\SOH!#\n\
    \;\n\
    \\EOT\EOT\STX\STX\SYN\DC2\EOT\161\SOH\EOT'\SUB- List of features advertised on the invoice.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\SYN\ACK\DC2\EOT\161\SOH\EOT\CAN\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\SYN\SOH\DC2\EOT\161\SOH\EM!\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\SYN\ETX\DC2\EOT\161\SOH$&\n\
    \l\n\
    \\EOT\EOT\STX\STX\ETB\DC2\EOT\167\SOH\EOT\EM\SUB^\n\
    \Indicates if this invoice was a spontaneous payment that arrived via keysend\n\
    \[EXPERIMENTAL].\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\ETB\ENQ\DC2\EOT\167\SOH\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\ETB\SOH\DC2\EOT\167\SOH\t\DC3\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\ETB\ETX\DC2\EOT\167\SOH\SYN\CAN\n\
    \\189\SOH\n\
    \\EOT\EOT\STX\STX\CAN\DC2\EOT\174\SOH\EOT\FS\SUB\174\SOH\n\
    \The payment address of this invoice. This value will be used in MPP\n\
    \payments, and also for newer invoices that always require the MPP payload\n\
    \for added end-to-end security.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\CAN\ENQ\DC2\EOT\174\SOH\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\CAN\SOH\DC2\EOT\174\SOH\n\
    \\SYN\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\CAN\ETX\DC2\EOT\174\SOH\EM\ESC\n\
    \>\n\
    \\EOT\EOT\STX\STX\EM\DC2\EOT\179\SOH\EOT\NAK\SUB0\n\
    \Signals whether or not this is an AMP invoice.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\EM\ENQ\DC2\EOT\179\SOH\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\EM\SOH\DC2\EOT\179\SOH\t\SI\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\EM\ETX\DC2\EOT\179\SOH\DC2\DC4\n\
    \\143\STX\n\
    \\EOT\EOT\STX\STX\SUB\DC2\EOT\189\SOH\EOT8\SUB\128\STX\n\
    \[EXPERIMENTAL]:\n\
    \\n\
    \Maps a 32-byte hex-encoded set ID to the sub-invoice AMP state for the\n\
    \given set ID. This field is always populated for AMP invoices, and can be\n\
    \used along side LookupInvoice to obtain the HTLC information related to a\n\
    \given sub-invoice.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\SUB\ACK\DC2\EOT\189\SOH\EOT \n\
    \\r\n\
    \\ENQ\EOT\STX\STX\SUB\SOH\DC2\EOT\189\SOH!2\n\
    \\r\n\
    \\ENQ\EOT\STX\STX\SUB\ETX\DC2\EOT\189\SOH57\n\
    \\f\n\
    \\STX\ENQ\NUL\DC2\ACK\192\SOH\NUL\196\SOH\SOH\n\
    \\v\n\
    \\ETX\ENQ\NUL\SOH\DC2\EOT\192\SOH\ENQ\NAK\n\
    \\f\n\
    \\EOT\ENQ\NUL\STX\NUL\DC2\EOT\193\SOH\EOT\DC1\n\
    \\r\n\
    \\ENQ\ENQ\NUL\STX\NUL\SOH\DC2\EOT\193\SOH\EOT\f\n\
    \\r\n\
    \\ENQ\ENQ\NUL\STX\NUL\STX\DC2\EOT\193\SOH\SI\DLE\n\
    \\f\n\
    \\EOT\ENQ\NUL\STX\SOH\DC2\EOT\194\SOH\EOT\DLE\n\
    \\r\n\
    \\ENQ\ENQ\NUL\STX\SOH\SOH\DC2\EOT\194\SOH\EOT\v\n\
    \\r\n\
    \\ENQ\ENQ\NUL\STX\SOH\STX\DC2\EOT\194\SOH\SO\SI\n\
    \\f\n\
    \\EOT\ENQ\NUL\STX\STX\DC2\EOT\195\SOH\EOT\DC1\n\
    \\r\n\
    \\ENQ\ENQ\NUL\STX\STX\SOH\DC2\EOT\195\SOH\EOT\f\n\
    \\r\n\
    \\ENQ\ENQ\NUL\STX\STX\STX\DC2\EOT\195\SOH\SI\DLE\n\
    \:\n\
    \\STX\EOT\ETX\DC2\ACK\199\SOH\NUL\232\SOH\SOH\SUB, Details of an HTLC that paid to an invoice\n\
    \\n\
    \\v\n\
    \\ETX\EOT\ETX\SOH\DC2\EOT\199\SOH\b\DC3\n\
    \B\n\
    \\EOT\EOT\ETX\STX\NUL\DC2\EOT\201\SOH\EOT,\SUB4 Short channel id over which the htlc was received.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\NUL\ENQ\DC2\EOT\201\SOH\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\NUL\SOH\DC2\EOT\201\SOH\v\DC2\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\NUL\ETX\DC2\EOT\201\SOH\NAK\SYN\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\NUL\b\DC2\EOT\201\SOH\ETB+\n\
    \\SO\n\
    \\ACK\EOT\ETX\STX\NUL\b\ACK\DC2\EOT\201\SOH\CAN*\n\
    \:\n\
    \\EOT\EOT\ETX\STX\SOH\DC2\EOT\204\SOH\EOT\SUB\SUB, Index identifying the htlc on the channel.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\SOH\ENQ\DC2\EOT\204\SOH\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\SOH\SOH\DC2\EOT\204\SOH\v\NAK\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\SOH\ETX\DC2\EOT\204\SOH\CAN\EM\n\
    \/\n\
    \\EOT\EOT\ETX\STX\STX\DC2\EOT\207\SOH\EOT\CAN\SUB! The amount of the htlc in msat.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\STX\ENQ\DC2\EOT\207\SOH\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\STX\SOH\DC2\EOT\207\SOH\v\DC3\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\STX\ETX\DC2\EOT\207\SOH\SYN\ETB\n\
    \=\n\
    \\EOT\EOT\ETX\STX\ETX\DC2\EOT\210\SOH\EOT\FS\SUB/ Block height at which this htlc was accepted.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\ETX\ENQ\DC2\EOT\210\SOH\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\ETX\SOH\DC2\EOT\210\SOH\n\
    \\ETB\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\ETX\ETX\DC2\EOT\210\SOH\SUB\ESC\n\
    \5\n\
    \\EOT\EOT\ETX\STX\EOT\DC2\EOT\213\SOH\EOT\SUB\SUB' Time at which this htlc was accepted.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\EOT\ENQ\DC2\EOT\213\SOH\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\EOT\SOH\DC2\EOT\213\SOH\n\
    \\NAK\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\EOT\ETX\DC2\EOT\213\SOH\CAN\EM\n\
    \@\n\
    \\EOT\EOT\ETX\STX\ENQ\DC2\EOT\216\SOH\EOT\ESC\SUB2 Time at which this htlc was settled or canceled.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\ENQ\ENQ\DC2\EOT\216\SOH\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\ENQ\SOH\DC2\EOT\216\SOH\n\
    \\SYN\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\ENQ\ETX\DC2\EOT\216\SOH\EM\SUB\n\
    \8\n\
    \\EOT\EOT\ETX\STX\ACK\DC2\EOT\219\SOH\EOT\FS\SUB* Block height at which this htlc expires.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\ACK\ENQ\DC2\EOT\219\SOH\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\ACK\SOH\DC2\EOT\219\SOH\n\
    \\ETB\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\ACK\ETX\DC2\EOT\219\SOH\SUB\ESC\n\
    \-\n\
    \\EOT\EOT\ETX\STX\a\DC2\EOT\222\SOH\EOT\US\SUB\US Current state the htlc is in.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\a\ACK\DC2\EOT\222\SOH\EOT\DC4\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\a\SOH\DC2\EOT\222\SOH\NAK\SUB\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\a\ETX\DC2\EOT\222\SOH\GS\RS\n\
    \#\n\
    \\EOT\EOT\ETX\STX\b\DC2\EOT\225\SOH\EOT*\SUB\NAK Custom tlv records.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\b\ACK\DC2\EOT\225\SOH\EOT\SYN\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\b\SOH\DC2\EOT\225\SOH\ETB%\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\b\ETX\DC2\EOT\225\SOH()\n\
    \<\n\
    \\EOT\EOT\ETX\STX\t\DC2\EOT\228\SOH\EOT#\SUB. The total amount of the mpp payment in msat.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\t\ENQ\DC2\EOT\228\SOH\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\t\SOH\DC2\EOT\228\SOH\v\GS\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\t\ETX\DC2\EOT\228\SOH \"\n\
    \U\n\
    \\EOT\EOT\ETX\STX\n\
    \\DC2\EOT\231\SOH\EOT\DC1\SUBG Details relevant to AMP HTLCs, only populated if this is an AMP HTLC.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\n\
    \\ACK\DC2\EOT\231\SOH\EOT\a\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\n\
    \\SOH\DC2\EOT\231\SOH\b\v\n\
    \\r\n\
    \\ENQ\EOT\ETX\STX\n\
    \\ETX\DC2\EOT\231\SOH\SO\DLE\n\
    \.\n\
    \\STX\EOT\EOT\DC2\ACK\235\SOH\NUL\254\SOH\SOH\SUB  Details specific to AMP HTLCs.\n\
    \\n\
    \\v\n\
    \\ETX\EOT\EOT\SOH\DC2\EOT\235\SOH\b\v\n\
    \s\n\
    \\EOT\EOT\EOT\STX\NUL\DC2\EOT\238\SOH\EOT\EM\SUBe An n-of-n secret share of the root seed from which child payment hashes\n\
    \ and preimages are derived.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\NUL\ENQ\DC2\EOT\238\SOH\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\NUL\SOH\DC2\EOT\238\SOH\n\
    \\DC4\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\NUL\ETX\DC2\EOT\238\SOH\ETB\CAN\n\
    \I\n\
    \\EOT\EOT\EOT\STX\SOH\DC2\EOT\241\SOH\EOT\NAK\SUB; An identifier for the HTLC set that this HTLC belongs to.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\SOH\ENQ\DC2\EOT\241\SOH\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\SOH\SOH\DC2\EOT\241\SOH\n\
    \\DLE\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\SOH\ETX\DC2\EOT\241\SOH\DC3\DC4\n\
    \e\n\
    \\EOT\EOT\EOT\STX\STX\DC2\EOT\245\SOH\EOT\ESC\SUBW A nonce used to randomize the child preimage and child hash from a given\n\
    \ root_share.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\STX\ENQ\DC2\EOT\245\SOH\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\STX\SOH\DC2\EOT\245\SOH\v\SYN\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\STX\ETX\DC2\EOT\245\SOH\EM\SUB\n\
    \1\n\
    \\EOT\EOT\EOT\STX\ETX\DC2\EOT\248\SOH\EOT\DC3\SUB# The payment hash of the AMP HTLC.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\ETX\ENQ\DC2\EOT\248\SOH\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\ETX\SOH\DC2\EOT\248\SOH\n\
    \\SO\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\ETX\ETX\DC2\EOT\248\SOH\DC1\DC2\n\
    \\163\SOH\n\
    \\EOT\EOT\EOT\STX\EOT\DC2\EOT\253\SOH\EOT\ETB\SUB\148\SOH The preimage used to settle this AMP htlc. This field will only be\n\
    \ populated if the invoice is in InvoiceState_ACCEPTED or\n\
    \ InvoiceState_SETTLED.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\EOT\ENQ\DC2\EOT\253\SOH\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\EOT\SOH\DC2\EOT\253\SOH\n\
    \\DC2\n\
    \\r\n\
    \\ENQ\EOT\EOT\STX\EOT\ETX\DC2\EOT\253\SOH\NAK\SYN\n\
    \\f\n\
    \\STX\EOT\ENQ\DC2\ACK\128\STX\NUL\152\STX\SOH\n\
    \\v\n\
    \\ETX\EOT\ENQ\SOH\DC2\EOT\128\STX\b\SUB\n\
    \\f\n\
    \\EOT\EOT\ENQ\STX\NUL\DC2\EOT\129\STX\EOT\NAK\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\NUL\ENQ\DC2\EOT\129\STX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\NUL\SOH\DC2\EOT\129\STX\n\
    \\DLE\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\NUL\ETX\DC2\EOT\129\STX\DC3\DC4\n\
    \\188\SOH\n\
    \\EOT\EOT\ENQ\STX\SOH\DC2\EOT\136\STX\EOT\US\SUB\173\SOH\n\
    \A bare-bones invoice for a payment within the Lightning Network. With the\n\
    \details of the invoice, the sender has all the data necessary to send a\n\
    \payment to the recipient.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\SOH\ENQ\DC2\EOT\136\STX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\SOH\SOH\DC2\EOT\136\STX\v\SUB\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\SOH\ETX\DC2\EOT\136\STX\GS\RS\n\
    \\150\STX\n\
    \\EOT\EOT\ENQ\STX\STX\DC2\EOT\144\STX\EOT\SUB\SUB\135\STX\n\
    \The \"add\" index of this invoice. Each newly created invoice will increment\n\
    \this index making it monotonically increasing. Callers to the\n\
    \SubscribeInvoices call can use this to instantly get notified of all added\n\
    \invoices with an add_index greater than this one.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\STX\ENQ\DC2\EOT\144\STX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\STX\SOH\DC2\EOT\144\STX\v\DC4\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\STX\ETX\DC2\EOT\144\STX\ETB\EM\n\
    \\163\SOH\n\
    \\EOT\EOT\ENQ\STX\ETX\DC2\EOT\151\STX\EOT\FS\SUB\148\SOH\n\
    \The payment address of the generated invoice. This value should be used\n\
    \in all payments for this invoice as we require it for end to end\n\
    \security.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\ETX\ENQ\DC2\EOT\151\STX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\ETX\SOH\DC2\EOT\151\STX\n\
    \\SYN\n\
    \\r\n\
    \\ENQ\EOT\ENQ\STX\ETX\ETX\DC2\EOT\151\STX\EM\ESC\n\
    \\f\n\
    \\STX\EOT\ACK\DC2\ACK\153\STX\NUL\167\STX\SOH\n\
    \\v\n\
    \\ETX\EOT\ACK\SOH\DC2\EOT\153\STX\b\DC3\n\
    \\238\SOH\n\
    \\EOT\EOT\ACK\STX\NUL\DC2\EOT\160\STX\EOT.\SUB\223\SOH\n\
    \The hex-encoded payment hash of the invoice to be looked up. The passed\n\
    \payment hash must be exactly 32 bytes, otherwise an error is returned.\n\
    \Deprecated now that the REST gateway supports base64 encoding of bytes\n\
    \fields.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ACK\STX\NUL\ENQ\DC2\EOT\160\STX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ACK\STX\NUL\SOH\DC2\EOT\160\STX\v\NAK\n\
    \\r\n\
    \\ENQ\EOT\ACK\STX\NUL\ETX\DC2\EOT\160\STX\CAN\EM\n\
    \\r\n\
    \\ENQ\EOT\ACK\STX\NUL\b\DC2\EOT\160\STX\SUB-\n\
    \\SO\n\
    \\ACK\EOT\ACK\STX\NUL\b\ETX\DC2\EOT\160\STX\ESC,\n\
    \w\n\
    \\EOT\EOT\ACK\STX\SOH\DC2\EOT\166\STX\EOT\NAK\SUBi\n\
    \The payment hash of the invoice to be looked up. When using REST, this field\n\
    \must be encoded as base64.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ACK\STX\SOH\ENQ\DC2\EOT\166\STX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ACK\STX\SOH\SOH\DC2\EOT\166\STX\n\
    \\DLE\n\
    \\r\n\
    \\ENQ\EOT\ACK\STX\SOH\ETX\DC2\EOT\166\STX\DC3\DC4\n\
    \\f\n\
    \\STX\EOT\a\DC2\ACK\169\STX\NUL\190\STX\SOH\n\
    \\v\n\
    \\ETX\EOT\a\SOH\DC2\EOT\169\STX\b\SUB\n\
    \m\n\
    \\EOT\EOT\a\STX\NUL\DC2\EOT\174\STX\EOT\SUB\SUB_\n\
    \If set, only invoices that are not settled and not canceled will be returned\n\
    \in the response.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\a\STX\NUL\ENQ\DC2\EOT\174\STX\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\a\STX\NUL\SOH\DC2\EOT\174\STX\t\NAK\n\
    \\r\n\
    \\ENQ\EOT\a\STX\NUL\ETX\DC2\EOT\174\STX\CAN\EM\n\
    \\160\SOH\n\
    \\EOT\EOT\a\STX\SOH\DC2\EOT\180\STX\EOT\FS\SUB\145\SOH\n\
    \The index of an invoice that will be used as either the start or end of a\n\
    \query to determine which invoices should be returned in the response.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\a\STX\SOH\ENQ\DC2\EOT\180\STX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\a\STX\SOH\SOH\DC2\EOT\180\STX\v\ETB\n\
    \\r\n\
    \\ENQ\EOT\a\STX\SOH\ETX\DC2\EOT\180\STX\SUB\ESC\n\
    \S\n\
    \\EOT\EOT\a\STX\STX\DC2\EOT\183\STX\EOT \SUBE The max number of invoices to return in the response to this query.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\a\STX\STX\ENQ\DC2\EOT\183\STX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\a\STX\STX\SOH\DC2\EOT\183\STX\v\ESC\n\
    \\r\n\
    \\ENQ\EOT\a\STX\STX\ETX\DC2\EOT\183\STX\RS\US\n\
    \\154\SOH\n\
    \\EOT\EOT\a\STX\ETX\DC2\EOT\189\STX\EOT\SYN\SUB\139\SOH\n\
    \If set, the invoices returned will result from seeking backwards from the\n\
    \specified index offset. This can be used to paginate backwards.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\a\STX\ETX\ENQ\DC2\EOT\189\STX\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\a\STX\ETX\SOH\DC2\EOT\189\STX\t\DC1\n\
    \\r\n\
    \\ENQ\EOT\a\STX\ETX\ETX\DC2\EOT\189\STX\DC4\NAK\n\
    \\f\n\
    \\STX\EOT\b\DC2\ACK\191\STX\NUL\209\STX\SOH\n\
    \\v\n\
    \\ETX\EOT\b\SOH\DC2\EOT\191\STX\b\ESC\n\
    \c\n\
    \\EOT\EOT\b\STX\NUL\DC2\EOT\196\STX\EOT\"\SUBU\n\
    \A list of invoices from the time slice of the time series specified in the\n\
    \request.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\b\STX\NUL\EOT\DC2\EOT\196\STX\EOT\f\n\
    \\r\n\
    \\ENQ\EOT\b\STX\NUL\ACK\DC2\EOT\196\STX\r\DC4\n\
    \\r\n\
    \\ENQ\EOT\b\STX\NUL\SOH\DC2\EOT\196\STX\NAK\GS\n\
    \\r\n\
    \\ENQ\EOT\b\STX\NUL\ETX\DC2\EOT\196\STX !\n\
    \\DEL\n\
    \\EOT\EOT\b\STX\SOH\DC2\EOT\202\STX\EOT!\SUBq\n\
    \The index of the last item in the set of returned invoices. This can be used\n\
    \to seek further, pagination style.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\b\STX\SOH\ENQ\DC2\EOT\202\STX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\b\STX\SOH\SOH\DC2\EOT\202\STX\v\FS\n\
    \\r\n\
    \\ENQ\EOT\b\STX\SOH\ETX\DC2\EOT\202\STX\US \n\
    \\129\SOH\n\
    \\EOT\EOT\b\STX\STX\DC2\EOT\208\STX\EOT\"\SUBs\n\
    \The index of the last item in the set of returned invoices. This can be used\n\
    \to seek backwards, pagination style.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\b\STX\STX\ENQ\DC2\EOT\208\STX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\b\STX\STX\SOH\DC2\EOT\208\STX\v\GS\n\
    \\r\n\
    \\ENQ\EOT\b\STX\STX\ETX\DC2\EOT\208\STX !\n\
    \\f\n\
    \\STX\EOT\t\DC2\ACK\211\STX\NUL\227\STX\SOH\n\
    \\v\n\
    \\ETX\EOT\t\SOH\DC2\EOT\211\STX\b\ESC\n\
    \\139\STX\n\
    \\EOT\EOT\t\STX\NUL\DC2\EOT\218\STX\EOT\EM\SUB\252\SOH\n\
    \If specified (non-zero), then we'll first start by sending out\n\
    \notifications for all added indexes with an add_index greater than this\n\
    \value. This allows callers to catch up on any events they missed while they\n\
    \weren't connected to the streaming RPC.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\t\STX\NUL\ENQ\DC2\EOT\218\STX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\t\STX\NUL\SOH\DC2\EOT\218\STX\v\DC4\n\
    \\r\n\
    \\ENQ\EOT\t\STX\NUL\ETX\DC2\EOT\218\STX\ETB\CAN\n\
    \\144\STX\n\
    \\EOT\EOT\t\STX\SOH\DC2\EOT\226\STX\EOT\FS\SUB\129\STX\n\
    \If specified (non-zero), then we'll first start by sending out\n\
    \notifications for all settled indexes with an settle_index greater than\n\
    \this value. This allows callers to catch up on any events they missed while\n\
    \they weren't connected to the streaming RPC.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\t\STX\SOH\ENQ\DC2\EOT\226\STX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\t\STX\SOH\SOH\DC2\EOT\226\STX\v\ETB\n\
    \\r\n\
    \\ENQ\EOT\t\STX\SOH\ETX\DC2\EOT\226\STX\SUB\ESC\n\
    \\f\n\
    \\STX\ENQ\SOH\DC2\ACK\229\STX\NUL\133\ETX\SOH\n\
    \\v\n\
    \\ETX\ENQ\SOH\SOH\DC2\EOT\229\STX\ENQ\EM\n\
    \+\n\
    \\EOT\ENQ\SOH\STX\NUL\DC2\EOT\233\STX\EOT\FS\SUB\GS\n\
    \Payment isn't failed (yet).\n\
    \\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\NUL\SOH\DC2\EOT\233\STX\EOT\ETB\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\NUL\STX\DC2\EOT\233\STX\SUB\ESC\n\
    \S\n\
    \\EOT\ENQ\SOH\STX\SOH\DC2\EOT\238\STX\EOT\US\SUBE\n\
    \There are more routes to try, but the payment timeout was exceeded.\n\
    \\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\SOH\SOH\DC2\EOT\238\STX\EOT\SUB\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\SOH\STX\DC2\EOT\238\STX\GS\RS\n\
    \s\n\
    \\EOT\ENQ\SOH\STX\STX\DC2\EOT\244\STX\EOT \SUBe\n\
    \All possible routes were tried and failed permanently. Or were no\n\
    \routes to the destination at all.\n\
    \\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\STX\SOH\DC2\EOT\244\STX\EOT\ESC\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\STX\STX\DC2\EOT\244\STX\RS\US\n\
    \4\n\
    \\EOT\ENQ\SOH\STX\ETX\DC2\EOT\249\STX\EOT\GS\SUB&\n\
    \A non-recoverable error has occured.\n\
    \\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\ETX\SOH\DC2\EOT\249\STX\EOT\CAN\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\ETX\STX\DC2\EOT\249\STX\ESC\FS\n\
    \a\n\
    \\EOT\ENQ\SOH\STX\EOT\DC2\EOT\255\STX\EOT1\SUBS\n\
    \Payment details incorrect (unknown hash, invalid amt or\n\
    \invalid final cltv delta)\n\
    \\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\EOT\SOH\DC2\EOT\255\STX\EOT,\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\EOT\STX\DC2\EOT\255\STX/0\n\
    \+\n\
    \\EOT\ENQ\SOH\STX\ENQ\DC2\EOT\132\ETX\EOT,\SUB\GS\n\
    \Insufficient local balance.\n\
    \\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\ENQ\SOH\DC2\EOT\132\ETX\EOT'\n\
    \\r\n\
    \\ENQ\ENQ\SOH\STX\ENQ\STX\DC2\EOT\132\ETX*+\n\
    \\f\n\
    \\STX\EOT\n\
    \\DC2\ACK\135\ETX\NUL\192\ETX\SOH\n\
    \\v\n\
    \\ETX\EOT\n\
    \\SOH\DC2\EOT\135\ETX\b\SI\n\
    \ \n\
    \\EOT\EOT\n\
    \\STX\NUL\DC2\EOT\137\ETX\EOT\FS\SUB\DC2 The payment hash\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\NUL\ENQ\DC2\EOT\137\ETX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\NUL\SOH\DC2\EOT\137\ETX\v\ETB\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\NUL\ETX\DC2\EOT\137\ETX\SUB\ESC\n\
    \8\n\
    \\EOT\EOT\n\
    \\STX\SOH\DC2\EOT\140\ETX\EOT(\SUB* Deprecated, use value_sat or value_msat.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\SOH\ENQ\DC2\EOT\140\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\SOH\SOH\DC2\EOT\140\ETX\n\
    \\SI\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\SOH\ETX\DC2\EOT\140\ETX\DC2\DC3\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\SOH\b\DC2\EOT\140\ETX\DC4'\n\
    \\SO\n\
    \\ACK\EOT\n\
    \\STX\SOH\b\ETX\DC2\EOT\140\ETX\NAK&\n\
    \0\n\
    \\EOT\EOT\n\
    \\STX\STX\DC2\EOT\143\ETX\EOT0\SUB\" Deprecated, use creation_time_ns\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\STX\ENQ\DC2\EOT\143\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\STX\SOH\DC2\EOT\143\ETX\n\
    \\ETB\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\STX\ETX\DC2\EOT\143\ETX\SUB\ESC\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\STX\b\DC2\EOT\143\ETX\FS/\n\
    \\SO\n\
    \\ACK\EOT\n\
    \\STX\STX\b\ETX\DC2\EOT\143\ETX\GS.\n\
    \\v\n\
    \\ETX\EOT\n\
    \\t\DC2\EOT\145\ETX\EOT\SI\n\
    \\f\n\
    \\EOT\EOT\n\
    \\t\NUL\DC2\EOT\145\ETX\r\SO\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\t\NUL\SOH\DC2\EOT\145\ETX\r\SO\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\t\NUL\STX\DC2\EOT\145\ETX\r\SO\n\
    \4\n\
    \\EOT\EOT\n\
    \\STX\ETX\DC2\EOT\148\ETX\EOT&\SUB& Deprecated, use fee_sat or fee_msat.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\ETX\ENQ\DC2\EOT\148\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\ETX\SOH\DC2\EOT\148\ETX\n\
    \\r\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\ETX\ETX\DC2\EOT\148\ETX\DLE\DC1\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\ETX\b\DC2\EOT\148\ETX\DC2%\n\
    \\SO\n\
    \\ACK\EOT\n\
    \\STX\ETX\b\ETX\DC2\EOT\148\ETX\DC3$\n\
    \$\n\
    \\EOT\EOT\n\
    \\STX\EOT\DC2\EOT\151\ETX\EOT \SUB\SYN The payment preimage\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\EOT\ENQ\DC2\EOT\151\ETX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\EOT\SOH\DC2\EOT\151\ETX\v\ESC\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\EOT\ETX\DC2\EOT\151\ETX\RS\US\n\
    \4\n\
    \\EOT\EOT\n\
    \\STX\ENQ\DC2\EOT\154\ETX\EOT\CAN\SUB& The value of the payment in satoshis\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\ENQ\ENQ\DC2\EOT\154\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\ENQ\SOH\DC2\EOT\154\ETX\n\
    \\DC3\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\ENQ\ETX\DC2\EOT\154\ETX\SYN\ETB\n\
    \:\n\
    \\EOT\EOT\n\
    \\STX\ACK\DC2\EOT\157\ETX\EOT\EM\SUB, The value of the payment in milli-satoshis\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\ACK\ENQ\DC2\EOT\157\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\ACK\SOH\DC2\EOT\157\ETX\n\
    \\DC4\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\ACK\ETX\DC2\EOT\157\ETX\ETB\CAN\n\
    \=\n\
    \\EOT\EOT\n\
    \\STX\a\DC2\EOT\160\ETX\EOT\US\SUB/ The optional payment request being fulfilled.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\a\ENQ\DC2\EOT\160\ETX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\a\SOH\DC2\EOT\160\ETX\v\SUB\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\a\ETX\DC2\EOT\160\ETX\GS\RS\n\
    \\SO\n\
    \\EOT\EOT\n\
    \\EOT\NUL\DC2\ACK\162\ETX\EOT\167\ETX\ENQ\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\EOT\NUL\SOH\DC2\EOT\162\ETX\t\SYN\n\
    \\SO\n\
    \\ACK\EOT\n\
    \\EOT\NUL\STX\NUL\DC2\EOT\163\ETX\b\DC4\n\
    \\SI\n\
    \\a\EOT\n\
    \\EOT\NUL\STX\NUL\SOH\DC2\EOT\163\ETX\b\SI\n\
    \\SI\n\
    \\a\EOT\n\
    \\EOT\NUL\STX\NUL\STX\DC2\EOT\163\ETX\DC2\DC3\n\
    \\SO\n\
    \\ACK\EOT\n\
    \\EOT\NUL\STX\SOH\DC2\EOT\164\ETX\b\SYN\n\
    \\SI\n\
    \\a\EOT\n\
    \\EOT\NUL\STX\SOH\SOH\DC2\EOT\164\ETX\b\DC1\n\
    \\SI\n\
    \\a\EOT\n\
    \\EOT\NUL\STX\SOH\STX\DC2\EOT\164\ETX\DC4\NAK\n\
    \\SO\n\
    \\ACK\EOT\n\
    \\EOT\NUL\STX\STX\DC2\EOT\165\ETX\b\SYN\n\
    \\SI\n\
    \\a\EOT\n\
    \\EOT\NUL\STX\STX\SOH\DC2\EOT\165\ETX\b\DC1\n\
    \\SI\n\
    \\a\EOT\n\
    \\EOT\NUL\STX\STX\STX\DC2\EOT\165\ETX\DC4\NAK\n\
    \\SO\n\
    \\ACK\EOT\n\
    \\EOT\NUL\STX\ETX\DC2\EOT\166\ETX\b\DC3\n\
    \\SI\n\
    \\a\EOT\n\
    \\EOT\NUL\STX\ETX\SOH\DC2\EOT\166\ETX\b\SO\n\
    \\SI\n\
    \\a\EOT\n\
    \\EOT\NUL\STX\ETX\STX\DC2\EOT\166\ETX\DC1\DC2\n\
    \*\n\
    \\EOT\EOT\n\
    \\STX\b\DC2\EOT\170\ETX\EOT\RS\SUB\FS The status of the payment.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\b\ACK\DC2\EOT\170\ETX\EOT\DC1\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\b\SOH\DC2\EOT\170\ETX\DC2\CAN\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\b\ETX\DC2\EOT\170\ETX\ESC\GS\n\
    \:\n\
    \\EOT\EOT\n\
    \\STX\t\DC2\EOT\173\ETX\EOT\ETB\SUB,  The fee paid for this payment in satoshis\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\t\ENQ\DC2\EOT\173\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\t\SOH\DC2\EOT\173\ETX\n\
    \\DC1\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\t\ETX\DC2\EOT\173\ETX\DC4\SYN\n\
    \@\n\
    \\EOT\EOT\n\
    \\STX\n\
    \\DC2\EOT\176\ETX\EOT\CAN\SUB2  The fee paid for this payment in milli-satoshis\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\n\
    \\ENQ\DC2\EOT\176\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\n\
    \\SOH\DC2\EOT\176\ETX\n\
    \\DC2\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\n\
    \\ETX\DC2\EOT\176\ETX\NAK\ETB\n\
    \N\n\
    \\EOT\EOT\n\
    \\STX\v\DC2\EOT\179\ETX\EOT \SUB@ The time in UNIX nanoseconds at which the payment was created.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\v\ENQ\DC2\EOT\179\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\v\SOH\DC2\EOT\179\ETX\n\
    \\SUB\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\v\ETX\DC2\EOT\179\ETX\GS\US\n\
    \@\n\
    \\EOT\EOT\n\
    \\STX\f\DC2\EOT\182\ETX\EOT$\SUB2 The HTLCs made in attempt to settle the payment.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\f\EOT\DC2\EOT\182\ETX\EOT\f\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\f\ACK\DC2\EOT\182\ETX\r\CAN\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\f\SOH\DC2\EOT\182\ETX\EM\RS\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\f\ETX\DC2\EOT\182\ETX!#\n\
    \\189\SOH\n\
    \\EOT\EOT\n\
    \\STX\r\DC2\EOT\189\ETX\EOT\RS\SUB\174\SOH\n\
    \The creation index of this payment. Each payment can be uniquely identified\n\
    \by this index, which may not strictly increment by 1 for payments made in\n\
    \older versions of lnd.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\r\ENQ\DC2\EOT\189\ETX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\r\SOH\DC2\EOT\189\ETX\v\CAN\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\r\ETX\DC2\EOT\189\ETX\ESC\GS\n\
    \\f\n\
    \\EOT\EOT\n\
    \\STX\SO\DC2\EOT\191\ETX\EOT-\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\SO\ACK\DC2\EOT\191\ETX\EOT\CAN\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\SO\SOH\DC2\EOT\191\ETX\EM'\n\
    \\r\n\
    \\ENQ\EOT\n\
    \\STX\SO\ETX\DC2\EOT\191\ETX*,\n\
    \\f\n\
    \\STX\EOT\v\DC2\ACK\194\ETX\NUL\224\ETX\SOH\n\
    \\v\n\
    \\ETX\EOT\v\SOH\DC2\EOT\194\ETX\b\DC3\n\
    \<\n\
    \\EOT\EOT\v\STX\NUL\DC2\EOT\196\ETX\EOT\SUB\SUB. The unique ID that is used for this attempt.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\v\STX\NUL\ENQ\DC2\EOT\196\ETX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\v\STX\NUL\SOH\DC2\EOT\196\ETX\v\NAK\n\
    \\r\n\
    \\ENQ\EOT\v\STX\NUL\ETX\DC2\EOT\196\ETX\CAN\EM\n\
    \\SO\n\
    \\EOT\EOT\v\EOT\NUL\DC2\ACK\198\ETX\EOT\202\ETX\ENQ\n\
    \\r\n\
    \\ENQ\EOT\v\EOT\NUL\SOH\DC2\EOT\198\ETX\t\DC3\n\
    \\SO\n\
    \\ACK\EOT\v\EOT\NUL\STX\NUL\DC2\EOT\199\ETX\b\SYN\n\
    \\SI\n\
    \\a\EOT\v\EOT\NUL\STX\NUL\SOH\DC2\EOT\199\ETX\b\DC1\n\
    \\SI\n\
    \\a\EOT\v\EOT\NUL\STX\NUL\STX\DC2\EOT\199\ETX\DC4\NAK\n\
    \\SO\n\
    \\ACK\EOT\v\EOT\NUL\STX\SOH\DC2\EOT\200\ETX\b\SYN\n\
    \\SI\n\
    \\a\EOT\v\EOT\NUL\STX\SOH\SOH\DC2\EOT\200\ETX\b\DC1\n\
    \\SI\n\
    \\a\EOT\v\EOT\NUL\STX\SOH\STX\DC2\EOT\200\ETX\DC4\NAK\n\
    \\SO\n\
    \\ACK\EOT\v\EOT\NUL\STX\STX\DC2\EOT\201\ETX\b\DC3\n\
    \\SI\n\
    \\a\EOT\v\EOT\NUL\STX\STX\SOH\DC2\EOT\201\ETX\b\SO\n\
    \\SI\n\
    \\a\EOT\v\EOT\NUL\STX\STX\STX\DC2\EOT\201\ETX\DC1\DC2\n\
    \'\n\
    \\EOT\EOT\v\STX\SOH\DC2\EOT\205\ETX\EOT\SUB\SUB\EM The status of the HTLC.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\v\STX\SOH\ACK\DC2\EOT\205\ETX\EOT\SO\n\
    \\r\n\
    \\ENQ\EOT\v\STX\SOH\SOH\DC2\EOT\205\ETX\SI\NAK\n\
    \\r\n\
    \\ENQ\EOT\v\STX\SOH\ETX\DC2\EOT\205\ETX\CAN\EM\n\
    \-\n\
    \\EOT\EOT\v\STX\STX\DC2\EOT\208\ETX\EOT\DC4\SUB\US The route taken by this HTLC.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\v\STX\STX\ACK\DC2\EOT\208\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\v\STX\STX\SOH\DC2\EOT\208\ETX\n\
    \\SI\n\
    \\r\n\
    \\ENQ\EOT\v\STX\STX\ETX\DC2\EOT\208\ETX\DC2\DC3\n\
    \I\n\
    \\EOT\EOT\v\STX\ETX\DC2\EOT\211\ETX\EOT\RS\SUB; The time in UNIX nanoseconds at which this HTLC was sent.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\v\STX\ETX\ENQ\DC2\EOT\211\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\v\STX\ETX\SOH\DC2\EOT\211\ETX\n\
    \\EM\n\
    \\r\n\
    \\ENQ\EOT\v\STX\ETX\ETX\DC2\EOT\211\ETX\FS\GS\n\
    \\146\SOH\n\
    \\EOT\EOT\v\STX\EOT\DC2\EOT\217\ETX\EOT\RS\SUB\131\SOH\n\
    \The time in UNIX nanoseconds at which this HTLC was settled or failed.\n\
    \This value will not be set if the HTLC is still IN_FLIGHT.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\v\STX\EOT\ENQ\DC2\EOT\217\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\v\STX\EOT\SOH\DC2\EOT\217\ETX\n\
    \\EM\n\
    \\r\n\
    \\ENQ\EOT\v\STX\EOT\ETX\DC2\EOT\217\ETX\FS\GS\n\
    \+\n\
    \\EOT\EOT\v\STX\ENQ\DC2\EOT\220\ETX\EOT\CAN\SUB\GS Detailed htlc failure info.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\v\STX\ENQ\ACK\DC2\EOT\220\ETX\EOT\v\n\
    \\r\n\
    \\ENQ\EOT\v\STX\ENQ\SOH\DC2\EOT\220\ETX\f\DC3\n\
    \\r\n\
    \\ENQ\EOT\v\STX\ENQ\ETX\DC2\EOT\220\ETX\SYN\ETB\n\
    \>\n\
    \\EOT\EOT\v\STX\ACK\DC2\EOT\223\ETX\EOT\ETB\SUB0 The preimage that was used to settle the HTLC.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\v\STX\ACK\ENQ\DC2\EOT\223\ETX\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\v\STX\ACK\SOH\DC2\EOT\223\ETX\n\
    \\DC2\n\
    \\r\n\
    \\ENQ\EOT\v\STX\ACK\ETX\DC2\EOT\223\ETX\NAK\SYN\n\
    \\f\n\
    \\STX\EOT\f\DC2\ACK\226\ETX\NUL\253\ETX\SOH\n\
    \\v\n\
    \\ETX\EOT\f\SOH\DC2\EOT\226\ETX\b\ESC\n\
    \\149\STX\n\
    \\EOT\EOT\f\STX\NUL\DC2\EOT\233\ETX\EOT \SUB\134\STX\n\
    \If true, then return payments that have not yet fully completed. This means\n\
    \that pending payments, as well as failed payments will show up if this\n\
    \field is set to true. This flag doesn't change the meaning of the indices,\n\
    \which are tied to individual payments.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\f\STX\NUL\ENQ\DC2\EOT\233\ETX\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\f\STX\NUL\SOH\DC2\EOT\233\ETX\t\ESC\n\
    \\r\n\
    \\ENQ\EOT\f\STX\NUL\ETX\DC2\EOT\233\ETX\RS\US\n\
    \\237\STX\n\
    \\EOT\EOT\f\STX\SOH\DC2\EOT\242\ETX\EOT\FS\SUB\222\STX\n\
    \The index of a payment that will be used as either the start or end of a\n\
    \query to determine which payments should be returned in the response. The\n\
    \index_offset is exclusive. In the case of a zero index_offset, the query\n\
    \will start with the oldest payment when paginating forwards, or will end\n\
    \with the most recent payment when paginating backwards.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\f\STX\SOH\ENQ\DC2\EOT\242\ETX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\f\STX\SOH\SOH\DC2\EOT\242\ETX\v\ETB\n\
    \\r\n\
    \\ENQ\EOT\f\STX\SOH\ETX\DC2\EOT\242\ETX\SUB\ESC\n\
    \V\n\
    \\EOT\EOT\f\STX\STX\DC2\EOT\245\ETX\EOT\FS\SUBH The maximal number of payments returned in the response to this query.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\f\STX\STX\ENQ\DC2\EOT\245\ETX\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\f\STX\STX\SOH\DC2\EOT\245\ETX\v\ETB\n\
    \\r\n\
    \\ENQ\EOT\f\STX\STX\ETX\DC2\EOT\245\ETX\SUB\ESC\n\
    \\237\SOH\n\
    \\EOT\EOT\f\STX\ETX\DC2\EOT\252\ETX\EOT\SYN\SUB\222\SOH\n\
    \If set, the payments returned will result from seeking backwards from the\n\
    \specified index offset. This can be used to paginate backwards. The order\n\
    \of the returned payments is always oldest first (ascending index order).\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\f\STX\ETX\ENQ\DC2\EOT\252\ETX\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\f\STX\ETX\SOH\DC2\EOT\252\ETX\t\DC1\n\
    \\r\n\
    \\ENQ\EOT\f\STX\ETX\ETX\DC2\EOT\252\ETX\DC4\NAK\n\
    \\f\n\
    \\STX\EOT\r\DC2\ACK\255\ETX\NUL\142\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\r\SOH\DC2\EOT\255\ETX\b\FS\n\
    \$\n\
    \\EOT\EOT\r\STX\NUL\DC2\EOT\129\EOT\EOT\"\SUB\SYN The list of payments\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\r\STX\NUL\EOT\DC2\EOT\129\EOT\EOT\f\n\
    \\r\n\
    \\ENQ\EOT\r\STX\NUL\ACK\DC2\EOT\129\EOT\r\DC4\n\
    \\r\n\
    \\ENQ\EOT\r\STX\NUL\SOH\DC2\EOT\129\EOT\NAK\GS\n\
    \\r\n\
    \\ENQ\EOT\r\STX\NUL\ETX\DC2\EOT\129\EOT !\n\
    \\165\SOH\n\
    \\EOT\EOT\r\STX\SOH\DC2\EOT\135\EOT\EOT\"\SUB\150\SOH\n\
    \The index of the first item in the set of returned payments. This can be\n\
    \used as the index_offset to continue seeking backwards in the next request.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\r\STX\SOH\ENQ\DC2\EOT\135\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\r\STX\SOH\SOH\DC2\EOT\135\EOT\v\GS\n\
    \\r\n\
    \\ENQ\EOT\r\STX\SOH\ETX\DC2\EOT\135\EOT !\n\
    \\163\SOH\n\
    \\EOT\EOT\r\STX\STX\DC2\EOT\141\EOT\EOT!\SUB\148\SOH\n\
    \The index of the last item in the set of returned payments. This can be used\n\
    \as the index_offset to continue seeking forwards in the next request.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\r\STX\STX\ENQ\DC2\EOT\141\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\r\STX\STX\SOH\DC2\EOT\141\EOT\v\FS\n\
    \\r\n\
    \\ENQ\EOT\r\STX\STX\ETX\DC2\EOT\141\EOT\US \n\
    \\f\n\
    \\STX\EOT\SO\DC2\ACK\144\EOT\NUL\152\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\SO\SOH\DC2\EOT\144\EOT\b\FS\n\
    \'\n\
    \\EOT\EOT\SO\STX\NUL\DC2\EOT\146\EOT\EOT\ESC\SUB\EM Payment hash to delete.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SO\STX\NUL\ENQ\DC2\EOT\146\EOT\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\SO\STX\NUL\SOH\DC2\EOT\146\EOT\n\
    \\SYN\n\
    \\r\n\
    \\ENQ\EOT\SO\STX\NUL\ETX\DC2\EOT\146\EOT\EM\SUB\n\
    \R\n\
    \\EOT\EOT\SO\STX\SOH\DC2\EOT\151\EOT\EOT\US\SUBD\n\
    \Only delete failed HTLCs from the payment, not the payment itself.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SO\STX\SOH\ENQ\DC2\EOT\151\EOT\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\SO\STX\SOH\SOH\DC2\EOT\151\EOT\t\SUB\n\
    \\r\n\
    \\ENQ\EOT\SO\STX\SOH\ETX\DC2\EOT\151\EOT\GS\RS\n\
    \\f\n\
    \\STX\EOT\SI\DC2\ACK\154\EOT\NUL\162\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\SI\SOH\DC2\EOT\154\EOT\b \n\
    \,\n\
    \\EOT\EOT\SI\STX\NUL\DC2\EOT\156\EOT\EOT\"\SUB\RS Only delete failed payments.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SI\STX\NUL\ENQ\DC2\EOT\156\EOT\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\SI\STX\NUL\SOH\DC2\EOT\156\EOT\t\GS\n\
    \\r\n\
    \\ENQ\EOT\SI\STX\NUL\ETX\DC2\EOT\156\EOT !\n\
    \O\n\
    \\EOT\EOT\SI\STX\SOH\DC2\EOT\161\EOT\EOT\US\SUBA\n\
    \Only delete failed HTLCs from payments, not the payment itself.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SI\STX\SOH\ENQ\DC2\EOT\161\EOT\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\SI\STX\SOH\SOH\DC2\EOT\161\EOT\t\SUB\n\
    \\r\n\
    \\ENQ\EOT\SI\STX\SOH\ETX\DC2\EOT\161\EOT\GS\RS\n\
    \\f\n\
    \\STX\EOT\DLE\DC2\ACK\164\EOT\NUL\165\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\DLE\SOH\DC2\EOT\164\EOT\b\GS\n\
    \\f\n\
    \\STX\EOT\DC1\DC2\ACK\167\EOT\NUL\168\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\DC1\SOH\DC2\EOT\167\EOT\b!\n\
    \\f\n\
    \\STX\EOT\DC2\DC2\ACK\170\EOT\NUL\181\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\DC2\SOH\DC2\EOT\170\EOT\b\GS\n\
    \\f\n\
    \\EOT\EOT\DC2\STX\NUL\DC2\EOT\171\EOT\EOT#\n\
    \\r\n\
    \\ENQ\EOT\DC2\STX\NUL\ACK\DC2\EOT\171\EOT\EOT\DLE\n\
    \\r\n\
    \\ENQ\EOT\DC2\STX\NUL\SOH\DC2\EOT\171\EOT\DC1\RS\n\
    \\r\n\
    \\ENQ\EOT\DC2\STX\NUL\ETX\DC2\EOT\171\EOT!\"\n\
    \\f\n\
    \\EOT\EOT\DC2\STX\SOH\DC2\EOT\173\EOT\EOT'\n\
    \\r\n\
    \\ENQ\EOT\DC2\STX\SOH\ENQ\DC2\EOT\173\EOT\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\DC2\STX\SOH\SOH\DC2\EOT\173\EOT\t\"\n\
    \\r\n\
    \\ENQ\EOT\DC2\STX\SOH\ETX\DC2\EOT\173\EOT%&\n\
    \\212\SOH\n\
    \\EOT\EOT\DC2\STX\STX\DC2\EOT\180\EOT\EOT$\SUB\197\SOH\n\
    \Override the requirement for being in dev mode by setting this to true and\n\
    \confirming the user knows what they are doing and this is a potential foot\n\
    \gun to lose funds if used on active channels.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\DC2\STX\STX\ENQ\DC2\EOT\180\EOT\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\DC2\STX\STX\SOH\DC2\EOT\180\EOT\t\US\n\
    \\r\n\
    \\ENQ\EOT\DC2\STX\STX\ETX\DC2\EOT\180\EOT\"#\n\
    \\f\n\
    \\STX\EOT\DC3\DC2\ACK\183\EOT\NUL\184\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\DC3\SOH\DC2\EOT\183\EOT\b\RS\n\
    \\f\n\
    \\STX\EOT\DC4\DC2\ACK\186\EOT\NUL\189\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\DC4\SOH\DC2\EOT\186\EOT\b\EM\n\
    \\f\n\
    \\EOT\EOT\DC4\STX\NUL\DC2\EOT\187\EOT\EOT\DC2\n\
    \\r\n\
    \\ENQ\EOT\DC4\STX\NUL\ENQ\DC2\EOT\187\EOT\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\DC4\STX\NUL\SOH\DC2\EOT\187\EOT\t\r\n\
    \\r\n\
    \\ENQ\EOT\DC4\STX\NUL\ETX\DC2\EOT\187\EOT\DLE\DC1\n\
    \\f\n\
    \\EOT\EOT\DC4\STX\SOH\DC2\EOT\188\EOT\EOT\SUB\n\
    \\r\n\
    \\ENQ\EOT\DC4\STX\SOH\ENQ\DC2\EOT\188\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\DC4\STX\SOH\SOH\DC2\EOT\188\EOT\v\NAK\n\
    \\r\n\
    \\ENQ\EOT\DC4\STX\SOH\ETX\DC2\EOT\188\EOT\CAN\EM\n\
    \\f\n\
    \\STX\EOT\NAK\DC2\ACK\190\EOT\NUL\192\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\NAK\SOH\DC2\EOT\190\EOT\b\SUB\n\
    \\f\n\
    \\EOT\EOT\NAK\STX\NUL\DC2\EOT\191\EOT\EOT\ESC\n\
    \\r\n\
    \\ENQ\EOT\NAK\STX\NUL\ENQ\DC2\EOT\191\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\NAK\STX\NUL\SOH\DC2\EOT\191\EOT\v\SYN\n\
    \\r\n\
    \\ENQ\EOT\NAK\STX\NUL\ETX\DC2\EOT\191\EOT\EM\SUB\n\
    \\f\n\
    \\STX\EOT\SYN\DC2\ACK\194\EOT\NUL\197\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\SYN\SOH\DC2\EOT\194\EOT\b\DC4\n\
    \8\n\
    \\EOT\EOT\SYN\STX\NUL\DC2\EOT\196\EOT\EOT\ETB\SUB* The payment request string to be decoded\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SYN\STX\NUL\ENQ\DC2\EOT\196\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SYN\STX\NUL\SOH\DC2\EOT\196\EOT\v\DC2\n\
    \\r\n\
    \\ENQ\EOT\SYN\STX\NUL\ETX\DC2\EOT\196\EOT\NAK\SYN\n\
    \\f\n\
    \\STX\EOT\ETB\DC2\ACK\198\EOT\NUL\212\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\ETB\SOH\DC2\EOT\198\EOT\b\SO\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\NUL\DC2\EOT\199\EOT\EOT\ESC\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\NUL\ENQ\DC2\EOT\199\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\NUL\SOH\DC2\EOT\199\EOT\v\SYN\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\NUL\ETX\DC2\EOT\199\EOT\EM\SUB\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\SOH\DC2\EOT\200\EOT\EOT\FS\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\SOH\ENQ\DC2\EOT\200\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\SOH\SOH\DC2\EOT\200\EOT\v\ETB\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\SOH\ETX\DC2\EOT\200\EOT\SUB\ESC\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\STX\DC2\EOT\201\EOT\EOT\ESC\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\STX\ENQ\DC2\EOT\201\EOT\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\STX\SOH\DC2\EOT\201\EOT\n\
    \\SYN\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\STX\ETX\DC2\EOT\201\EOT\EM\SUB\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\ETX\DC2\EOT\202\EOT\EOT\CAN\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\ETX\ENQ\DC2\EOT\202\EOT\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\ETX\SOH\DC2\EOT\202\EOT\n\
    \\DC3\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\ETX\ETX\DC2\EOT\202\EOT\SYN\ETB\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\EOT\DC2\EOT\203\EOT\EOT\NAK\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\EOT\ENQ\DC2\EOT\203\EOT\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\EOT\SOH\DC2\EOT\203\EOT\n\
    \\DLE\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\EOT\ETX\DC2\EOT\203\EOT\DC3\DC4\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\ENQ\DC2\EOT\204\EOT\EOT\ESC\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\ENQ\ENQ\DC2\EOT\204\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\ENQ\SOH\DC2\EOT\204\EOT\v\SYN\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\ENQ\ETX\DC2\EOT\204\EOT\EM\SUB\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\ACK\DC2\EOT\205\EOT\EOT \n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\ACK\ENQ\DC2\EOT\205\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\ACK\SOH\DC2\EOT\205\EOT\v\ESC\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\ACK\ETX\DC2\EOT\205\EOT\RS\US\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\a\DC2\EOT\206\EOT\EOT\GS\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\a\ENQ\DC2\EOT\206\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\a\SOH\DC2\EOT\206\EOT\v\CAN\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\a\ETX\DC2\EOT\206\EOT\ESC\FS\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\b\DC2\EOT\207\EOT\EOT\SUB\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\b\ENQ\DC2\EOT\207\EOT\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\b\SOH\DC2\EOT\207\EOT\n\
    \\NAK\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\b\ETX\DC2\EOT\207\EOT\CAN\EM\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\t\DC2\EOT\208\EOT\EOT(\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\t\EOT\DC2\EOT\208\EOT\EOT\f\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\t\ACK\DC2\EOT\208\EOT\r\SYN\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\t\SOH\DC2\EOT\208\EOT\ETB\"\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\t\ETX\DC2\EOT\208\EOT%'\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\n\
    \\DC2\EOT\209\EOT\EOT\FS\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\n\
    \\ENQ\DC2\EOT\209\EOT\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\n\
    \\SOH\DC2\EOT\209\EOT\n\
    \\SYN\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\n\
    \\ETX\DC2\EOT\209\EOT\EM\ESC\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\v\DC2\EOT\210\EOT\EOT\CAN\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\v\ENQ\DC2\EOT\210\EOT\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\v\SOH\DC2\EOT\210\EOT\n\
    \\DC2\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\v\ETX\DC2\EOT\210\EOT\NAK\ETB\n\
    \\f\n\
    \\EOT\EOT\ETB\STX\f\DC2\EOT\211\EOT\EOT'\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\f\ACK\DC2\EOT\211\EOT\EOT\CAN\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\f\SOH\DC2\EOT\211\EOT\EM!\n\
    \\r\n\
    \\ENQ\EOT\ETB\STX\f\ETX\DC2\EOT\211\EOT$&\n\
    \\f\n\
    \\STX\EOT\CAN\DC2\ACK\214\EOT\NUL\215\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\CAN\SOH\DC2\EOT\214\EOT\b\CAN\n\
    \\f\n\
    \\STX\EOT\EM\DC2\ACK\216\EOT\NUL\233\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\EM\SOH\DC2\EOT\216\EOT\b\CAN\n\
    \E\n\
    \\EOT\EOT\EM\STX\NUL\DC2\EOT\218\EOT\EOT,\SUB7 The short channel id that this fee report belongs to.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\NUL\ENQ\DC2\EOT\218\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\NUL\SOH\DC2\EOT\218\EOT\v\DC2\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\NUL\ETX\DC2\EOT\218\EOT\NAK\SYN\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\NUL\b\DC2\EOT\218\EOT\ETB+\n\
    \\SO\n\
    \\ACK\EOT\EM\STX\NUL\b\ACK\DC2\EOT\218\EOT\CAN*\n\
    \<\n\
    \\EOT\EOT\EM\STX\SOH\DC2\EOT\221\EOT\EOT\GS\SUB. The channel that this fee report belongs to.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\SOH\ENQ\DC2\EOT\221\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\SOH\SOH\DC2\EOT\221\EOT\v\CAN\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\SOH\ETX\DC2\EOT\221\EOT\ESC\FS\n\
    \U\n\
    \\EOT\EOT\EM\STX\STX\DC2\EOT\224\EOT\EOT\FS\SUBG The base fee charged regardless of the number of milli-satoshis sent.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\STX\ENQ\DC2\EOT\224\EOT\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\STX\SOH\DC2\EOT\224\EOT\n\
    \\ETB\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\STX\ETX\DC2\EOT\224\EOT\SUB\ESC\n\
    \h\n\
    \\EOT\EOT\EM\STX\ETX\DC2\EOT\228\EOT\EOT\SUB\SUBZ The amount charged per milli-satoshis transferred expressed in\n\
    \ millionths of a satoshi.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\ETX\ENQ\DC2\EOT\228\EOT\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\ETX\SOH\DC2\EOT\228\EOT\n\
    \\NAK\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\ETX\ETX\DC2\EOT\228\EOT\CAN\EM\n\
    \s\n\
    \\EOT\EOT\EM\STX\EOT\DC2\EOT\232\EOT\EOT\CAN\SUBe The effective fee rate in milli-satoshis. Computed by dividing the\n\
    \ fee_per_mil value by 1 million.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\EOT\ENQ\DC2\EOT\232\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\EOT\SOH\DC2\EOT\232\EOT\v\DC3\n\
    \\r\n\
    \\ENQ\EOT\EM\STX\EOT\ETX\DC2\EOT\232\EOT\SYN\ETB\n\
    \\f\n\
    \\STX\EOT\SUB\DC2\ACK\234\EOT\NUL\250\EOT\SOH\n\
    \\v\n\
    \\ETX\EOT\SUB\SOH\DC2\EOT\234\EOT\b\EM\n\
    \k\n\
    \\EOT\EOT\SUB\STX\NUL\DC2\EOT\237\EOT\EOT/\SUB] An array of channel fee reports which describes the current fee schedule\n\
    \ for each channel.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\NUL\EOT\DC2\EOT\237\EOT\EOT\f\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\NUL\ACK\DC2\EOT\237\EOT\r\GS\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\NUL\SOH\DC2\EOT\237\EOT\RS*\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\NUL\ETX\DC2\EOT\237\EOT-.\n\
    \m\n\
    \\EOT\EOT\SUB\STX\SOH\DC2\EOT\241\EOT\EOT\ESC\SUB_ The total amount of fee revenue (in satoshis) the switch has collected\n\
    \ over the past 24 hrs.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\SOH\ENQ\DC2\EOT\241\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\SOH\SOH\DC2\EOT\241\EOT\v\SYN\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\SOH\ETX\DC2\EOT\241\EOT\EM\SUB\n\
    \m\n\
    \\EOT\EOT\SUB\STX\STX\DC2\EOT\245\EOT\EOT\FS\SUB_ The total amount of fee revenue (in satoshis) the switch has collected\n\
    \ over the past 1 week.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\STX\ENQ\DC2\EOT\245\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\STX\SOH\DC2\EOT\245\EOT\v\ETB\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\STX\ETX\DC2\EOT\245\EOT\SUB\ESC\n\
    \n\n\
    \\EOT\EOT\SUB\STX\ETX\DC2\EOT\249\EOT\EOT\GS\SUB` The total amount of fee revenue (in satoshis) the switch has collected\n\
    \ over the past 1 month.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\ETX\ENQ\DC2\EOT\249\EOT\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\ETX\SOH\DC2\EOT\249\EOT\v\CAN\n\
    \\r\n\
    \\ENQ\EOT\SUB\STX\ETX\ETX\DC2\EOT\249\EOT\ESC\FS\n\
    \\f\n\
    \\STX\EOT\ESC\DC2\ACK\252\EOT\NUL\153\ENQ\SOH\n\
    \\v\n\
    \\ETX\EOT\ESC\SOH\DC2\EOT\252\EOT\b\ESC\n\
    \\SO\n\
    \\EOT\EOT\ESC\b\NUL\DC2\ACK\253\EOT\EOT\131\ENQ\ENQ\n\
    \\r\n\
    \\ENQ\EOT\ESC\b\NUL\SOH\DC2\EOT\253\EOT\n\
    \\SI\n\
    \R\n\
    \\EOT\EOT\ESC\STX\NUL\DC2\EOT\255\EOT\b\CAN\SUBD If set, then this update applies to all currently active channels.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\NUL\ENQ\DC2\EOT\255\EOT\b\f\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\NUL\SOH\DC2\EOT\255\EOT\r\DC3\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\NUL\ETX\DC2\EOT\255\EOT\SYN\ETB\n\
    \C\n\
    \\EOT\EOT\ESC\STX\SOH\DC2\EOT\130\ENQ\b$\SUB5 If set, this update will target a specific channel.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\SOH\ACK\DC2\EOT\130\ENQ\b\DC4\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\SOH\SOH\DC2\EOT\130\ENQ\NAK\US\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\SOH\ETX\DC2\EOT\130\ENQ\"#\n\
    \U\n\
    \\EOT\EOT\ESC\STX\STX\DC2\EOT\134\ENQ\EOT\FS\SUBG The base fee charged regardless of the number of milli-satoshis sent.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\STX\ENQ\DC2\EOT\134\ENQ\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\STX\SOH\DC2\EOT\134\ENQ\n\
    \\ETB\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\STX\ETX\DC2\EOT\134\ENQ\SUB\ESC\n\
    \|\n\
    \\EOT\EOT\ESC\STX\ETX\DC2\EOT\138\ENQ\EOT\CAN\SUBn The effective fee rate in milli-satoshis. The precision of this value\n\
    \ goes up to 6 decimal places, so 1e-6.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\ETX\ENQ\DC2\EOT\138\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\ETX\SOH\DC2\EOT\138\ENQ\v\DC3\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\ETX\ETX\DC2\EOT\138\ENQ\SYN\ETB\n\
    \Q\n\
    \\EOT\EOT\ESC\STX\EOT\DC2\EOT\141\ENQ\EOT\US\SUBC The required timelock delta for HTLCs forwarded over the channel.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\EOT\ENQ\DC2\EOT\141\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\EOT\SOH\DC2\EOT\141\ENQ\v\SUB\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\EOT\ETX\DC2\EOT\141\ENQ\GS\RS\n\
    \o\n\
    \\EOT\EOT\ESC\STX\ENQ\DC2\EOT\145\ENQ\EOT\GS\SUBa If set, the maximum HTLC size in milli-satoshis. If unset, the maximum\n\
    \ HTLC will be unchanged.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\ENQ\ENQ\DC2\EOT\145\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\ENQ\SOH\DC2\EOT\145\ENQ\v\CAN\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\ENQ\ETX\DC2\EOT\145\ENQ\ESC\FS\n\
    \j\n\
    \\EOT\EOT\ESC\STX\ACK\DC2\EOT\149\ENQ\EOT\GS\SUB\\ The minimum HTLC size in milli-satoshis. Only applied if\n\
    \ min_htlc_msat_specified is true.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\ACK\ENQ\DC2\EOT\149\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\ACK\SOH\DC2\EOT\149\ENQ\v\CAN\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\ACK\ETX\DC2\EOT\149\ENQ\ESC\FS\n\
    \2\n\
    \\EOT\EOT\ESC\STX\a\DC2\EOT\152\ENQ\EOT%\SUB$ If true, min_htlc_msat is applied.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\a\ENQ\DC2\EOT\152\ENQ\EOT\b\n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\a\SOH\DC2\EOT\152\ENQ\t \n\
    \\r\n\
    \\ENQ\EOT\ESC\STX\a\ETX\DC2\EOT\152\ENQ#$\n\
    \\f\n\
    \\STX\ENQ\STX\DC2\ACK\154\ENQ\NUL\160\ENQ\SOH\n\
    \\v\n\
    \\ETX\ENQ\STX\SOH\DC2\EOT\154\ENQ\ENQ\DC2\n\
    \\f\n\
    \\EOT\ENQ\STX\STX\NUL\DC2\EOT\155\ENQ\EOT\US\n\
    \\r\n\
    \\ENQ\ENQ\STX\STX\NUL\SOH\DC2\EOT\155\ENQ\EOT\SUB\n\
    \\r\n\
    \\ENQ\ENQ\STX\STX\NUL\STX\DC2\EOT\155\ENQ\GS\RS\n\
    \\f\n\
    \\EOT\ENQ\STX\STX\SOH\DC2\EOT\156\ENQ\EOT\US\n\
    \\r\n\
    \\ENQ\ENQ\STX\STX\SOH\SOH\DC2\EOT\156\ENQ\EOT\SUB\n\
    \\r\n\
    \\ENQ\ENQ\STX\STX\SOH\STX\DC2\EOT\156\ENQ\GS\RS\n\
    \\f\n\
    \\EOT\ENQ\STX\STX\STX\DC2\EOT\157\ENQ\EOT!\n\
    \\r\n\
    \\ENQ\ENQ\STX\STX\STX\SOH\DC2\EOT\157\ENQ\EOT\FS\n\
    \\r\n\
    \\ENQ\ENQ\STX\STX\STX\STX\DC2\EOT\157\ENQ\US \n\
    \\f\n\
    \\EOT\ENQ\STX\STX\ETX\DC2\EOT\158\ENQ\EOT$\n\
    \\r\n\
    \\ENQ\ENQ\STX\STX\ETX\SOH\DC2\EOT\158\ENQ\EOT\US\n\
    \\r\n\
    \\ENQ\ENQ\STX\STX\ETX\STX\DC2\EOT\158\ENQ\"#\n\
    \\f\n\
    \\EOT\ENQ\STX\STX\EOT\DC2\EOT\159\ENQ\EOT)\n\
    \\r\n\
    \\ENQ\ENQ\STX\STX\EOT\SOH\DC2\EOT\159\ENQ\EOT$\n\
    \\r\n\
    \\ENQ\ENQ\STX\STX\EOT\STX\DC2\EOT\159\ENQ'(\n\
    \\f\n\
    \\STX\EOT\FS\DC2\ACK\162\ENQ\NUL\171\ENQ\SOH\n\
    \\v\n\
    \\ETX\EOT\FS\SOH\DC2\EOT\162\ENQ\b\DC4\n\
    \-\n\
    \\EOT\EOT\FS\STX\NUL\DC2\EOT\164\ENQ\EOT\SUB\SUB\US The outpoint in format txid:n\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\FS\STX\NUL\ACK\DC2\EOT\164\ENQ\EOT\f\n\
    \\r\n\
    \\ENQ\EOT\FS\STX\NUL\SOH\DC2\EOT\164\ENQ\r\NAK\n\
    \\r\n\
    \\ENQ\EOT\FS\STX\NUL\ETX\DC2\EOT\164\ENQ\CAN\EM\n\
    \5\n\
    \\EOT\EOT\FS\STX\SOH\DC2\EOT\167\ENQ\EOT\GS\SUB' Reason for the policy update failure.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\FS\STX\SOH\ACK\DC2\EOT\167\ENQ\EOT\DC1\n\
    \\r\n\
    \\ENQ\EOT\FS\STX\SOH\SOH\DC2\EOT\167\ENQ\DC2\CAN\n\
    \\r\n\
    \\ENQ\EOT\FS\STX\SOH\ETX\DC2\EOT\167\ENQ\ESC\FS\n\
    \C\n\
    \\EOT\EOT\FS\STX\STX\DC2\EOT\170\ENQ\EOT\FS\SUB5 A string representation of the policy update error.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\FS\STX\STX\ENQ\DC2\EOT\170\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\FS\STX\STX\SOH\DC2\EOT\170\ENQ\v\ETB\n\
    \\r\n\
    \\ENQ\EOT\FS\STX\STX\ETX\DC2\EOT\170\ENQ\SUB\ESC\n\
    \\f\n\
    \\STX\EOT\GS\DC2\ACK\173\ENQ\NUL\176\ENQ\SOH\n\
    \\v\n\
    \\ETX\EOT\GS\SOH\DC2\EOT\173\ENQ\b\FS\n\
    \.\n\
    \\EOT\EOT\GS\STX\NUL\DC2\EOT\175\ENQ\EOT-\SUB  List of failed policy updates.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\GS\STX\NUL\EOT\DC2\EOT\175\ENQ\EOT\f\n\
    \\r\n\
    \\ENQ\EOT\GS\STX\NUL\ACK\DC2\EOT\175\ENQ\r\EM\n\
    \\r\n\
    \\ENQ\EOT\GS\STX\NUL\SOH\DC2\EOT\175\ENQ\SUB(\n\
    \\r\n\
    \\ENQ\EOT\GS\STX\NUL\ETX\DC2\EOT\175\ENQ+,\n\
    \\f\n\
    \\STX\EOT\RS\DC2\ACK\178\ENQ\NUL\196\ENQ\SOH\n\
    \\v\n\
    \\ETX\EOT\RS\SOH\DC2\EOT\178\ENQ\b \n\
    \\181\SOH\n\
    \\EOT\EOT\RS\STX\NUL\DC2\EOT\182\ENQ\EOT\SUB\SUB\166\SOH Start time is the starting point of the forwarding history request. All\n\
    \ records beyond this point will be included, respecting the end time, and\n\
    \ the index offset.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\NUL\ENQ\DC2\EOT\182\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\NUL\SOH\DC2\EOT\182\ENQ\v\NAK\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\NUL\ETX\DC2\EOT\182\ENQ\CAN\EM\n\
    \\218\SOH\n\
    \\EOT\EOT\RS\STX\SOH\DC2\EOT\187\ENQ\EOT\CAN\SUB\203\SOH End time is the end point of the forwarding history request. The\n\
    \ response will carry at most 50k records between the start time and the\n\
    \ end time. The index offset can be used to implement pagination.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\SOH\ENQ\DC2\EOT\187\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\SOH\SOH\DC2\EOT\187\ENQ\v\DC3\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\SOH\ETX\DC2\EOT\187\ENQ\SYN\ETB\n\
    \\189\SOH\n\
    \\EOT\EOT\RS\STX\STX\DC2\EOT\192\ENQ\EOT\FS\SUB\174\SOH Index offset is the offset in the time series to start at. As each\n\
    \ response can only contain 50k records, callers can use this to skip\n\
    \ around within a packed time series.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\STX\ENQ\DC2\EOT\192\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\STX\SOH\DC2\EOT\192\ENQ\v\ETB\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\STX\ETX\DC2\EOT\192\ENQ\SUB\ESC\n\
    \Q\n\
    \\EOT\EOT\RS\STX\ETX\DC2\EOT\195\ENQ\EOT\RS\SUBC The max number of events to return in the response to this query.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\ETX\ENQ\DC2\EOT\195\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\ETX\SOH\DC2\EOT\195\ENQ\v\EM\n\
    \\r\n\
    \\ENQ\EOT\RS\STX\ETX\ETX\DC2\EOT\195\ENQ\FS\GS\n\
    \\f\n\
    \\STX\EOT\US\DC2\ACK\197\ENQ\NUL\238\ENQ\SOH\n\
    \\v\n\
    \\ETX\EOT\US\SOH\DC2\EOT\197\ENQ\b\ETB\n\
    \w\n\
    \\EOT\EOT\US\STX\NUL\DC2\EOT\200\ENQ\EOT-\SUBi Timestamp is the time (unix epoch offset) that this circuit was\n\
    \ completed. Deprecated by timestamp_ns.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\NUL\ENQ\DC2\EOT\200\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\NUL\SOH\DC2\EOT\200\ENQ\v\DC4\n\
    \\r\n\
    \\ENQ\EOT\US\STX\NUL\ETX\DC2\EOT\200\ENQ\ETB\CAN\n\
    \\r\n\
    \\ENQ\EOT\US\STX\NUL\b\DC2\EOT\200\ENQ\EM,\n\
    \\SO\n\
    \\ACK\EOT\US\STX\NUL\b\ETX\DC2\EOT\200\ENQ\SUB+\n\
    \W\n\
    \\EOT\EOT\US\STX\SOH\DC2\EOT\203\ENQ\EOT/\SUBI The incoming channel ID that carried the HTLC that created the circuit.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\SOH\ENQ\DC2\EOT\203\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\SOH\SOH\DC2\EOT\203\ENQ\v\NAK\n\
    \\r\n\
    \\ENQ\EOT\US\STX\SOH\ETX\DC2\EOT\203\ENQ\CAN\EM\n\
    \\r\n\
    \\ENQ\EOT\US\STX\SOH\b\DC2\EOT\203\ENQ\SUB.\n\
    \\SO\n\
    \\ACK\EOT\US\STX\SOH\b\ACK\DC2\EOT\203\ENQ\ESC-\n\
    \^\n\
    \\EOT\EOT\US\STX\STX\DC2\EOT\207\ENQ\EOT0\SUBP The outgoing channel ID that carried the preimage that completed the\n\
    \ circuit.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\STX\ENQ\DC2\EOT\207\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\STX\SOH\DC2\EOT\207\ENQ\v\SYN\n\
    \\r\n\
    \\ENQ\EOT\US\STX\STX\ETX\DC2\EOT\207\ENQ\EM\SUB\n\
    \\r\n\
    \\ENQ\EOT\US\STX\STX\b\DC2\EOT\207\ENQ\ESC/\n\
    \\SO\n\
    \\ACK\EOT\US\STX\STX\b\ACK\DC2\EOT\207\ENQ\FS.\n\
    \c\n\
    \\EOT\EOT\US\STX\ETX\DC2\EOT\211\ENQ\EOT\SYN\SUBU The total amount (in satoshis) of the incoming HTLC that created half\n\
    \ the circuit.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\ETX\ENQ\DC2\EOT\211\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\ETX\SOH\DC2\EOT\211\ENQ\v\DC1\n\
    \\r\n\
    \\ENQ\EOT\US\STX\ETX\ETX\DC2\EOT\211\ENQ\DC4\NAK\n\
    \q\n\
    \\EOT\EOT\US\STX\EOT\DC2\EOT\215\ENQ\EOT\ETB\SUBc The total amount (in satoshis) of the outgoing HTLC that created the\n\
    \ second half of the circuit.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\EOT\ENQ\DC2\EOT\215\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\EOT\SOH\DC2\EOT\215\ENQ\v\DC2\n\
    \\r\n\
    \\ENQ\EOT\US\STX\EOT\ETX\DC2\EOT\215\ENQ\NAK\SYN\n\
    \N\n\
    \\EOT\EOT\US\STX\ENQ\DC2\EOT\218\ENQ\EOT\DC3\SUB@ The total fee (in satoshis) that this payment circuit carried.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\ENQ\ENQ\DC2\EOT\218\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\ENQ\SOH\DC2\EOT\218\ENQ\v\SO\n\
    \\r\n\
    \\ENQ\EOT\US\STX\ENQ\ETX\DC2\EOT\218\ENQ\DC1\DC2\n\
    \T\n\
    \\EOT\EOT\US\STX\ACK\DC2\EOT\221\ENQ\EOT\CAN\SUBF The total fee (in milli-satoshis) that this payment circuit carried.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\ACK\ENQ\DC2\EOT\221\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\ACK\SOH\DC2\EOT\221\ENQ\v\DC3\n\
    \\r\n\
    \\ENQ\EOT\US\STX\ACK\ETX\DC2\EOT\221\ENQ\SYN\ETB\n\
    \i\n\
    \\EOT\EOT\US\STX\a\DC2\EOT\225\ENQ\EOT\ESC\SUB[ The total amount (in milli-satoshis) of the incoming HTLC that created\n\
    \ half the circuit.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\a\ENQ\DC2\EOT\225\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\a\SOH\DC2\EOT\225\ENQ\v\SYN\n\
    \\r\n\
    \\ENQ\EOT\US\STX\a\ETX\DC2\EOT\225\ENQ\EM\SUB\n\
    \w\n\
    \\EOT\EOT\US\STX\b\DC2\EOT\229\ENQ\EOT\GS\SUBi The total amount (in milli-satoshis) of the outgoing HTLC that created\n\
    \ the second half of the circuit.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\b\ENQ\DC2\EOT\229\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\b\SOH\DC2\EOT\229\ENQ\v\ETB\n\
    \\r\n\
    \\ENQ\EOT\US\STX\b\ETX\DC2\EOT\229\ENQ\SUB\FS\n\
    \m\n\
    \\EOT\EOT\US\STX\t\DC2\EOT\233\ENQ\EOT\GS\SUB_ The number of nanoseconds elapsed since January 1, 1970 UTC when this\n\
    \ circuit was completed.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\t\ENQ\DC2\EOT\233\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\US\STX\t\SOH\DC2\EOT\233\ENQ\v\ETB\n\
    \\r\n\
    \\ENQ\EOT\US\STX\t\ETX\DC2\EOT\233\ENQ\SUB\FS\n\
    \\f\n\
    \\STX\EOT \DC2\ACK\239\ENQ\NUL\247\ENQ\SOH\n\
    \\v\n\
    \\ETX\EOT \SOH\DC2\EOT\239\ENQ\b!\n\
    \m\n\
    \\EOT\EOT \STX\NUL\DC2\EOT\242\ENQ\EOT3\SUB_ A list of forwarding events from the time slice of the time series\n\
    \ specified in the request.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT \STX\NUL\EOT\DC2\EOT\242\ENQ\EOT\f\n\
    \\r\n\
    \\ENQ\EOT \STX\NUL\ACK\DC2\EOT\242\ENQ\r\FS\n\
    \\r\n\
    \\ENQ\EOT \STX\NUL\SOH\DC2\EOT\242\ENQ\GS.\n\
    \\r\n\
    \\ENQ\EOT \STX\NUL\ETX\DC2\EOT\242\ENQ12\n\
    \\132\SOH\n\
    \\EOT\EOT \STX\SOH\DC2\EOT\246\ENQ\EOT!\SUBv The index of the last time in the set of returned forwarding events. Can\n\
    \ be used to seek further, pagination style.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT \STX\SOH\ENQ\DC2\EOT\246\ENQ\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT \STX\SOH\SOH\DC2\EOT\246\ENQ\v\FS\n\
    \\r\n\
    \\ENQ\EOT \STX\SOH\ETX\DC2\EOT\246\ENQ\US \n\
    \\f\n\
    \\STX\EOT!\DC2\ACK\249\ENQ\NUL\252\ENQ\SOH\n\
    \\v\n\
    \\ETX\EOT!\SOH\DC2\EOT\249\ENQ\b\"\n\
    \A\n\
    \\EOT\EOT!\STX\NUL\DC2\EOT\251\ENQ\EOT \SUB3 The target channel point to obtain a back up for.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT!\STX\NUL\ACK\DC2\EOT\251\ENQ\EOT\DLE\n\
    \\r\n\
    \\ENQ\EOT!\STX\NUL\SOH\DC2\EOT\251\ENQ\DC1\ESC\n\
    \\r\n\
    \\ENQ\EOT!\STX\NUL\ETX\DC2\EOT\251\ENQ\RS\US\n\
    \\f\n\
    \\STX\EOT\"\DC2\ACK\254\ENQ\NUL\139\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT\"\SOH\DC2\EOT\254\ENQ\b\NAK\n\
    \C\n\
    \\EOT\EOT\"\STX\NUL\DC2\EOT\130\ACK\EOT \SUB5\n\
    \Identifies the channel that this backup belongs to.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\"\STX\NUL\ACK\DC2\EOT\130\ACK\EOT\DLE\n\
    \\r\n\
    \\ENQ\EOT\"\STX\NUL\SOH\DC2\EOT\130\ACK\DC1\ESC\n\
    \\r\n\
    \\ENQ\EOT\"\STX\NUL\ETX\DC2\EOT\130\ACK\RS\US\n\
    \\241\SOH\n\
    \\EOT\EOT\"\STX\SOH\DC2\EOT\138\ACK\EOT\SUB\SUB\226\SOH\n\
    \Is an encrypted single-chan backup. this can be passed to\n\
    \RestoreChannelBackups, or the WalletUnlocker Init and Unlock methods in\n\
    \order to trigger the recovery protocol. When using REST, this field must be\n\
    \encoded as base64.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT\"\STX\SOH\ENQ\DC2\EOT\138\ACK\EOT\t\n\
    \\r\n\
    \\ENQ\EOT\"\STX\SOH\SOH\DC2\EOT\138\ACK\n\
    \\NAK\n\
    \\r\n\
    \\ENQ\EOT\"\STX\SOH\ETX\DC2\EOT\138\ACK\CAN\EM\n\
    \\f\n\
    \\STX\EOT#\DC2\ACK\141\ACK\NUL\154\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT#\SOH\DC2\EOT\141\ACK\b\ETB\n\
    \Z\n\
    \\EOT\EOT#\STX\NUL\DC2\EOT\145\ACK\EOT*\SUBL\n\
    \Is the set of all channels that are included in this multi-channel backup.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT#\STX\NUL\EOT\DC2\EOT\145\ACK\EOT\f\n\
    \\r\n\
    \\ENQ\EOT#\STX\NUL\ACK\DC2\EOT\145\ACK\r\EM\n\
    \\r\n\
    \\ENQ\EOT#\STX\NUL\SOH\DC2\EOT\145\ACK\SUB%\n\
    \\r\n\
    \\ENQ\EOT#\STX\NUL\ETX\DC2\EOT\145\ACK()\n\
    \\138\STX\n\
    \\EOT\EOT#\STX\SOH\DC2\EOT\153\ACK\EOT \SUB\251\SOH\n\
    \A single encrypted blob containing all the static channel backups of the\n\
    \channel listed above. This can be stored as a single file or blob, and\n\
    \safely be replaced with any prior/future versions. When using REST, this\n\
    \field must be encoded as base64.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT#\STX\SOH\ENQ\DC2\EOT\153\ACK\EOT\t\n\
    \\r\n\
    \\ENQ\EOT#\STX\SOH\SOH\DC2\EOT\153\ACK\n\
    \\ESC\n\
    \\r\n\
    \\ENQ\EOT#\STX\SOH\ETX\DC2\EOT\153\ACK\RS\US\n\
    \\f\n\
    \\STX\EOT$\DC2\ACK\156\ACK\NUL\157\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT$\SOH\DC2\EOT\156\ACK\b\US\n\
    \\f\n\
    \\STX\EOT%\DC2\ACK\158\ACK\NUL\170\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT%\SOH\DC2\EOT\158\ACK\b\SUB\n\
    \r\n\
    \\EOT\EOT%\STX\NUL\DC2\EOT\163\ACK\EOT+\SUBd\n\
    \The set of new channels that have been added since the last channel backup\n\
    \snapshot was requested.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT%\STX\NUL\ACK\DC2\EOT\163\ACK\EOT\DC2\n\
    \\r\n\
    \\ENQ\EOT%\STX\NUL\SOH\DC2\EOT\163\ACK\DC3&\n\
    \\r\n\
    \\ENQ\EOT%\STX\NUL\ETX\DC2\EOT\163\ACK)*\n\
    \\\\n\
    \\EOT\EOT%\STX\SOH\DC2\EOT\169\ACK\EOT*\SUBN\n\
    \A multi-channel backup that covers all open channels currently known to\n\
    \lnd.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT%\STX\SOH\ACK\DC2\EOT\169\ACK\EOT\DC3\n\
    \\r\n\
    \\ENQ\EOT%\STX\SOH\SOH\DC2\EOT\169\ACK\DC4%\n\
    \\r\n\
    \\ENQ\EOT%\STX\SOH\ETX\DC2\EOT\169\ACK()\n\
    \\f\n\
    \\STX\EOT&\DC2\ACK\172\ACK\NUL\177\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT&\SOH\DC2\EOT\172\ACK\b\SYN\n\
    \<\n\
    \\EOT\EOT&\STX\NUL\DC2\EOT\176\ACK\EOT,\SUB.\n\
    \A set of single-chan static channel backups.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT&\STX\NUL\EOT\DC2\EOT\176\ACK\EOT\f\n\
    \\r\n\
    \\ENQ\EOT&\STX\NUL\ACK\DC2\EOT\176\ACK\r\SUB\n\
    \\r\n\
    \\ENQ\EOT&\STX\NUL\SOH\DC2\EOT\176\ACK\ESC'\n\
    \\r\n\
    \\ENQ\EOT&\STX\NUL\ETX\DC2\EOT\176\ACK*+\n\
    \\f\n\
    \\STX\EOT'\DC2\ACK\179\ACK\NUL\192\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT'\SOH\DC2\EOT\179\ACK\b \n\
    \\SO\n\
    \\EOT\EOT'\b\NUL\DC2\ACK\180\ACK\EOT\191\ACK\ENQ\n\
    \\r\n\
    \\ENQ\EOT'\b\NUL\SOH\DC2\EOT\180\ACK\n\
    \\DLE\n\
    \J\n\
    \\EOT\EOT'\STX\NUL\DC2\EOT\184\ACK\b(\SUB<\n\
    \The channels to restore as a list of channel/backup pairs.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT'\STX\NUL\ACK\DC2\EOT\184\ACK\b\SYN\n\
    \\r\n\
    \\ENQ\EOT'\STX\NUL\SOH\DC2\EOT\184\ACK\ETB#\n\
    \\r\n\
    \\ENQ\EOT'\STX\NUL\ETX\DC2\EOT\184\ACK&'\n\
    \\129\SOH\n\
    \\EOT\EOT'\STX\SOH\DC2\EOT\190\ACK\b$\SUBs\n\
    \The channels to restore in the packed multi backup format. When using\n\
    \REST, this field must be encoded as base64.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT'\STX\SOH\ENQ\DC2\EOT\190\ACK\b\r\n\
    \\r\n\
    \\ENQ\EOT'\STX\SOH\SOH\DC2\EOT\190\ACK\SO\US\n\
    \\r\n\
    \\ENQ\EOT'\STX\SOH\ETX\DC2\EOT\190\ACK\"#\n\
    \\f\n\
    \\STX\EOT(\DC2\ACK\193\ACK\NUL\194\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT(\SOH\DC2\EOT\193\ACK\b\GS\n\
    \\f\n\
    \\STX\EOT)\DC2\ACK\196\ACK\NUL\197\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT)\SOH\DC2\EOT\196\ACK\b!\n\
    \\f\n\
    \\STX\EOT*\DC2\ACK\199\ACK\NUL\200\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT*\SOH\DC2\EOT\199\ACK\b \n\
    \\f\n\
    \\STX\EOT+\DC2\ACK\202\ACK\NUL\208\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT+\SOH\DC2\EOT\202\ACK\b\SUB\n\
    \9\n\
    \\EOT\EOT+\STX\NUL\DC2\EOT\204\ACK\EOT\SYN\SUB+ The entity a permission grants access to.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT+\STX\NUL\ENQ\DC2\EOT\204\ACK\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT+\STX\NUL\SOH\DC2\EOT\204\ACK\v\DC1\n\
    \\r\n\
    \\ENQ\EOT+\STX\NUL\ETX\DC2\EOT\204\ACK\DC4\NAK\n\
    \+\n\
    \\EOT\EOT+\STX\SOH\DC2\EOT\207\ACK\EOT\SYN\SUB\GS The action that is granted.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT+\STX\SOH\ENQ\DC2\EOT\207\ACK\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT+\STX\SOH\SOH\DC2\EOT\207\ACK\v\DC1\n\
    \\r\n\
    \\ENQ\EOT+\STX\SOH\ETX\DC2\EOT\207\ACK\DC4\NAK\n\
    \\f\n\
    \\STX\EOT,\DC2\ACK\209\ACK\NUL\221\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT,\SOH\DC2\EOT\209\ACK\b\ESC\n\
    \F\n\
    \\EOT\EOT,\STX\NUL\DC2\EOT\211\ACK\EOT0\SUB8 The list of permissions the new macaroon should grant.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT,\STX\NUL\EOT\DC2\EOT\211\ACK\EOT\f\n\
    \\r\n\
    \\ENQ\EOT,\STX\NUL\ACK\DC2\EOT\211\ACK\r\US\n\
    \\r\n\
    \\ENQ\EOT,\STX\NUL\SOH\DC2\EOT\211\ACK +\n\
    \\r\n\
    \\ENQ\EOT,\STX\NUL\ETX\DC2\EOT\211\ACK./\n\
    \X\n\
    \\EOT\EOT,\STX\SOH\DC2\EOT\214\ACK\EOT\ESC\SUBJ The root key ID used to create the macaroon, must be a positive integer.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT,\STX\SOH\ENQ\DC2\EOT\214\ACK\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT,\STX\SOH\SOH\DC2\EOT\214\ACK\v\SYN\n\
    \\r\n\
    \\ENQ\EOT,\STX\SOH\ETX\DC2\EOT\214\ACK\EM\SUB\n\
    \b\n\
    \\EOT\EOT,\STX\STX\DC2\EOT\220\ACK\EOT(\SUBT\n\
    \Informs the RPC on whether to allow external permissions that LND is not\n\
    \aware of.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT,\STX\STX\ENQ\DC2\EOT\220\ACK\EOT\b\n\
    \\r\n\
    \\ENQ\EOT,\STX\STX\SOH\DC2\EOT\220\ACK\t#\n\
    \\r\n\
    \\ENQ\EOT,\STX\STX\ETX\DC2\EOT\220\ACK&'\n\
    \\f\n\
    \\STX\EOT-\DC2\ACK\222\ACK\NUL\225\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT-\SOH\DC2\EOT\222\ACK\b\FS\n\
    \F\n\
    \\EOT\EOT-\STX\NUL\DC2\EOT\224\ACK\EOT\CAN\SUB8 The hex encoded macaroon, serialized in binary format.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT-\STX\NUL\ENQ\DC2\EOT\224\ACK\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT-\STX\NUL\SOH\DC2\EOT\224\ACK\v\DC3\n\
    \\r\n\
    \\ENQ\EOT-\STX\NUL\ETX\DC2\EOT\224\ACK\SYN\ETB\n\
    \\f\n\
    \\STX\EOT.\DC2\ACK\227\ACK\NUL\228\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT.\SOH\DC2\EOT\227\ACK\b\RS\n\
    \\f\n\
    \\STX\EOT/\DC2\ACK\229\ACK\NUL\232\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT/\SOH\DC2\EOT\229\ACK\b\US\n\
    \9\n\
    \\EOT\EOT/\STX\NUL\DC2\EOT\231\ACK\EOT%\SUB+ The list of root key IDs that are in use.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT/\STX\NUL\EOT\DC2\EOT\231\ACK\EOT\f\n\
    \\r\n\
    \\ENQ\EOT/\STX\NUL\ENQ\DC2\EOT\231\ACK\r\DC3\n\
    \\r\n\
    \\ENQ\EOT/\STX\NUL\SOH\DC2\EOT\231\ACK\DC4 \n\
    \\r\n\
    \\ENQ\EOT/\STX\NUL\ETX\DC2\EOT\231\ACK#$\n\
    \\f\n\
    \\STX\EOT0\DC2\ACK\234\ACK\NUL\237\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT0\SOH\DC2\EOT\234\ACK\b\US\n\
    \.\n\
    \\EOT\EOT0\STX\NUL\DC2\EOT\236\ACK\EOT\ESC\SUB  The root key ID to be removed.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT0\STX\NUL\ENQ\DC2\EOT\236\ACK\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT0\STX\NUL\SOH\DC2\EOT\236\ACK\v\SYN\n\
    \\r\n\
    \\ENQ\EOT0\STX\NUL\ETX\DC2\EOT\236\ACK\EM\SUB\n\
    \\f\n\
    \\STX\EOT1\DC2\ACK\238\ACK\NUL\241\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT1\SOH\DC2\EOT\238\ACK\b \n\
    \D\n\
    \\EOT\EOT1\STX\NUL\DC2\EOT\240\ACK\EOT\NAK\SUB6 A boolean indicates that the deletion is successful.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT1\STX\NUL\ENQ\DC2\EOT\240\ACK\EOT\b\n\
    \\r\n\
    \\ENQ\EOT1\STX\NUL\SOH\DC2\EOT\240\ACK\t\DLE\n\
    \\r\n\
    \\ENQ\EOT1\STX\NUL\ETX\DC2\EOT\240\ACK\DC3\DC4\n\
    \\f\n\
    \\STX\EOT2\DC2\ACK\243\ACK\NUL\246\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT2\SOH\DC2\EOT\243\ACK\b\RS\n\
    \/\n\
    \\EOT\EOT2\STX\NUL\DC2\EOT\245\ACK\EOT0\SUB! A list of macaroon permissions.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT2\STX\NUL\EOT\DC2\EOT\245\ACK\EOT\f\n\
    \\r\n\
    \\ENQ\EOT2\STX\NUL\ACK\DC2\EOT\245\ACK\r\US\n\
    \\r\n\
    \\ENQ\EOT2\STX\NUL\SOH\DC2\EOT\245\ACK +\n\
    \\r\n\
    \\ENQ\EOT2\STX\NUL\ETX\DC2\EOT\245\ACK./\n\
    \\f\n\
    \\STX\EOT3\DC2\ACK\248\ACK\NUL\249\ACK\SOH\n\
    \\v\n\
    \\ETX\EOT3\SOH\DC2\EOT\248\ACK\b\RS\n\
    \\f\n\
    \\STX\EOT4\DC2\ACK\250\ACK\NUL\128\a\SOH\n\
    \\v\n\
    \\ETX\EOT4\SOH\DC2\EOT\250\ACK\b\US\n\
    \i\n\
    \\EOT\EOT4\STX\NUL\DC2\EOT\255\ACK\EOT?\SUB[\n\
    \A map between all RPC method URIs and their required macaroon permissions to\n\
    \access them.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT4\STX\NUL\ACK\DC2\EOT\255\ACK\EOT'\n\
    \\r\n\
    \\ENQ\EOT4\STX\NUL\SOH\DC2\EOT\255\ACK(:\n\
    \\r\n\
    \\ENQ\EOT4\STX\NUL\ETX\DC2\EOT\255\ACK=>\n\
    \\f\n\
    \\STX\EOT5\DC2\ACK\130\a\NUL\209\a\SOH\n\
    \\v\n\
    \\ETX\EOT5\SOH\DC2\EOT\130\a\b\SI\n\
    \\SO\n\
    \\EOT\EOT5\EOT\NUL\DC2\ACK\131\a\EOT\179\a\ENQ\n\
    \\r\n\
    \\ENQ\EOT5\EOT\NUL\SOH\DC2\EOT\131\a\t\DC4\n\
    \\184\SOH\n\
    \\ACK\EOT5\EOT\NUL\STX\NUL\DC2\EOT\137\a\b\NAK\SUB\167\SOH\n\
    \The numbers assigned in this enumeration match the failure codes as\n\
    \defined in BOLT #4. Because protobuf 3 requires enums to start with 0,\n\
    \a RESERVED value is added.\n\
    \\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\NUL\SOH\DC2\EOT\137\a\b\DLE\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\NUL\STX\DC2\EOT\137\a\DC3\DC4\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\SOH\DC2\EOT\139\a\b1\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\SOH\SOH\DC2\EOT\139\a\b,\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\SOH\STX\DC2\EOT\139\a/0\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\STX\DC2\EOT\140\a\b%\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\STX\SOH\DC2\EOT\140\a\b \n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\STX\STX\DC2\EOT\140\a#$\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\ETX\DC2\EOT\141\a\b(\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\ETX\SOH\DC2\EOT\141\a\b#\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\ETX\STX\DC2\EOT\141\a&'\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\EOT\DC2\EOT\142\a\b(\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\EOT\SOH\DC2\EOT\142\a\b#\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\EOT\STX\DC2\EOT\142\a&'\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\ENQ\DC2\EOT\143\a\b\"\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\ENQ\SOH\DC2\EOT\143\a\b\GS\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\ENQ\STX\DC2\EOT\143\a !\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\ACK\DC2\EOT\144\a\b\SUB\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\ACK\SOH\DC2\EOT\144\a\b\NAK\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\ACK\STX\DC2\EOT\144\a\CAN\EM\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\a\DC2\EOT\145\a\b\FS\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\a\SOH\DC2\EOT\145\a\b\ETB\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\a\STX\DC2\EOT\145\a\SUB\ESC\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\b\DC2\EOT\146\a\b\"\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\b\SOH\DC2\EOT\146\a\b\GS\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\b\STX\DC2\EOT\146\a !\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\t\DC2\EOT\147\a\b\US\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\t\SOH\DC2\EOT\147\a\b\SUB\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\t\STX\DC2\EOT\147\a\GS\RS\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\n\
    \\DC2\EOT\148\a\b\US\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\n\
    \\SOH\DC2\EOT\148\a\b\EM\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\n\
    \\STX\DC2\EOT\148\a\FS\RS\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\v\DC2\EOT\149\a\b\"\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\v\SOH\DC2\EOT\149\a\b\FS\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\v\STX\DC2\EOT\149\a\US!\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\f\DC2\EOT\150\a\b\RS\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\f\SOH\DC2\EOT\150\a\b\CAN\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\f\STX\DC2\EOT\150\a\ESC\GS\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\r\DC2\EOT\151\a\b#\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\r\SOH\DC2\EOT\151\a\b\GS\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\r\STX\DC2\EOT\151\a \"\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\SO\DC2\EOT\152\a\b\RS\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\SO\SOH\DC2\EOT\152\a\b\CAN\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\SO\STX\DC2\EOT\152\a\ESC\GS\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\SI\DC2\EOT\153\a\b'\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\SI\SOH\DC2\EOT\153\a\b!\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\SI\STX\DC2\EOT\153\a$&\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\DLE\DC2\EOT\154\a\b+\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\DLE\SOH\DC2\EOT\154\a\b%\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\DLE\STX\DC2\EOT\154\a(*\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\DC1\DC2\EOT\155\a\b.\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\DC1\SOH\DC2\EOT\155\a\b(\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\DC1\STX\DC2\EOT\155\a+-\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\DC2\DC2\EOT\156\a\b\US\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\DC2\SOH\DC2\EOT\156\a\b\EM\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\DC2\STX\DC2\EOT\156\a\FS\RS\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\DC3\DC2\EOT\157\a\b$\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\DC3\SOH\DC2\EOT\157\a\b\RS\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\DC3\STX\DC2\EOT\157\a!#\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\DC4\DC2\EOT\158\a\b$\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\DC4\SOH\DC2\EOT\158\a\b\RS\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\DC4\STX\DC2\EOT\158\a!#\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\NAK\DC2\EOT\159\a\b'\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\NAK\SOH\DC2\EOT\159\a\b!\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\NAK\STX\DC2\EOT\159\a$&\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\SYN\DC2\EOT\160\a\b\FS\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\SYN\SOH\DC2\EOT\160\a\b\SYN\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\SYN\STX\DC2\EOT\160\a\EM\ESC\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\ETB\DC2\EOT\161\a\b\EM\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\ETB\SOH\DC2\EOT\161\a\b\DC3\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\ETB\STX\DC2\EOT\161\a\SYN\CAN\n\
    \\SO\n\
    \\ACK\EOT5\EOT\NUL\STX\CAN\DC2\EOT\162\a\b#\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\CAN\SOH\DC2\EOT\162\a\b\GS\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\CAN\STX\DC2\EOT\162\a \"\n\
    \-\n\
    \\ACK\EOT5\EOT\NUL\STX\EM\DC2\EOT\167\a\b\US\SUB\GS\n\
    \An internal error occurred.\n\
    \\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\EM\SOH\DC2\EOT\167\a\b\CAN\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\EM\STX\DC2\EOT\167\a\ESC\RS\n\
    \X\n\
    \\ACK\EOT5\EOT\NUL\STX\SUB\DC2\EOT\172\a\b\RS\SUBH\n\
    \The error source is known, but the failure itself couldn't be decoded.\n\
    \\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\SUB\SOH\DC2\EOT\172\a\b\ETB\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\SUB\STX\DC2\EOT\172\a\SUB\GS\n\
    \\154\SOH\n\
    \\ACK\EOT5\EOT\NUL\STX\ESC\DC2\EOT\178\a\b!\SUB\137\SOH\n\
    \An unreadable failure result is returned if the received failure message\n\
    \cannot be decrypted. In that case the error source is unknown.\n\
    \\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\ESC\SOH\DC2\EOT\178\a\b\SUB\n\
    \\SI\n\
    \\a\EOT5\EOT\NUL\STX\ESC\STX\DC2\EOT\178\a\GS \n\
    \=\n\
    \\EOT\EOT5\STX\NUL\DC2\EOT\182\a\EOT\EM\SUB/ Failure code as defined in the Lightning spec\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\NUL\ACK\DC2\EOT\182\a\EOT\SI\n\
    \\r\n\
    \\ENQ\EOT5\STX\NUL\SOH\DC2\EOT\182\a\DLE\DC4\n\
    \\r\n\
    \\ENQ\EOT5\STX\NUL\ETX\DC2\EOT\182\a\ETB\CAN\n\
    \\v\n\
    \\ETX\EOT5\t\DC2\EOT\184\a\EOT\SI\n\
    \\f\n\
    \\EOT\EOT5\t\NUL\DC2\EOT\184\a\r\SO\n\
    \\r\n\
    \\ENQ\EOT5\t\NUL\SOH\DC2\EOT\184\a\r\SO\n\
    \\r\n\
    \\ENQ\EOT5\t\NUL\STX\DC2\EOT\184\a\r\SO\n\
    \3\n\
    \\EOT\EOT5\STX\SOH\DC2\EOT\187\a\EOT%\SUB% An optional channel update message.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\SOH\ACK\DC2\EOT\187\a\EOT\DC1\n\
    \\r\n\
    \\ENQ\EOT5\STX\SOH\SOH\DC2\EOT\187\a\DC2 \n\
    \\r\n\
    \\ENQ\EOT5\STX\SOH\ETX\DC2\EOT\187\a#$\n\
    \4\n\
    \\EOT\EOT5\STX\STX\DC2\EOT\190\a\EOT\EM\SUB& A failure type-dependent htlc value.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\STX\ENQ\DC2\EOT\190\a\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\STX\SOH\DC2\EOT\190\a\v\DC4\n\
    \\r\n\
    \\ENQ\EOT5\STX\STX\ETX\DC2\EOT\190\a\ETB\CAN\n\
    \4\n\
    \\EOT\EOT5\STX\ETX\DC2\EOT\193\a\EOT\FS\SUB& The sha256 sum of the onion payload.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\ETX\ENQ\DC2\EOT\193\a\EOT\t\n\
    \\r\n\
    \\ENQ\EOT5\STX\ETX\SOH\DC2\EOT\193\a\n\
    \\ETB\n\
    \\r\n\
    \\ENQ\EOT5\STX\ETX\ETX\DC2\EOT\193\a\SUB\ESC\n\
    \;\n\
    \\EOT\EOT5\STX\EOT\DC2\EOT\196\a\EOT\ESC\SUB- A failure type-dependent cltv expiry value.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\EOT\ENQ\DC2\EOT\196\a\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\EOT\SOH\DC2\EOT\196\a\v\SYN\n\
    \\r\n\
    \\ENQ\EOT5\STX\EOT\ETX\DC2\EOT\196\a\EM\SUB\n\
    \5\n\
    \\EOT\EOT5\STX\ENQ\DC2\EOT\199\a\EOT\NAK\SUB' A failure type-dependent flags value.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\ENQ\ENQ\DC2\EOT\199\a\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\ENQ\SOH\DC2\EOT\199\a\v\DLE\n\
    \\r\n\
    \\ENQ\EOT5\STX\ENQ\ETX\DC2\EOT\199\a\DC3\DC4\n\
    \\145\SOH\n\
    \\EOT\EOT5\STX\ACK\DC2\EOT\205\a\EOT$\SUB\130\SOH\n\
    \The position in the path of the intermediate or final node that generated\n\
    \the failure message. Position zero is the sender node.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\ACK\ENQ\DC2\EOT\205\a\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\ACK\SOH\DC2\EOT\205\a\v\US\n\
    \\r\n\
    \\ENQ\EOT5\STX\ACK\ETX\DC2\EOT\205\a\"#\n\
    \6\n\
    \\EOT\EOT5\STX\a\DC2\EOT\208\a\EOT\SYN\SUB( A failure type-dependent block height.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\a\ENQ\DC2\EOT\208\a\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT5\STX\a\SOH\DC2\EOT\208\a\v\DC1\n\
    \\r\n\
    \\ENQ\EOT5\STX\a\ETX\DC2\EOT\208\a\DC4\NAK\n\
    \\f\n\
    \\STX\EOT6\DC2\ACK\211\a\NUL\164\b\SOH\n\
    \\v\n\
    \\ETX\EOT6\SOH\DC2\EOT\211\a\b\NAK\n\
    \d\n\
    \\EOT\EOT6\STX\NUL\DC2\EOT\216\a\EOT\CAN\SUBV\n\
    \The signature that validates the announced data and proves the ownership\n\
    \of node id.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\NUL\ENQ\DC2\EOT\216\a\EOT\t\n\
    \\r\n\
    \\ENQ\EOT6\STX\NUL\SOH\DC2\EOT\216\a\n\
    \\DC3\n\
    \\r\n\
    \\ENQ\EOT6\STX\NUL\ETX\DC2\EOT\216\a\SYN\ETB\n\
    \\225\SOH\n\
    \\EOT\EOT6\STX\SOH\DC2\EOT\224\a\EOT\EM\SUB\210\SOH\n\
    \The target chain that this channel was opened within. This value\n\
    \should be the genesis hash of the target chain. Along with the short\n\
    \channel ID, this uniquely identifies the channel globally in a\n\
    \blockchain.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\SOH\ENQ\DC2\EOT\224\a\EOT\t\n\
    \\r\n\
    \\ENQ\EOT6\STX\SOH\SOH\DC2\EOT\224\a\n\
    \\DC4\n\
    \\r\n\
    \\ENQ\EOT6\STX\SOH\ETX\DC2\EOT\224\a\ETB\CAN\n\
    \B\n\
    \\EOT\EOT6\STX\STX\DC2\EOT\229\a\EOT,\SUB4\n\
    \The unique description of the funding transaction.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\STX\ENQ\DC2\EOT\229\a\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\STX\SOH\DC2\EOT\229\a\v\DC2\n\
    \\r\n\
    \\ENQ\EOT6\STX\STX\ETX\DC2\EOT\229\a\NAK\SYN\n\
    \\r\n\
    \\ENQ\EOT6\STX\STX\b\DC2\EOT\229\a\ETB+\n\
    \\SO\n\
    \\ACK\EOT6\STX\STX\b\ACK\DC2\EOT\229\a\CAN*\n\
    \\169\SOH\n\
    \\EOT\EOT6\STX\ETX\DC2\EOT\236\a\EOT\EM\SUB\154\SOH\n\
    \A timestamp that allows ordering in the case of multiple announcements.\n\
    \We should ignore the message if timestamp is not greater than the\n\
    \last-received.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\ETX\ENQ\DC2\EOT\236\a\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\ETX\SOH\DC2\EOT\236\a\v\DC4\n\
    \\r\n\
    \\ENQ\EOT6\STX\ETX\ETX\DC2\EOT\236\a\ETB\CAN\n\
    \\192\SOH\n\
    \\EOT\EOT6\STX\EOT\DC2\EOT\243\a\EOT\RS\SUB\177\SOH\n\
    \The bitfield that describes whether optional fields are present in this\n\
    \update. Currently, the least-significant bit must be set to 1 if the\n\
    \optional field MaxHtlc is present.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\EOT\ENQ\DC2\EOT\243\a\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\EOT\SOH\DC2\EOT\243\a\v\CAN\n\
    \\r\n\
    \\ENQ\EOT6\STX\EOT\ETX\DC2\EOT\243\a\ESC\GS\n\
    \\217\STX\n\
    \\EOT\EOT6\STX\ENQ\DC2\EOT\252\a\EOT\GS\SUB\202\STX\n\
    \The bitfield that describes additional meta-data concerning how the\n\
    \update is to be interpreted. Currently, the least-significant bit must be\n\
    \set to 0 if the creating node corresponds to the first node in the\n\
    \previously sent channel announcement and 1 otherwise. If the second bit\n\
    \is set, then the channel is set to be disabled.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\ENQ\ENQ\DC2\EOT\252\a\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\ENQ\SOH\DC2\EOT\252\a\v\CAN\n\
    \\r\n\
    \\ENQ\EOT6\STX\ENQ\ETX\DC2\EOT\252\a\ESC\FS\n\
    \\150\STX\n\
    \\EOT\EOT6\STX\ACK\DC2\EOT\132\b\EOT\US\SUB\135\STX\n\
    \The minimum number of blocks this node requires to be added to the expiry\n\
    \of HTLCs. This is a security parameter determined by the node operator.\n\
    \This value represents the required gap between the time locks of the\n\
    \incoming and outgoing HTLC's set to this node.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\ACK\ENQ\DC2\EOT\132\b\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\ACK\SOH\DC2\EOT\132\b\v\SUB\n\
    \\r\n\
    \\ENQ\EOT6\STX\ACK\ETX\DC2\EOT\132\b\GS\RS\n\
    \>\n\
    \\EOT\EOT6\STX\a\DC2\EOT\137\b\EOT!\SUB0\n\
    \The minimum HTLC value which will be accepted.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\a\ENQ\DC2\EOT\137\b\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\a\SOH\DC2\EOT\137\b\v\FS\n\
    \\r\n\
    \\ENQ\EOT6\STX\a\ETX\DC2\EOT\137\b\US \n\
    \\193\SOH\n\
    \\EOT\EOT6\STX\b\DC2\EOT\144\b\EOT\CAN\SUB\178\SOH\n\
    \The base fee that must be used for incoming HTLC's to this particular\n\
    \channel. This value will be tacked onto the required for a payment\n\
    \independent of the size of the payment.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\b\ENQ\DC2\EOT\144\b\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\b\SOH\DC2\EOT\144\b\v\DC3\n\
    \\r\n\
    \\ENQ\EOT6\STX\b\ETX\DC2\EOT\144\b\SYN\ETB\n\
    \M\n\
    \\EOT\EOT6\STX\t\DC2\EOT\149\b\EOT\CAN\SUB?\n\
    \The fee rate that will be charged per millionth of a satoshi.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\t\ENQ\DC2\EOT\149\b\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\t\SOH\DC2\EOT\149\b\v\DC3\n\
    \\r\n\
    \\ENQ\EOT6\STX\t\ETX\DC2\EOT\149\b\SYN\ETB\n\
    \>\n\
    \\EOT\EOT6\STX\n\
    \\DC2\EOT\154\b\EOT\"\SUB0\n\
    \The maximum HTLC value which will be accepted.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\n\
    \\ENQ\DC2\EOT\154\b\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\n\
    \\SOH\DC2\EOT\154\b\v\FS\n\
    \\r\n\
    \\ENQ\EOT6\STX\n\
    \\ETX\DC2\EOT\154\b\US!\n\
    \\215\STX\n\
    \\EOT\EOT6\STX\v\DC2\EOT\163\b\EOT!\SUB\200\STX\n\
    \The set of data that was appended to this message, some of which we may\n\
    \not actually know how to iterate or parse. By holding onto this data, we\n\
    \ensure that we're able to properly validate the set of signatures that\n\
    \cover these new fields, and ensure we're able to make upgrades to the\n\
    \network in a forwards compatible manner.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT6\STX\v\ENQ\DC2\EOT\163\b\EOT\t\n\
    \\r\n\
    \\ENQ\EOT6\STX\v\SOH\DC2\EOT\163\b\n\
    \\ESC\n\
    \\r\n\
    \\ENQ\EOT6\STX\v\ETX\DC2\EOT\163\b\RS \n\
    \\f\n\
    \\STX\EOT7\DC2\ACK\166\b\NUL\170\b\SOH\n\
    \\v\n\
    \\ETX\EOT7\SOH\DC2\EOT\166\b\b\DC2\n\
    \\f\n\
    \\EOT\EOT7\STX\NUL\DC2\EOT\167\b\EOT\DC4\n\
    \\r\n\
    \\ENQ\EOT7\STX\NUL\ENQ\DC2\EOT\167\b\EOT\t\n\
    \\r\n\
    \\ENQ\EOT7\STX\NUL\SOH\DC2\EOT\167\b\n\
    \\SI\n\
    \\r\n\
    \\ENQ\EOT7\STX\NUL\ETX\DC2\EOT\167\b\DC2\DC3\n\
    \\f\n\
    \\EOT\EOT7\STX\SOH\DC2\EOT\168\b\EOT\CAN\n\
    \\r\n\
    \\ENQ\EOT7\STX\SOH\ENQ\DC2\EOT\168\b\EOT\t\n\
    \\r\n\
    \\ENQ\EOT7\STX\SOH\SOH\DC2\EOT\168\b\n\
    \\DC3\n\
    \\r\n\
    \\ENQ\EOT7\STX\SOH\ETX\DC2\EOT\168\b\SYN\ETB\n\
    \\f\n\
    \\EOT\EOT7\STX\STX\DC2\EOT\169\b\EOT\CAN\n\
    \\r\n\
    \\ENQ\EOT7\STX\STX\EOT\DC2\EOT\169\b\EOT\f\n\
    \\r\n\
    \\ENQ\EOT7\STX\STX\ACK\DC2\EOT\169\b\r\SI\n\
    \\r\n\
    \\ENQ\EOT7\STX\STX\SOH\DC2\EOT\169\b\DLE\DC3\n\
    \\r\n\
    \\ENQ\EOT7\STX\STX\ETX\DC2\EOT\169\b\SYN\ETB\n\
    \\f\n\
    \\STX\EOT8\DC2\ACK\172\b\NUL\175\b\SOH\n\
    \\v\n\
    \\ETX\EOT8\SOH\DC2\EOT\172\b\b\n\
    \\n\
    \\f\n\
    \\EOT\EOT8\STX\NUL\DC2\EOT\173\b\EOT\SYN\n\
    \\r\n\
    \\ENQ\EOT8\STX\NUL\ENQ\DC2\EOT\173\b\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT8\STX\NUL\SOH\DC2\EOT\173\b\v\DC1\n\
    \\r\n\
    \\ENQ\EOT8\STX\NUL\ETX\DC2\EOT\173\b\DC4\NAK\n\
    \\f\n\
    \\EOT\EOT8\STX\SOH\DC2\EOT\174\b\EOT \n\
    \\r\n\
    \\ENQ\EOT8\STX\SOH\EOT\DC2\EOT\174\b\EOT\f\n\
    \\r\n\
    \\ENQ\EOT8\STX\SOH\ENQ\DC2\EOT\174\b\r\DC3\n\
    \\r\n\
    \\ENQ\EOT8\STX\SOH\SOH\DC2\EOT\174\b\DC4\ESC\n\
    \\r\n\
    \\ENQ\EOT8\STX\SOH\ETX\DC2\EOT\174\b\RS\US\n\
    \\f\n\
    \\STX\EOT9\DC2\ACK\177\b\NUL\181\b\SOH\n\
    \\v\n\
    \\ETX\EOT9\SOH\DC2\EOT\177\b\b\ESC\n\
    \\f\n\
    \\EOT\EOT9\STX\NUL\DC2\EOT\178\b\EOT\ETB\n\
    \\r\n\
    \\ENQ\EOT9\STX\NUL\ENQ\DC2\EOT\178\b\EOT\t\n\
    \\r\n\
    \\ENQ\EOT9\STX\NUL\SOH\DC2\EOT\178\b\n\
    \\DC2\n\
    \\r\n\
    \\ENQ\EOT9\STX\NUL\ETX\DC2\EOT\178\b\NAK\SYN\n\
    \\f\n\
    \\EOT\EOT9\STX\SOH\DC2\EOT\179\b\EOT0\n\
    \\r\n\
    \\ENQ\EOT9\STX\SOH\EOT\DC2\EOT\179\b\EOT\f\n\
    \\r\n\
    \\ENQ\EOT9\STX\SOH\ACK\DC2\EOT\179\b\r\US\n\
    \\r\n\
    \\ENQ\EOT9\STX\SOH\SOH\DC2\EOT\179\b +\n\
    \\r\n\
    \\ENQ\EOT9\STX\SOH\ETX\DC2\EOT\179\b./\n\
    \\f\n\
    \\EOT\EOT9\STX\STX\DC2\EOT\180\b\EOT\SUB\n\
    \\r\n\
    \\ENQ\EOT9\STX\STX\ENQ\DC2\EOT\180\b\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT9\STX\STX\SOH\DC2\EOT\180\b\v\NAK\n\
    \\r\n\
    \\ENQ\EOT9\STX\STX\ETX\DC2\EOT\180\b\CAN\EM\n\
    \\f\n\
    \\STX\EOT:\DC2\ACK\183\b\NUL\185\b\SOH\n\
    \\v\n\
    \\ETX\EOT:\SOH\DC2\EOT\183\b\b\FS\n\
    \\f\n\
    \\EOT\EOT:\STX\NUL\DC2\EOT\184\b\EOT\DC3\n\
    \\r\n\
    \\ENQ\EOT:\STX\NUL\ENQ\DC2\EOT\184\b\EOT\b\n\
    \\r\n\
    \\ENQ\EOT:\STX\NUL\SOH\DC2\EOT\184\b\t\SO\n\
    \\r\n\
    \\ENQ\EOT:\STX\NUL\ETX\DC2\EOT\184\b\DC1\DC2\n\
    \\f\n\
    \\STX\EOT;\DC2\ACK\187\b\NUL\129\t\SOH\n\
    \\v\n\
    \\ETX\EOT;\SOH\DC2\EOT\187\b\b\FS\n\
    \\166\STX\n\
    \\EOT\EOT;\STX\NUL\DC2\EOT\194\b\EOT\SUB\SUB\151\STX\n\
    \The unique ID of the intercepted original gRPC request. Useful for mapping\n\
    \request to response when implementing full duplex message interception. For\n\
    \streaming requests, this will be the same ID for all incoming and outgoing\n\
    \middleware intercept messages of the _same_ stream.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT;\STX\NUL\ENQ\DC2\EOT\194\b\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT;\STX\NUL\SOH\DC2\EOT\194\b\v\NAK\n\
    \\r\n\
    \\ENQ\EOT;\STX\NUL\ETX\DC2\EOT\194\b\CAN\EM\n\
    \\206\SOH\n\
    \\EOT\EOT;\STX\SOH\DC2\EOT\201\b\EOT\ESC\SUB\191\SOH\n\
    \The raw bytes of the complete macaroon as sent by the gRPC client in the\n\
    \original request. This might be empty for a request that doesn't require\n\
    \macaroons such as the wallet unlocker RPCs.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT;\STX\SOH\ENQ\DC2\EOT\201\b\EOT\t\n\
    \\r\n\
    \\ENQ\EOT;\STX\SOH\SOH\DC2\EOT\201\b\n\
    \\SYN\n\
    \\r\n\
    \\ENQ\EOT;\STX\SOH\ETX\DC2\EOT\201\b\EM\SUB\n\
    \\166\STX\n\
    \\EOT\EOT;\STX\STX\DC2\EOT\209\b\EOT'\SUB\151\STX\n\
    \The parsed condition of the macaroon's custom caveat for convenient access.\n\
    \This field only contains the value of the custom caveat that the handling\n\
    \middleware has registered itself for. The condition _must_ be validated for\n\
    \messages of intercept_type stream_auth and request!\n\
    \\n\
    \\r\n\
    \\ENQ\EOT;\STX\STX\ENQ\DC2\EOT\209\b\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT;\STX\STX\SOH\DC2\EOT\209\b\v\"\n\
    \\r\n\
    \\ENQ\EOT;\STX\STX\ETX\DC2\EOT\209\b%&\n\
    \\205\STX\n\
    \\EOT\EOT;\b\NUL\DC2\ACK\218\b\EOT\246\b\ENQ\SUB\188\STX\n\
    \There are three types of messages that will be sent to the middleware for\n\
    \inspection and approval: Stream authentication, request and response\n\
    \interception. The first two can only be accepted (=forward to main RPC\n\
    \server) or denied (=return error to client). Intercepted responses can also\n\
    \be replaced/overwritten.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT;\b\NUL\SOH\DC2\EOT\218\b\n\
    \\CAN\n\
    \\180\ETX\n\
    \\EOT\EOT;\STX\ETX\DC2\EOT\227\b\b#\SUB\165\ETX\n\
    \Intercept stream authentication: each new streaming RPC call that is\n\
    \initiated against lnd and contains the middleware's custom macaroon\n\
    \caveat can be approved or denied based upon the macaroon in the stream\n\
    \header. This message will only be sent for streaming RPCs, unary RPCs\n\
    \must handle the macaroon authentication in the request interception to\n\
    \avoid an additional message round trip between lnd and the middleware.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT;\STX\ETX\ACK\DC2\EOT\227\b\b\DC2\n\
    \\r\n\
    \\ENQ\EOT;\STX\ETX\SOH\DC2\EOT\227\b\DC3\RS\n\
    \\r\n\
    \\ENQ\EOT;\STX\ETX\ETX\DC2\EOT\227\b!\"\n\
    \\151\STX\n\
    \\EOT\EOT;\STX\EOT\DC2\EOT\235\b\b\US\SUB\136\STX\n\
    \Intercept incoming gRPC client request message: all incoming messages,\n\
    \both on streaming and unary RPCs, are forwarded to the middleware for\n\
    \inspection. For unary RPC messages the middleware is also expected to\n\
    \validate the custom macaroon caveat of the request.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT;\STX\EOT\ACK\DC2\EOT\235\b\b\DC2\n\
    \\r\n\
    \\ENQ\EOT;\STX\EOT\SOH\DC2\EOT\235\b\DC3\SUB\n\
    \\r\n\
    \\ENQ\EOT;\STX\EOT\ETX\DC2\EOT\235\b\GS\RS\n\
    \\164\ETX\n\
    \\EOT\EOT;\STX\ENQ\DC2\EOT\245\b\b \SUB\149\ETX\n\
    \Intercept outgoing gRPC response message: all outgoing messages, both on\n\
    \streaming and unary RPCs, are forwarded to the middleware for inspection\n\
    \and amendment. The response in this message is the original response as\n\
    \it was generated by the main RPC server. It can either be accepted\n\
    \(=forwarded to the client), replaced/overwritten with a new message of\n\
    \the same type, or replaced by an error message.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT;\STX\ENQ\ACK\DC2\EOT\245\b\b\DC2\n\
    \\r\n\
    \\ENQ\EOT;\STX\ENQ\SOH\DC2\EOT\245\b\DC3\ESC\n\
    \\r\n\
    \\ENQ\EOT;\STX\ENQ\ETX\DC2\EOT\245\b\RS\US\n\
    \\152\ETX\n\
    \\EOT\EOT;\STX\ACK\DC2\EOT\128\t\EOT\SYN\SUB\137\ETX\n\
    \The unique message ID of this middleware intercept message. There can be\n\
    \multiple middleware intercept messages per single gRPC request (one for the\n\
    \incoming request and one for the outgoing response) or gRPC stream (one for\n\
    \each incoming message and one for each outgoing response). This message ID\n\
    \must be referenced when responding (accepting/rejecting/modifying) to an\n\
    \intercept message.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT;\STX\ACK\ENQ\DC2\EOT\128\t\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT;\STX\ACK\SOH\DC2\EOT\128\t\v\DC1\n\
    \\r\n\
    \\ENQ\EOT;\STX\ACK\ETX\DC2\EOT\128\t\DC4\NAK\n\
    \\f\n\
    \\STX\EOT<\DC2\ACK\131\t\NUL\138\t\SOH\n\
    \\v\n\
    \\ETX\EOT<\SOH\DC2\EOT\131\t\b\DC2\n\
    \\177\SOH\n\
    \\EOT\EOT<\STX\NUL\DC2\EOT\137\t\EOT\US\SUB\162\SOH\n\
    \The full URI (in the format /<rpcpackage>.<ServiceName>/MethodName, for\n\
    \example /lnrpc.Lightning/GetInfo) of the streaming RPC method that was just\n\
    \established.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT<\STX\NUL\ENQ\DC2\EOT\137\t\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT<\STX\NUL\SOH\DC2\EOT\137\t\v\SUB\n\
    \\r\n\
    \\ENQ\EOT<\STX\NUL\ETX\DC2\EOT\137\t\GS\RS\n\
    \\f\n\
    \\STX\EOT=\DC2\ACK\140\t\NUL\164\t\SOH\n\
    \\v\n\
    \\ETX\EOT=\SOH\DC2\EOT\140\t\b\DC2\n\
    \\170\SOH\n\
    \\EOT\EOT=\STX\NUL\DC2\EOT\146\t\EOT\US\SUB\155\SOH\n\
    \The full URI (in the format /<rpcpackage>.<ServiceName>/MethodName, for\n\
    \example /lnrpc.Lightning/GetInfo) of the RPC method the message was sent\n\
    \to/from.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT=\STX\NUL\ENQ\DC2\EOT\146\t\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT=\STX\NUL\SOH\DC2\EOT\146\t\v\SUB\n\
    \\r\n\
    \\ENQ\EOT=\STX\NUL\ETX\DC2\EOT\146\t\GS\RS\n\
    \Z\n\
    \\EOT\EOT=\STX\SOH\DC2\EOT\151\t\EOT\CAN\SUBL\n\
    \Indicates whether the message was sent over a streaming RPC method or not.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT=\STX\SOH\ENQ\DC2\EOT\151\t\EOT\b\n\
    \\r\n\
    \\ENQ\EOT=\STX\SOH\SOH\DC2\EOT\151\t\t\DC3\n\
    \\r\n\
    \\ENQ\EOT=\STX\SOH\ETX\DC2\EOT\151\t\SYN\ETB\n\
    \\137\SOH\n\
    \\EOT\EOT=\STX\STX\DC2\EOT\157\t\EOT\EM\SUB{\n\
    \The full canonical gRPC name of the message type (in the format\n\
    \<rpcpackage>.TypeName, for example lnrpc.GetInfoRequest).\n\
    \\n\
    \\r\n\
    \\ENQ\EOT=\STX\STX\ENQ\DC2\EOT\157\t\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT=\STX\STX\SOH\DC2\EOT\157\t\v\DC4\n\
    \\r\n\
    \\ENQ\EOT=\STX\STX\ETX\DC2\EOT\157\t\ETB\CAN\n\
    \_\n\
    \\EOT\EOT=\STX\ETX\DC2\EOT\163\t\EOT\EM\SUBQ\n\
    \The full content of the gRPC message, serialized in the binary protobuf\n\
    \format.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT=\STX\ETX\ENQ\DC2\EOT\163\t\EOT\t\n\
    \\r\n\
    \\ENQ\EOT=\STX\ETX\SOH\DC2\EOT\163\t\n\
    \\DC4\n\
    \\r\n\
    \\ENQ\EOT=\STX\ETX\ETX\DC2\EOT\163\t\ETB\CAN\n\
    \\f\n\
    \\STX\EOT>\DC2\ACK\166\t\NUL\199\t\SOH\n\
    \\v\n\
    \\ETX\EOT>\SOH\DC2\EOT\166\t\b\GS\n\
    \\173\SOH\n\
    \\EOT\EOT>\STX\NUL\DC2\EOT\172\t\EOT\SUB\SUB\158\SOH\n\
    \The request message ID this response refers to. Must always be set when\n\
    \giving feedback to an intercept but is ignored for the initial registration\n\
    \message.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT>\STX\NUL\ENQ\DC2\EOT\172\t\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT>\STX\NUL\SOH\DC2\EOT\172\t\v\NAK\n\
    \\r\n\
    \\ENQ\EOT>\STX\NUL\ETX\DC2\EOT\172\t\CAN\EM\n\
    \\215\SOH\n\
    \\EOT\EOT>\b\NUL\DC2\ACK\179\t\EOT\198\t\ENQ\SUB\198\SOH\n\
    \The middleware can only send two types of messages to lnd: The initial\n\
    \registration message that identifies the middleware and after that only\n\
    \feedback messages to requests sent to the middleware.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT>\b\NUL\SOH\DC2\EOT\179\t\n\
    \\FS\n\
    \\191\EOT\n\
    \\EOT\EOT>\STX\SOH\DC2\EOT\191\t\b,\SUB\176\EOT\n\
    \The registration message identifies the middleware that's being\n\
    \registered in lnd. The registration message must be sent immediately\n\
    \after initiating the RegisterRpcMiddleware stream, otherwise lnd will\n\
    \time out the attempt and terminate the request. NOTE: The middleware\n\
    \will only receive interception messages for requests that contain a\n\
    \macaroon with the custom caveat that the middleware declares it is\n\
    \responsible for handling in the registration message! As a security\n\
    \measure, _no_ middleware can intercept requests made with _unencumbered_\n\
    \macaroons!\n\
    \\n\
    \\r\n\
    \\ENQ\EOT>\STX\SOH\ACK\DC2\EOT\191\t\b\RS\n\
    \\r\n\
    \\ENQ\EOT>\STX\SOH\SOH\DC2\EOT\191\t\US'\n\
    \\r\n\
    \\ENQ\EOT>\STX\SOH\ETX\DC2\EOT\191\t*+\n\
    \\152\SOH\n\
    \\EOT\EOT>\STX\STX\DC2\EOT\197\t\b'\SUB\137\SOH\n\
    \The middleware received an interception request and gives feedback to\n\
    \it. The request_id indicates what message the feedback refers to.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT>\STX\STX\ACK\DC2\EOT\197\t\b\EM\n\
    \\r\n\
    \\ENQ\EOT>\STX\STX\SOH\DC2\EOT\197\t\SUB\"\n\
    \\r\n\
    \\ENQ\EOT>\STX\STX\ETX\DC2\EOT\197\t%&\n\
    \\f\n\
    \\STX\EOT?\DC2\ACK\201\t\NUL\228\t\SOH\n\
    \\v\n\
    \\ETX\EOT?\SOH\DC2\EOT\201\t\b\RS\n\
    \\132\SOH\n\
    \\EOT\EOT?\STX\NUL\DC2\EOT\206\t\EOT\US\SUBv\n\
    \The name of the middleware to register. The name should be as informative\n\
    \as possible and is logged on registration.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT?\STX\NUL\ENQ\DC2\EOT\206\t\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT?\STX\NUL\SOH\DC2\EOT\206\t\v\SUB\n\
    \\r\n\
    \\ENQ\EOT?\STX\NUL\ETX\DC2\EOT\206\t\GS\RS\n\
    \\194\EOT\n\
    \\EOT\EOT?\STX\SOH\DC2\EOT\218\t\EOT+\SUB\179\EOT\n\
    \The name of the custom macaroon caveat that this middleware is responsible\n\
    \for. Only requests/responses that contain a macaroon with the registered\n\
    \custom caveat are forwarded for interception to the middleware. The\n\
    \exception being the read-only mode: All requests/responses are forwarded to\n\
    \a middleware that requests read-only access but such a middleware won't be\n\
    \allowed to _alter_ responses. As a security measure, _no_ middleware can\n\
    \change responses to requests made with _unencumbered_ macaroons!\n\
    \NOTE: Cannot be used at the same time as read_only_mode.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT?\STX\SOH\ENQ\DC2\EOT\218\t\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT?\STX\SOH\SOH\DC2\EOT\218\t\v&\n\
    \\r\n\
    \\ENQ\EOT?\STX\SOH\ETX\DC2\EOT\218\t)*\n\
    \\200\STX\n\
    \\EOT\EOT?\STX\STX\DC2\EOT\227\t\EOT\FS\SUB\185\STX\n\
    \Instead of defining a custom macaroon caveat name a middleware can register\n\
    \itself for read-only access only. In that mode all requests/responses are\n\
    \forwarded to the middleware but the middleware isn't allowed to alter any of\n\
    \the responses.\n\
    \NOTE: Cannot be used at the same time as custom_macaroon_caveat_name.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT?\STX\STX\ENQ\DC2\EOT\227\t\EOT\b\n\
    \\r\n\
    \\ENQ\EOT?\STX\STX\SOH\DC2\EOT\227\t\t\ETB\n\
    \\r\n\
    \\ENQ\EOT?\STX\STX\ETX\DC2\EOT\227\t\SUB\ESC\n\
    \\f\n\
    \\STX\EOT@\DC2\ACK\230\t\NUL\254\t\SOH\n\
    \\v\n\
    \\ETX\EOT@\SOH\DC2\EOT\230\t\b\EM\n\
    \\157\STX\n\
    \\EOT\EOT@\STX\NUL\DC2\EOT\237\t\EOT\NAK\SUB\142\STX\n\
    \The error to return to the user. If this is non-empty, the incoming gRPC\n\
    \stream/request is aborted and the error is returned to the gRPC client. If\n\
    \this value is empty, it means the middleware accepts the stream/request/\n\
    \response and the processing of it can continue.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT@\STX\NUL\ENQ\DC2\EOT\237\t\EOT\n\
    \\n\
    \\r\n\
    \\ENQ\EOT@\STX\NUL\SOH\DC2\EOT\237\t\v\DLE\n\
    \\r\n\
    \\ENQ\EOT@\STX\NUL\ETX\DC2\EOT\237\t\DC3\DC4\n\
    \\204\ETX\n\
    \\EOT\EOT@\STX\SOH\DC2\EOT\247\t\EOT\RS\SUB\189\ETX\n\
    \A boolean indicating that the gRPC response should be replaced/overwritten.\n\
    \As its name suggests, this can only be used as a feedback to an intercepted\n\
    \response RPC message and is ignored for feedback on any other message. This\n\
    \boolean is needed because in protobuf an empty message is serialized as a\n\
    \0-length or nil byte slice and we wouldn't be able to distinguish between\n\
    \an empty replacement message and the \"don't replace anything\" case.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT@\STX\SOH\ENQ\DC2\EOT\247\t\EOT\b\n\
    \\r\n\
    \\ENQ\EOT@\STX\SOH\SOH\DC2\EOT\247\t\t\EM\n\
    \\r\n\
    \\ENQ\EOT@\STX\SOH\ETX\DC2\EOT\247\t\FS\GS\n\
    \\154\SOH\n\
    \\EOT\EOT@\STX\STX\DC2\EOT\253\t\EOT%\SUB\139\SOH\n\
    \If the replace_response field is set to true, this field must contain the\n\
    \binary serialized gRPC response message in the protobuf format.\n\
    \\n\
    \\r\n\
    \\ENQ\EOT@\STX\STX\ENQ\DC2\EOT\253\t\EOT\t\n\
    \\r\n\
    \\ENQ\EOT@\STX\STX\SOH\DC2\EOT\253\t\n\
    \ \n\
    \\r\n\
    \\ENQ\EOT@\STX\STX\ETX\DC2\EOT\253\t#$b\ACKproto3"