scala.googleapis.storage.BucketLogging.scala Maven / Gradle / Ivy
The newest version!
package googleapis.storage
import io.circe._
import io.circe.syntax._
final case class BucketLogging(
/** The destination bucket where the current bucket's logs should be placed.
*/
logBucket: Option[String] = None,
/** A prefix for log object names.
*/
logObjectPrefix: Option[String] = None,
)
object BucketLogging {
implicit val encoder: Encoder[BucketLogging] = Encoder.instance { x =>
Json.obj("logBucket" := x.logBucket, "logObjectPrefix" := x.logObjectPrefix)
}
implicit val decoder: Decoder[BucketLogging] = Decoder.instance { c =>
for {
v0 <- c.get[Option[String]]("logBucket")
v1 <- c.get[Option[String]]("logObjectPrefix")
} yield BucketLogging(v0, v1)
}
}