toDomainAvailability method

DomainAvailability toDomainAvailability()

Implementation

DomainAvailability toDomainAvailability() {
  switch (this) {
    case 'AVAILABLE':
      return DomainAvailability.available;
    case 'AVAILABLE_RESERVED':
      return DomainAvailability.availableReserved;
    case 'AVAILABLE_PREORDER':
      return DomainAvailability.availablePreorder;
    case 'UNAVAILABLE':
      return DomainAvailability.unavailable;
    case 'UNAVAILABLE_PREMIUM':
      return DomainAvailability.unavailablePremium;
    case 'UNAVAILABLE_RESTRICTED':
      return DomainAvailability.unavailableRestricted;
    case 'RESERVED':
      return DomainAvailability.reserved;
    case 'DONT_KNOW':
      return DomainAvailability.dontKnow;
  }
  throw Exception('$this is not known in enum DomainAvailability');
}