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

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

package googleapis.bigquery

import io.circe._

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

  /** BiEngineMode type not specified.
    */
  case object BI_ENGINE_ACCELERATION_MODE_UNSPECIFIED
      extends BiEngineStatisticsAccelerationMode("BI_ENGINE_ACCELERATION_MODE_UNSPECIFIED")

  /** BI Engine acceleration was attempted but disabled. bi_engine_reasons specifies a more detailed reason.
    */
  case object BI_ENGINE_DISABLED extends BiEngineStatisticsAccelerationMode("BI_ENGINE_DISABLED")

  /** Some inputs were accelerated using BI Engine. See bi_engine_reasons for why parts of the query were not accelerated.
    */
  case object PARTIAL_INPUT extends BiEngineStatisticsAccelerationMode("PARTIAL_INPUT")

  /** All of the query inputs were accelerated using BI Engine.
    */
  case object FULL_INPUT extends BiEngineStatisticsAccelerationMode("FULL_INPUT")

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy