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

sbt-graphql.GetConsignmentFiles.scala Maven / Gradle / Ivy

The newest version!
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 GetConsignmentFiles {
  object getConsignmentFiles extends GraphQLQuery {
    val document: sangria.ast.Document = graphql"""query getConsignmentFiles($$consignmentId: UUID!) {
  getConsignment(consignmentid: $$consignmentId) {
    files {
      fileId
      fileName
      fileType
      parentId
      metadata {
        clientSideOriginalFilePath
      }
      fileStatuses {
        statusType
        statusValue
      }
    }
  }
}"""
    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(files: List[GetConsignment.Files])
    object GetConsignment {
      implicit val jsonDecoder: Decoder[GetConsignment] = deriveDecoder[GetConsignment]
      implicit val jsonEncoder: Encoder[GetConsignment] = deriveEncoder[GetConsignment]
      case class Files(fileId: UUID, fileName: Option[String], fileType: Option[String], parentId: Option[UUID], metadata: Files.Metadata, fileStatuses: List[Files.FileStatuses])
      object Files {
        implicit val jsonDecoder: Decoder[Files] = deriveDecoder[Files]
        implicit val jsonEncoder: Encoder[Files] = deriveEncoder[Files]
        case class Metadata(clientSideOriginalFilePath: Option[String])
        object Metadata {
          implicit val jsonDecoder: Decoder[Metadata] = deriveDecoder[Metadata]
          implicit val jsonEncoder: Encoder[Metadata] = deriveEncoder[Metadata]
        }
        case class FileStatuses(statusType: String, statusValue: String)
        object FileStatuses {
          implicit val jsonDecoder: Decoder[FileStatuses] = deriveDecoder[FileStatuses]
          implicit val jsonEncoder: Encoder[FileStatuses] = deriveEncoder[FileStatuses]
        }
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy