scala.googleapis.bigquery.DatasetList.scala Maven / Gradle / Ivy
package googleapis.bigquery
import io.circe._
import io.circe.syntax._
final case class DatasetList(
/** Output only. A hash value of the results page. You can use this property to determine if the page has changed since the last request.
*/
etag: Option[String] = None,
/** A token that can be used to request the next results page. This property is omitted on the final results page.
*/
nextPageToken: Option[String] = None,
/** An array of the dataset resources in the project. Each resource contains basic information. For full information about a particular dataset resource, use the Datasets: get method. This property is omitted when there are no datasets in the project.
*/
datasets: Option[List[DatasetListDataset]] = None,
/** A list of skipped locations that were unreachable. For more information about BigQuery locations, see: https://cloud.google.com/bigquery/docs/locations. Example: "europe-west5"
*/
unreachable: Option[List[String]] = None,
/** Output only. The resource type. This property always returns the value "bigquery#datasetList"
*/
kind: Option[String] = None,
)
object DatasetList {
implicit val encoder: Encoder[DatasetList] = Encoder.instance { x =>
Json.obj(
"etag" := x.etag,
"nextPageToken" := x.nextPageToken,
"datasets" := x.datasets,
"unreachable" := x.unreachable,
"kind" := x.kind,
)
}
implicit val decoder: Decoder[DatasetList] = Decoder.instance { c =>
for {
v0 <- c.get[Option[String]]("etag")
v1 <- c.get[Option[String]]("nextPageToken")
v2 <- c.get[Option[List[DatasetListDataset]]]("datasets")
v3 <- c.get[Option[List[String]]]("unreachable")
v4 <- c.get[Option[String]]("kind")
} yield DatasetList(v0, v1, v2, v3, v4)
}
}