from method

RadarrEventType? from(
  1. String? type
)

Given a String, will return the correct RadarrEventType object.

Implementation

RadarrEventType? from(String? type) {
    switch(type) {
        case 'grabbed': return RadarrEventType.GRABBED;
        case 'downloadFailed': return RadarrEventType.DOWNLOAD_FAILED;
        case 'downloadFolderImported': return RadarrEventType.DOWNLOAD_FOLDER_IMPORTED;
        case 'downloadIgnored': return RadarrEventType.DOWNLOAD_IGNORED;
        case 'movieFileDeleted': return RadarrEventType.MOVIE_FILE_DELETED;
        case 'movieFileRenamed': return RadarrEventType.MOVIE_FILE_RENAMED;
        case 'movieFolderImported': return RadarrEventType.MOVIE_FOLDER_IMPORTED;
    }
}