scala.googleapis.storage.Buckets.scala Maven / Gradle / Ivy
The newest version!
package googleapis.storage
import io.circe._
import io.circe.syntax._
final case class Buckets(
/** The list of items.
*/
items: Option[List[Bucket]] = None,
/** The kind of item this is. For lists of buckets, this is always storage#buckets.
*/
kind: Option[String] = None,
/** The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
*/
nextPageToken: Option[String] = None,
)
object Buckets {
implicit val encoder: Encoder[Buckets] = Encoder.instance { x =>
Json.obj(
"items" := x.items,
"kind" := x.kind,
"nextPageToken" := x.nextPageToken,
)
}
implicit val decoder: Decoder[Buckets] = Decoder.instance { c =>
for {
v0 <- c.get[Option[List[Bucket]]]("items")
v1 <- c.get[Option[String]]("kind")
v2 <- c.get[Option[String]]("nextPageToken")
} yield Buckets(v0, v1, v2)
}
}