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

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

There is a newer version: 0.4.5-v2-20240905
Show newest version
package googleapis.bigquery

import io.circe._

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

  /** BiEngineMode type not specified.
    */
  case object ACCELERATION_MODE_UNSPECIFIED
      extends BiEngineStatisticsBiEngineMode("ACCELERATION_MODE_UNSPECIFIED")

  /** BI Engine disabled the acceleration. bi_engine_reasons specifies a more detailed reason.
    */
  case object DISABLED extends BiEngineStatisticsBiEngineMode("DISABLED")

  /** Part of the query was accelerated using BI Engine. See bi_engine_reasons for why parts of the query were not accelerated.
    */
  case object PARTIAL extends BiEngineStatisticsBiEngineMode("PARTIAL")

  /** All of the query was accelerated using BI Engine.
    */
  case object FULL extends BiEngineStatisticsBiEngineMode("FULL")
  val values = List(ACCELERATION_MODE_UNSPECIFIED, DISABLED, PARTIAL, FULL)
  def fromString(input: String): Either[String, BiEngineStatisticsBiEngineMode] = values
    .find(_.value == input)
    .toRight(s"'$input' was not a valid value for BiEngineStatisticsBiEngineMode")
  implicit val decoder: Decoder[BiEngineStatisticsBiEngineMode] =
    Decoder[String].emap(s => fromString(s))
  implicit val encoder: Encoder[BiEngineStatisticsBiEngineMode] = Encoder[String].contramap(_.value)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy