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

scala.googleapis.bigquery.SnapshotDefinition.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 SnapshotDefinition(
    /** Required. Reference describing the ID of the table that was snapshot.
      */
    baseTableReference: Option[TableReference] = None,
    /** Required. The time at which the base table was snapshot. This value is reported in the JSON response using RFC3339 format.
      */
    snapshotTime: Option[String] = None,
)
object SnapshotDefinition {
  implicit val encoder: Encoder[SnapshotDefinition] = Encoder.instance { x =>
    Json.obj(
      "baseTableReference" := x.baseTableReference,
      "snapshotTime" := x.snapshotTime,
    )
  }
  implicit val decoder: Decoder[SnapshotDefinition] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[TableReference]]("baseTableReference")
      v1 <- c.get[Option[String]]("snapshotTime")
    } yield SnapshotDefinition(v0, v1)

  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy