toEntityType method

EntityType toEntityType()

Implementation

EntityType toEntityType() {
  switch (this) {
    case 'DEVICE':
      return EntityType.device;
    case 'SERVICE':
      return EntityType.service;
    case 'DEVICE_MODEL':
      return EntityType.deviceModel;
    case 'CAPABILITY':
      return EntityType.capability;
    case 'STATE':
      return EntityType.state;
    case 'ACTION':
      return EntityType.action;
    case 'EVENT':
      return EntityType.event;
    case 'PROPERTY':
      return EntityType.property;
    case 'MAPPING':
      return EntityType.mapping;
    case 'ENUM':
      return EntityType.$enum;
  }
  throw Exception('$this is not known in enum EntityType');
}