scala.googleapis.storage.BucketOwner.scala Maven / Gradle / Ivy
The newest version!
package googleapis.storage
import io.circe._
import io.circe.syntax._
final case class BucketOwner(
/** The entity, in the form project-owner-projectId.
*/
entity: Option[String] = None,
/** The ID for the entity.
*/
entityId: Option[String] = None,
)
object BucketOwner {
implicit val encoder: Encoder[BucketOwner] = Encoder.instance { x =>
Json.obj("entity" := x.entity, "entityId" := x.entityId)
}
implicit val decoder: Decoder[BucketOwner] = Decoder.instance { c =>
for {
v0 <- c.get[Option[String]]("entity")
v1 <- c.get[Option[String]]("entityId")
} yield BucketOwner(v0, v1)
}
}