lnrpc.Payment.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package lnrpc
import org.bitcoins.lnd.rpc.LndUtils._
/** @param paymentHash
* The payment hash
* @param value
* Deprecated, use value_sat or value_msat.
* @param creationDate
* Deprecated, use creation_time_ns
* @param fee
* Deprecated, use fee_sat or fee_msat.
* @param paymentPreimage
* The payment preimage
* @param valueSat
* The value of the payment in satoshis
* @param valueMsat
* The value of the payment in milli-satoshis
* @param paymentRequest
* The optional payment request being fulfilled.
* @param status
* The status of the payment.
* @param feeSat
* The fee paid for this payment in satoshis
* @param feeMsat
* The fee paid for this payment in milli-satoshis
* @param creationTimeNs
* The time in UNIX nanoseconds at which the payment was created.
* @param htlcs
* The HTLCs made in attempt to settle the payment.
* @param paymentIndex
*
* The creation index of this payment. Each payment can be uniquely identified
* by this index, which may not strictly increment by 1 for payments made in
* older versions of lnd.
*/
@SerialVersionUID(0L)
final case class Payment(
paymentHash: _root_.scala.Predef.String = "",
@scala.deprecated(message="Marked as deprecated in proto file", "") value: _root_.scala.Long = 0L,
@scala.deprecated(message="Marked as deprecated in proto file", "") creationDate: _root_.scala.Long = 0L,
@scala.deprecated(message="Marked as deprecated in proto file", "") fee: _root_.scala.Long = 0L,
paymentPreimage: _root_.scala.Predef.String = "",
valueSat: _root_.scala.Long = 0L,
valueMsat: _root_.scala.Long = 0L,
paymentRequest: _root_.scala.Predef.String = "",
status: lnrpc.Payment.PaymentStatus = lnrpc.Payment.PaymentStatus.UNKNOWN,
feeSat: _root_.scala.Long = 0L,
feeMsat: _root_.scala.Long = 0L,
creationTimeNs: _root_.scala.Long = 0L,
htlcs: _root_.scala.Seq[lnrpc.HTLCAttempt] = _root_.scala.Seq.empty,
paymentIndex: org.bitcoins.core.number.UInt64 = lnrpc.Payment._typemapper_paymentIndex.toCustom(0L),
failureReason: lnrpc.PaymentFailureReason = lnrpc.PaymentFailureReason.FAILURE_REASON_NONE,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[Payment] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = paymentHash
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
{
val __value = value
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(2, __value)
}
};
{
val __value = creationDate
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(3, __value)
}
};
{
val __value = fee
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(5, __value)
}
};
{
val __value = paymentPreimage
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(6, __value)
}
};
{
val __value = valueSat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(7, __value)
}
};
{
val __value = valueMsat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(8, __value)
}
};
{
val __value = paymentRequest
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(9, __value)
}
};
{
val __value = status.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(10, __value)
}
};
{
val __value = feeSat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(11, __value)
}
};
{
val __value = feeMsat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(12, __value)
}
};
{
val __value = creationTimeNs
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(13, __value)
}
};
htlcs.foreach { __item =>
val __value = __item
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
}
{
val __value = lnrpc.Payment._typemapper_paymentIndex.toBase(paymentIndex)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(15, __value)
}
};
{
val __value = failureReason.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(16, __value)
}
};
__size += unknownFields.serializedSize
__size
}
override def serializedSize: _root_.scala.Int = {
var __size = __serializedSizeMemoized
if (__size == 0) {
__size = __computeSerializedSize() + 1
__serializedSizeMemoized = __size
}
__size - 1
}
def writeTo(`_output__`: _root_.com.google.protobuf.CodedOutputStream): _root_.scala.Unit = {
{
val __v = paymentHash
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
{
val __v = value
if (__v != 0L) {
_output__.writeInt64(2, __v)
}
};
{
val __v = creationDate
if (__v != 0L) {
_output__.writeInt64(3, __v)
}
};
{
val __v = fee
if (__v != 0L) {
_output__.writeInt64(5, __v)
}
};
{
val __v = paymentPreimage
if (!__v.isEmpty) {
_output__.writeString(6, __v)
}
};
{
val __v = valueSat
if (__v != 0L) {
_output__.writeInt64(7, __v)
}
};
{
val __v = valueMsat
if (__v != 0L) {
_output__.writeInt64(8, __v)
}
};
{
val __v = paymentRequest
if (!__v.isEmpty) {
_output__.writeString(9, __v)
}
};
{
val __v = status.value
if (__v != 0) {
_output__.writeEnum(10, __v)
}
};
{
val __v = feeSat
if (__v != 0L) {
_output__.writeInt64(11, __v)
}
};
{
val __v = feeMsat
if (__v != 0L) {
_output__.writeInt64(12, __v)
}
};
{
val __v = creationTimeNs
if (__v != 0L) {
_output__.writeInt64(13, __v)
}
};
htlcs.foreach { __v =>
val __m = __v
_output__.writeTag(14, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
{
val __v = lnrpc.Payment._typemapper_paymentIndex.toBase(paymentIndex)
if (__v != 0L) {
_output__.writeUInt64(15, __v)
}
};
{
val __v = failureReason.value
if (__v != 0) {
_output__.writeEnum(16, __v)
}
};
unknownFields.writeTo(_output__)
}
def withPaymentHash(__v: _root_.scala.Predef.String): Payment = copy(paymentHash = __v)
def withValue(__v: _root_.scala.Long): Payment = copy(value = __v)
def withCreationDate(__v: _root_.scala.Long): Payment = copy(creationDate = __v)
def withFee(__v: _root_.scala.Long): Payment = copy(fee = __v)
def withPaymentPreimage(__v: _root_.scala.Predef.String): Payment = copy(paymentPreimage = __v)
def withValueSat(__v: _root_.scala.Long): Payment = copy(valueSat = __v)
def withValueMsat(__v: _root_.scala.Long): Payment = copy(valueMsat = __v)
def withPaymentRequest(__v: _root_.scala.Predef.String): Payment = copy(paymentRequest = __v)
def withStatus(__v: lnrpc.Payment.PaymentStatus): Payment = copy(status = __v)
def withFeeSat(__v: _root_.scala.Long): Payment = copy(feeSat = __v)
def withFeeMsat(__v: _root_.scala.Long): Payment = copy(feeMsat = __v)
def withCreationTimeNs(__v: _root_.scala.Long): Payment = copy(creationTimeNs = __v)
def clearHtlcs = copy(htlcs = _root_.scala.Seq.empty)
def addHtlcs(__vs: lnrpc.HTLCAttempt *): Payment = addAllHtlcs(__vs)
def addAllHtlcs(__vs: Iterable[lnrpc.HTLCAttempt]): Payment = copy(htlcs = htlcs ++ __vs)
def withHtlcs(__v: _root_.scala.Seq[lnrpc.HTLCAttempt]): Payment = copy(htlcs = __v)
def withPaymentIndex(__v: org.bitcoins.core.number.UInt64): Payment = copy(paymentIndex = __v)
def withFailureReason(__v: lnrpc.PaymentFailureReason): Payment = copy(failureReason = __v)
def withUnknownFields(__v: _root_.scalapb.UnknownFieldSet) = copy(unknownFields = __v)
def discardUnknownFields = copy(unknownFields = _root_.scalapb.UnknownFieldSet.empty)
def getFieldByNumber(__fieldNumber: _root_.scala.Int): _root_.scala.Any = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 1 => {
val __t = paymentHash
if (__t != "") __t else null
}
case 2 => {
val __t = value
if (__t != 0L) __t else null
}
case 3 => {
val __t = creationDate
if (__t != 0L) __t else null
}
case 5 => {
val __t = fee
if (__t != 0L) __t else null
}
case 6 => {
val __t = paymentPreimage
if (__t != "") __t else null
}
case 7 => {
val __t = valueSat
if (__t != 0L) __t else null
}
case 8 => {
val __t = valueMsat
if (__t != 0L) __t else null
}
case 9 => {
val __t = paymentRequest
if (__t != "") __t else null
}
case 10 => {
val __t = status.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 11 => {
val __t = feeSat
if (__t != 0L) __t else null
}
case 12 => {
val __t = feeMsat
if (__t != 0L) __t else null
}
case 13 => {
val __t = creationTimeNs
if (__t != 0L) __t else null
}
case 14 => htlcs
case 15 => {
val __t = lnrpc.Payment._typemapper_paymentIndex.toBase(paymentIndex)
if (__t != 0L) __t else null
}
case 16 => {
val __t = failureReason.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PString(paymentHash)
case 2 => _root_.scalapb.descriptors.PLong(value)
case 3 => _root_.scalapb.descriptors.PLong(creationDate)
case 5 => _root_.scalapb.descriptors.PLong(fee)
case 6 => _root_.scalapb.descriptors.PString(paymentPreimage)
case 7 => _root_.scalapb.descriptors.PLong(valueSat)
case 8 => _root_.scalapb.descriptors.PLong(valueMsat)
case 9 => _root_.scalapb.descriptors.PString(paymentRequest)
case 10 => _root_.scalapb.descriptors.PEnum(status.scalaValueDescriptor)
case 11 => _root_.scalapb.descriptors.PLong(feeSat)
case 12 => _root_.scalapb.descriptors.PLong(feeMsat)
case 13 => _root_.scalapb.descriptors.PLong(creationTimeNs)
case 14 => _root_.scalapb.descriptors.PRepeated(htlcs.iterator.map(_.toPMessage).toVector)
case 15 => _root_.scalapb.descriptors.PLong(lnrpc.Payment._typemapper_paymentIndex.toBase(paymentIndex))
case 16 => _root_.scalapb.descriptors.PEnum(failureReason.scalaValueDescriptor)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: lnrpc.Payment.type = lnrpc.Payment
// @@protoc_insertion_point(GeneratedMessage[lnrpc.Payment])
}
object Payment extends scalapb.GeneratedMessageCompanion[lnrpc.Payment] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.Payment] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.Payment = {
var __paymentHash: _root_.scala.Predef.String = ""
var __value: _root_.scala.Long = 0L
var __creationDate: _root_.scala.Long = 0L
var __fee: _root_.scala.Long = 0L
var __paymentPreimage: _root_.scala.Predef.String = ""
var __valueSat: _root_.scala.Long = 0L
var __valueMsat: _root_.scala.Long = 0L
var __paymentRequest: _root_.scala.Predef.String = ""
var __status: lnrpc.Payment.PaymentStatus = lnrpc.Payment.PaymentStatus.UNKNOWN
var __feeSat: _root_.scala.Long = 0L
var __feeMsat: _root_.scala.Long = 0L
var __creationTimeNs: _root_.scala.Long = 0L
val __htlcs: _root_.scala.collection.immutable.VectorBuilder[lnrpc.HTLCAttempt] = new _root_.scala.collection.immutable.VectorBuilder[lnrpc.HTLCAttempt]
var __paymentIndex: _root_.scala.Long = 0L
var __failureReason: lnrpc.PaymentFailureReason = lnrpc.PaymentFailureReason.FAILURE_REASON_NONE
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__paymentHash = _input__.readStringRequireUtf8()
case 16 =>
__value = _input__.readInt64()
case 24 =>
__creationDate = _input__.readInt64()
case 40 =>
__fee = _input__.readInt64()
case 50 =>
__paymentPreimage = _input__.readStringRequireUtf8()
case 56 =>
__valueSat = _input__.readInt64()
case 64 =>
__valueMsat = _input__.readInt64()
case 74 =>
__paymentRequest = _input__.readStringRequireUtf8()
case 80 =>
__status = lnrpc.Payment.PaymentStatus.fromValue(_input__.readEnum())
case 88 =>
__feeSat = _input__.readInt64()
case 96 =>
__feeMsat = _input__.readInt64()
case 104 =>
__creationTimeNs = _input__.readInt64()
case 114 =>
__htlcs += _root_.scalapb.LiteParser.readMessage[lnrpc.HTLCAttempt](_input__)
case 120 =>
__paymentIndex = _input__.readUInt64()
case 128 =>
__failureReason = lnrpc.PaymentFailureReason.fromValue(_input__.readEnum())
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
lnrpc.Payment(
paymentHash = __paymentHash,
value = __value,
creationDate = __creationDate,
fee = __fee,
paymentPreimage = __paymentPreimage,
valueSat = __valueSat,
valueMsat = __valueMsat,
paymentRequest = __paymentRequest,
status = __status,
feeSat = __feeSat,
feeMsat = __feeMsat,
creationTimeNs = __creationTimeNs,
htlcs = __htlcs.result(),
paymentIndex = lnrpc.Payment._typemapper_paymentIndex.toCustom(__paymentIndex),
failureReason = __failureReason,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.Payment] = _root_.scalapb.descriptors.Reads{
case _root_.scalapb.descriptors.PMessage(__fieldsMap) =>
_root_.scala.Predef.require(__fieldsMap.keys.forall(_.containingMessage eq scalaDescriptor), "FieldDescriptor does not match message type.")
lnrpc.Payment(
paymentHash = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
creationDate = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
fee = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
paymentPreimage = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
valueSat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
valueMsat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
paymentRequest = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
status = lnrpc.Payment.PaymentStatus.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(lnrpc.Payment.PaymentStatus.UNKNOWN.scalaValueDescriptor).number),
feeSat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
feeMsat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
creationTimeNs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
htlcs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(14).get).map(_.as[_root_.scala.Seq[lnrpc.HTLCAttempt]]).getOrElse(_root_.scala.Seq.empty),
paymentIndex = lnrpc.Payment._typemapper_paymentIndex.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(15).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
failureReason = lnrpc.PaymentFailureReason.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(16).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(lnrpc.PaymentFailureReason.FAILURE_REASON_NONE.scalaValueDescriptor).number)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LightningProto.javaDescriptor.getMessageTypes().get(136)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LightningProto.scalaDescriptor.messages(136)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 14 => __out = lnrpc.HTLCAttempt
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 10 => lnrpc.Payment.PaymentStatus
case 16 => lnrpc.PaymentFailureReason
}
}
lazy val defaultInstance = lnrpc.Payment(
paymentHash = "",
value = 0L,
creationDate = 0L,
fee = 0L,
paymentPreimage = "",
valueSat = 0L,
valueMsat = 0L,
paymentRequest = "",
status = lnrpc.Payment.PaymentStatus.UNKNOWN,
feeSat = 0L,
feeMsat = 0L,
creationTimeNs = 0L,
htlcs = _root_.scala.Seq.empty,
paymentIndex = lnrpc.Payment._typemapper_paymentIndex.toCustom(0L),
failureReason = lnrpc.PaymentFailureReason.FAILURE_REASON_NONE
)
sealed abstract class PaymentStatus(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = PaymentStatus
def isUnknown: _root_.scala.Boolean = false
def isInFlight: _root_.scala.Boolean = false
def isSucceeded: _root_.scala.Boolean = false
def isFailed: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[PaymentStatus] = lnrpc.Payment.PaymentStatus
final def asRecognized: _root_.scala.Option[lnrpc.Payment.PaymentStatus.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[lnrpc.Payment.PaymentStatus.Recognized])
}
object PaymentStatus extends _root_.scalapb.GeneratedEnumCompanion[PaymentStatus] {
sealed trait Recognized extends PaymentStatus
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[PaymentStatus] = this
@SerialVersionUID(0L)
case object UNKNOWN extends PaymentStatus(0) with PaymentStatus.Recognized {
val index = 0
val name = "UNKNOWN"
override def isUnknown: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object IN_FLIGHT extends PaymentStatus(1) with PaymentStatus.Recognized {
val index = 1
val name = "IN_FLIGHT"
override def isInFlight: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object SUCCEEDED extends PaymentStatus(2) with PaymentStatus.Recognized {
val index = 2
val name = "SUCCEEDED"
override def isSucceeded: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object FAILED extends PaymentStatus(3) with PaymentStatus.Recognized {
val index = 3
val name = "FAILED"
override def isFailed: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends PaymentStatus(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(UNKNOWN, IN_FLIGHT, SUCCEEDED, FAILED)
def fromValue(__value: _root_.scala.Int): PaymentStatus = __value match {
case 0 => UNKNOWN
case 1 => IN_FLIGHT
case 2 => SUCCEEDED
case 3 => FAILED
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = lnrpc.Payment.javaDescriptor.getEnumTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = lnrpc.Payment.scalaDescriptor.enums(0)
}
implicit class PaymentLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.Payment]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.Payment](_l) {
def paymentHash: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.paymentHash)((c_, f_) => c_.copy(paymentHash = f_))
def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.value)((c_, f_) => c_.copy(value = f_))
def creationDate: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.creationDate)((c_, f_) => c_.copy(creationDate = f_))
def fee: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.fee)((c_, f_) => c_.copy(fee = f_))
def paymentPreimage: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.paymentPreimage)((c_, f_) => c_.copy(paymentPreimage = f_))
def valueSat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.valueSat)((c_, f_) => c_.copy(valueSat = f_))
def valueMsat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.valueMsat)((c_, f_) => c_.copy(valueMsat = f_))
def paymentRequest: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.paymentRequest)((c_, f_) => c_.copy(paymentRequest = f_))
def status: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.Payment.PaymentStatus] = field(_.status)((c_, f_) => c_.copy(status = f_))
def feeSat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.feeSat)((c_, f_) => c_.copy(feeSat = f_))
def feeMsat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.feeMsat)((c_, f_) => c_.copy(feeMsat = f_))
def creationTimeNs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.creationTimeNs)((c_, f_) => c_.copy(creationTimeNs = f_))
def htlcs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[lnrpc.HTLCAttempt]] = field(_.htlcs)((c_, f_) => c_.copy(htlcs = f_))
def paymentIndex: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.paymentIndex)((c_, f_) => c_.copy(paymentIndex = f_))
def failureReason: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PaymentFailureReason] = field(_.failureReason)((c_, f_) => c_.copy(failureReason = f_))
}
final val PAYMENT_HASH_FIELD_NUMBER = 1
final val VALUE_FIELD_NUMBER = 2
final val CREATION_DATE_FIELD_NUMBER = 3
final val FEE_FIELD_NUMBER = 5
final val PAYMENT_PREIMAGE_FIELD_NUMBER = 6
final val VALUE_SAT_FIELD_NUMBER = 7
final val VALUE_MSAT_FIELD_NUMBER = 8
final val PAYMENT_REQUEST_FIELD_NUMBER = 9
final val STATUS_FIELD_NUMBER = 10
final val FEE_SAT_FIELD_NUMBER = 11
final val FEE_MSAT_FIELD_NUMBER = 12
final val CREATION_TIME_NS_FIELD_NUMBER = 13
final val HTLCS_FIELD_NUMBER = 14
final val PAYMENT_INDEX_FIELD_NUMBER = 15
final val FAILURE_REASON_FIELD_NUMBER = 16
@transient
private[lnrpc] val _typemapper_paymentIndex: _root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64]]
def of(
paymentHash: _root_.scala.Predef.String,
value: _root_.scala.Long,
creationDate: _root_.scala.Long,
fee: _root_.scala.Long,
paymentPreimage: _root_.scala.Predef.String,
valueSat: _root_.scala.Long,
valueMsat: _root_.scala.Long,
paymentRequest: _root_.scala.Predef.String,
status: lnrpc.Payment.PaymentStatus,
feeSat: _root_.scala.Long,
feeMsat: _root_.scala.Long,
creationTimeNs: _root_.scala.Long,
htlcs: _root_.scala.Seq[lnrpc.HTLCAttempt],
paymentIndex: org.bitcoins.core.number.UInt64,
failureReason: lnrpc.PaymentFailureReason
): _root_.lnrpc.Payment = _root_.lnrpc.Payment(
paymentHash,
value,
creationDate,
fee,
paymentPreimage,
valueSat,
valueMsat,
paymentRequest,
status,
feeSat,
feeMsat,
creationTimeNs,
htlcs,
paymentIndex,
failureReason
)
// @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.Payment])
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy