sbt-graphql.GetFileCheckProgressSummary.scala Maven / Gradle / Ivy
package graphql.codegen
import java.util.UUID
import java.time.ZonedDateTime
import java.time.LocalDateTime
import io.circe.{ Decoder, Encoder }
import io.circe.generic.semiauto.{ deriveDecoder, deriveEncoder }
import sangria.macros._
import types._
object GetFileCheckProgressSummary {
object getFileCheckProgressSummary extends GraphQLQuery {
val document: sangria.ast.Document = graphql"""query getFileCheckProgressSummary($$consignmentId: UUID!) {
getConsignment(consignmentid: $$consignmentId) {
totalFiles
fileChecks {
antivirusProgress {
filesProcessed
}
checksumProgress {
filesProcessed
}
ffidProgress {
filesProcessed
}
}
}
}"""
case class Variables(consignmentId: UUID)
object Variables { implicit val jsonEncoder: Encoder[Variables] = deriveEncoder[Variables] }
case class Data(getConsignment: Option[GetConsignment])
object Data { implicit val jsonDecoder: Decoder[Data] = deriveDecoder[Data] }
case class GetConsignment(totalFiles: Int, fileChecks: GetConsignment.FileChecks)
object GetConsignment {
implicit val jsonDecoder: Decoder[GetConsignment] = deriveDecoder[GetConsignment]
implicit val jsonEncoder: Encoder[GetConsignment] = deriveEncoder[GetConsignment]
case class FileChecks(antivirusProgress: FileChecks.AntivirusProgress, checksumProgress: FileChecks.ChecksumProgress, ffidProgress: FileChecks.FfidProgress)
object FileChecks {
implicit val jsonDecoder: Decoder[FileChecks] = deriveDecoder[FileChecks]
implicit val jsonEncoder: Encoder[FileChecks] = deriveEncoder[FileChecks]
case class AntivirusProgress(filesProcessed: Int)
object AntivirusProgress {
implicit val jsonDecoder: Decoder[AntivirusProgress] = deriveDecoder[AntivirusProgress]
implicit val jsonEncoder: Encoder[AntivirusProgress] = deriveEncoder[AntivirusProgress]
}
case class ChecksumProgress(filesProcessed: Int)
object ChecksumProgress {
implicit val jsonDecoder: Decoder[ChecksumProgress] = deriveDecoder[ChecksumProgress]
implicit val jsonEncoder: Encoder[ChecksumProgress] = deriveEncoder[ChecksumProgress]
}
case class FfidProgress(filesProcessed: Int)
object FfidProgress {
implicit val jsonDecoder: Decoder[FfidProgress] = deriveDecoder[FfidProgress]
implicit val jsonEncoder: Encoder[FfidProgress] = deriveEncoder[FfidProgress]
}
}
}
}
}