/** * 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/ning_1_9_mock_client */ package io.grhodes.code.deploy.dashboard.v0.mock { trait Client extends io.grhodes.code.deploy.dashboard.v0.interfaces.Client { val baseUrl: String = "http://mock.localhost" override def applications: io.grhodes.code.deploy.dashboard.v0.Applications = MockApplicationsImpl override def info: io.grhodes.code.deploy.dashboard.v0.Info = MockInfoImpl } object MockApplicationsImpl extends MockApplications trait MockApplications extends io.grhodes.code.deploy.dashboard.v0.Applications { def get( requestHeaders: Seq[(String, String)] = Nil )(implicit ec: scala.concurrent.ExecutionContext): scala.concurrent.Future[Seq[io.grhodes.code.deploy.dashboard.v0.models.Application]] = scala.concurrent.Future.successful { Nil } } object MockInfoImpl extends MockInfo trait MockInfo extends io.grhodes.code.deploy.dashboard.v0.Info { def get( requestHeaders: Seq[(String, String)] = Nil )(implicit ec: scala.concurrent.ExecutionContext): scala.concurrent.Future[io.grhodes.code.deploy.dashboard.v0.models.Info] = scala.concurrent.Future.successful { 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_.org.joda.time.DateTime.now, started = _root_.org.joda.time.DateTime.now, completed = _root_.org.joda.time.DateTime.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_.org.joda.time.DateTime.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_.org.joda.time.DateTime.now, endTime = _root_.org.joda.time.DateTime.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_.org.joda.time.DateTime.now ) } }