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

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

The newest version!
package googleapis.storage

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

final case class Notifications(
    /** The list of items.
      */
    items: Option[List[Notification]] = None,
    /** The kind of item this is. For lists of notifications, this is always storage#notifications.
      */
    kind: Option[String] = None,
)
object Notifications {
  implicit val encoder: Encoder[Notifications] = Encoder.instance { x =>
    Json.obj("items" := x.items, "kind" := x.kind)
  }
  implicit val decoder: Decoder[Notifications] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[List[Notification]]]("items")
      v1 <- c.get[Option[String]]("kind")
    } yield Notifications(v0, v1)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy