All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala.googleapis.storage.BucketSoftDeletePolicy.scala Maven / Gradle / Ivy

The newest version!
package googleapis.storage

import io.circe._
import io.circe.syntax._

final case class BucketSoftDeletePolicy(
    /** Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.
      */
    effectiveTime: Option[String] = None,
    /** The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted.
      */
    retentionDurationSeconds: Option[Long] = None,
)
object BucketSoftDeletePolicy {
  implicit val encoder: Encoder[BucketSoftDeletePolicy] = Encoder.instance { x =>
    Json.obj(
      "effectiveTime" := x.effectiveTime,
      "retentionDurationSeconds" := x.retentionDurationSeconds,
    )
  }
  implicit val decoder: Decoder[
    BucketSoftDeletePolicy
  ] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[String]]("effectiveTime")
      v1 <- c.get[Option[Long]]("retentionDurationSeconds")
    } yield BucketSoftDeletePolicy(v0, v1)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy