scala.googleapis.storage.GoogleLongrunningListOperationsResponse.scala Maven / Gradle / Ivy
The newest version!
package googleapis.storage
import io.circe._
import io.circe.syntax._
final case class GoogleLongrunningListOperationsResponse(
/** The kind of item this is. For lists of operations, this is always storage#operations.
*/
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,
/** A list of operations that matches the specified filter in the request.
*/
operations: Option[List[GoogleLongrunningOperation]] = None,
)
object GoogleLongrunningListOperationsResponse {
implicit val encoder: Encoder[
GoogleLongrunningListOperationsResponse
] = Encoder.instance { x =>
Json.obj(
"kind" := x.kind,
"nextPageToken" := x.nextPageToken,
"operations" := x.operations,
)
}
implicit val decoder: Decoder[
GoogleLongrunningListOperationsResponse
] = Decoder.instance { c =>
for {
v0 <- c.get[Option[String]]("kind")
v1 <- c.get[Option[String]]("nextPageToken")
v2 <- c.get[Option[List[GoogleLongrunningOperation]]]("operations")
} yield GoogleLongrunningListOperationsResponse(v0, v1, v2)
}
}