/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1-dev * User agent: apibuilder app.apibuilder.io/michal/playground-api/0.0.1-dev/scalacheck */ package io.github.mkows.playground.api.v0.models.scalacheck import org.scalacheck.{Arbitrary, Gen} object PlaygroundApiScalaCheck extends PlaygroundApiScalaCheck { implicit def arbitraryJodaDateTime: Arbitrary[_root_.org.joda.time.DateTime] = Arbitrary(genJodaDateTime) def genJodaDateTime: Gen[_root_.org.joda.time.DateTime] = Gen.posNum[Long].map(instant => new _root_.org.joda.time.DateTime(instant)) implicit def arbitraryPlayJsObject: Arbitrary[_root_.play.api.libs.json.JsObject] = Arbitrary(genPlayJsObject) def genPlayJsObject: Gen[_root_.play.api.libs.json.JsObject] = Gen.const(_root_.play.api.libs.json.JsObject.empty) } trait PlaygroundApiScalaCheck { implicit def arbitraryJodaDateTime: Arbitrary[_root_.org.joda.time.DateTime] implicit def arbitraryPlayJsObject: Arbitrary[_root_.play.api.libs.json.JsObject] implicit def arbitraryError: Arbitrary[io.github.mkows.playground.api.v0.models.Error] = Arbitrary(genError) def genError: Gen[io.github.mkows.playground.api.v0.models.Error] = for { code <- Arbitrary.arbitrary[Int] message <- Arbitrary.arbitrary[String] details <- Arbitrary.arbitrary[_root_.scala.Option[String]] } yield io.github.mkows.playground.api.v0.models.Error(code, message, details) implicit def arbitraryHealthcheck: Arbitrary[io.github.mkows.playground.api.v0.models.Healthcheck] = Arbitrary(genHealthcheck) def genHealthcheck: Gen[io.github.mkows.playground.api.v0.models.Healthcheck] = for { status <- Arbitrary.arbitrary[String] createdAt <- Arbitrary.arbitrary[_root_.org.joda.time.DateTime] } yield io.github.mkows.playground.api.v0.models.Healthcheck(status, createdAt) implicit def arbitraryItemStateFailedCause: Arbitrary[io.github.mkows.playground.api.v0.models.ItemStateFailedCause] = Arbitrary(genItemStateFailedCause) def genItemStateFailedCause: Gen[io.github.mkows.playground.api.v0.models.ItemStateFailedCause] = Gen.oneOf( io.github.mkows.playground.api.v0.models.ItemStateFailedCause.ErrorCause1, io.github.mkows.playground.api.v0.models.ItemStateFailedCause.ErrorCause2, io.github.mkows.playground.api.v0.models.ItemStateFailedCause.ErrorCause3 ) implicit def arbitraryItemStateProgress: Arbitrary[io.github.mkows.playground.api.v0.models.ItemStateProgress] = Arbitrary(genItemStateProgress) def genItemStateProgress: Gen[io.github.mkows.playground.api.v0.models.ItemStateProgress] = Gen.oneOf( io.github.mkows.playground.api.v0.models.ItemStateProgress.Init, io.github.mkows.playground.api.v0.models.ItemStateProgress.Pending, io.github.mkows.playground.api.v0.models.ItemStateProgress.Completed ) implicit def arbitraryItemState: Arbitrary[io.github.mkows.playground.api.v0.models.ItemState] = Arbitrary(genItemState) def genItemState: Gen[io.github.mkows.playground.api.v0.models.ItemState] = Gen.oneOf(genItemStateProgress, genItemStateFailedCause) }