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

sbt-graphql.Interfaces.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 }
object types {
  case class AddAntivirusMetadataInput(antivirusMetadata: List[AddAntivirusMetadataInputValues])
  case object AddAntivirusMetadataInput {
    implicit val jsonDecoder: Decoder[AddAntivirusMetadataInput] = deriveDecoder[AddAntivirusMetadataInput]
    implicit val jsonEncoder: Encoder[AddAntivirusMetadataInput] = deriveEncoder[AddAntivirusMetadataInput]
  }
  case class AddAntivirusMetadataInputValues(fileId: UUID, software: String, softwareVersion: String, databaseVersion: String, result: String, datetime: Long)
  case object AddAntivirusMetadataInputValues {
    implicit val jsonDecoder: Decoder[AddAntivirusMetadataInputValues] = deriveDecoder[AddAntivirusMetadataInputValues]
    implicit val jsonEncoder: Encoder[AddAntivirusMetadataInputValues] = deriveEncoder[AddAntivirusMetadataInputValues]
  }
  case class AddConsignmentInput(seriesid: Option[UUID], consignmentType: String)
  case object AddConsignmentInput {
    implicit val jsonDecoder: Decoder[AddConsignmentInput] = deriveDecoder[AddConsignmentInput]
    implicit val jsonEncoder: Encoder[AddConsignmentInput] = deriveEncoder[AddConsignmentInput]
  }
  case class AddFileAndMetadataInput(consignmentId: UUID, metadataInput: List[ClientSideMetadataInput], emptyDirectories: Option[List[String]])
  case object AddFileAndMetadataInput {
    implicit val jsonDecoder: Decoder[AddFileAndMetadataInput] = deriveDecoder[AddFileAndMetadataInput]
    implicit val jsonEncoder: Encoder[AddFileAndMetadataInput] = deriveEncoder[AddFileAndMetadataInput]
  }
  case class AddFileMetadataWithFileIdInput(metadataInputValues: List[AddFileMetadataWithFileIdInputValues])
  case object AddFileMetadataWithFileIdInput {
    implicit val jsonDecoder: Decoder[AddFileMetadataWithFileIdInput] = deriveDecoder[AddFileMetadataWithFileIdInput]
    implicit val jsonEncoder: Encoder[AddFileMetadataWithFileIdInput] = deriveEncoder[AddFileMetadataWithFileIdInput]
  }
  case class AddFileMetadataWithFileIdInputValues(filePropertyName: String, fileId: UUID, value: String)
  case object AddFileMetadataWithFileIdInputValues {
    implicit val jsonDecoder: Decoder[AddFileMetadataWithFileIdInputValues] = deriveDecoder[AddFileMetadataWithFileIdInputValues]
    implicit val jsonEncoder: Encoder[AddFileMetadataWithFileIdInputValues] = deriveEncoder[AddFileMetadataWithFileIdInputValues]
  }
  case class AddFileStatusInput(fileId: UUID, statusType: String, statusValue: String)
  case object AddFileStatusInput {
    implicit val jsonDecoder: Decoder[AddFileStatusInput] = deriveDecoder[AddFileStatusInput]
    implicit val jsonEncoder: Encoder[AddFileStatusInput] = deriveEncoder[AddFileStatusInput]
  }
  case class AddFinalTransferConfirmationInput(consignmentId: UUID, legalCustodyTransferConfirmed: Boolean)
  case object AddFinalTransferConfirmationInput {
    implicit val jsonDecoder: Decoder[AddFinalTransferConfirmationInput] = deriveDecoder[AddFinalTransferConfirmationInput]
    implicit val jsonEncoder: Encoder[AddFinalTransferConfirmationInput] = deriveEncoder[AddFinalTransferConfirmationInput]
  }
  case class AddMultipleFileStatusesInput(statuses: List[AddFileStatusInput])
  case object AddMultipleFileStatusesInput {
    implicit val jsonDecoder: Decoder[AddMultipleFileStatusesInput] = deriveDecoder[AddMultipleFileStatusesInput]
    implicit val jsonEncoder: Encoder[AddMultipleFileStatusesInput] = deriveEncoder[AddMultipleFileStatusesInput]
  }
  case class AddOrUpdateBulkFileMetadataInput(consignmentId: UUID, fileMetadata: List[AddOrUpdateFileMetadata])
  case object AddOrUpdateBulkFileMetadataInput {
    implicit val jsonDecoder: Decoder[AddOrUpdateBulkFileMetadataInput] = deriveDecoder[AddOrUpdateBulkFileMetadataInput]
    implicit val jsonEncoder: Encoder[AddOrUpdateBulkFileMetadataInput] = deriveEncoder[AddOrUpdateBulkFileMetadataInput]
  }
  case class AddOrUpdateFileMetadata(fileId: UUID, metadata: List[AddOrUpdateMetadata])
  case object AddOrUpdateFileMetadata {
    implicit val jsonDecoder: Decoder[AddOrUpdateFileMetadata] = deriveDecoder[AddOrUpdateFileMetadata]
    implicit val jsonEncoder: Encoder[AddOrUpdateFileMetadata] = deriveEncoder[AddOrUpdateFileMetadata]
  }
  case class AddOrUpdateMetadata(filePropertyName: String, value: String)
  case object AddOrUpdateMetadata {
    implicit val jsonDecoder: Decoder[AddOrUpdateMetadata] = deriveDecoder[AddOrUpdateMetadata]
    implicit val jsonEncoder: Encoder[AddOrUpdateMetadata] = deriveEncoder[AddOrUpdateMetadata]
  }
  case class AddTransferAgreementComplianceInput(consignmentId: UUID, appraisalSelectionSignedOff: Boolean, initialOpenRecords: Option[Boolean], sensitivityReviewSignedOff: Boolean)
  case object AddTransferAgreementComplianceInput {
    implicit val jsonDecoder: Decoder[AddTransferAgreementComplianceInput] = deriveDecoder[AddTransferAgreementComplianceInput]
    implicit val jsonEncoder: Encoder[AddTransferAgreementComplianceInput] = deriveEncoder[AddTransferAgreementComplianceInput]
  }
  case class AddTransferAgreementPrivateBetaInput(consignmentId: UUID, allPublicRecords: Boolean, allCrownCopyright: Boolean, allEnglish: Option[Boolean])
  case object AddTransferAgreementPrivateBetaInput {
    implicit val jsonDecoder: Decoder[AddTransferAgreementPrivateBetaInput] = deriveDecoder[AddTransferAgreementPrivateBetaInput]
    implicit val jsonEncoder: Encoder[AddTransferAgreementPrivateBetaInput] = deriveEncoder[AddTransferAgreementPrivateBetaInput]
  }
  case class ClientSideMetadataInput(originalPath: String, checksum: String, lastModified: Long, fileSize: Long, matchId: Long)
  case object ClientSideMetadataInput {
    implicit val jsonDecoder: Decoder[ClientSideMetadataInput] = deriveDecoder[ClientSideMetadataInput]
    implicit val jsonEncoder: Encoder[ClientSideMetadataInput] = deriveEncoder[ClientSideMetadataInput]
  }
  case class ConsignmentStatusInput(consignmentId: UUID, statusType: String, statusValue: Option[String])
  case object ConsignmentStatusInput {
    implicit val jsonDecoder: Decoder[ConsignmentStatusInput] = deriveDecoder[ConsignmentStatusInput]
    implicit val jsonEncoder: Encoder[ConsignmentStatusInput] = deriveEncoder[ConsignmentStatusInput]
  }
  case class DeleteFileMetadataInput(fileIds: List[UUID], propertyNames: List[String], consignmentId: UUID)
  case object DeleteFileMetadataInput {
    implicit val jsonDecoder: Decoder[DeleteFileMetadataInput] = deriveDecoder[DeleteFileMetadataInput]
    implicit val jsonEncoder: Encoder[DeleteFileMetadataInput] = deriveEncoder[DeleteFileMetadataInput]
  }
  case class FFIDMetadataInput(metadataInputValues: List[FFIDMetadataInputValues])
  case object FFIDMetadataInput {
    implicit val jsonDecoder: Decoder[FFIDMetadataInput] = deriveDecoder[FFIDMetadataInput]
    implicit val jsonEncoder: Encoder[FFIDMetadataInput] = deriveEncoder[FFIDMetadataInput]
  }
  case class FFIDMetadataInputMatches(extension: Option[String], identificationBasis: String, puid: Option[String], fileExtensionMismatch: Option[Boolean], formatName: Option[String])
  case object FFIDMetadataInputMatches {
    implicit val jsonDecoder: Decoder[FFIDMetadataInputMatches] = deriveDecoder[FFIDMetadataInputMatches]
    implicit val jsonEncoder: Encoder[FFIDMetadataInputMatches] = deriveEncoder[FFIDMetadataInputMatches]
  }
  case class FFIDMetadataInputValues(fileId: UUID, software: String, softwareVersion: String, binarySignatureFileVersion: String, containerSignatureFileVersion: String, method: String, matches: List[FFIDMetadataInputMatches])
  case object FFIDMetadataInputValues {
    implicit val jsonDecoder: Decoder[FFIDMetadataInputValues] = deriveDecoder[FFIDMetadataInputValues]
    implicit val jsonEncoder: Encoder[FFIDMetadataInputValues] = deriveEncoder[FFIDMetadataInputValues]
  }
  case class StartUploadInput(consignmentId: UUID, parentFolder: String, includeTopLevelFolder: Option[Boolean])
  case object StartUploadInput {
    implicit val jsonDecoder: Decoder[StartUploadInput] = deriveDecoder[StartUploadInput]
    implicit val jsonEncoder: Encoder[StartUploadInput] = deriveEncoder[StartUploadInput]
  }
  case class UpdateBulkFileMetadataInput(consignmentId: UUID, fileIds: List[UUID], metadataProperties: List[UpdateFileMetadataInput])
  case object UpdateBulkFileMetadataInput {
    implicit val jsonDecoder: Decoder[UpdateBulkFileMetadataInput] = deriveDecoder[UpdateBulkFileMetadataInput]
    implicit val jsonEncoder: Encoder[UpdateBulkFileMetadataInput] = deriveEncoder[UpdateBulkFileMetadataInput]
  }
  case class UpdateConsignmentSeriesIdInput(consignmentId: UUID, seriesId: UUID)
  case object UpdateConsignmentSeriesIdInput {
    implicit val jsonDecoder: Decoder[UpdateConsignmentSeriesIdInput] = deriveDecoder[UpdateConsignmentSeriesIdInput]
    implicit val jsonEncoder: Encoder[UpdateConsignmentSeriesIdInput] = deriveEncoder[UpdateConsignmentSeriesIdInput]
  }
  case class UpdateExportDataInput(consignmentId: UUID, exportLocation: String, exportDatetime: Option[ZonedDateTime], exportVersion: String)
  case object UpdateExportDataInput {
    implicit val jsonDecoder: Decoder[UpdateExportDataInput] = deriveDecoder[UpdateExportDataInput]
    implicit val jsonEncoder: Encoder[UpdateExportDataInput] = deriveEncoder[UpdateExportDataInput]
  }
  case class UpdateFileMetadataInput(filePropertyIsMultiValue: Boolean, filePropertyName: String, value: String)
  case object UpdateFileMetadataInput {
    implicit val jsonDecoder: Decoder[UpdateFileMetadataInput] = deriveDecoder[UpdateFileMetadataInput]
    implicit val jsonEncoder: Encoder[UpdateFileMetadataInput] = deriveEncoder[UpdateFileMetadataInput]
  }
  case class AllDescendantsInput(consignmentId: UUID, parentIds: List[UUID])
  case object AllDescendantsInput {
    implicit val jsonDecoder: Decoder[AllDescendantsInput] = deriveDecoder[AllDescendantsInput]
    implicit val jsonEncoder: Encoder[AllDescendantsInput] = deriveEncoder[AllDescendantsInput]
  }
  case class ConsignmentFilters(userId: Option[UUID], consignmentType: Option[String])
  case object ConsignmentFilters {
    implicit val jsonDecoder: Decoder[ConsignmentFilters] = deriveDecoder[ConsignmentFilters]
    implicit val jsonEncoder: Encoder[ConsignmentFilters] = deriveEncoder[ConsignmentFilters]
  }
  sealed trait DataType
  object DataType {
    case object Decimal extends DataType
    case object DateTime extends DataType
    case object Boolean extends DataType
    case object Integer extends DataType
    case object Text extends DataType
    implicit val jsonDecoder: Decoder[DataType] = Decoder.decodeString.emap({
      case "Decimal" =>
        Right(Decimal)
      case "DateTime" =>
        Right(DateTime)
      case "Boolean" =>
        Right(Boolean)
      case "Integer" =>
        Right(Integer)
      case "Text" =>
        Right(Text)
      case other =>
        Left("invalid enum value: " + other)
    })
    implicit val jsonEncoder: Encoder[DataType] = Encoder.encodeString.contramap({
      case Decimal => "Decimal"
      case DateTime => "DateTime"
      case Boolean => "Boolean"
      case Integer => "Integer"
      case Text => "Text"
    })
  }
  case class FileFilters(fileTypeIdentifier: Option[String], selectedFileIds: Option[List[UUID]], parentId: Option[UUID], metadataFilters: Option[FileMetadataFilters])
  case object FileFilters {
    implicit val jsonDecoder: Decoder[FileFilters] = deriveDecoder[FileFilters]
    implicit val jsonEncoder: Encoder[FileFilters] = deriveEncoder[FileFilters]
  }
  case class FileMetadataFilters(closureMetadata: Option[Boolean], descriptiveMetadata: Option[Boolean], properties: Option[List[String]])
  case object FileMetadataFilters {
    implicit val jsonDecoder: Decoder[FileMetadataFilters] = deriveDecoder[FileMetadataFilters]
    implicit val jsonEncoder: Encoder[FileMetadataFilters] = deriveEncoder[FileMetadataFilters]
  }
  case class PaginationInput(limit: Option[Int], currentPage: Option[Int], currentCursor: Option[String], fileFilters: Option[FileFilters])
  case object PaginationInput {
    implicit val jsonDecoder: Decoder[PaginationInput] = deriveDecoder[PaginationInput]
    implicit val jsonEncoder: Encoder[PaginationInput] = deriveEncoder[PaginationInput]
  }
  sealed trait PropertyType
  object PropertyType {
    case object System extends PropertyType
    case object Defined extends PropertyType
    case object Supplied extends PropertyType
    implicit val jsonDecoder: Decoder[PropertyType] = Decoder.decodeString.emap({
      case "System" =>
        Right(System)
      case "Defined" =>
        Right(Defined)
      case "Supplied" =>
        Right(Supplied)
      case other =>
        Left("invalid enum value: " + other)
    })
    implicit val jsonEncoder: Encoder[PropertyType] = Encoder.encodeString.contramap({
      case System => "System"
      case Defined => "Defined"
      case Supplied => "Supplied"
    })
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy