import Foundation enum RosterSubsriptionType: String { case both case from case none case remove case to var isFrom: Bool { switch self { case .from, .both: return true case .none, .to, .remove: return false } } var isTo: Bool { switch self { case .to, .both: return true case .none, .from, .remove: return false } } }