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

scala.googleapis.bigquery.JobStatistics2ReservationUsage.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 JobStatistics2ReservationUsage(
    /** Reservation name or "unreserved" for on-demand resource usage and multi-statement queries.
      */
    name: Option[String] = None,
    /** Total slot milliseconds used by the reservation for a particular job.
      */
    slotMs: Option[FiniteDuration] = None,
)
object JobStatistics2ReservationUsage {
  implicit val encoder: Encoder[
    JobStatistics2ReservationUsage
  ] = Encoder.instance(x => Json.obj("name" := x.name, "slotMs" := x.slotMs))
  implicit val decoder: Decoder[
    JobStatistics2ReservationUsage
  ] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[String]]("name")
      v1 <- c.get[Option[FiniteDuration]]("slotMs")
    } yield JobStatistics2ReservationUsage(v0, v1)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy