lnrpc.ResolutionOutcome.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._
sealed abstract class ResolutionOutcome(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = ResolutionOutcome
def isOutcomeUnknown: _root_.scala.Boolean = false
def isClaimed: _root_.scala.Boolean = false
def isUnclaimed: _root_.scala.Boolean = false
def isAbandoned: _root_.scala.Boolean = false
def isFirstStage: _root_.scala.Boolean = false
def isTimeout: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[ResolutionOutcome] = lnrpc.ResolutionOutcome
final def asRecognized: _root_.scala.Option[lnrpc.ResolutionOutcome.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[lnrpc.ResolutionOutcome.Recognized])
}
object ResolutionOutcome extends _root_.scalapb.GeneratedEnumCompanion[ResolutionOutcome] {
sealed trait Recognized extends ResolutionOutcome
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[ResolutionOutcome] = this
/** Outcome unknown.
*/
@SerialVersionUID(0L)
case object OUTCOME_UNKNOWN extends ResolutionOutcome(0) with ResolutionOutcome.Recognized {
val index = 0
val name = "OUTCOME_UNKNOWN"
override def isOutcomeUnknown: _root_.scala.Boolean = true
}
/** An output was claimed on chain.
*/
@SerialVersionUID(0L)
case object CLAIMED extends ResolutionOutcome(1) with ResolutionOutcome.Recognized {
val index = 1
val name = "CLAIMED"
override def isClaimed: _root_.scala.Boolean = true
}
/** An output was left unclaimed on chain.
*/
@SerialVersionUID(0L)
case object UNCLAIMED extends ResolutionOutcome(2) with ResolutionOutcome.Recognized {
val index = 2
val name = "UNCLAIMED"
override def isUnclaimed: _root_.scala.Boolean = true
}
/**
* ResolverOutcomeAbandoned indicates that an output that we did not
* claim on chain, for example an anchor that we did not sweep and a
* third party claimed on chain, or a htlc that we could not decode
* so left unclaimed.
*/
@SerialVersionUID(0L)
case object ABANDONED extends ResolutionOutcome(3) with ResolutionOutcome.Recognized {
val index = 3
val name = "ABANDONED"
override def isAbandoned: _root_.scala.Boolean = true
}
/**
* If we force closed our channel, our htlcs need to be claimed in two
* stages. This outcome represents the broadcast of a timeout or success
* transaction for this two stage htlc claim.
*/
@SerialVersionUID(0L)
case object FIRST_STAGE extends ResolutionOutcome(4) with ResolutionOutcome.Recognized {
val index = 4
val name = "FIRST_STAGE"
override def isFirstStage: _root_.scala.Boolean = true
}
/** A htlc was timed out on chain.
*/
@SerialVersionUID(0L)
case object TIMEOUT extends ResolutionOutcome(5) with ResolutionOutcome.Recognized {
val index = 5
val name = "TIMEOUT"
override def isTimeout: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends ResolutionOutcome(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(OUTCOME_UNKNOWN, CLAIMED, UNCLAIMED, ABANDONED, FIRST_STAGE, TIMEOUT)
def fromValue(__value: _root_.scala.Int): ResolutionOutcome = __value match {
case 0 => OUTCOME_UNKNOWN
case 1 => CLAIMED
case 2 => UNCLAIMED
case 3 => ABANDONED
case 4 => FIRST_STAGE
case 5 => TIMEOUT
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = LightningProto.javaDescriptor.getEnumTypes().get(5)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = LightningProto.scalaDescriptor.enums(5)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy