scala.googleapis.storage.BucketLifecycle.scala Maven / Gradle / Ivy
The newest version!
package googleapis.storage
import io.circe._
import io.circe.syntax._
final case class BucketLifecycle(
/** A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken.
*/
rule: Option[List[BucketLifecycleRule]] = None
)
object BucketLifecycle {
implicit val encoder: Encoder[BucketLifecycle] = Encoder.instance { x =>
Json.obj("rule" := x.rule)
}
implicit val decoder: Decoder[BucketLifecycle] = Decoder.instance { c =>
for {
v0 <- c.get[Option[List[BucketLifecycleRule]]]("rule")
} yield BucketLifecycle(v0)
}
}