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

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

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

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

final case class JobReference(
    /** Required. The ID of the job. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or dashes (-). The maximum length is 1,024 characters.
      */
    jobId: Option[String] = None,
    /** Optional. The geographic location of the job. The default value is US. For more information about BigQuery locations, see: https://cloud.google.com/bigquery/docs/locations
      */
    location: Option[String] = None,
    /** Required. The ID of the project containing this job.
      */
    projectId: Option[String] = None,
)
object JobReference {
  implicit val encoder: Encoder[JobReference] = Encoder.instance { x =>
    Json.obj(
      "jobId" := x.jobId,
      "location" := x.location,
      "projectId" := x.projectId,
    )
  }
  implicit val decoder: Decoder[JobReference] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[String]]("jobId")
      v1 <- c.get[Option[String]]("location")
      v2 <- c.get[Option[String]]("projectId")
    } yield JobReference(v0, v1, v2)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy