lnrpc.WalletState.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 WalletState(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = WalletState
def isNonExisting: _root_.scala.Boolean = false
def isLocked: _root_.scala.Boolean = false
def isUnlocked: _root_.scala.Boolean = false
def isRpcActive: _root_.scala.Boolean = false
def isServerActive: _root_.scala.Boolean = false
def isWaitingToStart: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[WalletState] = lnrpc.WalletState
final def asRecognized: _root_.scala.Option[lnrpc.WalletState.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[lnrpc.WalletState.Recognized])
}
object WalletState extends _root_.scalapb.GeneratedEnumCompanion[WalletState] {
sealed trait Recognized extends WalletState
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[WalletState] = this
/** NON_EXISTING means that the wallet has not yet been initialized.
*/
@SerialVersionUID(0L)
case object NON_EXISTING extends WalletState(0) with WalletState.Recognized {
val index = 0
val name = "NON_EXISTING"
override def isNonExisting: _root_.scala.Boolean = true
}
/** LOCKED means that the wallet is locked and requires a password to unlock.
*/
@SerialVersionUID(0L)
case object LOCKED extends WalletState(1) with WalletState.Recognized {
val index = 1
val name = "LOCKED"
override def isLocked: _root_.scala.Boolean = true
}
/** UNLOCKED means that the wallet was unlocked successfully, but RPC server
* isn't ready.
*/
@SerialVersionUID(0L)
case object UNLOCKED extends WalletState(2) with WalletState.Recognized {
val index = 2
val name = "UNLOCKED"
override def isUnlocked: _root_.scala.Boolean = true
}
/** RPC_ACTIVE means that the lnd server is active but not fully ready for
* calls.
*/
@SerialVersionUID(0L)
case object RPC_ACTIVE extends WalletState(3) with WalletState.Recognized {
val index = 3
val name = "RPC_ACTIVE"
override def isRpcActive: _root_.scala.Boolean = true
}
/** SERVER_ACTIVE means that the lnd server is ready to accept calls.
*/
@SerialVersionUID(0L)
case object SERVER_ACTIVE extends WalletState(4) with WalletState.Recognized {
val index = 4
val name = "SERVER_ACTIVE"
override def isServerActive: _root_.scala.Boolean = true
}
/** WAITING_TO_START means that node is waiting to become the leader in a
* cluster and is not started yet.
*/
@SerialVersionUID(0L)
case object WAITING_TO_START extends WalletState(255) with WalletState.Recognized {
val index = 5
val name = "WAITING_TO_START"
override def isWaitingToStart: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends WalletState(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(NON_EXISTING, LOCKED, UNLOCKED, RPC_ACTIVE, SERVER_ACTIVE, WAITING_TO_START)
def fromValue(__value: _root_.scala.Int): WalletState = __value match {
case 0 => NON_EXISTING
case 1 => LOCKED
case 2 => UNLOCKED
case 3 => RPC_ACTIVE
case 4 => SERVER_ACTIVE
case 255 => WAITING_TO_START
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = StateserviceProto.javaDescriptor.getEnumTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = StateserviceProto.scalaDescriptor.enums(0)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy