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

scala.googleapis.bigquery.RangePartitioning.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 RangePartitioning(
    /** Required. The name of the column to partition the table on. It must be a top-level, INT64 column whose mode is NULLABLE or REQUIRED.
      */
    field: Option[String] = None,
    /** [Experimental] Defines the ranges for range partitioning.
      */
    range: Option[RangePartitioningRange] = None,
)
object RangePartitioning {
  implicit val encoder: Encoder[RangePartitioning] = Encoder.instance { x =>
    Json.obj("field" := x.field, "range" := x.range)
  }
  implicit val decoder: Decoder[RangePartitioning] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[String]]("field")
      v1 <- c.get[Option[RangePartitioningRange]]("range")
    } yield RangePartitioning(v0, v1)

  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy