sbt-graphql.GetFileCheckProgress.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 GetFileCheckProgress {
object getFileCheckProgress extends GraphQLQuery {
val document: sangria.ast.Document = graphql"""query getFileCheckProgress($$consignmentId: UUID!) {
getConsignment(consignmentid: $$consignmentId) {
allChecksSucceeded
parentFolder
totalFiles
files {
fileStatus
}
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(allChecksSucceeded: Boolean, parentFolder: Option[String], totalFiles: Int, files: List[GetConsignment.Files], fileChecks: GetConsignment.FileChecks)
object GetConsignment {
implicit val jsonDecoder: Decoder[GetConsignment] = deriveDecoder[GetConsignment]
implicit val jsonEncoder: Encoder[GetConsignment] = deriveEncoder[GetConsignment]
case class Files(fileStatus: Option[String])
object Files {
implicit val jsonDecoder: Decoder[Files] = deriveDecoder[Files]
implicit val jsonEncoder: Encoder[Files] = deriveEncoder[Files]
}
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]
}
}
}
}
}