scala.googleapis.storage.ComposeRequest.scala Maven / Gradle / Ivy
The newest version!
package googleapis.storage
import io.circe._
import io.circe.syntax._
final case class ComposeRequest(
/** Properties of the resulting object.
*/
destination: Option[Object] = None,
/** The kind of item this is.
*/
kind: Option[String] = None,
/** The list of source objects that will be concatenated into a single object.
*/
sourceObjects: Option[List[ComposeRequestSourceObject]] = None,
)
object ComposeRequest {
implicit val encoder: Encoder[ComposeRequest] = Encoder.instance { x =>
Json.obj(
"destination" := x.destination,
"kind" := x.kind,
"sourceObjects" := x.sourceObjects,
)
}
implicit val decoder: Decoder[ComposeRequest] = Decoder.instance { c =>
for {
v0 <- c.get[Option[Object]]("destination")
v1 <- c.get[Option[String]]("kind")
v2 <- c.get[Option[List[ComposeRequestSourceObject]]]("sourceObjects")
} yield ComposeRequest(v0, v1, v2)
}
}