lnrpc.RoutingPolicy.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 customRecords
* Custom channel update tlv records.
*/
@SerialVersionUID(0L)
final case class RoutingPolicy(
timeLockDelta: org.bitcoins.core.number.UInt32 = lnrpc.RoutingPolicy._typemapper_timeLockDelta.toCustom(0),
minHtlc: _root_.scala.Long = 0L,
feeBaseMsat: _root_.scala.Long = 0L,
feeRateMilliMsat: _root_.scala.Long = 0L,
disabled: _root_.scala.Boolean = false,
maxHtlcMsat: org.bitcoins.core.number.UInt64 = lnrpc.RoutingPolicy._typemapper_maxHtlcMsat.toCustom(0L),
lastUpdate: org.bitcoins.core.number.UInt32 = lnrpc.RoutingPolicy._typemapper_lastUpdate.toCustom(0),
customRecords: _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString] = _root_.scala.collection.immutable.Map.empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[RoutingPolicy] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = lnrpc.RoutingPolicy._typemapper_timeLockDelta.toBase(timeLockDelta)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(1, __value)
}
};
{
val __value = minHtlc
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(2, __value)
}
};
{
val __value = feeBaseMsat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(3, __value)
}
};
{
val __value = feeRateMilliMsat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(4, __value)
}
};
{
val __value = disabled
if (__value != false) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBoolSize(5, __value)
}
};
{
val __value = lnrpc.RoutingPolicy._typemapper_maxHtlcMsat.toBase(maxHtlcMsat)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(6, __value)
}
};
{
val __value = lnrpc.RoutingPolicy._typemapper_lastUpdate.toBase(lastUpdate)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(7, __value)
}
};
customRecords.foreach { __item =>
val __value = lnrpc.RoutingPolicy._typemapper_customRecords.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 = lnrpc.RoutingPolicy._typemapper_timeLockDelta.toBase(timeLockDelta)
if (__v != 0) {
_output__.writeUInt32(1, __v)
}
};
{
val __v = minHtlc
if (__v != 0L) {
_output__.writeInt64(2, __v)
}
};
{
val __v = feeBaseMsat
if (__v != 0L) {
_output__.writeInt64(3, __v)
}
};
{
val __v = feeRateMilliMsat
if (__v != 0L) {
_output__.writeInt64(4, __v)
}
};
{
val __v = disabled
if (__v != false) {
_output__.writeBool(5, __v)
}
};
{
val __v = lnrpc.RoutingPolicy._typemapper_maxHtlcMsat.toBase(maxHtlcMsat)
if (__v != 0L) {
_output__.writeUInt64(6, __v)
}
};
{
val __v = lnrpc.RoutingPolicy._typemapper_lastUpdate.toBase(lastUpdate)
if (__v != 0) {
_output__.writeUInt32(7, __v)
}
};
customRecords.foreach { __v =>
val __m = lnrpc.RoutingPolicy._typemapper_customRecords.toBase(__v)
_output__.writeTag(8, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withTimeLockDelta(__v: org.bitcoins.core.number.UInt32): RoutingPolicy = copy(timeLockDelta = __v)
def withMinHtlc(__v: _root_.scala.Long): RoutingPolicy = copy(minHtlc = __v)
def withFeeBaseMsat(__v: _root_.scala.Long): RoutingPolicy = copy(feeBaseMsat = __v)
def withFeeRateMilliMsat(__v: _root_.scala.Long): RoutingPolicy = copy(feeRateMilliMsat = __v)
def withDisabled(__v: _root_.scala.Boolean): RoutingPolicy = copy(disabled = __v)
def withMaxHtlcMsat(__v: org.bitcoins.core.number.UInt64): RoutingPolicy = copy(maxHtlcMsat = __v)
def withLastUpdate(__v: org.bitcoins.core.number.UInt32): RoutingPolicy = copy(lastUpdate = __v)
def clearCustomRecords = copy(customRecords = _root_.scala.collection.immutable.Map.empty)
def addCustomRecords(__vs: (org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString) *): RoutingPolicy = addAllCustomRecords(__vs)
def addAllCustomRecords(__vs: Iterable[(org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString)]): RoutingPolicy = copy(customRecords = customRecords ++ __vs)
def withCustomRecords(__v: _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString]): RoutingPolicy = copy(customRecords = __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.RoutingPolicy._typemapper_timeLockDelta.toBase(timeLockDelta)
if (__t != 0) __t else null
}
case 2 => {
val __t = minHtlc
if (__t != 0L) __t else null
}
case 3 => {
val __t = feeBaseMsat
if (__t != 0L) __t else null
}
case 4 => {
val __t = feeRateMilliMsat
if (__t != 0L) __t else null
}
case 5 => {
val __t = disabled
if (__t != false) __t else null
}
case 6 => {
val __t = lnrpc.RoutingPolicy._typemapper_maxHtlcMsat.toBase(maxHtlcMsat)
if (__t != 0L) __t else null
}
case 7 => {
val __t = lnrpc.RoutingPolicy._typemapper_lastUpdate.toBase(lastUpdate)
if (__t != 0) __t else null
}
case 8 => customRecords.iterator.map(lnrpc.RoutingPolicy._typemapper_customRecords.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.PInt(lnrpc.RoutingPolicy._typemapper_timeLockDelta.toBase(timeLockDelta))
case 2 => _root_.scalapb.descriptors.PLong(minHtlc)
case 3 => _root_.scalapb.descriptors.PLong(feeBaseMsat)
case 4 => _root_.scalapb.descriptors.PLong(feeRateMilliMsat)
case 5 => _root_.scalapb.descriptors.PBoolean(disabled)
case 6 => _root_.scalapb.descriptors.PLong(lnrpc.RoutingPolicy._typemapper_maxHtlcMsat.toBase(maxHtlcMsat))
case 7 => _root_.scalapb.descriptors.PInt(lnrpc.RoutingPolicy._typemapper_lastUpdate.toBase(lastUpdate))
case 8 => _root_.scalapb.descriptors.PRepeated(customRecords.iterator.map(lnrpc.RoutingPolicy._typemapper_customRecords.toBase(_).toPMessage).toVector)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: lnrpc.RoutingPolicy.type = lnrpc.RoutingPolicy
// @@protoc_insertion_point(GeneratedMessage[lnrpc.RoutingPolicy])
}
object RoutingPolicy extends scalapb.GeneratedMessageCompanion[lnrpc.RoutingPolicy] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.RoutingPolicy] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.RoutingPolicy = {
var __timeLockDelta: _root_.scala.Int = 0
var __minHtlc: _root_.scala.Long = 0L
var __feeBaseMsat: _root_.scala.Long = 0L
var __feeRateMilliMsat: _root_.scala.Long = 0L
var __disabled: _root_.scala.Boolean = false
var __maxHtlcMsat: _root_.scala.Long = 0L
var __lastUpdate: _root_.scala.Int = 0
val __customRecords: _root_.scala.collection.mutable.Builder[(org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString), _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString]] = _root_.scala.collection.immutable.Map.newBuilder[org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString]
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 8 =>
__timeLockDelta = _input__.readUInt32()
case 16 =>
__minHtlc = _input__.readInt64()
case 24 =>
__feeBaseMsat = _input__.readInt64()
case 32 =>
__feeRateMilliMsat = _input__.readInt64()
case 40 =>
__disabled = _input__.readBool()
case 48 =>
__maxHtlcMsat = _input__.readUInt64()
case 56 =>
__lastUpdate = _input__.readUInt32()
case 66 =>
__customRecords += lnrpc.RoutingPolicy._typemapper_customRecords.toCustom(_root_.scalapb.LiteParser.readMessage[lnrpc.RoutingPolicy.CustomRecordsEntry](_input__))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
lnrpc.RoutingPolicy(
timeLockDelta = lnrpc.RoutingPolicy._typemapper_timeLockDelta.toCustom(__timeLockDelta),
minHtlc = __minHtlc,
feeBaseMsat = __feeBaseMsat,
feeRateMilliMsat = __feeRateMilliMsat,
disabled = __disabled,
maxHtlcMsat = lnrpc.RoutingPolicy._typemapper_maxHtlcMsat.toCustom(__maxHtlcMsat),
lastUpdate = lnrpc.RoutingPolicy._typemapper_lastUpdate.toCustom(__lastUpdate),
customRecords = __customRecords.result(),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.RoutingPolicy] = _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.RoutingPolicy(
timeLockDelta = lnrpc.RoutingPolicy._typemapper_timeLockDelta.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
minHtlc = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
feeBaseMsat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
feeRateMilliMsat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
disabled = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Boolean]).getOrElse(false),
maxHtlcMsat = lnrpc.RoutingPolicy._typemapper_maxHtlcMsat.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
lastUpdate = lnrpc.RoutingPolicy._typemapper_lastUpdate.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
customRecords = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Seq[lnrpc.RoutingPolicy.CustomRecordsEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(lnrpc.RoutingPolicy._typemapper_customRecords.toCustom(_)).toMap
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LightningProto.javaDescriptor.getMessageTypes().get(107)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LightningProto.scalaDescriptor.messages(107)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 8 => __out = lnrpc.RoutingPolicy.CustomRecordsEntry
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.lnrpc.RoutingPolicy.CustomRecordsEntry
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = lnrpc.RoutingPolicy(
timeLockDelta = lnrpc.RoutingPolicy._typemapper_timeLockDelta.toCustom(0),
minHtlc = 0L,
feeBaseMsat = 0L,
feeRateMilliMsat = 0L,
disabled = false,
maxHtlcMsat = lnrpc.RoutingPolicy._typemapper_maxHtlcMsat.toCustom(0L),
lastUpdate = lnrpc.RoutingPolicy._typemapper_lastUpdate.toCustom(0),
customRecords = _root_.scala.collection.immutable.Map.empty
)
@SerialVersionUID(0L)
final case class CustomRecordsEntry(
key: org.bitcoins.core.number.UInt64 = lnrpc.RoutingPolicy.CustomRecordsEntry._typemapper_key.toCustom(0L),
value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[CustomRecordsEntry] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = lnrpc.RoutingPolicy.CustomRecordsEntry._typemapper_key.toBase(key)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(1, __value)
}
};
{
val __value = value
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeBytesSize(2, __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 = lnrpc.RoutingPolicy.CustomRecordsEntry._typemapper_key.toBase(key)
if (__v != 0L) {
_output__.writeUInt64(1, __v)
}
};
{
val __v = value
if (!__v.isEmpty) {
_output__.writeBytes(2, __v)
}
};
unknownFields.writeTo(_output__)
}
def withKey(__v: org.bitcoins.core.number.UInt64): CustomRecordsEntry = copy(key = __v)
def withValue(__v: _root_.com.google.protobuf.ByteString): CustomRecordsEntry = copy(value = __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.RoutingPolicy.CustomRecordsEntry._typemapper_key.toBase(key)
if (__t != 0L) __t else null
}
case 2 => {
val __t = value
if (__t != _root_.com.google.protobuf.ByteString.EMPTY) __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.PLong(lnrpc.RoutingPolicy.CustomRecordsEntry._typemapper_key.toBase(key))
case 2 => _root_.scalapb.descriptors.PByteString(value)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: lnrpc.RoutingPolicy.CustomRecordsEntry.type = lnrpc.RoutingPolicy.CustomRecordsEntry
// @@protoc_insertion_point(GeneratedMessage[lnrpc.RoutingPolicy.CustomRecordsEntry])
}
object CustomRecordsEntry extends scalapb.GeneratedMessageCompanion[lnrpc.RoutingPolicy.CustomRecordsEntry] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.RoutingPolicy.CustomRecordsEntry] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.RoutingPolicy.CustomRecordsEntry = {
var __key: _root_.scala.Long = 0L
var __value: _root_.com.google.protobuf.ByteString = _root_.com.google.protobuf.ByteString.EMPTY
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__.readUInt64()
case 18 =>
__value = _input__.readBytes()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
lnrpc.RoutingPolicy.CustomRecordsEntry(
key = lnrpc.RoutingPolicy.CustomRecordsEntry._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.RoutingPolicy.CustomRecordsEntry] = _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.RoutingPolicy.CustomRecordsEntry(
key = lnrpc.RoutingPolicy.CustomRecordsEntry._typemapper_key.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
value = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.com.google.protobuf.ByteString]).getOrElse(_root_.com.google.protobuf.ByteString.EMPTY)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = lnrpc.RoutingPolicy.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = lnrpc.RoutingPolicy.scalaDescriptor.nestedMessages(0)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = throw new MatchError(__number)
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.RoutingPolicy.CustomRecordsEntry(
key = lnrpc.RoutingPolicy.CustomRecordsEntry._typemapper_key.toCustom(0L),
value = _root_.com.google.protobuf.ByteString.EMPTY
)
implicit class CustomRecordsEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.RoutingPolicy.CustomRecordsEntry]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.RoutingPolicy.CustomRecordsEntry](_l) {
def key: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.key)((c_, f_) => c_.copy(key = f_))
def value: _root_.scalapb.lenses.Lens[UpperPB, _root_.com.google.protobuf.ByteString] = 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.Long, org.bitcoins.core.number.UInt64] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64]]
@transient
implicit val keyValueMapper: _root_.scalapb.TypeMapper[lnrpc.RoutingPolicy.CustomRecordsEntry, (org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString)] =
_root_.scalapb.TypeMapper[lnrpc.RoutingPolicy.CustomRecordsEntry, (org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString)](__m => (__m.key, __m.value))(__p => lnrpc.RoutingPolicy.CustomRecordsEntry(__p._1, __p._2))
def of(
key: org.bitcoins.core.number.UInt64,
value: _root_.com.google.protobuf.ByteString
): _root_.lnrpc.RoutingPolicy.CustomRecordsEntry = _root_.lnrpc.RoutingPolicy.CustomRecordsEntry(
key,
value
)
// @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.RoutingPolicy.CustomRecordsEntry])
}
implicit class RoutingPolicyLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.RoutingPolicy]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.RoutingPolicy](_l) {
def timeLockDelta: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.timeLockDelta)((c_, f_) => c_.copy(timeLockDelta = f_))
def minHtlc: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.minHtlc)((c_, f_) => c_.copy(minHtlc = f_))
def feeBaseMsat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.feeBaseMsat)((c_, f_) => c_.copy(feeBaseMsat = f_))
def feeRateMilliMsat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.feeRateMilliMsat)((c_, f_) => c_.copy(feeRateMilliMsat = f_))
def disabled: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Boolean] = field(_.disabled)((c_, f_) => c_.copy(disabled = f_))
def maxHtlcMsat: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.maxHtlcMsat)((c_, f_) => c_.copy(maxHtlcMsat = f_))
def lastUpdate: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.lastUpdate)((c_, f_) => c_.copy(lastUpdate = f_))
def customRecords: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString]] = field(_.customRecords)((c_, f_) => c_.copy(customRecords = f_))
}
final val TIME_LOCK_DELTA_FIELD_NUMBER = 1
final val MIN_HTLC_FIELD_NUMBER = 2
final val FEE_BASE_MSAT_FIELD_NUMBER = 3
final val FEE_RATE_MILLI_MSAT_FIELD_NUMBER = 4
final val DISABLED_FIELD_NUMBER = 5
final val MAX_HTLC_MSAT_FIELD_NUMBER = 6
final val LAST_UPDATE_FIELD_NUMBER = 7
final val CUSTOM_RECORDS_FIELD_NUMBER = 8
@transient
private[lnrpc] val _typemapper_timeLockDelta: _root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32]]
@transient
private[lnrpc] val _typemapper_maxHtlcMsat: _root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Long, org.bitcoins.core.number.UInt64]]
@transient
private[lnrpc] val _typemapper_lastUpdate: _root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32]]
@transient
private[lnrpc] val _typemapper_customRecords: _root_.scalapb.TypeMapper[lnrpc.RoutingPolicy.CustomRecordsEntry, (org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString)] = implicitly[_root_.scalapb.TypeMapper[lnrpc.RoutingPolicy.CustomRecordsEntry, (org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString)]]
def of(
timeLockDelta: org.bitcoins.core.number.UInt32,
minHtlc: _root_.scala.Long,
feeBaseMsat: _root_.scala.Long,
feeRateMilliMsat: _root_.scala.Long,
disabled: _root_.scala.Boolean,
maxHtlcMsat: org.bitcoins.core.number.UInt64,
lastUpdate: org.bitcoins.core.number.UInt32,
customRecords: _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString]
): _root_.lnrpc.RoutingPolicy = _root_.lnrpc.RoutingPolicy(
timeLockDelta,
minHtlc,
feeBaseMsat,
feeRateMilliMsat,
disabled,
maxHtlcMsat,
lastUpdate,
customRecords
)
// @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.RoutingPolicy])
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy