/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.2.7 * User agent: apibuilder app.apibuilder.io/gilt/svc-sundial/0.2.7/scala_mock_models */ package com.gilt.svc.sundial.v0.mock { object Factories { def randomString(length: Int = 24): String = { _root_.scala.util.Random.alphanumeric.take(length).mkString } def makeDefaultEmrJobFlowRole(): com.gilt.svc.sundial.v0.models.DefaultEmrJobFlowRole = com.gilt.svc.sundial.v0.models.DefaultEmrJobFlowRole.DefaultEmrJobFlowRole def makeDefaultEmrServiceRole(): com.gilt.svc.sundial.v0.models.DefaultEmrServiceRole = com.gilt.svc.sundial.v0.models.DefaultEmrServiceRole.DefaultEmrServiceRole def makeEmrApplication(): com.gilt.svc.sundial.v0.models.EmrApplication = com.gilt.svc.sundial.v0.models.EmrApplication.Hadoop def makeEmrReleaseLabel(): com.gilt.svc.sundial.v0.models.EmrReleaseLabel = com.gilt.svc.sundial.v0.models.EmrReleaseLabel.Emr5140 def makeNotificationOptions(): com.gilt.svc.sundial.v0.models.NotificationOptions = com.gilt.svc.sundial.v0.models.NotificationOptions.Always def makeOnDemand(): com.gilt.svc.sundial.v0.models.OnDemand = com.gilt.svc.sundial.v0.models.OnDemand.OnDemand def makeProcessOverlapAction(): com.gilt.svc.sundial.v0.models.ProcessOverlapAction = com.gilt.svc.sundial.v0.models.ProcessOverlapAction.Wait def makeProcessStatus(): com.gilt.svc.sundial.v0.models.ProcessStatus = com.gilt.svc.sundial.v0.models.ProcessStatus.Running def makeTaskStatus(): com.gilt.svc.sundial.v0.models.TaskStatus = com.gilt.svc.sundial.v0.models.TaskStatus.Submitted def makeBatchImageCommand(): com.gilt.svc.sundial.v0.models.BatchImageCommand = com.gilt.svc.sundial.v0.models.BatchImageCommand( image = Factories.randomString(24), tag = Factories.randomString(24), command = Nil, memory = 1, vCpus = 1, jobRoleArn = None, environmentVariables = Nil, jobQueue = None ) def makeContinuousSchedule(): com.gilt.svc.sundial.v0.models.ContinuousSchedule = com.gilt.svc.sundial.v0.models.ContinuousSchedule( bufferSeconds = None ) def makeCronSchedule(): com.gilt.svc.sundial.v0.models.CronSchedule = com.gilt.svc.sundial.v0.models.CronSchedule( dayOfWeek = Factories.randomString(24), month = Factories.randomString(24), dayOfMonth = Factories.randomString(24), hours = Factories.randomString(24), minutes = Factories.randomString(24) ) def makeCustomEmrJobFlowRole(): com.gilt.svc.sundial.v0.models.CustomEmrJobFlowRole = com.gilt.svc.sundial.v0.models.CustomEmrJobFlowRole( roleName = Factories.randomString(24) ) def makeCustomEmrServiceRole(): com.gilt.svc.sundial.v0.models.CustomEmrServiceRole = com.gilt.svc.sundial.v0.models.CustomEmrServiceRole( roleName = Factories.randomString(24) ) def makeDockerImageCommand(): com.gilt.svc.sundial.v0.models.DockerImageCommand = com.gilt.svc.sundial.v0.models.DockerImageCommand( image = Factories.randomString(24), tag = Factories.randomString(24), command = Nil, memory = None, cpu = None, taskRoleArn = None, logPaths = Nil, environmentVariables = Nil ) def makeEmail(): com.gilt.svc.sundial.v0.models.Email = com.gilt.svc.sundial.v0.models.Email( name = Factories.randomString(24), email = Factories.randomString(24), notifyWhen = com.gilt.svc.sundial.v0.mock.Factories.makeNotificationOptions() ) def makeEmrCommand(): com.gilt.svc.sundial.v0.models.EmrCommand = com.gilt.svc.sundial.v0.models.EmrCommand( emrCluster = com.gilt.svc.sundial.v0.mock.Factories.makeEmrCluster(), jobName = Factories.randomString(24), region = Factories.randomString(24), `class` = Factories.randomString(24), s3JarPath = Factories.randomString(24), sparkConf = Nil, args = Nil, s3LogDetails = None, loadData = None, saveResults = None ) def makeEmrInstanceGroupDetails(): com.gilt.svc.sundial.v0.models.EmrInstanceGroupDetails = com.gilt.svc.sundial.v0.models.EmrInstanceGroupDetails( emrInstanceType = Factories.randomString(24), instanceCount = 1, awsMarket = com.gilt.svc.sundial.v0.mock.Factories.makeAwsMarket(), ebsVolumeSize = None ) def makeEnvironmentVariable(): com.gilt.svc.sundial.v0.models.EnvironmentVariable = com.gilt.svc.sundial.v0.models.EnvironmentVariable( variableName = Factories.randomString(24), value = Factories.randomString(24) ) def makeExistingEmrCluster(): com.gilt.svc.sundial.v0.models.ExistingEmrCluster = com.gilt.svc.sundial.v0.models.ExistingEmrCluster( clusterId = Factories.randomString(24) ) def makeHealthcheck(): com.gilt.svc.sundial.v0.models.Healthcheck = com.gilt.svc.sundial.v0.models.Healthcheck( status = Factories.randomString(24) ) def makeLogEntry(): com.gilt.svc.sundial.v0.models.LogEntry = com.gilt.svc.sundial.v0.models.LogEntry( logEntryId = _root_.java.util.UUID.randomUUID, when = _root_.org.joda.time.DateTime.now, source = Factories.randomString(24), message = Factories.randomString(24) ) def makeMetadataEntry(): com.gilt.svc.sundial.v0.models.MetadataEntry = com.gilt.svc.sundial.v0.models.MetadataEntry( metadataEntryId = _root_.java.util.UUID.randomUUID, when = _root_.org.joda.time.DateTime.now, key = Factories.randomString(24), value = Factories.randomString(24) ) def makeNewEmrCluster(): com.gilt.svc.sundial.v0.models.NewEmrCluster = com.gilt.svc.sundial.v0.models.NewEmrCluster( name = Factories.randomString(24), releaseLabel = com.gilt.svc.sundial.v0.mock.Factories.makeEmrReleaseLabel(), applications = Nil, s3LogUri = Factories.randomString(24), masterInstance = com.gilt.svc.sundial.v0.mock.Factories.makeEmrInstanceGroupDetails(), coreInstance = None, taskInstance = None, ec2Subnet = None, emrServiceRole = com.gilt.svc.sundial.v0.mock.Factories.makeEmrServiceRole(), emrJobFlowRole = com.gilt.svc.sundial.v0.mock.Factories.makeEmrJobFlowRole(), visibleToAllUsers = true ) def makePagerduty(): com.gilt.svc.sundial.v0.models.Pagerduty = com.gilt.svc.sundial.v0.models.Pagerduty( serviceKey = Factories.randomString(24), numConsecutiveFailures = 1, apiUrl = Factories.randomString(24) ) def makeProcess(): com.gilt.svc.sundial.v0.models.Process = com.gilt.svc.sundial.v0.models.Process( processId = _root_.java.util.UUID.randomUUID, processDefinitionName = Factories.randomString(24), startTime = _root_.org.joda.time.DateTime.now, status = com.gilt.svc.sundial.v0.mock.Factories.makeProcessStatus(), task = Nil ) def makeProcessDefinition(): com.gilt.svc.sundial.v0.models.ProcessDefinition = com.gilt.svc.sundial.v0.models.ProcessDefinition( processDefinitionName = Factories.randomString(24), paused = None, processDescription = None, schedule = None, taskDefinitions = Nil, overlapAction = com.gilt.svc.sundial.v0.mock.Factories.makeProcessOverlapAction(), notifications = None ) def makeS3Cp(): com.gilt.svc.sundial.v0.models.S3Cp = com.gilt.svc.sundial.v0.models.S3Cp( source = Factories.randomString(24), destination = Factories.randomString(24) ) def makeS3LogDetails(): com.gilt.svc.sundial.v0.models.S3LogDetails = com.gilt.svc.sundial.v0.models.S3LogDetails( logGroupName = Factories.randomString(24), logStreamName = Factories.randomString(24) ) def makeShellScriptCommand(): com.gilt.svc.sundial.v0.models.ShellScriptCommand = com.gilt.svc.sundial.v0.models.ShellScriptCommand( script = Factories.randomString(24), environmentVariables = None ) def makeSpot(): com.gilt.svc.sundial.v0.models.Spot = com.gilt.svc.sundial.v0.models.Spot( bidPrice = BigDecimal("1") ) def makeTask(): com.gilt.svc.sundial.v0.models.Task = com.gilt.svc.sundial.v0.models.Task( taskId = _root_.java.util.UUID.randomUUID, processId = _root_.java.util.UUID.randomUUID, processDefinitionName = Factories.randomString(24), taskDefinitionName = Factories.randomString(24), startTime = _root_.org.joda.time.DateTime.now, endTime = None, previousAttemptCount = 1, logEntries = Nil, metadataEntries = Nil, executionState = None, status = com.gilt.svc.sundial.v0.mock.Factories.makeTaskStatus() ) def makeTaskDefinition(): com.gilt.svc.sundial.v0.models.TaskDefinition = com.gilt.svc.sundial.v0.models.TaskDefinition( taskDefinitionName = Factories.randomString(24), dependencies = Nil, executable = com.gilt.svc.sundial.v0.mock.Factories.makeTaskExecutable(), maxAttempts = 1, maxRuntimeSeconds = None, backoffBaseSeconds = 1, backoffExponent = 1.0, requireExplicitSuccess = true ) def makeTaskDependency(): com.gilt.svc.sundial.v0.models.TaskDependency = com.gilt.svc.sundial.v0.models.TaskDependency( taskDefinitionName = Factories.randomString(24), successRequired = true ) def makeAwsMarket(): com.gilt.svc.sundial.v0.models.AwsMarket = com.gilt.svc.sundial.v0.mock.Factories.makeOnDemand() def makeEmrCluster(): com.gilt.svc.sundial.v0.models.EmrCluster = com.gilt.svc.sundial.v0.mock.Factories.makeNewEmrCluster() def makeEmrJobFlowRole(): com.gilt.svc.sundial.v0.models.EmrJobFlowRole = com.gilt.svc.sundial.v0.mock.Factories.makeDefaultEmrJobFlowRole() def makeEmrServiceRole(): com.gilt.svc.sundial.v0.models.EmrServiceRole = com.gilt.svc.sundial.v0.mock.Factories.makeDefaultEmrServiceRole() def makeNotification(): com.gilt.svc.sundial.v0.models.Notification = com.gilt.svc.sundial.v0.mock.Factories.makeEmail() def makeProcessSchedule(): com.gilt.svc.sundial.v0.models.ProcessSchedule = com.gilt.svc.sundial.v0.mock.Factories.makeCronSchedule() def makeTaskExecutable(): com.gilt.svc.sundial.v0.models.TaskExecutable = com.gilt.svc.sundial.v0.mock.Factories.makeDockerImageCommand() } }