toImportStatus method
Implementation
ImportStatus toImportStatus() {
switch (this) {
case 'IMPORT_IN_PROGRESS':
return ImportStatus.importInProgress;
case 'IMPORT_COMPLETE':
return ImportStatus.importComplete;
case 'IMPORT_COMPLETE_WITH_ERRORS':
return ImportStatus.importCompleteWithErrors;
case 'IMPORT_FAILED':
return ImportStatus.importFailed;
case 'IMPORT_FAILED_SERVER_LIMIT_EXCEEDED':
return ImportStatus.importFailedServerLimitExceeded;
case 'IMPORT_FAILED_RECORD_LIMIT_EXCEEDED':
return ImportStatus.importFailedRecordLimitExceeded;
case 'DELETE_IN_PROGRESS':
return ImportStatus.deleteInProgress;
case 'DELETE_COMPLETE':
return ImportStatus.deleteComplete;
case 'DELETE_FAILED':
return ImportStatus.deleteFailed;
case 'DELETE_FAILED_LIMIT_EXCEEDED':
return ImportStatus.deleteFailedLimitExceeded;
case 'INTERNAL_ERROR':
return ImportStatus.internalError;
}
throw Exception('$this is not known in enum ImportStatus');
}