lnrpc.HopHint.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 nodeId
* The public key of the node at the start of the channel.
* @param chanId
* The unique identifier of the channel.
* @param feeBaseMsat
* The base fee of the channel denominated in millisatoshis.
* @param feeProportionalMillionths
*
* The fee rate of the channel for sending one satoshi across it denominated in
* millionths of a satoshi.
* @param cltvExpiryDelta
* The time-lock delta of the channel.
*/
@SerialVersionUID(0L)
final case class HopHint(
nodeId: _root_.scala.Predef.String = "",
chanId: org.bitcoins.core.number.UInt64 = lnrpc.HopHint._typemapper_chanId.toCustom(0L),
feeBaseMsat: org.bitcoins.core.number.UInt32 = lnrpc.HopHint._typemapper_feeBaseMsat.toCustom(0),
feeProportionalMillionths: org.bitcoins.core.number.UInt32 = lnrpc.HopHint._typemapper_feeProportionalMillionths.toCustom(0),
cltvExpiryDelta: org.bitcoins.core.number.UInt32 = lnrpc.HopHint._typemapper_cltvExpiryDelta.toCustom(0),
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[HopHint] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = nodeId
if (!__value.isEmpty) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeStringSize(1, __value)
}
};
{
val __value = lnrpc.HopHint._typemapper_chanId.toBase(chanId)
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(2, __value)
}
};
{
val __value = lnrpc.HopHint._typemapper_feeBaseMsat.toBase(feeBaseMsat)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(3, __value)
}
};
{
val __value = lnrpc.HopHint._typemapper_feeProportionalMillionths.toBase(feeProportionalMillionths)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(4, __value)
}
};
{
val __value = lnrpc.HopHint._typemapper_cltvExpiryDelta.toBase(cltvExpiryDelta)
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt32Size(5, __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 = nodeId
if (!__v.isEmpty) {
_output__.writeString(1, __v)
}
};
{
val __v = lnrpc.HopHint._typemapper_chanId.toBase(chanId)
if (__v != 0L) {
_output__.writeUInt64(2, __v)
}
};
{
val __v = lnrpc.HopHint._typemapper_feeBaseMsat.toBase(feeBaseMsat)
if (__v != 0) {
_output__.writeUInt32(3, __v)
}
};
{
val __v = lnrpc.HopHint._typemapper_feeProportionalMillionths.toBase(feeProportionalMillionths)
if (__v != 0) {
_output__.writeUInt32(4, __v)
}
};
{
val __v = lnrpc.HopHint._typemapper_cltvExpiryDelta.toBase(cltvExpiryDelta)
if (__v != 0) {
_output__.writeUInt32(5, __v)
}
};
unknownFields.writeTo(_output__)
}
def withNodeId(__v: _root_.scala.Predef.String): HopHint = copy(nodeId = __v)
def withChanId(__v: org.bitcoins.core.number.UInt64): HopHint = copy(chanId = __v)
def withFeeBaseMsat(__v: org.bitcoins.core.number.UInt32): HopHint = copy(feeBaseMsat = __v)
def withFeeProportionalMillionths(__v: org.bitcoins.core.number.UInt32): HopHint = copy(feeProportionalMillionths = __v)
def withCltvExpiryDelta(__v: org.bitcoins.core.number.UInt32): HopHint = copy(cltvExpiryDelta = __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 = nodeId
if (__t != "") __t else null
}
case 2 => {
val __t = lnrpc.HopHint._typemapper_chanId.toBase(chanId)
if (__t != 0L) __t else null
}
case 3 => {
val __t = lnrpc.HopHint._typemapper_feeBaseMsat.toBase(feeBaseMsat)
if (__t != 0) __t else null
}
case 4 => {
val __t = lnrpc.HopHint._typemapper_feeProportionalMillionths.toBase(feeProportionalMillionths)
if (__t != 0) __t else null
}
case 5 => {
val __t = lnrpc.HopHint._typemapper_cltvExpiryDelta.toBase(cltvExpiryDelta)
if (__t != 0) __t else null
}
}
}
def getField(__field: _root_.scalapb.descriptors.FieldDescriptor): _root_.scalapb.descriptors.PValue = {
_root_.scala.Predef.require(__field.containingMessage eq companion.scalaDescriptor)
(__field.number: @_root_.scala.unchecked) match {
case 1 => _root_.scalapb.descriptors.PString(nodeId)
case 2 => _root_.scalapb.descriptors.PLong(lnrpc.HopHint._typemapper_chanId.toBase(chanId))
case 3 => _root_.scalapb.descriptors.PInt(lnrpc.HopHint._typemapper_feeBaseMsat.toBase(feeBaseMsat))
case 4 => _root_.scalapb.descriptors.PInt(lnrpc.HopHint._typemapper_feeProportionalMillionths.toBase(feeProportionalMillionths))
case 5 => _root_.scalapb.descriptors.PInt(lnrpc.HopHint._typemapper_cltvExpiryDelta.toBase(cltvExpiryDelta))
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: lnrpc.HopHint.type = lnrpc.HopHint
// @@protoc_insertion_point(GeneratedMessage[lnrpc.HopHint])
}
object HopHint extends scalapb.GeneratedMessageCompanion[lnrpc.HopHint] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[lnrpc.HopHint] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): lnrpc.HopHint = {
var __nodeId: _root_.scala.Predef.String = ""
var __chanId: _root_.scala.Long = 0L
var __feeBaseMsat: _root_.scala.Int = 0
var __feeProportionalMillionths: _root_.scala.Int = 0
var __cltvExpiryDelta: _root_.scala.Int = 0
var `_unknownFields__`: _root_.scalapb.UnknownFieldSet.Builder = null
var _done__ = false
while (!_done__) {
val _tag__ = _input__.readTag()
_tag__ match {
case 0 => _done__ = true
case 10 =>
__nodeId = _input__.readStringRequireUtf8()
case 16 =>
__chanId = _input__.readUInt64()
case 24 =>
__feeBaseMsat = _input__.readUInt32()
case 32 =>
__feeProportionalMillionths = _input__.readUInt32()
case 40 =>
__cltvExpiryDelta = _input__.readUInt32()
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
lnrpc.HopHint(
nodeId = __nodeId,
chanId = lnrpc.HopHint._typemapper_chanId.toCustom(__chanId),
feeBaseMsat = lnrpc.HopHint._typemapper_feeBaseMsat.toCustom(__feeBaseMsat),
feeProportionalMillionths = lnrpc.HopHint._typemapper_feeProportionalMillionths.toCustom(__feeProportionalMillionths),
cltvExpiryDelta = lnrpc.HopHint._typemapper_cltvExpiryDelta.toCustom(__cltvExpiryDelta),
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[lnrpc.HopHint] = _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.HopHint(
nodeId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Predef.String]).getOrElse(""),
chanId = lnrpc.HopHint._typemapper_chanId.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L)),
feeBaseMsat = lnrpc.HopHint._typemapper_feeBaseMsat.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
feeProportionalMillionths = lnrpc.HopHint._typemapper_feeProportionalMillionths.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Int]).getOrElse(0)),
cltvExpiryDelta = lnrpc.HopHint._typemapper_cltvExpiryDelta.toCustom(__fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Int]).getOrElse(0))
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = LightningProto.javaDescriptor.getMessageTypes().get(124)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = LightningProto.scalaDescriptor.messages(124)
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.HopHint(
nodeId = "",
chanId = lnrpc.HopHint._typemapper_chanId.toCustom(0L),
feeBaseMsat = lnrpc.HopHint._typemapper_feeBaseMsat.toCustom(0),
feeProportionalMillionths = lnrpc.HopHint._typemapper_feeProportionalMillionths.toCustom(0),
cltvExpiryDelta = lnrpc.HopHint._typemapper_cltvExpiryDelta.toCustom(0)
)
implicit class HopHintLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, lnrpc.HopHint]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, lnrpc.HopHint](_l) {
def nodeId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Predef.String] = field(_.nodeId)((c_, f_) => c_.copy(nodeId = f_))
def chanId: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt64] = field(_.chanId)((c_, f_) => c_.copy(chanId = f_))
def feeBaseMsat: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.feeBaseMsat)((c_, f_) => c_.copy(feeBaseMsat = f_))
def feeProportionalMillionths: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.feeProportionalMillionths)((c_, f_) => c_.copy(feeProportionalMillionths = f_))
def cltvExpiryDelta: _root_.scalapb.lenses.Lens[UpperPB, org.bitcoins.core.number.UInt32] = field(_.cltvExpiryDelta)((c_, f_) => c_.copy(cltvExpiryDelta = f_))
}
final val NODE_ID_FIELD_NUMBER = 1
final val CHAN_ID_FIELD_NUMBER = 2
final val FEE_BASE_MSAT_FIELD_NUMBER = 3
final val FEE_PROPORTIONAL_MILLIONTHS_FIELD_NUMBER = 4
final val CLTV_EXPIRY_DELTA_FIELD_NUMBER = 5
@transient
private[lnrpc] val _typemapper_chanId: _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_feeBaseMsat: _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_feeProportionalMillionths: _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_cltvExpiryDelta: _root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32] = implicitly[_root_.scalapb.TypeMapper[_root_.scala.Int, org.bitcoins.core.number.UInt32]]
def of(
nodeId: _root_.scala.Predef.String,
chanId: org.bitcoins.core.number.UInt64,
feeBaseMsat: org.bitcoins.core.number.UInt32,
feeProportionalMillionths: org.bitcoins.core.number.UInt32,
cltvExpiryDelta: org.bitcoins.core.number.UInt32
): _root_.lnrpc.HopHint = _root_.lnrpc.HopHint(
nodeId,
chanId,
feeBaseMsat,
feeProportionalMillionths,
cltvExpiryDelta
)
// @@protoc_insertion_point(GeneratedMessageCompanion[lnrpc.HopHint])
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy