lnrpc.NetworkInfo.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 numZombieChans
* The number of edges marked as zombies.
*/
@SerialVersionUID(0L)
final case class NetworkInfo(
graphDiameter: org.bitcoins.core.number.UInt32 = lnrpc.NetworkInfo._typemapper_graphDiameter.toCustom(0),
avgOutDegree: _root_.scala.Double = 0.0,
maxOutDegree: org.bitcoins.core.number.UInt32 = lnrpc.NetworkInfo._typemapper_maxOutDegree.toCustom(0),
numNodes: org.bitcoins.core.number.UInt32 = lnrpc.NetworkInfo._typemapper_numNodes.toCustom(0),
numChannels: org.bitcoins.core.number.UInt32 = lnrpc.NetworkInfo._typemapper_numChannels.toCustom(0),
totalNetworkCapacity: _root_.scala.Long = 0L,
avgChannelSize: _root_.scala.Double = 0.0,
minChannelSize: _root_.scala.Long = 0L,
maxChannelSize: _root_.scala.Long = 0L,
medianChannelSizeSat: _root_.scala.Long = 0L,
numZombieChans: org.bitcoins.core.number.UInt64 = lnrpc.NetworkInfo._typemapper_numZombieChans.toCustom(0L),
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[NetworkInfo] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = lnrpc.NetworkInfo._typemapper_graphDiameter.toBase(graphDiameter)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(1, __value)
}
};
{
val __value = avgOutDegree
if (__value != 0.0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeDoubleSize(2, __value)
}
};
{
val __value = lnrpc.NetworkInfo._typemapper_maxOutDegree.toBase(maxOutDegree)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(3, __value)
}
};
{
val __value = lnrpc.NetworkInfo._typemapper_numNodes.toBase(numNodes)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(4, __value)
}
};
{
val __value = lnrpc.NetworkInfo._typemapper_numChannels.toBase(numChannels)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(5, __value)
}
};
{
val __value = totalNetworkCapacity
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(6, __value)
}
};
{
val __value = avgChannelSize
if (__value != 0.0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeDoubleSize(7, __value)
}
};
{
val __value = minChannelSize
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(8, __value)
}
};
{
val __value = maxChannelSize
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(9, __value)
}
};
{
val __value = medianChannelSizeSat
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeInt64Size(10, __value)
}
};
{
val __value = lnrpc.NetworkInfo._typemapper_numZombieChans.toBase(numZombieChans)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(11, __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.NetworkInfo._typemapper_graphDiameter.toBase(graphDiameter)
if (__v != 0) {
_output__.writeUInt32(1, __v)
}
};
{
val __v = avgOutDegree
if (__v != 0.0) {
_output__.writeDouble(2, __v)
}
};
{
val __v = lnrpc.NetworkInfo._typemapper_maxOutDegree.toBase(maxOutDegree)
if (__v != 0) {
_output__.writeUInt32(3, __v)
}
};
{
val __v = lnrpc.NetworkInfo._typemapper_numNodes.toBase(numNodes)
if (__v != 0) {
_output__.writeUInt32(4, __v)
}
};
{
val __v = lnrpc.NetworkInfo._typemapper_numChannels.toBase(numChannels)
if (__v != 0) {
_output__.writeUInt32(5, __v)
}
};
{
val __v = totalNetworkCapacity
if (__v != 0L) {
_output__.writeInt64(6, __v)
}
};
{
val __v = avgChannelSize
if (__v != 0.0) {
_output__.writeDouble(7, __v)
}
};
{
val __v = minChannelSize
if (__v != 0L) {
_output__.writeInt64(8, __v)
}
};
{
val __v = maxChannelSize
if (__v != 0L) {
_output__.writeInt64(9, __v)
}
};
{
val __v = medianChannelSizeSat
if (__v != 0L) {
_output__.writeInt64(10, __v)
}
};
{
val __v = lnrpc.NetworkInfo._typemapper_numZombieChans.toBase(numZombieChans)
if (__v != 0L) {
_output__.writeUInt64(11, __v)
}
};
unknownFields.writeTo(_output__)
}
def withGraphDiameter(__v: org.bitcoins.core.number.UInt32): NetworkInfo = copy(graphDiameter = __v)
def withAvgOutDegree(__v: _root_.scala.Double): NetworkInfo = copy(avgOutDegree = __v)
def withMaxOutDegree(__v: org.bitcoins.core.number.UInt32): NetworkInfo = copy(maxOutDegree = __v)
def withNumNodes(__v: org.bitcoins.core.number.UInt32): NetworkInfo = copy(numNodes = __v)
def withNumChannels(__v: org.bitcoins.core.number.UInt32): NetworkInfo = copy(numChannels = __v)
def withTotalNetworkCapacity(__v: _root_.scala.Long): NetworkInfo = copy(totalNetworkCapacity = __v)
def withAvgChannelSize(__v: _root_.scala.Double): NetworkInfo = copy(avgChannelSize = __v)
def withMinChannelSize(__v: _root_.scala.Long): NetworkInfo = copy(minChannelSize = __v)
def withMaxChannelSize(__v: _root_.scala.Long): NetworkInfo = copy(maxChannelSize = __v)
def withMedianChannelSizeSat(__v: _root_.scala.Long): NetworkInfo = copy(medianChannelSizeSat = __v)
def withNumZombieChans(__v: org.bitcoins.core.number.UInt64): NetworkInfo = copy(numZombieChans = __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.NetworkInfo._typemapper_graphDiameter.toBase(graphDiameter)
if (__t != 0) __t else null
}
case 2 => {
val __t = avgOutDegree
if (__t != 0.0) __t else null
}
case 3 => {
val __t = lnrpc.NetworkInfo._typemapper_maxOutDegree.toBase(maxOutDegree)
if (__t != 0) __t else null
}
case 4 => {
val __t = lnrpc.NetworkInfo._typemapper_numNodes.toBase(numNodes)
if (__t != 0) __t else null
}
case 5 => {
val __t = lnrpc.NetworkInfo._typemapper_numChannels.toBase(numChannels)
if (__t != 0) __t else null
}
case 6 => {
val __t = totalNetworkCapacity
if (__t != 0L) __t else null
}
case 7 => {
val __t = avgChannelSize
if (__t != 0.0) __t else null
}
case 8 => {
val __t = minChannelSize
if (__t != 0L) __t else null
}
case 9 => {
val __t = maxChannelSize
if (__t != 0L) __t else null
}
case 10 => {
val __t = medianChannelSizeSat
if (__t != 0L) __t else null
}
case 11 => {
val __t = lnrpc.NetworkInfo._typemapper_numZombieChans.toBase(numZombieChans)
if (__t != 0L) __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.PInt(lnrpc.NetworkInfo._typemapper_graphDiameter.toBase(graphDiameter))
case 2 => _root_.scalapb.descriptors.PDouble(avgOutDegree)
case 3 => _root_.scalapb.descriptors.PInt(lnrpc.NetworkInfo._typemapper_maxOutDegree.toBase(maxOutDegree))
case 4 => _root_.scalapb.descriptors.PInt(lnrpc.NetworkInfo._typemapper_numNodes.toBase(numNodes))
case 5 => _root_.scalapb.descriptors.PInt(lnrpc.NetworkInfo._typemapper_numChannels.toBase(numChannels))
case 6 => _root_.scalapb.descriptors.PLong(totalNetworkCapacity)
case 7 => _root_.scalapb.descriptors.PDouble(avgChannelSize)
case 8 => _root_.scalapb.descriptors.PLong(minChannelSize)
case 9 => _root_.scalapb.descriptors.PLong(maxChannelSize)
case 10 => _root_.scalapb.descriptors.PLong(medianChannelSizeSat)
case 11 => _root_.scalapb.descriptors.PLong(lnrpc.NetworkInfo._typemapper_numZombieChans.toBase(numZombieChans))
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: lnrpc.NetworkInfo.type = lnrpc.NetworkInfo
// @@protoc_insertion_point(GeneratedMessage[lnrpc.NetworkInfo])
}
object NetworkInfo extends scalapb.GeneratedMessageCompanion[lnrpc.NetworkInfo] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.NetworkInfo] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.NetworkInfo = {
var __graphDiameter: _root_.scala.Int = 0
var __avgOutDegree: _root_.scala.Double = 0.0
var __maxOutDegree: _root_.scala.Int = 0
var __numNodes: _root_.scala.Int = 0
var __numChannels: _root_.scala.Int = 0
var __totalNetworkCapacity: _root_.scala.Long = 0L
var __avgChannelSize: _root_.scala.Double = 0.0
var __minChannelSize: _root_.scala.Long = 0L
var __maxChannelSize: _root_.scala.Long = 0L
var __medianChannelSizeSat: _root_.scala.Long = 0L
var __numZombieChans: _root_.scala.Long = 0L
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 8 =>
__graphDiameter = _input__.readUInt32()
case 17 =>
__avgOutDegree = _input__.readDouble()
case 24 =>
__maxOutDegree = _input__.readUInt32()
case 32 =>
__numNodes = _input__.readUInt32()
case 40 =>
__numChannels = _input__.readUInt32()
case 48 =>
__totalNetworkCapacity = _input__.readInt64()
case 57 =>
__avgChannelSize = _input__.readDouble()
case 64 =>
__minChannelSize = _input__.readInt64()
case 72 =>
__maxChannelSize = _input__.readInt64()
case 80 =>
__medianChannelSizeSat = _input__.readInt64()
case 88 =>
__numZombieChans = _input__.readUInt64()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
lnrpc.NetworkInfo(
graphDiameter = lnrpc.NetworkInfo._typemapper_graphDiameter.toCustom(__graphDiameter),
avgOutDegree = __avgOutDegree,
maxOutDegree = lnrpc.NetworkInfo._typemapper_maxOutDegree.toCustom(__maxOutDegree),
numNodes = lnrpc.NetworkInfo._typemapper_numNodes.toCustom(__numNodes),
numChannels = lnrpc.NetworkInfo._typemapper_numChannels.toCustom(__numChannels),
totalNetworkCapacity = __totalNetworkCapacity,
avgChannelSize = __avgChannelSize,
minChannelSize = __minChannelSize,
maxChannelSize = __maxChannelSize,
medianChannelSizeSat = __medianChannelSizeSat,
numZombieChans = lnrpc.NetworkInfo._typemapper_numZombieChans.toCustom(__numZombieChans),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.NetworkInfo] = _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.NetworkInfo(
graphDiameter = lnrpc.NetworkInfo._typemapper_graphDiameter.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
avgOutDegree = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Double]).getOrElse(0.0),
maxOutDegree = lnrpc.NetworkInfo._typemapper_maxOutDegree.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
numNodes = lnrpc.NetworkInfo._typemapper_numNodes.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
numChannels = lnrpc.NetworkInfo._typemapper_numChannels.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
totalNetworkCapacity = __fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
avgChannelSize = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).map(_.as[_root_.scala.Double]).getOrElse(0.0),
minChannelSize = __fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
maxChannelSize = __fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
medianChannelSizeSat = __fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
numZombieChans = lnrpc.NetworkInfo._typemapper_numZombieChans.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).map(_.as[_root_.scala.Long]).getOrElse(0L))
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LightningProto.javaDescriptor.getMessageTypes().get(116)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LightningProto.scalaDescriptor.messages(116)
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.NetworkInfo(
graphDiameter = lnrpc.NetworkInfo._typemapper_graphDiameter.toCustom(0),
avgOutDegree = 0.0,
maxOutDegree = lnrpc.NetworkInfo._typemapper_maxOutDegree.toCustom(0),
numNodes = lnrpc.NetworkInfo._typemapper_numNodes.toCustom(0),
numChannels = lnrpc.NetworkInfo._typemapper_numChannels.toCustom(0),
totalNetworkCapacity = 0L,
avgChannelSize = 0.0,
minChannelSize = 0L,
maxChannelSize = 0L,
medianChannelSizeSat = 0L,
numZombieChans = lnrpc.NetworkInfo._typemapper_numZombieChans.toCustom(0L)
)
implicit class NetworkInfoLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.NetworkInfo]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.NetworkInfo](_l) {
def graphDiameter: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.graphDiameter)((c_, f_) => c_.copy(graphDiameter = f_))
def avgOutDegree: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Double] = field(_.avgOutDegree)((c_, f_) => c_.copy(avgOutDegree = f_))
def maxOutDegree: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.maxOutDegree)((c_, f_) => c_.copy(maxOutDegree = f_))
def numNodes: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.numNodes)((c_, f_) => c_.copy(numNodes = f_))
def numChannels: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.numChannels)((c_, f_) => c_.copy(numChannels = f_))
def totalNetworkCapacity: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.totalNetworkCapacity)((c_, f_) => c_.copy(totalNetworkCapacity = f_))
def avgChannelSize: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Double] = field(_.avgChannelSize)((c_, f_) => c_.copy(avgChannelSize = f_))
def minChannelSize: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.minChannelSize)((c_, f_) => c_.copy(minChannelSize = f_))
def maxChannelSize: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.maxChannelSize)((c_, f_) => c_.copy(maxChannelSize = f_))
def medianChannelSizeSat: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.medianChannelSizeSat)((c_, f_) => c_.copy(medianChannelSizeSat = f_))
def numZombieChans: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.numZombieChans)((c_, f_) => c_.copy(numZombieChans = f_))
}
final val GRAPH_DIAMETER_FIELD_NUMBER = 1
final val AVG_OUT_DEGREE_FIELD_NUMBER = 2
final val MAX_OUT_DEGREE_FIELD_NUMBER = 3
final val NUM_NODES_FIELD_NUMBER = 4
final val NUM_CHANNELS_FIELD_NUMBER = 5
final val TOTAL_NETWORK_CAPACITY_FIELD_NUMBER = 6
final val AVG_CHANNEL_SIZE_FIELD_NUMBER = 7
final val MIN_CHANNEL_SIZE_FIELD_NUMBER = 8
final val MAX_CHANNEL_SIZE_FIELD_NUMBER = 9
final val MEDIAN_CHANNEL_SIZE_SAT_FIELD_NUMBER = 10
final val NUM_ZOMBIE_CHANS_FIELD_NUMBER = 11
@transient
private[lnrpc] val _typemapper_graphDiameter: _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_maxOutDegree: _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_numNodes: _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_numChannels: _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_numZombieChans: _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(
graphDiameter: org.bitcoins.core.number.UInt32,
avgOutDegree: _root_.scala.Double,
maxOutDegree: org.bitcoins.core.number.UInt32,
numNodes: org.bitcoins.core.number.UInt32,
numChannels: org.bitcoins.core.number.UInt32,
totalNetworkCapacity: _root_.scala.Long,
avgChannelSize: _root_.scala.Double,
minChannelSize: _root_.scala.Long,
maxChannelSize: _root_.scala.Long,
medianChannelSizeSat: _root_.scala.Long,
numZombieChans: org.bitcoins.core.number.UInt64
): _root_.lnrpc.NetworkInfo = _root_.lnrpc.NetworkInfo(
graphDiameter,
avgOutDegree,
maxOutDegree,
numNodes,
numChannels,
totalNetworkCapacity,
avgChannelSize,
minChannelSize,
maxChannelSize,
medianChannelSizeSat,
numZombieChans
)
// @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.NetworkInfo])
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy