peersrpc.UpdateAction.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
/** UpdateAction is used to determine the kind of action we are referring to.
*/
sealed abstract class UpdateAction(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = UpdateAction
def isAdd: _root_.scala.Boolean = false
def isRemove: _root_.scala.Boolean = false
def companion: _root_.scalapb.GeneratedEnumCompanion[UpdateAction] = peersrpc.UpdateAction
final def asRecognized: _root_.scala.Option[peersrpc.UpdateAction.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[peersrpc.UpdateAction.Recognized])
}
object UpdateAction extends _root_.scalapb.GeneratedEnumCompanion[UpdateAction] {
sealed trait Recognized extends UpdateAction
implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[UpdateAction] = this
/** ADD indicates this is an "insertion" kind of action.
*/
@SerialVersionUID(0L)
case object ADD extends UpdateAction(0) with UpdateAction.Recognized {
val index = 0
val name = "ADD"
override def isAdd: _root_.scala.Boolean = true
}
/** REMOVE indicates this is a "deletion" kind of action.
*/
@SerialVersionUID(0L)
case object REMOVE extends UpdateAction(1) with UpdateAction.Recognized {
val index = 1
val name = "REMOVE"
override def isRemove: _root_.scala.Boolean = true
}
@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends UpdateAction(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(ADD, REMOVE)
def fromValue(__value: _root_.scala.Int): UpdateAction = __value match {
case 0 => ADD
case 1 => REMOVE
case __other => Unrecognized(__other)
}
def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = PeersProto.javaDescriptor.getEnumTypes().get(0)
def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = PeersProto.scalaDescriptor.enums(0)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy