/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.1-dev * User agent: apibuilder app.apibuilder.io/grhodes/code-deploy-dashboard/0.0.1-dev/http4s_0_18 */ package io.grhodes.code.deploy.dashboard.v0.mock { class Client[F[_]: cats.Applicative] extends io.grhodes.code.deploy.dashboard.v0.interfaces.Client[F] { val baseUrl: org.http4s.Uri = org.http4s.Uri.unsafeFromString("http://mock.localhost") override def applications: io.grhodes.code.deploy.dashboard.v0.Applications[F] = new MockApplications[F] override def info: io.grhodes.code.deploy.dashboard.v0.Info[F] = new MockInfo[F] } class MockApplications[F[_]: cats.Applicative] extends io.grhodes.code.deploy.dashboard.v0.Applications[F] { def get( requestHeaders: Seq[(String, String)] = Nil ): F[Seq[io.grhodes.code.deploy.dashboard.v0.models.Application]] = cats.Applicative[F].pure { Nil } } class MockInfo[F[_]: cats.Applicative] extends io.grhodes.code.deploy.dashboard.v0.Info[F] { def get( requestHeaders: Seq[(String, String)] = Nil ): F[io.grhodes.code.deploy.dashboard.v0.models.Info] = cats.Applicative[F].pure { io.grhodes.code.deploy.dashboard.v0.mock.Factories.makeInfo() } } object Factories { def randomString(length: Int = 24): String = { _root_.scala.util.Random.alphanumeric.take(length).mkString } def makeApplication(): io.grhodes.code.deploy.dashboard.v0.models.Application = io.grhodes.code.deploy.dashboard.v0.models.Application( name = Factories.randomString(24), deploymentGroups = Nil ) def makeDeployment(): io.grhodes.code.deploy.dashboard.v0.models.Deployment = io.grhodes.code.deploy.dashboard.v0.models.Deployment( id = Factories.randomString(24), created = _root_.java.time.Instant.now, started = _root_.java.time.Instant.now, completed = _root_.java.time.Instant.now, creator = Factories.randomString(24), deploymentGroupName = Factories.randomString(24), failed = 1, skipped = 1, inProgress = 1, pending = 1, succeeded = 1, status = Factories.randomString(24), errorMessage = None, revisionLocation = Factories.randomString(24), instances = Nil ) def makeDeploymentGroup(): io.grhodes.code.deploy.dashboard.v0.models.DeploymentGroup = io.grhodes.code.deploy.dashboard.v0.models.DeploymentGroup( name = Factories.randomString(24), autoScalingGroupNames = Nil ) def makeDeploymentInstance(): io.grhodes.code.deploy.dashboard.v0.models.DeploymentInstance = io.grhodes.code.deploy.dashboard.v0.models.DeploymentInstance( id = Factories.randomString(24), status = Factories.randomString(24), lastUpdatedAt = _root_.java.time.Instant.now, lifecycleEvents = Nil ) def makeDeploymentLifecycleEvent(): io.grhodes.code.deploy.dashboard.v0.models.DeploymentLifecycleEvent = io.grhodes.code.deploy.dashboard.v0.models.DeploymentLifecycleEvent( name = Factories.randomString(24), startTime = _root_.java.time.Instant.now, endTime = _root_.java.time.Instant.now, status = Factories.randomString(24), errorLogTail = None, errorMessage = None, scriptName = None ) def makeInfo(): io.grhodes.code.deploy.dashboard.v0.models.Info = io.grhodes.code.deploy.dashboard.v0.models.Info( name = Factories.randomString(24), version = Factories.randomString(24), scalaVersion = Factories.randomString(24), sbtVersion = Factories.randomString(24), buildTime = _root_.java.time.Instant.now ) } }