scala.googleapis.bigquery.BigLakeConfigurationTableFormat.scala Maven / Gradle / Ivy
package googleapis.bigquery
import io.circe._
sealed abstract class BigLakeConfigurationTableFormat(val value: String)
extends Product
with Serializable
object BigLakeConfigurationTableFormat {
/** Default Value.
*/
case object TABLE_FORMAT_UNSPECIFIED
extends BigLakeConfigurationTableFormat("TABLE_FORMAT_UNSPECIFIED")
/** Apache Iceberg format.
*/
case object ICEBERG extends BigLakeConfigurationTableFormat("ICEBERG")
val values = List(TABLE_FORMAT_UNSPECIFIED, ICEBERG)
def fromString(input: String): Either[String, BigLakeConfigurationTableFormat] = values
.find(_.value == input)
.toRight(s"'$input' was not a valid value for BigLakeConfigurationTableFormat")
implicit val decoder: Decoder[BigLakeConfigurationTableFormat] =
Decoder[String].emap(s => fromString(s))
implicit val encoder: Encoder[BigLakeConfigurationTableFormat] =
Encoder[String].contramap(_.value)
}