routerrpc.HtlcEvent.scala Maven / Gradle / Ivy
The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package routerrpc
/**
* HtlcEvent contains the htlc event that was processed. These are served on a
* best-effort basis; events are not persisted, delivery is not guaranteed
* (in the event of a crash in the switch, forward events may be lost) and
* some events may be replayed upon restart. Events consumed from this package
* should be de-duplicated by the htlc's unique combination of incoming and
* outgoing channel id and htlc id. [EXPERIMENTAL]
*
* @param incomingChannelId
*
* The short channel id that the incoming htlc arrived at our node on. This
* value is zero for sends.
* @param outgoingChannelId
*
* The short channel id that the outgoing htlc left our node on. This value
* is zero for receives.
* @param incomingHtlcId
*
* Incoming id is the index of the incoming htlc in the incoming channel.
* This value is zero for sends.
* @param outgoingHtlcId
*
* Outgoing id is the index of the outgoing htlc in the outgoing channel.
* This value is zero for receives.
* @param timestampNs
*
* The time in unix nanoseconds that the event occurred.
* @param eventType
*
* The event type indicates whether the htlc was part of a send, receive or
* forward.
*/
@SerialVersionUID(0L)
final case class HtlcEvent(
incomingChannelId: _root_.scala.Long = 0L,
outgoingChannelId: _root_.scala.Long = 0L,
incomingHtlcId: _root_.scala.Long = 0L,
outgoingHtlcId: _root_.scala.Long = 0L,
timestampNs: _root_.scala.Long = 0L,
eventType: routerrpc.HtlcEvent.EventType = routerrpc.HtlcEvent.EventType.UNKNOWN,
event: routerrpc.HtlcEvent.Event = routerrpc.HtlcEvent.Event.Empty,
unknownFields: _root_.scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty
) extends scalapb.GeneratedMessage with scalapb.lenses.Updatable[HtlcEvent] {
@transient
private[this] var __serializedSizeMemoized: _root_.scala.Int = 0
private[this] def __computeSerializedSize(): _root_.scala.Int = {
var __size = 0
{
val __value = incomingChannelId
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(1, __value)
}
};
{
val __value = outgoingChannelId
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(2, __value)
}
};
{
val __value = incomingHtlcId
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(3, __value)
}
};
{
val __value = outgoingHtlcId
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(4, __value)
}
};
{
val __value = timestampNs
if (__value != 0L) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeUInt64Size(5, __value)
}
};
{
val __value = eventType.value
if (__value != 0) {
__size += _root_.com.google.protobuf.CodedOutputStream.computeEnumSize(6, __value)
}
};
if (event.forwardEvent.isDefined) {
val __value = event.forwardEvent.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (event.forwardFailEvent.isDefined) {
val __value = event.forwardFailEvent.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (event.settleEvent.isDefined) {
val __value = event.settleEvent.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (event.linkFailEvent.isDefined) {
val __value = event.linkFailEvent.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (event.subscribedEvent.isDefined) {
val __value = event.subscribedEvent.get
__size += 1 + _root_.com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(__value.serializedSize) + __value.serializedSize
};
if (event.finalHtlcEvent.isDefined) {
val __value = event.finalHtlcEvent.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 = incomingChannelId
if (__v != 0L) {
_output__.writeUInt64(1, __v)
}
};
{
val __v = outgoingChannelId
if (__v != 0L) {
_output__.writeUInt64(2, __v)
}
};
{
val __v = incomingHtlcId
if (__v != 0L) {
_output__.writeUInt64(3, __v)
}
};
{
val __v = outgoingHtlcId
if (__v != 0L) {
_output__.writeUInt64(4, __v)
}
};
{
val __v = timestampNs
if (__v != 0L) {
_output__.writeUInt64(5, __v)
}
};
{
val __v = eventType.value
if (__v != 0) {
_output__.writeEnum(6, __v)
}
};
event.forwardEvent.foreach { __v =>
val __m = __v
_output__.writeTag(7, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
event.forwardFailEvent.foreach { __v =>
val __m = __v
_output__.writeTag(8, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
event.settleEvent.foreach { __v =>
val __m = __v
_output__.writeTag(9, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
event.linkFailEvent.foreach { __v =>
val __m = __v
_output__.writeTag(10, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
event.subscribedEvent.foreach { __v =>
val __m = __v
_output__.writeTag(11, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
event.finalHtlcEvent.foreach { __v =>
val __m = __v
_output__.writeTag(12, 2)
_output__.writeUInt32NoTag(__m.serializedSize)
__m.writeTo(_output__)
};
unknownFields.writeTo(_output__)
}
def withIncomingChannelId(__v: _root_.scala.Long): HtlcEvent = copy(incomingChannelId = __v)
def withOutgoingChannelId(__v: _root_.scala.Long): HtlcEvent = copy(outgoingChannelId = __v)
def withIncomingHtlcId(__v: _root_.scala.Long): HtlcEvent = copy(incomingHtlcId = __v)
def withOutgoingHtlcId(__v: _root_.scala.Long): HtlcEvent = copy(outgoingHtlcId = __v)
def withTimestampNs(__v: _root_.scala.Long): HtlcEvent = copy(timestampNs = __v)
def withEventType(__v: routerrpc.HtlcEvent.EventType): HtlcEvent = copy(eventType = __v)
def getForwardEvent: routerrpc.ForwardEvent = event.forwardEvent.getOrElse(routerrpc.ForwardEvent.defaultInstance)
def withForwardEvent(__v: routerrpc.ForwardEvent): HtlcEvent = copy(event = routerrpc.HtlcEvent.Event.ForwardEvent(__v))
def getForwardFailEvent: routerrpc.ForwardFailEvent = event.forwardFailEvent.getOrElse(routerrpc.ForwardFailEvent.defaultInstance)
def withForwardFailEvent(__v: routerrpc.ForwardFailEvent): HtlcEvent = copy(event = routerrpc.HtlcEvent.Event.ForwardFailEvent(__v))
def getSettleEvent: routerrpc.SettleEvent = event.settleEvent.getOrElse(routerrpc.SettleEvent.defaultInstance)
def withSettleEvent(__v: routerrpc.SettleEvent): HtlcEvent = copy(event = routerrpc.HtlcEvent.Event.SettleEvent(__v))
def getLinkFailEvent: routerrpc.LinkFailEvent = event.linkFailEvent.getOrElse(routerrpc.LinkFailEvent.defaultInstance)
def withLinkFailEvent(__v: routerrpc.LinkFailEvent): HtlcEvent = copy(event = routerrpc.HtlcEvent.Event.LinkFailEvent(__v))
def getSubscribedEvent: routerrpc.SubscribedEvent = event.subscribedEvent.getOrElse(routerrpc.SubscribedEvent.defaultInstance)
def withSubscribedEvent(__v: routerrpc.SubscribedEvent): HtlcEvent = copy(event = routerrpc.HtlcEvent.Event.SubscribedEvent(__v))
def getFinalHtlcEvent: routerrpc.FinalHtlcEvent = event.finalHtlcEvent.getOrElse(routerrpc.FinalHtlcEvent.defaultInstance)
def withFinalHtlcEvent(__v: routerrpc.FinalHtlcEvent): HtlcEvent = copy(event = routerrpc.HtlcEvent.Event.FinalHtlcEvent(__v))
def clearEvent: HtlcEvent = copy(event = routerrpc.HtlcEvent.Event.Empty)
def withEvent(__v: routerrpc.HtlcEvent.Event): HtlcEvent = copy(event = __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 = incomingChannelId
if (__t != 0L) __t else null
}
case 2 => {
val __t = outgoingChannelId
if (__t != 0L) __t else null
}
case 3 => {
val __t = incomingHtlcId
if (__t != 0L) __t else null
}
case 4 => {
val __t = outgoingHtlcId
if (__t != 0L) __t else null
}
case 5 => {
val __t = timestampNs
if (__t != 0L) __t else null
}
case 6 => {
val __t = eventType.javaValueDescriptor
if (__t.getNumber() != 0) __t else null
}
case 7 => event.forwardEvent.orNull
case 8 => event.forwardFailEvent.orNull
case 9 => event.settleEvent.orNull
case 10 => event.linkFailEvent.orNull
case 11 => event.subscribedEvent.orNull
case 12 => event.finalHtlcEvent.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.PLong(incomingChannelId)
case 2 => _root_.scalapb.descriptors.PLong(outgoingChannelId)
case 3 => _root_.scalapb.descriptors.PLong(incomingHtlcId)
case 4 => _root_.scalapb.descriptors.PLong(outgoingHtlcId)
case 5 => _root_.scalapb.descriptors.PLong(timestampNs)
case 6 => _root_.scalapb.descriptors.PEnum(eventType.scalaValueDescriptor)
case 7 => event.forwardEvent.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 8 => event.forwardFailEvent.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 9 => event.settleEvent.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 10 => event.linkFailEvent.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 11 => event.subscribedEvent.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
case 12 => event.finalHtlcEvent.map(_.toPMessage).getOrElse(_root_.scalapb.descriptors.PEmpty)
}
}
def toProtoString: _root_.scala.Predef.String = _root_.scalapb.TextFormat.printToUnicodeString(this)
def companion: routerrpc.HtlcEvent.type = routerrpc.HtlcEvent
// @@protoc_insertion_point(GeneratedMessage[routerrpc.HtlcEvent])
}
object HtlcEvent extends scalapb.GeneratedMessageCompanion[routerrpc.HtlcEvent] {
implicit def messageCompanion: scalapb.GeneratedMessageCompanion[routerrpc.HtlcEvent] = this
def parseFrom(`_input__`: _root_.com.google.protobuf.CodedInputStream): routerrpc.HtlcEvent = {
var __incomingChannelId: _root_.scala.Long = 0L
var __outgoingChannelId: _root_.scala.Long = 0L
var __incomingHtlcId: _root_.scala.Long = 0L
var __outgoingHtlcId: _root_.scala.Long = 0L
var __timestampNs: _root_.scala.Long = 0L
var __eventType: routerrpc.HtlcEvent.EventType = routerrpc.HtlcEvent.EventType.UNKNOWN
var __event: routerrpc.HtlcEvent.Event = routerrpc.HtlcEvent.Event.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 =>
__incomingChannelId = _input__.readUInt64()
case 16 =>
__outgoingChannelId = _input__.readUInt64()
case 24 =>
__incomingHtlcId = _input__.readUInt64()
case 32 =>
__outgoingHtlcId = _input__.readUInt64()
case 40 =>
__timestampNs = _input__.readUInt64()
case 48 =>
__eventType = routerrpc.HtlcEvent.EventType.fromValue(_input__.readEnum())
case 58 =>
__event = routerrpc.HtlcEvent.Event.ForwardEvent(__event.forwardEvent.fold(_root_.scalapb.LiteParser.readMessage[routerrpc.ForwardEvent](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 66 =>
__event = routerrpc.HtlcEvent.Event.ForwardFailEvent(__event.forwardFailEvent.fold(_root_.scalapb.LiteParser.readMessage[routerrpc.ForwardFailEvent](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 74 =>
__event = routerrpc.HtlcEvent.Event.SettleEvent(__event.settleEvent.fold(_root_.scalapb.LiteParser.readMessage[routerrpc.SettleEvent](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 82 =>
__event = routerrpc.HtlcEvent.Event.LinkFailEvent(__event.linkFailEvent.fold(_root_.scalapb.LiteParser.readMessage[routerrpc.LinkFailEvent](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 90 =>
__event = routerrpc.HtlcEvent.Event.SubscribedEvent(__event.subscribedEvent.fold(_root_.scalapb.LiteParser.readMessage[routerrpc.SubscribedEvent](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case 98 =>
__event = routerrpc.HtlcEvent.Event.FinalHtlcEvent(__event.finalHtlcEvent.fold(_root_.scalapb.LiteParser.readMessage[routerrpc.FinalHtlcEvent](_input__))(_root_.scalapb.LiteParser.readMessage(_input__, _)))
case tag =>
if (_unknownFields__ == null) {
_unknownFields__ = new _root_.scalapb.UnknownFieldSet.Builder()
}
_unknownFields__.parseField(tag, _input__)
}
}
routerrpc.HtlcEvent(
incomingChannelId = __incomingChannelId,
outgoingChannelId = __outgoingChannelId,
incomingHtlcId = __incomingHtlcId,
outgoingHtlcId = __outgoingHtlcId,
timestampNs = __timestampNs,
eventType = __eventType,
event = __event,
unknownFields = if (_unknownFields__ == null) _root_.scalapb.UnknownFieldSet.empty else _unknownFields__.result()
)
}
implicit def messageReads: _root_.scalapb.descriptors.Reads[routerrpc.HtlcEvent] = _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.")
routerrpc.HtlcEvent(
incomingChannelId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(1).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
outgoingChannelId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(2).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
incomingHtlcId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(3).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
outgoingHtlcId = __fieldsMap.get(scalaDescriptor.findFieldByNumber(4).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
timestampNs = __fieldsMap.get(scalaDescriptor.findFieldByNumber(5).get).map(_.as[_root_.scala.Long]).getOrElse(0L),
eventType = routerrpc.HtlcEvent.EventType.fromValue(__fieldsMap.get(scalaDescriptor.findFieldByNumber(6).get).map(_.as[_root_.scalapb.descriptors.EnumValueDescriptor]).getOrElse(routerrpc.HtlcEvent.EventType.UNKNOWN.scalaValueDescriptor).number),
event = __fieldsMap.get(scalaDescriptor.findFieldByNumber(7).get).flatMap(_.as[_root_.scala.Option[routerrpc.ForwardEvent]]).map(routerrpc.HtlcEvent.Event.ForwardEvent(_))
.orElse[routerrpc.HtlcEvent.Event](__fieldsMap.get(scalaDescriptor.findFieldByNumber(8).get).flatMap(_.as[_root_.scala.Option[routerrpc.ForwardFailEvent]]).map(routerrpc.HtlcEvent.Event.ForwardFailEvent(_)))
.orElse[routerrpc.HtlcEvent.Event](__fieldsMap.get(scalaDescriptor.findFieldByNumber(9).get).flatMap(_.as[_root_.scala.Option[routerrpc.SettleEvent]]).map(routerrpc.HtlcEvent.Event.SettleEvent(_)))
.orElse[routerrpc.HtlcEvent.Event](__fieldsMap.get(scalaDescriptor.findFieldByNumber(10).get).flatMap(_.as[_root_.scala.Option[routerrpc.LinkFailEvent]]).map(routerrpc.HtlcEvent.Event.LinkFailEvent(_)))
.orElse[routerrpc.HtlcEvent.Event](__fieldsMap.get(scalaDescriptor.findFieldByNumber(11).get).flatMap(_.as[_root_.scala.Option[routerrpc.SubscribedEvent]]).map(routerrpc.HtlcEvent.Event.SubscribedEvent(_)))
.orElse[routerrpc.HtlcEvent.Event](__fieldsMap.get(scalaDescriptor.findFieldByNumber(12).get).flatMap(_.as[_root_.scala.Option[routerrpc.FinalHtlcEvent]]).map(routerrpc.HtlcEvent.Event.FinalHtlcEvent(_)))
.getOrElse(routerrpc.HtlcEvent.Event.Empty)
)
case _ => throw new RuntimeException("Expected PMessage")
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.Descriptor = RouterProto.javaDescriptor.getMessageTypes().get(27)
def scalaDescriptor: _root_.scalapb.descriptors.Descriptor = RouterProto.scalaDescriptor.messages(27)
def messageCompanionForFieldNumber(__number: _root_.scala.Int): _root_.scalapb.GeneratedMessageCompanion[_] = {
var __out: _root_.scalapb.GeneratedMessageCompanion[_] = null
(__number: @_root_.scala.unchecked) match {
case 7 => __out = routerrpc.ForwardEvent
case 8 => __out = routerrpc.ForwardFailEvent
case 9 => __out = routerrpc.SettleEvent
case 10 => __out = routerrpc.LinkFailEvent
case 11 => __out = routerrpc.SubscribedEvent
case 12 => __out = routerrpc.FinalHtlcEvent
}
__out
}
lazy val nestedMessagesCompanions: Seq[_root_.scalapb.GeneratedMessageCompanion[_ <: _root_.scalapb.GeneratedMessage]] = Seq.empty
def enumCompanionForFieldNumber(__fieldNumber: _root_.scala.Int): _root_.scalapb.GeneratedEnumCompanion[_] = {
(__fieldNumber: @_root_.scala.unchecked) match {
case 6 => routerrpc.HtlcEvent.EventType
}
}
lazy val defaultInstance = routerrpc.HtlcEvent(
incomingChannelId = 0L,
outgoingChannelId = 0L,
incomingHtlcId = 0L,
outgoingHtlcId = 0L,
timestampNs = 0L,
eventType = routerrpc.HtlcEvent.EventType.UNKNOWN,
event = routerrpc.HtlcEvent.Event.Empty
)
sealed abstract class EventType(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = EventType
def isUnknown: _root_.scala.Boolean = false
def isSend: _root_.scala.Boolean = false
def isReceive: _root_.scala.Boolean = false
def isForward: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[EventType] = routerrpc.HtlcEvent.EventType
final def asRecognized: _root_.scala.Option[routerrpc.HtlcEvent.EventType.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[routerrpc.HtlcEvent.EventType.Recognized])
}
object EventType extends _root_.scalapb.GeneratedEnumCompanion[EventType] {
sealed trait Recognized extends EventType
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[EventType] = this
@SerialVersionUID(0L)
case object UNKNOWN extends EventType(0) with EventType.Recognized {
val index = 0
val name = "UNKNOWN"
override def isUnknown: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object SEND extends EventType(1) with EventType.Recognized {
val index = 1
val name = "SEND"
override def isSend: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object RECEIVE extends EventType(2) with EventType.Recognized {
val index = 2
val name = "RECEIVE"
override def isReceive: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
case object FORWARD extends EventType(3) with EventType.Recognized {
val index = 3
val name = "FORWARD"
override def isForward: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends EventType(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(UNKNOWN, SEND, RECEIVE, FORWARD)
def fromValue(__value: _root_.scala.Int): EventType = __value match {
case 0 => UNKNOWN
case 1 => SEND
case 2 => RECEIVE
case 3 => FORWARD
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = routerrpc.HtlcEvent.javaDescriptor.getEnumTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = routerrpc.HtlcEvent.scalaDescriptor.enums(0)
}
sealed trait Event extends _root_.scalapb.GeneratedOneof {
def isEmpty: _root_.scala.Boolean = false
def isDefined: _root_.scala.Boolean = true
def isForwardEvent: _root_.scala.Boolean = false
def isForwardFailEvent: _root_.scala.Boolean = false
def isSettleEvent: _root_.scala.Boolean = false
def isLinkFailEvent: _root_.scala.Boolean = false
def isSubscribedEvent: _root_.scala.Boolean = false
def isFinalHtlcEvent: _root_.scala.Boolean = false
def forwardEvent: _root_.scala.Option[routerrpc.ForwardEvent] = _root_.scala.None
def forwardFailEvent: _root_.scala.Option[routerrpc.ForwardFailEvent] = _root_.scala.None
def settleEvent: _root_.scala.Option[routerrpc.SettleEvent] = _root_.scala.None
def linkFailEvent: _root_.scala.Option[routerrpc.LinkFailEvent] = _root_.scala.None
def subscribedEvent: _root_.scala.Option[routerrpc.SubscribedEvent] = _root_.scala.None
def finalHtlcEvent: _root_.scala.Option[routerrpc.FinalHtlcEvent] = _root_.scala.None
}
object Event {
@SerialVersionUID(0L)
case object Empty extends routerrpc.HtlcEvent.Event {
type ValueType = _root_.scala.Nothing
override def isEmpty: _root_.scala.Boolean = true
override def isDefined: _root_.scala.Boolean = false
override def number: _root_.scala.Int = 0
override def value: _root_.scala.Nothing = throw new java.util.NoSuchElementException("Empty.value")
}
@SerialVersionUID(0L)
final case class ForwardEvent(value: routerrpc.ForwardEvent) extends routerrpc.HtlcEvent.Event {
type ValueType = routerrpc.ForwardEvent
override def isForwardEvent: _root_.scala.Boolean = true
override def forwardEvent: _root_.scala.Option[routerrpc.ForwardEvent] = Some(value)
override def number: _root_.scala.Int = 7
}
@SerialVersionUID(0L)
final case class ForwardFailEvent(value: routerrpc.ForwardFailEvent) extends routerrpc.HtlcEvent.Event {
type ValueType = routerrpc.ForwardFailEvent
override def isForwardFailEvent: _root_.scala.Boolean = true
override def forwardFailEvent: _root_.scala.Option[routerrpc.ForwardFailEvent] = Some(value)
override def number: _root_.scala.Int = 8
}
@SerialVersionUID(0L)
final case class SettleEvent(value: routerrpc.SettleEvent) extends routerrpc.HtlcEvent.Event {
type ValueType = routerrpc.SettleEvent
override def isSettleEvent: _root_.scala.Boolean = true
override def settleEvent: _root_.scala.Option[routerrpc.SettleEvent] = Some(value)
override def number: _root_.scala.Int = 9
}
@SerialVersionUID(0L)
final case class LinkFailEvent(value: routerrpc.LinkFailEvent) extends routerrpc.HtlcEvent.Event {
type ValueType = routerrpc.LinkFailEvent
override def isLinkFailEvent: _root_.scala.Boolean = true
override def linkFailEvent: _root_.scala.Option[routerrpc.LinkFailEvent] = Some(value)
override def number: _root_.scala.Int = 10
}
@SerialVersionUID(0L)
final case class SubscribedEvent(value: routerrpc.SubscribedEvent) extends routerrpc.HtlcEvent.Event {
type ValueType = routerrpc.SubscribedEvent
override def isSubscribedEvent: _root_.scala.Boolean = true
override def subscribedEvent: _root_.scala.Option[routerrpc.SubscribedEvent] = Some(value)
override def number: _root_.scala.Int = 11
}
@SerialVersionUID(0L)
final case class FinalHtlcEvent(value: routerrpc.FinalHtlcEvent) extends routerrpc.HtlcEvent.Event {
type ValueType = routerrpc.FinalHtlcEvent
override def isFinalHtlcEvent: _root_.scala.Boolean = true
override def finalHtlcEvent: _root_.scala.Option[routerrpc.FinalHtlcEvent] = Some(value)
override def number: _root_.scala.Int = 12
}
}
implicit class HtlcEventLens[UpperPB](_l: _root_.scalapb.lenses.Lens[UpperPB, routerrpc.HtlcEvent]) extends _root_.scalapb.lenses.ObjectLens[UpperPB, routerrpc.HtlcEvent](_l) {
def incomingChannelId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.incomingChannelId)((c_, f_) => c_.copy(incomingChannelId = f_))
def outgoingChannelId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.outgoingChannelId)((c_, f_) => c_.copy(outgoingChannelId = f_))
def incomingHtlcId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.incomingHtlcId)((c_, f_) => c_.copy(incomingHtlcId = f_))
def outgoingHtlcId: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.outgoingHtlcId)((c_, f_) => c_.copy(outgoingHtlcId = f_))
def timestampNs: _root_.scalapb.lenses.Lens[UpperPB, _root_.scala.Long] = field(_.timestampNs)((c_, f_) => c_.copy(timestampNs = f_))
def eventType: _root_.scalapb.lenses.Lens[UpperPB, routerrpc.HtlcEvent.EventType] = field(_.eventType)((c_, f_) => c_.copy(eventType = f_))
def forwardEvent: _root_.scalapb.lenses.Lens[UpperPB, routerrpc.ForwardEvent] = field(_.getForwardEvent)((c_, f_) => c_.copy(event = routerrpc.HtlcEvent.Event.ForwardEvent(f_)))
def forwardFailEvent: _root_.scalapb.lenses.Lens[UpperPB, routerrpc.ForwardFailEvent] = field(_.getForwardFailEvent)((c_, f_) => c_.copy(event = routerrpc.HtlcEvent.Event.ForwardFailEvent(f_)))
def settleEvent: _root_.scalapb.lenses.Lens[UpperPB, routerrpc.SettleEvent] = field(_.getSettleEvent)((c_, f_) => c_.copy(event = routerrpc.HtlcEvent.Event.SettleEvent(f_)))
def linkFailEvent: _root_.scalapb.lenses.Lens[UpperPB, routerrpc.LinkFailEvent] = field(_.getLinkFailEvent)((c_, f_) => c_.copy(event = routerrpc.HtlcEvent.Event.LinkFailEvent(f_)))
def subscribedEvent: _root_.scalapb.lenses.Lens[UpperPB, routerrpc.SubscribedEvent] = field(_.getSubscribedEvent)((c_, f_) => c_.copy(event = routerrpc.HtlcEvent.Event.SubscribedEvent(f_)))
def finalHtlcEvent: _root_.scalapb.lenses.Lens[UpperPB, routerrpc.FinalHtlcEvent] = field(_.getFinalHtlcEvent)((c_, f_) => c_.copy(event = routerrpc.HtlcEvent.Event.FinalHtlcEvent(f_)))
def event: _root_.scalapb.lenses.Lens[UpperPB, routerrpc.HtlcEvent.Event] = field(_.event)((c_, f_) => c_.copy(event = f_))
}
final val INCOMING_CHANNEL_ID_FIELD_NUMBER = 1
final val OUTGOING_CHANNEL_ID_FIELD_NUMBER = 2
final val INCOMING_HTLC_ID_FIELD_NUMBER = 3
final val OUTGOING_HTLC_ID_FIELD_NUMBER = 4
final val TIMESTAMP_NS_FIELD_NUMBER = 5
final val EVENT_TYPE_FIELD_NUMBER = 6
final val FORWARD_EVENT_FIELD_NUMBER = 7
final val FORWARD_FAIL_EVENT_FIELD_NUMBER = 8
final val SETTLE_EVENT_FIELD_NUMBER = 9
final val LINK_FAIL_EVENT_FIELD_NUMBER = 10
final val SUBSCRIBED_EVENT_FIELD_NUMBER = 11
final val FINAL_HTLC_EVENT_FIELD_NUMBER = 12
def of(
incomingChannelId: _root_.scala.Long,
outgoingChannelId: _root_.scala.Long,
incomingHtlcId: _root_.scala.Long,
outgoingHtlcId: _root_.scala.Long,
timestampNs: _root_.scala.Long,
eventType: routerrpc.HtlcEvent.EventType,
event: routerrpc.HtlcEvent.Event
): _root_.routerrpc.HtlcEvent = _root_.routerrpc.HtlcEvent(
incomingChannelId,
outgoingChannelId,
incomingHtlcId,
outgoingHtlcId,
timestampNs,
eventType,
event
)
// @@protoc_insertion_point(GeneratedMessageCompanion[routerrpc.HtlcEvent])
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy