toGranularity method

Granularity toGranularity()

Implementation

Granularity toGranularity() {
  switch (this) {
    case 'DAILY':
      return Granularity.daily;
    case 'MONTHLY':
      return Granularity.monthly;
    case 'HOURLY':
      return Granularity.hourly;
  }
  throw Exception('$this is not known in enum Granularity');
}