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

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

The newest version!
package googleapis.storage

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

final case class ComposeRequestSourceObject(
    /** The generation of this object to use as the source.
      */
    generation: Option[Long] = None,
    /** The source object's name. All source objects must reside in the same bucket.
      */
    name: Option[String] = None,
    /** Conditions that must be met for this operation to execute.
      */
    objectPreconditions: Option[ComposeRequestSourceObjectObjectPreconditions] = None,
)
object ComposeRequestSourceObject {
  implicit val encoder: Encoder[
    ComposeRequestSourceObject
  ] = Encoder.instance { x =>
    Json.obj(
      "generation" := x.generation,
      "name" := x.name,
      "objectPreconditions" := x.objectPreconditions,
    )
  }
  implicit val decoder: Decoder[
    ComposeRequestSourceObject
  ] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[Long]]("generation")
      v1 <- c.get[Option[String]]("name")
      v2 <- c.get[Option[ComposeRequestSourceObjectObjectPreconditions]]("objectPreconditions")
    } yield ComposeRequestSourceObject(v0, v1, v2)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy