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

scala.googleapis.bigquery.BiEngineReasonCode.scala Maven / Gradle / Ivy

There is a newer version: 0.6.1-v2-20241111
Show newest version
package googleapis.bigquery

import io.circe._

sealed abstract class BiEngineReasonCode(val value: String) extends Product with Serializable
object BiEngineReasonCode {

  /** BiEngineReason not specified.
    */
  case object CODE_UNSPECIFIED extends BiEngineReasonCode("CODE_UNSPECIFIED")

  /** No reservation available for BI Engine acceleration.
    */
  case object NO_RESERVATION extends BiEngineReasonCode("NO_RESERVATION")

  /** Not enough memory available for BI Engine acceleration.
    */
  case object INSUFFICIENT_RESERVATION extends BiEngineReasonCode("INSUFFICIENT_RESERVATION")

  /** This particular SQL text is not supported for acceleration by BI Engine.
    */
  case object UNSUPPORTED_SQL_TEXT extends BiEngineReasonCode("UNSUPPORTED_SQL_TEXT")

  /** Input too large for acceleration by BI Engine.
    */
  case object INPUT_TOO_LARGE extends BiEngineReasonCode("INPUT_TOO_LARGE")

  /** Catch-all code for all other cases for partial or disabled acceleration.
    */
  case object OTHER_REASON extends BiEngineReasonCode("OTHER_REASON")

  /** One or more tables were not eligible for BI Engine acceleration.
    */
  case object TABLE_EXCLUDED extends BiEngineReasonCode("TABLE_EXCLUDED")
  val values = List(
    CODE_UNSPECIFIED,
    NO_RESERVATION,
    INSUFFICIENT_RESERVATION,
    UNSUPPORTED_SQL_TEXT,
    INPUT_TOO_LARGE,
    OTHER_REASON,
    TABLE_EXCLUDED,
  )
  def fromString(input: String): Either[String, BiEngineReasonCode] =
    values.find(_.value == input).toRight(s"'$input' was not a valid value for BiEngineReasonCode")
  implicit val decoder: Decoder[BiEngineReasonCode] = Decoder[String].emap(s => fromString(s))
  implicit val encoder: Encoder[BiEngineReasonCode] = Encoder[String].contramap(_.value)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy