scala.googleapis.storage.BucketEncryption.scala Maven / Gradle / Ivy
The newest version!
package googleapis.storage
import io.circe._
import io.circe.syntax._
final case class BucketEncryption(
/** A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified.
*/
defaultKmsKeyName: Option[String] = None
)
object BucketEncryption {
implicit val encoder: Encoder[BucketEncryption] = Encoder.instance { x =>
Json.obj("defaultKmsKeyName" := x.defaultKmsKeyName)
}
implicit val decoder: Decoder[BucketEncryption] = Decoder.instance { c =>
for {
v0 <- c.get[Option[String]]("defaultKmsKeyName")
} yield BucketEncryption(v0)
}
}