scala.googleapis.storage.ObjectCustomerEncryption.scala Maven / Gradle / Ivy
The newest version!
package googleapis.storage
import io.circe._
import io.circe.syntax._
final case class ObjectCustomerEncryption(
/** The encryption algorithm.
*/
encryptionAlgorithm: Option[String] = None,
/** SHA256 hash value of the encryption key.
*/
keySha256: Option[String] = None,
)
object ObjectCustomerEncryption {
implicit val encoder: Encoder[
ObjectCustomerEncryption
] = Encoder.instance { x =>
Json.obj(
"encryptionAlgorithm" := x.encryptionAlgorithm,
"keySha256" := x.keySha256,
)
}
implicit val decoder: Decoder[
ObjectCustomerEncryption
] = Decoder.instance { c =>
for {
v0 <- c.get[Option[String]]("encryptionAlgorithm")
v1 <- c.get[Option[String]]("keySha256")
} yield ObjectCustomerEncryption(v0, v1)
}
}