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

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

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

import JsonInstances._
import io.circe._
import io.circe.syntax._
import scala.concurrent.duration.FiniteDuration

final case class TableListTable(
    /** A reference uniquely identifying table.
      */
    tableReference: Option[TableReference] = None,
    /** The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.
      */
    expirationTime: Option[FiniteDuration] = None,
    /** Optional. If set to true, queries including this table must specify a partition filter. This filter is used for partition elimination.
      */
    requirePartitionFilter: Option[Boolean] = None,
    /** The user-friendly name for this table.
      */
    friendlyName: Option[String] = None,
    /** An opaque ID of the table.
      */
    id: Option[String] = None,
    /** The time-based partitioning for this table.
      */
    timePartitioning: Option[TimePartitioning] = None,
    /** The labels associated with this table. You can use these to organize and group your tables.
      */
    labels: Option[Map[String, String]] = None,
    /** The resource type.
      */
    kind: Option[String] = None,
    /** The type of table.
      */
    `type`: Option[String] = None,
    /** The range partitioning for this table.
      */
    rangePartitioning: Option[RangePartitioning] = None,
    /** Output only. The time when this table was created, in milliseconds since the epoch.
      */
    creationTime: Option[FiniteDuration] = None,
    /** Information about a logical view.
      */
    view: Option[TableListTableView] = None,
    /** Clustering specification for this table, if configured.
      */
    clustering: Option[Clustering] = None,
)
object TableListTable {
  implicit val encoder: Encoder[TableListTable] = Encoder.instance { x =>
    Json.obj(
      "tableReference" := x.tableReference,
      "expirationTime" := x.expirationTime,
      "requirePartitionFilter" := x.requirePartitionFilter,
      "friendlyName" := x.friendlyName,
      "id" := x.id,
      "timePartitioning" := x.timePartitioning,
      "labels" := x.labels,
      "kind" := x.kind,
      "type" := x.`type`,
      "rangePartitioning" := x.rangePartitioning,
      "creationTime" := x.creationTime,
      "view" := x.view,
      "clustering" := x.clustering,
    )
  }
  implicit val decoder: Decoder[TableListTable] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[TableReference]]("tableReference")
      v1 <- c.get[Option[FiniteDuration]]("expirationTime")
      v2 <- c.get[Option[Boolean]]("requirePartitionFilter")
      v3 <- c.get[Option[String]]("friendlyName")
      v4 <- c.get[Option[String]]("id")
      v5 <- c.get[Option[TimePartitioning]]("timePartitioning")
      v6 <- c.get[Option[Map[String, String]]]("labels")
      v7 <- c.get[Option[String]]("kind")
      v8 <- c.get[Option[String]]("type")
      v9 <- c.get[Option[RangePartitioning]]("rangePartitioning")
      v10 <- c.get[Option[FiniteDuration]]("creationTime")
      v11 <- c.get[Option[TableListTableView]]("view")
      v12 <- c.get[Option[Clustering]]("clustering")
    } yield TableListTable(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy