from method

RadarrAvailability? from(
  1. String? type
)

Given a String, will return the correct RadarrAvailability object.

Implementation

RadarrAvailability? from(String? type) {
    switch(type) {
        case 'announced': return RadarrAvailability.ANNOUNCED;
        case 'inCinemas': return RadarrAvailability.IN_CINEMAS;
        case 'released': return RadarrAvailability.RELEASED;
        case 'preDB': return RadarrAvailability.PREDB;
        case 'tba': return RadarrAvailability.TBA;
        default: return null;
    }
}