toAssessmentRunState method

AssessmentRunState toAssessmentRunState()

Implementation

AssessmentRunState toAssessmentRunState() {
  switch (this) {
    case 'CREATED':
      return AssessmentRunState.created;
    case 'START_DATA_COLLECTION_PENDING':
      return AssessmentRunState.startDataCollectionPending;
    case 'START_DATA_COLLECTION_IN_PROGRESS':
      return AssessmentRunState.startDataCollectionInProgress;
    case 'COLLECTING_DATA':
      return AssessmentRunState.collectingData;
    case 'STOP_DATA_COLLECTION_PENDING':
      return AssessmentRunState.stopDataCollectionPending;
    case 'DATA_COLLECTED':
      return AssessmentRunState.dataCollected;
    case 'START_EVALUATING_RULES_PENDING':
      return AssessmentRunState.startEvaluatingRulesPending;
    case 'EVALUATING_RULES':
      return AssessmentRunState.evaluatingRules;
    case 'FAILED':
      return AssessmentRunState.failed;
    case 'ERROR':
      return AssessmentRunState.error;
    case 'COMPLETED':
      return AssessmentRunState.completed;
    case 'COMPLETED_WITH_ERRORS':
      return AssessmentRunState.completedWithErrors;
    case 'CANCELED':
      return AssessmentRunState.canceled;
  }
  throw Exception('$this is not known in enum AssessmentRunState');
}