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

scala.googleapis.bigquery.DatasetReference.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 DatasetReference(
    /** Required. A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters.
      */
    datasetId: Option[String] = None,
    /** Optional. The ID of the project containing this dataset.
      */
    projectId: Option[String] = None,
)
object DatasetReference {
  implicit val encoder: Encoder[DatasetReference] = Encoder.instance { x =>
    Json.obj("datasetId" := x.datasetId, "projectId" := x.projectId)
  }
  implicit val decoder: Decoder[DatasetReference] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[String]]("datasetId")
      v1 <- c.get[Option[String]]("projectId")
    } yield DatasetReference(v0, v1)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy