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

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

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

import io.circe._
import io.circe.syntax._

final case class ParquetOptions(
    /** Optional. Indicates whether to use schema inference specifically for Parquet LIST logical type.
      */
    enableListInference: Option[Boolean] = None,
    /** Optional. Indicates whether to infer Parquet ENUM logical type as STRING instead of BYTES by default.
      */
    enumAsString: Option[Boolean] = None,
    /** Optional. Indicates how to represent a Parquet map if present.
      */
    mapTargetType: Option[ParquetOptionsMapTargetType] = None,
)
object ParquetOptions {
  implicit val encoder: Encoder[ParquetOptions] = Encoder.instance { x =>
    Json.obj(
      "enableListInference" := x.enableListInference,
      "enumAsString" := x.enumAsString,
      "mapTargetType" := x.mapTargetType,
    )
  }
  implicit val decoder: Decoder[ParquetOptions] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[Boolean]]("enableListInference")
      v1 <- c.get[Option[Boolean]]("enumAsString")
      v2 <- c.get[Option[ParquetOptionsMapTargetType]]("mapTargetType")
    } yield ParquetOptions(v0, v1, v2)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy