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

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

The newest version!
package googleapis.storage

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

final case class BucketLifecycleRuleAction(
    /** Target storage class. Required iff the type of the action is SetStorageClass.
      */
    storageClass: Option[String] = None,
    /** Type of the action. Currently, only Delete, SetStorageClass, and AbortIncompleteMultipartUpload are supported.
      */
    `type`: Option[String] = None,
)
object BucketLifecycleRuleAction {
  implicit val encoder: Encoder[
    BucketLifecycleRuleAction
  ] = Encoder.instance { x =>
    Json.obj("storageClass" := x.storageClass, "type" := x.`type`)
  }
  implicit val decoder: Decoder[
    BucketLifecycleRuleAction
  ] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[String]]("storageClass")
      v1 <- c.get[Option[String]]("type")
    } yield BucketLifecycleRuleAction(v0, v1)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy