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

grpc.health.v1.ServingStatus.scala Maven / Gradle / Ivy

There is a newer version: 0.1.5
Show newest version
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3

package grpc.health.v1

sealed abstract class ServingStatus(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
  type EnumType = grpc.health.v1.ServingStatus
  type RecognizedType = grpc.health.v1.ServingStatus.Recognized
  def isUnknown: _root_.scala.Boolean = false
  def isServing: _root_.scala.Boolean = false
  def isNotServing: _root_.scala.Boolean = false
  def isServiceUnknown: _root_.scala.Boolean = false
  def companion: _root_.scalapb.GeneratedEnumCompanion[ServingStatus] = grpc.health.v1.ServingStatus
  final def asRecognized: _root_.scala.Option[grpc.health.v1.ServingStatus.Recognized] = if (isUnrecognized) _root_.scala.None else _root_.scala.Some(this.asInstanceOf[grpc.health.v1.ServingStatus.Recognized])
}

object ServingStatus extends _root_.scalapb.GeneratedEnumCompanion[ServingStatus] {
  sealed trait Recognized extends ServingStatus
  implicit def enumCompanion: _root_.scalapb.GeneratedEnumCompanion[ServingStatus] = this
  
  /** Default status. Indicates that no stats was returned.
    */
  @SerialVersionUID(0L)
  case object UNKNOWN extends ServingStatus(0) with ServingStatus.Recognized {
    val index = 0
    val name = "UNKNOWN"
    override def isUnknown: _root_.scala.Boolean = true
  }
  
  /** Service is in a healthy state.
    */
  @SerialVersionUID(0L)
  case object SERVING extends ServingStatus(1) with ServingStatus.Recognized {
    val index = 1
    val name = "SERVING"
    override def isServing: _root_.scala.Boolean = true
  }
  
  /** Service is unhealthy. Reason is implementation specific.
    */
  @SerialVersionUID(0L)
  case object NOT_SERVING extends ServingStatus(2) with ServingStatus.Recognized {
    val index = 2
    val name = "NOT_SERVING"
    override def isNotServing: _root_.scala.Boolean = true
  }
  
  /** Used only by the Watch method.
    */
  @SerialVersionUID(0L)
  case object SERVICE_UNKNOWN extends ServingStatus(3) with ServingStatus.Recognized {
    val index = 3
    val name = "SERVICE_UNKNOWN"
    override def isServiceUnknown: _root_.scala.Boolean = true
  }
  
  @SerialVersionUID(0L)
  final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends ServingStatus(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
  lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(UNKNOWN, SERVING, NOT_SERVING, SERVICE_UNKNOWN)
  def fromValue(__value: _root_.scala.Int): ServingStatus = __value match {
    case 0 => UNKNOWN
    case 1 => SERVING
    case 2 => NOT_SERVING
    case 3 => SERVICE_UNKNOWN
    case __other => Unrecognized(__other)
  }
  def javaDescriptor: _root_.com.google.protobuf.Descriptors.EnumDescriptor = HealthModelsProto.javaDescriptor.getEnumTypes().get(0)
  def scalaDescriptor: _root_.scalapb.descriptors.EnumDescriptor = HealthModelsProto.scalaDescriptor.enums(0)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy