/** * 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/http4s_0_23 */ package com.gilt.svc.sundial.v0.models { /** * The EC2 market of the EC2 instances */ sealed trait AwsMarket extends _root_.scala.Product with _root_.scala.Serializable /** * Whether or not to create a new EMR cluster or re-use a pre-existing one */ sealed trait EmrCluster extends _root_.scala.Product with _root_.scala.Serializable /** * The EMR role to use on the EC2 instances */ sealed trait EmrJobFlowRole extends _root_.scala.Product with _root_.scala.Serializable /** * The EMR service role to use */ sealed trait EmrServiceRole extends _root_.scala.Product with _root_.scala.Serializable sealed trait Notification extends _root_.scala.Product with _root_.scala.Serializable /** * A specification for when a process should be run */ sealed trait ProcessSchedule extends _root_.scala.Product with _root_.scala.Serializable sealed trait TaskExecutable extends _root_.scala.Product with _root_.scala.Serializable /** * @param image Name of docker image including registry URL if needed * @param tag Tag on docker image * @param command Command to pass to Docker container * @param jobRoleArn ARN of an IAM role, see * http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html * @param environmentVariables environment variables to be passed to container * @param jobQueue Override default job queue, eg: for priority queue or GPU instances queue */ final case class BatchImageCommand( image: String, tag: String = "latest", command: Seq[String], memory: Int, vCpus: Int, jobRoleArn: _root_.scala.Option[String] = None, environmentVariables: Seq[com.gilt.svc.sundial.v0.models.EnvironmentVariable] = Nil, jobQueue: _root_.scala.Option[String] = None ) extends TaskExecutable /** * @param bufferSeconds The minimum amount of time (in seconds) that must pass between executions of the * process */ final case class ContinuousSchedule( bufferSeconds: _root_.scala.Option[Int] = None ) extends ProcessSchedule /** * See http://quartz-scheduler.org/api/2.2.0/org/quartz/CronExpression.html */ final case class CronSchedule( dayOfWeek: String, month: String, dayOfMonth: String, hours: String, minutes: String ) extends ProcessSchedule /** * Custom, preconfigured, EMR EC2 instance role */ final case class CustomEmrJobFlowRole( roleName: String ) extends EmrJobFlowRole /** * Custom, preconfigured, EMR Service role */ final case class CustomEmrServiceRole( roleName: String ) extends EmrServiceRole final case class DockerImageCommand( image: String, tag: String = "latest", command: Seq[String], memory: _root_.scala.Option[Int] = None, cpu: _root_.scala.Option[Int] = None, taskRoleArn: _root_.scala.Option[String] = None, logPaths: Seq[String] = Nil, environmentVariables: Seq[com.gilt.svc.sundial.v0.models.EnvironmentVariable] = Nil ) extends TaskExecutable /** * An email to send notifications to */ final case class Email( name: String, email: String, notifyWhen: com.gilt.svc.sundial.v0.models.NotificationOptions = com.gilt.svc.sundial.v0.models.NotificationOptions.OnStateChangeAndFailures ) extends Notification /** * @param emrCluster The EMR cluster on which to launch the job (aka step) * @param jobName NAme to be assigned to the Job * @param region the AWS Region * @param `class` The spark job's `Main.class` to run * @param s3JarPath the s3 path to the jar of the job to be run * @param sparkConf options that will be sent to spark as --conf key=value, e.g. `--conf * spark.driver.extraJavaOptions=-Denvironment=integration` * @param args command line arguments to be passe to the job's main class * @param s3LogDetails AWS EMR periodically (currently every 5 minutes) zips up all the logs and upload * them into S3. This does not work well with sundial's _live logs_. Make use of S3 * Logs to visualise in real time job's log on sundial's live logs panel * @param loadData will trigger a s3 dist cp job for every entry in this array, can be used to load * data from s3 into HDFS. **requires Hadoop** as application on the cluster * @param saveResults will trigger a s3 dist cp job for every entry in this array, can be used to save * data from HDFS to s3. **requires Hadoop** as application on the cluster */ final case class EmrCommand( emrCluster: com.gilt.svc.sundial.v0.models.EmrCluster, jobName: String, region: String = "us-east-1", `class`: String, s3JarPath: String, sparkConf: Seq[String], args: Seq[String], s3LogDetails: _root_.scala.Option[com.gilt.svc.sundial.v0.models.S3LogDetails] = None, loadData: _root_.scala.Option[Seq[com.gilt.svc.sundial.v0.models.S3Cp]] = None, saveResults: _root_.scala.Option[Seq[com.gilt.svc.sundial.v0.models.S3Cp]] = None ) extends TaskExecutable /** * Additional configuration for Master/Core/Task EMR instance Groups. * * @param ebsVolumeSize optional EBS volume in GB to attach to the emr instance, for simplicity only one * volume for the given size and type gp2 will be created. */ final case class EmrInstanceGroupDetails( emrInstanceType: String, instanceCount: Int, awsMarket: com.gilt.svc.sundial.v0.models.AwsMarket, ebsVolumeSize: _root_.scala.Option[Int] = None ) final case class EnvironmentVariable( variableName: String, value: String ) /** * Existing EMR cluster configuration object * * @param clusterId The EMR cluster id */ final case class ExistingEmrCluster( clusterId: String ) extends EmrCluster final case class Healthcheck( status: String ) /** * @param logEntryId Uniquely identifies the log message to prevent duplication */ final case class LogEntry( logEntryId: _root_.java.util.UUID, when: _root_.java.time.Instant, source: String, message: String ) /** * @param metadataEntryId Uniquely identifies the metadata entry to prevent duplication */ final case class MetadataEntry( metadataEntryId: _root_.java.util.UUID, when: _root_.java.time.Instant, key: String, value: String ) /** * New EMR cluster configuration object * * @param ec2Subnet To be set in case the EMR cannot be launched in the `default VPC` * @param emrServiceRole role to be assigned to the service, the default one should cover most of the * cases * @param emrJobFlowRole role to be assigned to the ec2 instances composing the EMR cluster. The default * one should cover most of the cases * @param visibleToAllUsers whether or not to show the new cluster in the list of clusters. For more details * see [emr * docs](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-cluster.html#cfn-emr-cluster-visibletoallusers) */ final case class NewEmrCluster( name: String, releaseLabel: com.gilt.svc.sundial.v0.models.EmrReleaseLabel = com.gilt.svc.sundial.v0.models.EmrReleaseLabel.Emr5100, applications: Seq[com.gilt.svc.sundial.v0.models.EmrApplication], s3LogUri: String, masterInstance: com.gilt.svc.sundial.v0.models.EmrInstanceGroupDetails, coreInstance: _root_.scala.Option[com.gilt.svc.sundial.v0.models.EmrInstanceGroupDetails] = None, taskInstance: _root_.scala.Option[com.gilt.svc.sundial.v0.models.EmrInstanceGroupDetails] = None, ec2Subnet: _root_.scala.Option[String] = None, emrServiceRole: com.gilt.svc.sundial.v0.models.EmrServiceRole, emrJobFlowRole: com.gilt.svc.sundial.v0.models.EmrJobFlowRole, visibleToAllUsers: Boolean = false ) extends EmrCluster /** * Pager Duty integration */ final case class Pagerduty( serviceKey: String, numConsecutiveFailures: Int = 1, apiUrl: String = "https://events.pagerduty.com" ) extends Notification final case class Process( processId: _root_.java.util.UUID, processDefinitionName: String, startTime: _root_.java.time.Instant, status: com.gilt.svc.sundial.v0.models.ProcessStatus, task: Seq[com.gilt.svc.sundial.v0.models.Task] ) /** * A grouping of related tasks that are run as a single unit on the same schedule * * @param paused If true, ignore schedule and only start process if triggered manually * @param schedule The schedule that the process runs on; if not specified, the process will only * run when triggered manually */ final case class ProcessDefinition( processDefinitionName: String, paused: _root_.scala.Option[Boolean] = None, processDescription: _root_.scala.Option[String] = None, schedule: _root_.scala.Option[com.gilt.svc.sundial.v0.models.ProcessSchedule] = None, taskDefinitions: Seq[com.gilt.svc.sundial.v0.models.TaskDefinition], overlapAction: com.gilt.svc.sundial.v0.models.ProcessOverlapAction = com.gilt.svc.sundial.v0.models.ProcessOverlapAction.Wait, notifications: _root_.scala.Option[Seq[com.gilt.svc.sundial.v0.models.Notification]] = None ) /** * Wrapper of the S3DistCp spark job for more info visit the aws * [s3-dist-cp](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/UsingEMR_s3distcp.html) * page * * @param source Source folder or file to copy. It can be either a s3 or HDFS location * @param destination Source folder or file to copy. It can be either a s3 or HDFS location */ final case class S3Cp( source: String, destination: String ) final case class S3LogDetails( logGroupName: String, logStreamName: String ) final case class ShellScriptCommand( script: String, environmentVariables: _root_.scala.Option[Seq[com.gilt.svc.sundial.v0.models.EnvironmentVariable]] = None ) extends TaskExecutable /** * the maximum spot bid price */ final case class Spot( bidPrice: BigDecimal ) extends AwsMarket /** * @param executionState Internal bookkeeping metadata used for task scheduling (e.g. ECS task ID and * cluster name) */ final case class Task( taskId: _root_.java.util.UUID, processId: _root_.java.util.UUID, processDefinitionName: String, taskDefinitionName: String, startTime: _root_.java.time.Instant, endTime: _root_.scala.Option[_root_.java.time.Instant] = None, previousAttemptCount: Int, logEntries: Seq[com.gilt.svc.sundial.v0.models.LogEntry], metadataEntries: Seq[com.gilt.svc.sundial.v0.models.MetadataEntry], executionState: _root_.scala.Option[Seq[com.gilt.svc.sundial.v0.models.MetadataEntry]] = None, status: com.gilt.svc.sundial.v0.models.TaskStatus ) /** * An individual task that runs as part of a process * * @param taskDefinitionName The canonical name for this task used by other tasks to identify this task * @param dependencies The tasks that must have completed prior to this one beginning * @param maxRuntimeSeconds The execution time (for a single attempt) after which the system will kill the * task * @param requireExplicitSuccess If true, the task must explicitly update its status with Sundial in order to * succeed. */ final case class TaskDefinition( taskDefinitionName: String, dependencies: Seq[com.gilt.svc.sundial.v0.models.TaskDependency], executable: com.gilt.svc.sundial.v0.models.TaskExecutable, maxAttempts: Int, maxRuntimeSeconds: _root_.scala.Option[Int] = None, backoffBaseSeconds: Int, backoffExponent: Double = 1.0, requireExplicitSuccess: Boolean = false ) final case class TaskDependency( taskDefinitionName: String, successRequired: Boolean = true ) /** * Provides future compatibility in clients - in the future, when a type is added * to the union AwsMarket, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class AwsMarketUndefinedType( description: String ) extends AwsMarket /** * Provides future compatibility in clients - in the future, when a type is added * to the union EmrCluster, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class EmrClusterUndefinedType( description: String ) extends EmrCluster /** * Provides future compatibility in clients - in the future, when a type is added * to the union EmrJobFlowRole, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class EmrJobFlowRoleUndefinedType( description: String ) extends EmrJobFlowRole /** * Provides future compatibility in clients - in the future, when a type is added * to the union EmrServiceRole, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class EmrServiceRoleUndefinedType( description: String ) extends EmrServiceRole /** * Provides future compatibility in clients - in the future, when a type is added * to the union Notification, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class NotificationUndefinedType( description: String ) extends Notification /** * Provides future compatibility in clients - in the future, when a type is added * to the union ProcessSchedule, it will need to be handled in the client code. * This implementation will deserialize these future types as an instance of this * class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class ProcessScheduleUndefinedType( description: String ) extends ProcessSchedule /** * Provides future compatibility in clients - in the future, when a type is added * to the union TaskExecutable, it will need to be handled in the client code. This * implementation will deserialize these future types as an instance of this class. * * @param description Information about the type that we received that is undefined in this version of * the client. */ final case class TaskExecutableUndefinedType( description: String ) extends TaskExecutable /** * The default EMR EC2 Instance role */ sealed trait DefaultEmrJobFlowRole extends EmrJobFlowRole object DefaultEmrJobFlowRole { case object DefaultEmrJobFlowRole extends DefaultEmrJobFlowRole { override def toString = "EMR_EC2_DefaultRole" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends DefaultEmrJobFlowRole /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[DefaultEmrJobFlowRole] = scala.List(DefaultEmrJobFlowRole) private val byName: Map[String, DefaultEmrJobFlowRole] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): DefaultEmrJobFlowRole = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[DefaultEmrJobFlowRole] = byName.get(value.toLowerCase) } /** * The default EMR Service role */ sealed trait DefaultEmrServiceRole extends EmrServiceRole object DefaultEmrServiceRole { case object DefaultEmrServiceRole extends DefaultEmrServiceRole { override def toString = "EMR_DefaultRole" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends DefaultEmrServiceRole /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[DefaultEmrServiceRole] = scala.List(DefaultEmrServiceRole) private val byName: Map[String, DefaultEmrServiceRole] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): DefaultEmrServiceRole = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[DefaultEmrServiceRole] = byName.get(value.toLowerCase) } /** * List of applications to install in the EMR cluster */ sealed trait EmrApplication extends _root_.scala.Product with _root_.scala.Serializable object EmrApplication { case object Hadoop extends EmrApplication { override def toString = "Hadoop" } case object Hive extends EmrApplication { override def toString = "Hive" } case object Mahout extends EmrApplication { override def toString = "Mahout" } case object Pig extends EmrApplication { override def toString = "Pig" } case object Spark extends EmrApplication { override def toString = "Spark" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends EmrApplication /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[EmrApplication] = scala.List(Hadoop, Hive, Mahout, Pig, Spark) private val byName: Map[String, EmrApplication] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): EmrApplication = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[EmrApplication] = byName.get(value.toLowerCase) } /** * Version (aka label in AWS-EMR) of the EMR stack to create. */ sealed trait EmrReleaseLabel extends _root_.scala.Product with _root_.scala.Serializable object EmrReleaseLabel { case object Emr5140 extends EmrReleaseLabel { override def toString = "emr-5.14.0" } case object Emr5130 extends EmrReleaseLabel { override def toString = "emr-5.13.0" } case object Emr5121 extends EmrReleaseLabel { override def toString = "emr-5.12.1" } case object Emr5120 extends EmrReleaseLabel { override def toString = "emr-5.12.0" } case object Emr5111 extends EmrReleaseLabel { override def toString = "emr-5.11.1" } case object Emr5110 extends EmrReleaseLabel { override def toString = "emr-5.11.0" } case object Emr5100 extends EmrReleaseLabel { override def toString = "emr-5.10.0" } case object Emr590 extends EmrReleaseLabel { override def toString = "emr-5.9.0" } case object Emr492 extends EmrReleaseLabel { override def toString = "emr-4.9.2" } case object Emr491 extends EmrReleaseLabel { override def toString = "emr-4.9.1" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends EmrReleaseLabel /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[EmrReleaseLabel] = scala.List(Emr5140, Emr5130, Emr5121, Emr5120, Emr5111, Emr5110, Emr5100, Emr590, Emr492, Emr491) private val byName: Map[String, EmrReleaseLabel] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): EmrReleaseLabel = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[EmrReleaseLabel] = byName.get(value.toLowerCase) } sealed trait NotificationOptions extends _root_.scala.Product with _root_.scala.Serializable object NotificationOptions { /** * Always notify when a process completes */ case object Always extends NotificationOptions { override def toString = "always" } /** * Notify when a process fails */ case object OnFailure extends NotificationOptions { override def toString = "on_failure" } /** * Notify when a process goes from succeeding to failing and vica versa */ case object OnStateChange extends NotificationOptions { override def toString = "on_state_change" } /** * Notify when going from failing to succeeded and on each failure */ case object OnStateChangeAndFailures extends NotificationOptions { override def toString = "on_state_change_and_failures" } /** * Never notify */ case object Never extends NotificationOptions { override def toString = "never" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends NotificationOptions /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[NotificationOptions] = scala.List(Always, OnFailure, OnStateChange, OnStateChangeAndFailures, Never) private val byName: Map[String, NotificationOptions] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): NotificationOptions = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[NotificationOptions] = byName.get(value.toLowerCase) } /** * The onDemand type of Market Type */ sealed trait OnDemand extends AwsMarket object OnDemand { case object OnDemand extends OnDemand { override def toString = "on_demand" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends OnDemand /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[OnDemand] = scala.List(OnDemand) private val byName: Map[String, OnDemand] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): OnDemand = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[OnDemand] = byName.get(value.toLowerCase) } sealed trait ProcessOverlapAction extends _root_.scala.Product with _root_.scala.Serializable object ProcessOverlapAction { /** * The process should wait until the currently running instance finishes */ case object Wait extends ProcessOverlapAction { override def toString = "wait" } /** * The currently running process should be killed */ case object Terminate extends ProcessOverlapAction { override def toString = "terminate" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends ProcessOverlapAction /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[ProcessOverlapAction] = scala.List(Wait, Terminate) private val byName: Map[String, ProcessOverlapAction] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): ProcessOverlapAction = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[ProcessOverlapAction] = byName.get(value.toLowerCase) } sealed trait ProcessStatus extends _root_.scala.Product with _root_.scala.Serializable object ProcessStatus { /** * The process has tasks currently executing */ case object Running extends ProcessStatus { override def toString = "running" } /** * All of the process's tasks succeeded on its last run */ case object Succeeded extends ProcessStatus { override def toString = "succeeded" } /** * At least one of the process's tasks failed on its last run */ case object Failed extends ProcessStatus { override def toString = "failed" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends ProcessStatus /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[ProcessStatus] = scala.List(Running, Succeeded, Failed) private val byName: Map[String, ProcessStatus] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): ProcessStatus = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[ProcessStatus] = byName.get(value.toLowerCase) } sealed trait TaskStatus extends _root_.scala.Product with _root_.scala.Serializable object TaskStatus { /** * The task has been submitted */ case object Submitted extends TaskStatus { override def toString = "submitted" } case object Runnable extends TaskStatus { override def toString = "runnable" } case object Starting extends TaskStatus { override def toString = "starting" } /** * The task is waiting on compute resources */ case object Pending extends TaskStatus { override def toString = "pending" } /** * The task is currently executing or awaiting backoff */ case object Running extends TaskStatus { override def toString = "running" } /** * The task has irrevocably failed */ case object Failed extends TaskStatus { override def toString = "failed" } /** * The task has succeeded without serious errors */ case object Succeeded extends TaskStatus { override def toString = "succeeded" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends TaskStatus /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[TaskStatus] = scala.List(Submitted, Runnable, Starting, Pending, Running, Failed, Succeeded) private val byName: Map[String, TaskStatus] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): TaskStatus = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[TaskStatus] = byName.get(value.toLowerCase) } }