All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lnrpc.PayReq.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._

@SerialVersionUID(0L)
final case class PayReq(
    destination: _root_.scala.Predef.String = "",
    paymentHash: _root_.scala.Predef.String = "",
    numSatoshis: _root_.scala.Long = 0L,
    timestamp: _root_.scala.Long = 0L,
    expiry: _root_.scala.Long = 0L,
    description: _root_.scala.Predef.String = "",
    descriptionHash: _root_.scala.Predef.String = "",
    fallbackAddr: _root_.scala.Predef.String = "",
    cltvExpiry: _root_.scala.Long = 0L,
    routeHints: _root_.scala.Seq[lnrpc.RouteHint] = _root_.scala.Seq.empty,
    paymentAddr: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
    numMsat: _root_.scala.Long = 0L,
    features: _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt32, lnrpc.Feature] = _root_.scala.collection.immutable.Map.empty,
    unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
    ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[PayReq] {
    @transient
    private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
    private[this] def __computeSerializedSize(): _root_.scala.Int = {
      var __size = 0
      
      {
        val __value = destination
        if (!__value.isEmpty) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
        }
      };
      
      {
        val __value = paymentHash
        if (!__value.isEmpty) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
        }
      };
      
      {
        val __value = numSatoshis
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(3, __value)
        }
      };
      
      {
        val __value = timestamp
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(4, __value)
        }
      };
      
      {
        val __value = expiry
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(5, __value)
        }
      };
      
      {
        val __value = description
        if (!__value.isEmpty) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(6, __value)
        }
      };
      
      {
        val __value = descriptionHash
        if (!__value.isEmpty) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(7, __value)
        }
      };
      
      {
        val __value = fallbackAddr
        if (!__value.isEmpty) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(8, __value)
        }
      };
      
      {
        val __value = cltvExpiry
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(9, __value)
        }
      };
      routeHints.foreach { __item =>
        val __value = __item
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      }
      
      {
        val __value = paymentAddr
        if (!__value.isEmpty) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(11, __value)
        }
      };
      
      {
        val __value = numMsat
        if (__value != 0L) {
          __size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(12, __value)
        }
      };
      features.foreach { __item =>
        val __value = lnrpc.PayReq._typemapper_features.toBase(__item)
        __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
      }
      __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 = destination
        if (!__v.isEmpty) {
          _output__.writeString(1, __v)
        }
      };
      {
        val __v = paymentHash
        if (!__v.isEmpty) {
          _output__.writeString(2, __v)
        }
      };
      {
        val __v = numSatoshis
        if (__v != 0L) {
          _output__.writeInt64(3, __v)
        }
      };
      {
        val __v = timestamp
        if (__v != 0L) {
          _output__.writeInt64(4, __v)
        }
      };
      {
        val __v = expiry
        if (__v != 0L) {
          _output__.writeInt64(5, __v)
        }
      };
      {
        val __v = description
        if (!__v.isEmpty) {
          _output__.writeString(6, __v)
        }
      };
      {
        val __v = descriptionHash
        if (!__v.isEmpty) {
          _output__.writeString(7, __v)
        }
      };
      {
        val __v = fallbackAddr
        if (!__v.isEmpty) {
          _output__.writeString(8, __v)
        }
      };
      {
        val __v = cltvExpiry
        if (__v != 0L) {
          _output__.writeInt64(9, __v)
        }
      };
      routeHints.foreach { __v =>
        val __m = __v
        _output__.writeTag(10, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      {
        val __v = paymentAddr
        if (!__v.isEmpty) {
          _output__.writeBytes(11, __v)
        }
      };
      {
        val __v = numMsat
        if (__v != 0L) {
          _output__.writeInt64(12, __v)
        }
      };
      features.foreach { __v =>
        val __m = lnrpc.PayReq._typemapper_features.toBase(__v)
        _output__.writeTag(13, 2)
        _output__.writeUInt32NoTag(__m.serializedSize)
        __m.writeTo(_output__)
      };
      unknownFields.writeTo(_output__)
    }
    def withDestination(__v: _root_.scala.Predef.String): PayReq = copy(destination = __v)
    def withPaymentHash(__v: _root_.scala.Predef.String): PayReq = copy(paymentHash = __v)
    def withNumSatoshis(__v: _root_.scala.Long): PayReq = copy(numSatoshis = __v)
    def withTimestamp(__v: _root_.scala.Long): PayReq = copy(timestamp = __v)
    def withExpiry(__v: _root_.scala.Long): PayReq = copy(expiry = __v)
    def withDescription(__v: _root_.scala.Predef.String): PayReq = copy(description = __v)
    def withDescriptionHash(__v: _root_.scala.Predef.String): PayReq = copy(descriptionHash = __v)
    def withFallbackAddr(__v: _root_.scala.Predef.String): PayReq = copy(fallbackAddr = __v)
    def withCltvExpiry(__v: _root_.scala.Long): PayReq = copy(cltvExpiry = __v)
    def clearRouteHints = copy(routeHints = _root_.scala.Seq.empty)
    def addRouteHints(__vs: lnrpc.RouteHint *): PayReq = addAllRouteHints(__vs)
    def addAllRouteHints(__vs: Iterable[lnrpc.RouteHint]): PayReq = copy(routeHints = routeHints ++ __vs)
    def withRouteHints(__v: _root_.scala.Seq[lnrpc.RouteHint]): PayReq = copy(routeHints = __v)
    def withPaymentAddr(__v: _root_.com.google.protobuf.ByteString): PayReq = copy(paymentAddr = __v)
    def withNumMsat(__v: _root_.scala.Long): PayReq = copy(numMsat = __v)
    def clearFeatures = copy(features = _root_.scala.collection.immutable.Map.empty)
    def addFeatures(__vs: (org.bitcoins.core.number.UInt32, lnrpc.Feature) *): PayReq = addAllFeatures(__vs)
    def addAllFeatures(__vs: Iterable[(org.bitcoins.core.number.UInt32, lnrpc.Feature)]): PayReq = copy(features = features ++ __vs)
    def withFeatures(__v: _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt32, lnrpc.Feature]): PayReq = copy(features = __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 = destination
          if (__t != "") __t else null
        }
        case 2 => {
          val __t = paymentHash
          if (__t != "") __t else null
        }
        case 3 => {
          val __t = numSatoshis
          if (__t != 0L) __t else null
        }
        case 4 => {
          val __t = timestamp
          if (__t != 0L) __t else null
        }
        case 5 => {
          val __t = expiry
          if (__t != 0L) __t else null
        }
        case 6 => {
          val __t = description
          if (__t != "") __t else null
        }
        case 7 => {
          val __t = descriptionHash
          if (__t != "") __t else null
        }
        case 8 => {
          val __t = fallbackAddr
          if (__t != "") __t else null
        }
        case 9 => {
          val __t = cltvExpiry
          if (__t != 0L) __t else null
        }
        case 10 => routeHints
        case 11 => {
          val __t = paymentAddr
          if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __t else null
        }
        case 12 => {
          val __t = numMsat
          if (__t != 0L) __t else null
        }
        case 13 => features.iterator.map(lnrpc.PayReq._typemapper_features.toBase(_)).toSeq
      }
    }
    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(destination)
        case 2 => _root_.scalapb.descriptors.PString(paymentHash)
        case 3 => _root_.scalapb.descriptors.PLong(numSatoshis)
        case 4 => _root_.scalapb.descriptors.PLong(timestamp)
        case 5 => _root_.scalapb.descriptors.PLong(expiry)
        case 6 => _root_.scalapb.descriptors.PString(description)
        case 7 => _root_.scalapb.descriptors.PString(descriptionHash)
        case 8 => _root_.scalapb.descriptors.PString(fallbackAddr)
        case 9 => _root_.scalapb.descriptors.PLong(cltvExpiry)
        case 10 => _root_.scalapb.descriptors.PRepeated(routeHints.iterator.map(_.toPMessage).toVector)
        case 11 => _root_.scalapb.descriptors.PByteString(paymentAddr)
        case 12 => _root_.scalapb.descriptors.PLong(numMsat)
        case 13 => _root_.scalapb.descriptors.PRepeated(features.iterator.map(lnrpc.PayReq._typemapper_features.toBase(_).toPMessage).toVector)
      }
    }
    def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
    def companion: lnrpc.PayReq.type = lnrpc.PayReq
    // @@protoc_insertion_point(GeneratedMessage[lnrpc.PayReq])
}

object PayReq extends scalapb.GeneratedMessageCompanion[lnrpc.PayReq] {
  implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.PayReq] = this
  def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.PayReq = {
    var __destination: _root_.scala.Predef.String = ""
    var __paymentHash: _root_.scala.Predef.String = ""
    var __numSatoshis: _root_.scala.Long = 0L
    var __timestamp: _root_.scala.Long = 0L
    var __expiry: _root_.scala.Long = 0L
    var __description: _root_.scala.Predef.String = ""
    var __descriptionHash: _root_.scala.Predef.String = ""
    var __fallbackAddr: _root_.scala.Predef.String = ""
    var __cltvExpiry: _root_.scala.Long = 0L
    val __routeHints: _root_.scala.collection.immutable.VectorBuilder[lnrpc.RouteHint] = new _root_.scala.collection.immutable.VectorBuilder[lnrpc.RouteHint]
    var __paymentAddr: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
    var __numMsat: _root_.scala.Long = 0L
    val __features: _root_.scala.collection.mutable.Builder[(org.bitcoins.core.number.UInt32, lnrpc.Feature), _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt32, lnrpc.Feature]] = _root_.scala.collection.immutable.Map.newBuilder[org.bitcoins.core.number.UInt32, lnrpc.Feature]
    var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
    var _done__ = false
    while (!_done__) {
      val _tag__ = _input__.readTag()
      _tag__ match {
        case 0 => _done__ = true
        case 10 =>
          __destination = _input__.readStringRequireUtf8()
        case 18 =>
          __paymentHash = _input__.readStringRequireUtf8()
        case 24 =>
          __numSatoshis = _input__.readInt64()
        case 32 =>
          __timestamp = _input__.readInt64()
        case 40 =>
          __expiry = _input__.readInt64()
        case 50 =>
          __description = _input__.readStringRequireUtf8()
        case 58 =>
          __descriptionHash = _input__.readStringRequireUtf8()
        case 66 =>
          __fallbackAddr = _input__.readStringRequireUtf8()
        case 72 =>
          __cltvExpiry = _input__.readInt64()
        case 82 =>
          __routeHints += _root_.scalapb.LiteParser.readMessage[lnrpc.RouteHint](_input__)
        case 90 =>
          __paymentAddr = _input__.readBytes()
        case 96 =>
          __numMsat = _input__.readInt64()
        case 106 =>
          __features += lnrpc.PayReq._typemapper_features.toCustom(_root_.scalapb.LiteParser.readMessage[lnrpc.PayReq.FeaturesEntry](_input__))
        case tag =>
          if (_unknownFields__ == null) {
            _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
          }
          _unknownFields__.parseField(tag, _input__)
      }
    }
    lnrpc.PayReq(
        destination = __destination,
        paymentHash = __paymentHash,
        numSatoshis = __numSatoshis,
        timestamp = __timestamp,
        expiry = __expiry,
        description = __description,
        descriptionHash = __descriptionHash,
        fallbackAddr = __fallbackAddr,
        cltvExpiry = __cltvExpiry,
        routeHints = __routeHints.result(),
        paymentAddr = __paymentAddr,
        numMsat = __numMsat,
        features = __features.result(),
        unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
    )
  }
  implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.PayReq] = _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.PayReq(
        destination = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
        paymentHash = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
        numSatoshis = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
        timestamp = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
        expiry = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
        description = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
        descriptionHash = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
        fallbackAddr = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
        cltvExpiry = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
        routeHints = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Seq[lnrpc.RouteHint]]).getOrElse(_root_.scala.Seq.empty),
        paymentAddr = __fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY),
        numMsat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
        features = __fieldsMap.get(scalaDescriptor.findFieldByNumber(13).get).map(_.as[_root_.scala.Seq[lnrpc.PayReq.FeaturesEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(lnrpc.PayReq._typemapper_features.toCustom(_)).toMap
      )
    case _ => throw new RuntimeException("Expected PMessage")
  }
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LightningProto.javaDescriptor.getMessageTypes().get(149)
  def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LightningProto.scalaDescriptor.messages(149)
  def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
    var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
    (__number: @_root_.scala.unchecked) match {
      case 10 => __out = lnrpc.RouteHint
      case 13 => __out = lnrpc.PayReq.FeaturesEntry
    }
    __out
  }
  lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
    Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
      _root_.lnrpc.PayReq.FeaturesEntry
    )
  def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
  lazy val defaultInstance = lnrpc.PayReq(
    destination = "",
    paymentHash = "",
    numSatoshis = 0L,
    timestamp = 0L,
    expiry = 0L,
    description = "",
    descriptionHash = "",
    fallbackAddr = "",
    cltvExpiry = 0L,
    routeHints = _root_.scala.Seq.empty,
    paymentAddr = _root_.com.google.protobuf.ByteString.EMPTY,
    numMsat = 0L,
    features = _root_.scala.collection.immutable.Map.empty
  )
  @SerialVersionUID(0L)
  final case class FeaturesEntry(
      key: org.bitcoins.core.number.UInt32 = lnrpc.PayReq.FeaturesEntry._typemapper_key.toCustom(0),
      value: _root_.scala.Option[lnrpc.Feature] = _root_.scala.None,
      unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
      ) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[FeaturesEntry] {
      @transient
      private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
      private[this] def __computeSerializedSize(): _root_.scala.Int = {
        var __size = 0
        
        {
          val __value = lnrpc.PayReq.FeaturesEntry._typemapper_key.toBase(key)
          if (__value != 0) {
            __size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(1, __value)
          }
        };
        if (value.isDefined) {
          val __value = value.get
          __size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
        };
        __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 = lnrpc.PayReq.FeaturesEntry._typemapper_key.toBase(key)
          if (__v != 0) {
            _output__.writeUInt32(1, __v)
          }
        };
        value.foreach { __v =>
          val __m = __v
          _output__.writeTag(2, 2)
          _output__.writeUInt32NoTag(__m.serializedSize)
          __m.writeTo(_output__)
        };
        unknownFields.writeTo(_output__)
      }
      def withKey(__v: org.bitcoins.core.number.UInt32): FeaturesEntry = copy(key = __v)
      def getValue: lnrpc.Feature = value.getOrElse(lnrpc.Feature.defaultInstance)
      def clearValue: FeaturesEntry = copy(value = _root_.scala.None)
      def withValue(__v: lnrpc.Feature): FeaturesEntry = copy(value = Option(__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 = lnrpc.PayReq.FeaturesEntry._typemapper_key.toBase(key)
            if (__t != 0) __t else null
          }
          case 2 => value.orNull
        }
      }
      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.PInt(lnrpc.PayReq.FeaturesEntry._typemapper_key.toBase(key))
          case 2 => value.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
        }
      }
      def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
      def companion: lnrpc.PayReq.FeaturesEntry.type = lnrpc.PayReq.FeaturesEntry
      // @@protoc_insertion_point(GeneratedMessage[lnrpc.PayReq.FeaturesEntry])
  }
  
  object FeaturesEntry extends scalapb.GeneratedMessageCompanion[lnrpc.PayReq.FeaturesEntry] {
    implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.PayReq.FeaturesEntry] = this
    def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.PayReq.FeaturesEntry = {
      var __key: _root_.scala.Int = 0
      var __value: _root_.scala.Option[lnrpc.Feature] = _root_.scala.None
      var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
      var _done__ = false
      while (!_done__) {
        val _tag__ = _input__.readTag()
        _tag__ match {
          case 0 => _done__ = true
          case 8 =>
            __key = _input__.readUInt32()
          case 18 =>
            __value = Option(__value.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.Feature](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
          case tag =>
            if (_unknownFields__ == null) {
              _unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
            }
            _unknownFields__.parseField(tag, _input__)
        }
      }
      lnrpc.PayReq.FeaturesEntry(
          key = lnrpc.PayReq.FeaturesEntry._typemapper_key.toCustom(__key),
          value = __value,
          unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
      )
    }
    implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.PayReq.FeaturesEntry] = _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.PayReq.FeaturesEntry(
          key = lnrpc.PayReq.FeaturesEntry._typemapper_key.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
          value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).flatMap(_.as[_root_.scala.Option[lnrpc.Feature]])
        )
      case _ => throw new RuntimeException("Expected PMessage")
    }
    def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = lnrpc.PayReq.javaDescriptor.getNestedTypes().get(0)
    def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = lnrpc.PayReq.scalaDescriptor.nestedMessages(0)
    def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
      var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
      (__number: @_root_.scala.unchecked) match {
        case 2 => __out = lnrpc.Feature
      }
      __out
    }
    lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
    def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
    lazy val defaultInstance = lnrpc.PayReq.FeaturesEntry(
      key = lnrpc.PayReq.FeaturesEntry._typemapper_key.toCustom(0),
      value = _root_.scala.None
    )
    implicit class FeaturesEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PayReq.FeaturesEntry]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.PayReq.FeaturesEntry](_l) {
      def key: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.key)((c_, f_) => c_.copy(key = f_))
      def value: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.Feature] = field(_.getValue)((c_, f_) => c_.copy(value = Option(f_)))
      def optionalValue: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[lnrpc.Feature]] = field(_.value)((c_, f_) => c_.copy(value = f_))
    }
    final val KEY_FIELD_NUMBER = 1
    final val VALUE_FIELD_NUMBER = 2
    @transient
    private[lnrpc] val _typemapper_key: _root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32]]
    @transient
    implicit val keyValueMapper: _root_.scalapb.TypeMapper[lnrpc.PayReq.FeaturesEntry, (org.bitcoins.core.number.UInt32, lnrpc.Feature)] =
      _root_.scalapb.TypeMapper[lnrpc.PayReq.FeaturesEntry, (org.bitcoins.core.number.UInt32, lnrpc.Feature)](__m => (__m.key, __m.getValue))(__p => lnrpc.PayReq.FeaturesEntry(__p._1, Some(__p._2)))
    def of(
      key: org.bitcoins.core.number.UInt32,
      value: _root_.scala.Option[lnrpc.Feature]
    ): _root_.lnrpc.PayReq.FeaturesEntry = _root_.lnrpc.PayReq.FeaturesEntry(
      key,
      value
    )
    // @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.PayReq.FeaturesEntry])
  }
  
  implicit class PayReqLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.PayReq]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.PayReq](_l) {
    def destination: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.destination)((c_, f_) => c_.copy(destination = f_))
    def paymentHash: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.paymentHash)((c_, f_) => c_.copy(paymentHash = f_))
    def numSatoshis: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.numSatoshis)((c_, f_) => c_.copy(numSatoshis = f_))
    def timestamp: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.timestamp)((c_, f_) => c_.copy(timestamp = f_))
    def expiry: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.expiry)((c_, f_) => c_.copy(expiry = f_))
    def description: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.description)((c_, f_) => c_.copy(description = f_))
    def descriptionHash: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.descriptionHash)((c_, f_) => c_.copy(descriptionHash = f_))
    def fallbackAddr: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.fallbackAddr)((c_, f_) => c_.copy(fallbackAddr = f_))
    def cltvExpiry: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.cltvExpiry)((c_, f_) => c_.copy(cltvExpiry = f_))
    def routeHints: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Seq[lnrpc.RouteHint]] = field(_.routeHints)((c_, f_) => c_.copy(routeHints = f_))
    def paymentAddr: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = field(_.paymentAddr)((c_, f_) => c_.copy(paymentAddr = f_))
    def numMsat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.numMsat)((c_, f_) => c_.copy(numMsat = f_))
    def features: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt32, lnrpc.Feature]] = field(_.features)((c_, f_) => c_.copy(features = f_))
  }
  final val DESTINATION_FIELD_NUMBER = 1
  final val PAYMENT_HASH_FIELD_NUMBER = 2
  final val NUM_SATOSHIS_FIELD_NUMBER = 3
  final val TIMESTAMP_FIELD_NUMBER = 4
  final val EXPIRY_FIELD_NUMBER = 5
  final val DESCRIPTION_FIELD_NUMBER = 6
  final val DESCRIPTION_HASH_FIELD_NUMBER = 7
  final val FALLBACK_ADDR_FIELD_NUMBER = 8
  final val CLTV_EXPIRY_FIELD_NUMBER = 9
  final val ROUTE_HINTS_FIELD_NUMBER = 10
  final val PAYMENT_ADDR_FIELD_NUMBER = 11
  final val NUM_MSAT_FIELD_NUMBER = 12
  final val FEATURES_FIELD_NUMBER = 13
  @transient
  private[lnrpc] val _typemapper_features: _root_.scalapb.TypeMapper[lnrpc.PayReq.FeaturesEntry, (org.bitcoins.core.number.UInt32, lnrpc.Feature)] = implicitly[_root_.scalapb.TypeMapper[lnrpc.PayReq.FeaturesEntry, (org.bitcoins.core.number.UInt32, lnrpc.Feature)]]
  def of(
    destination: _root_.scala.Predef.String,
    paymentHash: _root_.scala.Predef.String,
    numSatoshis: _root_.scala.Long,
    timestamp: _root_.scala.Long,
    expiry: _root_.scala.Long,
    description: _root_.scala.Predef.String,
    descriptionHash: _root_.scala.Predef.String,
    fallbackAddr: _root_.scala.Predef.String,
    cltvExpiry: _root_.scala.Long,
    routeHints: _root_.scala.Seq[lnrpc.RouteHint],
    paymentAddr: _root_.com.google.protobuf.ByteString,
    numMsat: _root_.scala.Long,
    features: _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt32, lnrpc.Feature]
  ): _root_.lnrpc.PayReq = _root_.lnrpc.PayReq(
    destination,
    paymentHash,
    numSatoshis,
    timestamp,
    expiry,
    description,
    descriptionHash,
    fallbackAddr,
    cltvExpiry,
    routeHints,
    paymentAddr,
    numMsat,
    features
  )
  // @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.PayReq])
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy