lnrpc.ChannelEdge.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._
/**
* A fully authenticated channel along with all its unique attributes.
* Once an authenticated channel announcement has been processed on the network,
* then an instance of ChannelEdgeInfo encapsulating the channels attributes is
* stored. The other portions relevant to routing policy of a channel are stored
* within a ChannelEdgePolicy for each direction of the channel.
*
* @param channelId
*
* The unique channel ID for the channel. The first 3 bytes are the block
* height, the next 3 the index within the block, and the last 2 bytes are the
* output index for the channel.
* @param customRecords
* Custom channel announcement tlv records.
*/
@SerialVersionUID(0L)
final case class ChannelEdge(
channelId: org.bitcoins.core.number.UInt64 = lnrpc.ChannelEdge._typemapper_channelId.toCustom(0L),
chanPoint: _root_.scala.Predef.String = "",
@scala.deprecated(message="Marked as deprecated in proto file", "") lastUpdate: org.bitcoins.core.number.UInt32 = lnrpc.ChannelEdge._typemapper_lastUpdate.toCustom(0),
node1Pub: _root_.scala.Predef.String = "",
node2Pub: _root_.scala.Predef.String = "",
capacity: _root_.scala.Long = 0L,
node1Policy: _root_.scala.Option[lnrpc.RoutingPolicy] = _root_.scala.None,
node2Policy: _root_.scala.Option[lnrpc.RoutingPolicy] = _root_.scala.None,
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[ChannelEdge] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = lnrpc.ChannelEdge._typemapper_channelId.toBase(channelId)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(1, __value)
}
};
{
val __value = chanPoint
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(2, __value)
}
};
{
val __value = lnrpc.ChannelEdge._typemapper_lastUpdate.toBase(lastUpdate)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(3, __value)
}
};
{
val __value = node1Pub
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(4, __value)
}
};
{
val __value = node2Pub
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(5, __value)
}
};
{
val __value = capacity
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(6, __value)
}
};
if (node1Policy.isDefined) {
val __value = node1Policy.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (node2Policy.isDefined) {
val __value = node2Policy.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
customRecords.foreach { __item =>
val __value = lnrpc.ChannelEdge._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.ChannelEdge._typemapper_channelId.toBase(channelId)
if (__v != 0L) {
_output__.writeUInt64(1, __v)
}
};
{
val __v = chanPoint
if (!__v.isEmpty) {
_output__.writeString(2, __v)
}
};
{
val __v = lnrpc.ChannelEdge._typemapper_lastUpdate.toBase(lastUpdate)
if (__v != 0) {
_output__.writeUInt32(3, __v)
}
};
{
val __v = node1Pub
if (!__v.isEmpty) {
_output__.writeString(4, __v)
}
};
{
val __v = node2Pub
if (!__v.isEmpty) {
_output__.writeString(5, __v)
}
};
{
val __v = capacity
if (__v != 0L) {
_output__.writeInt64(6, __v)
}
};
node1Policy.foreach { __v =>
val __m = __v
_output__.writeTag(7, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
node2Policy.foreach { __v =>
val __m = __v
_output__.writeTag(8, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
customRecords.foreach { __v =>
val __m = lnrpc.ChannelEdge._typemapper_customRecords.toBase(__v)
_output__.writeTag(9, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withChannelId(__v: org.bitcoins.core.number.UInt64): ChannelEdge = copy(channelId = __v)
def withChanPoint(__v: _root_.scala.Predef.String): ChannelEdge = copy(chanPoint = __v)
def withLastUpdate(__v: org.bitcoins.core.number.UInt32): ChannelEdge = copy(lastUpdate = __v)
def withNode1Pub(__v: _root_.scala.Predef.String): ChannelEdge = copy(node1Pub = __v)
def withNode2Pub(__v: _root_.scala.Predef.String): ChannelEdge = copy(node2Pub = __v)
def withCapacity(__v: _root_.scala.Long): ChannelEdge = copy(capacity = __v)
def getNode1Policy: lnrpc.RoutingPolicy = node1Policy.getOrElse(lnrpc.RoutingPolicy.defaultInstance)
def clearNode1Policy: ChannelEdge = copy(node1Policy = _root_.scala.None)
def withNode1Policy(__v: lnrpc.RoutingPolicy): ChannelEdge = copy(node1Policy = Option(__v))
def getNode2Policy: lnrpc.RoutingPolicy = node2Policy.getOrElse(lnrpc.RoutingPolicy.defaultInstance)
def clearNode2Policy: ChannelEdge = copy(node2Policy = _root_.scala.None)
def withNode2Policy(__v: lnrpc.RoutingPolicy): ChannelEdge = copy(node2Policy = Option(__v))
def clearCustomRecords = copy(customRecords = _root_.scala.collection.immutable.Map.empty)
def addCustomRecords(__vs: (org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString) *): ChannelEdge = addAllCustomRecords(__vs)
def addAllCustomRecords(__vs: Iterable[(org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString)]): ChannelEdge = copy(customRecords = customRecords ++ __vs)
def withCustomRecords(__v: _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString]): ChannelEdge = 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.ChannelEdge._typemapper_channelId.toBase(channelId)
if (__t != 0L) __t else null
}
case 2 => {
val __t = chanPoint
if (__t != "") __t else null
}
case 3 => {
val __t = lnrpc.ChannelEdge._typemapper_lastUpdate.toBase(lastUpdate)
if (__t != 0) __t else null
}
case 4 => {
val __t = node1Pub
if (__t != "") __t else null
}
case 5 => {
val __t = node2Pub
if (__t != "") __t else null
}
case 6 => {
val __t = capacity
if (__t != 0L) __t else null
}
case 7 => node1Policy.orNull
case 8 => node2Policy.orNull
case 9 => customRecords.iterator.map(lnrpc.ChannelEdge._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.PLong(lnrpc.ChannelEdge._typemapper_channelId.toBase(channelId))
case 2 => _root_.scalapb.descriptors.PString(chanPoint)
case 3 => _root_.scalapb.descriptors.PInt(lnrpc.ChannelEdge._typemapper_lastUpdate.toBase(lastUpdate))
case 4 => _root_.scalapb.descriptors.PString(node1Pub)
case 5 => _root_.scalapb.descriptors.PString(node2Pub)
case 6 => _root_.scalapb.descriptors.PLong(capacity)
case 7 => node1Policy.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 8 => node2Policy.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 9 => _root_.scalapb.descriptors.PRepeated(customRecords.iterator.map(lnrpc.ChannelEdge._typemapper_customRecords.toBase(_).toPMessage).toVector)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: lnrpc.ChannelEdge.type = lnrpc.ChannelEdge
// @@protoc_insertion_point(GeneratedMessage[lnrpc.ChannelEdge])
}
object ChannelEdge extends scalapb.GeneratedMessageCompanion[lnrpc.ChannelEdge] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.ChannelEdge] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.ChannelEdge = {
var __channelId: _root_.scala.Long = 0L
var __chanPoint: _root_.scala.Predef.String = ""
var __lastUpdate: _root_.scala.Int = 0
var __node1Pub: _root_.scala.Predef.String = ""
var __node2Pub: _root_.scala.Predef.String = ""
var __capacity: _root_.scala.Long = 0L
var __node1Policy: _root_.scala.Option[lnrpc.RoutingPolicy] = _root_.scala.None
var __node2Policy: _root_.scala.Option[lnrpc.RoutingPolicy] = _root_.scala.None
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 =>
__channelId = _input__.readUInt64()
case 18 =>
__chanPoint = _input__.readStringRequireUtf8()
case 24 =>
__lastUpdate = _input__.readUInt32()
case 34 =>
__node1Pub = _input__.readStringRequireUtf8()
case 42 =>
__node2Pub = _input__.readStringRequireUtf8()
case 48 =>
__capacity = _input__.readInt64()
case 58 =>
__node1Policy = Option(__node1Policy.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.RoutingPolicy](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 66 =>
__node2Policy = Option(__node2Policy.fold(_root_.scalapb.LiteParser.readMessage[lnrpc.RoutingPolicy](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 74 =>
__customRecords += lnrpc.ChannelEdge._typemapper_customRecords.toCustom(_root_.scalapb.LiteParser.readMessage[lnrpc.ChannelEdge.CustomRecordsEntry](_input__))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
lnrpc.ChannelEdge(
channelId = lnrpc.ChannelEdge._typemapper_channelId.toCustom(__channelId),
chanPoint = __chanPoint,
lastUpdate = lnrpc.ChannelEdge._typemapper_lastUpdate.toCustom(__lastUpdate),
node1Pub = __node1Pub,
node2Pub = __node2Pub,
capacity = __capacity,
node1Policy = __node1Policy,
node2Policy = __node2Policy,
customRecords = __customRecords.result(),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.ChannelEdge] = _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.ChannelEdge(
channelId = lnrpc.ChannelEdge._typemapper_channelId.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
chanPoint = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
lastUpdate = lnrpc.ChannelEdge._typemapper_lastUpdate.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
node1Pub = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
node2Pub = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
capacity = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
node1Policy = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[lnrpc.RoutingPolicy]]),
node2Policy = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).flatMap(_.as[_root_.scala.Option[lnrpc.RoutingPolicy]]),
customRecords = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Seq[lnrpc.ChannelEdge.CustomRecordsEntry]]).getOrElse(_root_.scala.Seq.empty).iterator.map(lnrpc.ChannelEdge._typemapper_customRecords.toCustom(_)).toMap
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LightningProto.javaDescriptor.getMessageTypes().get(108)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LightningProto.scalaDescriptor.messages(108)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 7 => __out = lnrpc.RoutingPolicy
case 8 => __out = lnrpc.RoutingPolicy
case 9 => __out = lnrpc.ChannelEdge.CustomRecordsEntry
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] =
Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]](
_root_.lnrpc.ChannelEdge.CustomRecordsEntry
)
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = throw new MatchError(__fieldNumber)
lazy val defaultInstance = lnrpc.ChannelEdge(
channelId = lnrpc.ChannelEdge._typemapper_channelId.toCustom(0L),
chanPoint = "",
lastUpdate = lnrpc.ChannelEdge._typemapper_lastUpdate.toCustom(0),
node1Pub = "",
node2Pub = "",
capacity = 0L,
node1Policy = _root_.scala.None,
node2Policy = _root_.scala.None,
customRecords = _root_.scala.collection.immutable.Map.empty
)
@SerialVersionUID(0L)
final case class CustomRecordsEntry(
key: org.bitcoins.core.number.UInt64 = lnrpc.ChannelEdge.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.ChannelEdge.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.ChannelEdge.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.ChannelEdge.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.ChannelEdge.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.ChannelEdge.CustomRecordsEntry.type = lnrpc.ChannelEdge.CustomRecordsEntry
// @@protoc_insertion_point(GeneratedMessage[lnrpc.ChannelEdge.CustomRecordsEntry])
}
object CustomRecordsEntry extends scalapb.GeneratedMessageCompanion[lnrpc.ChannelEdge.CustomRecordsEntry] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.ChannelEdge.CustomRecordsEntry] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.ChannelEdge.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.ChannelEdge.CustomRecordsEntry(
key = lnrpc.ChannelEdge.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.ChannelEdge.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.ChannelEdge.CustomRecordsEntry(
key = lnrpc.ChannelEdge.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.ChannelEdge.javaDescriptor.getNestedTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = lnrpc.ChannelEdge.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.ChannelEdge.CustomRecordsEntry(
key = lnrpc.ChannelEdge.CustomRecordsEntry._typemapper_key.toCustom(0L),
value = _root_.com.google.protobuf.ByteString.EMPTY
)
implicit class CustomRecordsEntryLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.ChannelEdge.CustomRecordsEntry]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.ChannelEdge.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.ChannelEdge.CustomRecordsEntry, (org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString)] =
_root_.scalapb.TypeMapper[lnrpc.ChannelEdge.CustomRecordsEntry, (org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString)](__m => (__m.key, __m.value))(__p => lnrpc.ChannelEdge.CustomRecordsEntry(__p._1, __p._2))
def of(
key: org.bitcoins.core.number.UInt64,
value: _root_.com.google.protobuf.ByteString
): _root_.lnrpc.ChannelEdge.CustomRecordsEntry = _root_.lnrpc.ChannelEdge.CustomRecordsEntry(
key,
value
)
// @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.ChannelEdge.CustomRecordsEntry])
}
implicit class ChannelEdgeLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.ChannelEdge]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.ChannelEdge](_l) {
def channelId: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.channelId)((c_, f_) => c_.copy(channelId = f_))
def chanPoint: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.chanPoint)((c_, f_) => c_.copy(chanPoint = f_))
def lastUpdate: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.lastUpdate)((c_, f_) => c_.copy(lastUpdate = f_))
def node1Pub: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.node1Pub)((c_, f_) => c_.copy(node1Pub = f_))
def node2Pub: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.node2Pub)((c_, f_) => c_.copy(node2Pub = f_))
def capacity: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.capacity)((c_, f_) => c_.copy(capacity = f_))
def node1Policy: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.RoutingPolicy] = field(_.getNode1Policy)((c_, f_) => c_.copy(node1Policy = Option(f_)))
def optionalNode1Policy: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[lnrpc.RoutingPolicy]] = field(_.node1Policy)((c_, f_) => c_.copy(node1Policy = f_))
def node2Policy: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.RoutingPolicy] = field(_.getNode2Policy)((c_, f_) => c_.copy(node2Policy = Option(f_)))
def optionalNode2Policy: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Option[lnrpc.RoutingPolicy]] = field(_.node2Policy)((c_, f_) => c_.copy(node2Policy = 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 CHANNEL_ID_FIELD_NUMBER = 1
final val CHAN_POINT_FIELD_NUMBER = 2
final val LAST_UPDATE_FIELD_NUMBER = 3
final val NODE1_PUB_FIELD_NUMBER = 4
final val NODE2_PUB_FIELD_NUMBER = 5
final val CAPACITY_FIELD_NUMBER = 6
final val NODE1_POLICY_FIELD_NUMBER = 7
final val NODE2_POLICY_FIELD_NUMBER = 8
final val CUSTOM_RECORDS_FIELD_NUMBER = 9
@transient
private[lnrpc] val _typemapper_channelId: _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.ChannelEdge.CustomRecordsEntry, (org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString)] = implicitly[_root_.scalapb.TypeMapper[lnrpc.ChannelEdge.CustomRecordsEntry, (org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString)]]
def of(
channelId: org.bitcoins.core.number.UInt64,
chanPoint: _root_.scala.Predef.String,
lastUpdate: org.bitcoins.core.number.UInt32,
node1Pub: _root_.scala.Predef.String,
node2Pub: _root_.scala.Predef.String,
capacity: _root_.scala.Long,
node1Policy: _root_.scala.Option[lnrpc.RoutingPolicy],
node2Policy: _root_.scala.Option[lnrpc.RoutingPolicy],
customRecords: _root_.scala.collection.immutable.Map[org.bitcoins.core.number.UInt64, _root_.com.google.protobuf.ByteString]
): _root_.lnrpc.ChannelEdge = _root_.lnrpc.ChannelEdge(
channelId,
chanPoint,
lastUpdate,
node1Pub,
node2Pub,
capacity,
node1Policy,
node2Policy,
customRecords
)
// @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.ChannelEdge])
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy