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

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

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

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

final case class SerDeInfo(
    /** Optional. Name of the SerDe. The maximum length is 256 characters.
      */
    name: Option[String] = None,
    /** Optional. Key-value pairs that define the initialization parameters for the serialization library. Maximum size 10 Kib.
      */
    parameters: Option[Map[String, String]] = None,
    /** Required. Specifies a fully-qualified class name of the serialization library that is responsible for the translation of data between table representation and the underlying low-level input and output format structures. The maximum length is 256 characters.
      */
    serializationLibrary: Option[String] = None,
)
object SerDeInfo {
  implicit val encoder: Encoder[SerDeInfo] = Encoder.instance { x =>
    Json.obj(
      "name" := x.name,
      "parameters" := x.parameters,
      "serializationLibrary" :=
        x.serializationLibrary,
    )
  }
  implicit val decoder: Decoder[SerDeInfo] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[String]]("name")
      v1 <- c.get[Option[Map[String, String]]]("parameters")
      v2 <- c.get[Option[String]]("serializationLibrary")
    } yield SerDeInfo(v0, v1, v2)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy