All Downloads are FREE. Search and download functionalities are using the official Maven repository.

peersrpc.FeatureSet.scala Maven / Gradle / Ivy

The newest version!
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package peersrpc

sealed abstract class FeatureSet(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
  type EnumType = FeatureSet
  def isSetInit: _root_.scala.Boolean = false
  def isSetLegacyGlobal: _root_.scala.Boolean = false
  def isSetNodeAnn: _root_.scala.Boolean = false
  def isSetInvoice: _root_.scala.Boolean = false
  def isSetInvoiceAmp: _root_.scala.Boolean = false
  def companion: _root_.scalapb.GeneratedEnumCompanion[FeatureSet] = peersrpc.FeatureSet
  final def asRecognized: _root_.scala.Option[peersrpc.FeatureSet.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[peersrpc.FeatureSet.Recognized])
}

object FeatureSet extends _root_.scalapb.GeneratedEnumCompanion[FeatureSet] {
  sealed trait Recognized extends FeatureSet
  implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[FeatureSet] = this
  
  /**
    * SET_INIT identifies features that should be sent in an Init message to
    * a remote peer.
    */
  @SerialVersionUID(0L)
  case object SET_INIT extends FeatureSet(0) with FeatureSet.Recognized {
    val index = 0
    val name = "SET_INIT"
    override def isSetInit: _root_.scala.Boolean = true
  }
  
  /**
    * SET_LEGACY_GLOBAL identifies features that should be set in the legacy
    * GlobalFeatures field of an Init message, which maintains backwards
    * compatibility with nodes that haven't implemented flat features.
    */
  @SerialVersionUID(0L)
  case object SET_LEGACY_GLOBAL extends FeatureSet(1) with FeatureSet.Recognized {
    val index = 1
    val name = "SET_LEGACY_GLOBAL"
    override def isSetLegacyGlobal: _root_.scala.Boolean = true
  }
  
  /**
    * SET_NODE_ANN identifies features that should be advertised on node
    * announcements.
    */
  @SerialVersionUID(0L)
  case object SET_NODE_ANN extends FeatureSet(2) with FeatureSet.Recognized {
    val index = 2
    val name = "SET_NODE_ANN"
    override def isSetNodeAnn: _root_.scala.Boolean = true
  }
  
  /**
    * SET_INVOICE identifies features that should be advertised on invoices
    * generated by the daemon.
    */
  @SerialVersionUID(0L)
  case object SET_INVOICE extends FeatureSet(3) with FeatureSet.Recognized {
    val index = 3
    val name = "SET_INVOICE"
    override def isSetInvoice: _root_.scala.Boolean = true
  }
  
  /**
    * SET_INVOICE_AMP identifies the features that should be advertised on
    * AMP invoices generated by the daemon.
    */
  @SerialVersionUID(0L)
  case object SET_INVOICE_AMP extends FeatureSet(4) with FeatureSet.Recognized {
    val index = 4
    val name = "SET_INVOICE_AMP"
    override def isSetInvoiceAmp: _root_.scala.Boolean = true
  }
  
  @SerialVersionUID(0L)
  final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends FeatureSet(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
  lazy val values = scala.collection.immutable.Seq(SET_INIT, SET_LEGACY_GLOBAL, SET_NODE_ANN, SET_INVOICE, SET_INVOICE_AMP)
  def fromValue(__value: _root_.scala.Int): FeatureSet = __value match {
    case 0 => SET_INIT
    case 1 => SET_LEGACY_GLOBAL
    case 2 => SET_NODE_ANN
    case 3 => SET_INVOICE
    case 4 => SET_INVOICE_AMP
    case __other => Unrecognized(__other)
  }
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = PeersProto.javaDescriptor.getEnumTypes().get(1)
  def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = PeersProto.scalaDescriptor.enums(1)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy