toViolationEventType method

ViolationEventType toViolationEventType()

Implementation

ViolationEventType toViolationEventType() {
  switch (this) {
    case 'in-alarm':
      return ViolationEventType.inAlarm;
    case 'alarm-cleared':
      return ViolationEventType.alarmCleared;
    case 'alarm-invalidated':
      return ViolationEventType.alarmInvalidated;
  }
  throw Exception('$this is not known in enum ViolationEventType');
}