from method

RadarrProtocol? from(
  1. String? type
)

Given a String, will return the correct RadarrProtocol object.

Implementation

RadarrProtocol? from(String? type) {
    switch(type) {
        case 'usenet': return RadarrProtocol.USENET;
        case 'torrent': return RadarrProtocol.TORRENT;
        default: return null;
    }
}