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

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

The newest version!
package googleapis.storage

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

final case class HmacKeysMetadata(
    /** The list of items.
      */
    items: Option[List[HmacKeyMetadata]] = None,
    /** The kind of item this is. For lists of hmacKeys, this is always storage#hmacKeysMetadata.
      */
    kind: Option[String] = None,
    /** The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
      */
    nextPageToken: Option[String] = None,
)
object HmacKeysMetadata {
  implicit val encoder: Encoder[HmacKeysMetadata] = Encoder.instance { x =>
    Json.obj(
      "items" := x.items,
      "kind" := x.kind,
      "nextPageToken" := x.nextPageToken,
    )
  }
  implicit val decoder: Decoder[HmacKeysMetadata] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[List[HmacKeyMetadata]]]("items")
      v1 <- c.get[Option[String]]("kind")
      v2 <- c.get[Option[String]]("nextPageToken")
    } yield HmacKeysMetadata(v0, v1, v2)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy