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