from method

TautulliSessionLocation? from(
  1. String? location
)

Given a String, will return the correct TautulliSessionLocation object.

Implementation

TautulliSessionLocation? from(String? location) {
    switch(location) {
        case 'lan': return TautulliSessionLocation.LAN;
        case 'wan': return TautulliSessionLocation.WAN;
        case '': return TautulliSessionLocation.NULL;
    }
    return null;
}