mirrored_repositories/networkarch-flutter/lib/dns_lookup
// Project imports:
import 'package:network_arch/dns_lookup/utils/rr_code_name.dart';

RrCodeName rrCodeToName(int type) {
  switch (type) {
    case 1:
      return RrCodeName.A;
    case 10:
      return RrCodeName.NULL;
    case 28:
      return RrCodeName.AAAA;
    case 18:
      return RrCodeName.AFSDB;
    case 42:
      return RrCodeName.APL;
    case 257:
      return RrCodeName.CAA;
    case 60:
      return RrCodeName.CDNSKEY;
    case 59:
      return RrCodeName.CDS;
    case 37:
      return RrCodeName.CERT;
    case 5:
      return RrCodeName.CNAME;
    case 49:
      return RrCodeName.DHCID;
    case 32769:
      return RrCodeName.DLV;
    case 39:
      return RrCodeName.DNAME;
    case 48:
      return RrCodeName.DNSKEY;
    case 43:
      return RrCodeName.DS;
    case 55:
      return RrCodeName.HIP;
    case 13:
      return RrCodeName.HINFO;
    case 45:
      return RrCodeName.IPSECKEY;
    case 25:
      return RrCodeName.KEY;
    case 36:
      return RrCodeName.KX;
    case 29:
      return RrCodeName.LOC;
    case 15:
      return RrCodeName.MX;
    case 35:
      return RrCodeName.NAPTR;
    case 2:
      return RrCodeName.NS;
    case 47:
      return RrCodeName.NSEC;
    case 50:
      return RrCodeName.NSEC3;
    case 51:
      return RrCodeName.NSEC3PARAM;
    case 12:
      return RrCodeName.PTR;
    case 46:
      return RrCodeName.RRSIG;
    case 17:
      return RrCodeName.RP;
    case 24:
      return RrCodeName.SIG;
    case 6:
      return RrCodeName.SOA;
    case 99:
      return RrCodeName.SPF;
    case 33:
      return RrCodeName.SRV;
    case 44:
      return RrCodeName.SSHFP;
    case 32768:
      return RrCodeName.TA;
    case 249:
      return RrCodeName.TKEY;
    case 52:
      return RrCodeName.TLSA;
    case 250:
      return RrCodeName.TSIG;
    case 16:
      return RrCodeName.TXT;
    case 252:
      return RrCodeName.AXFR;
    case 251:
      return RrCodeName.IXFR;
    case 41:
      return RrCodeName.OPT;
    case 255:
      return RrCodeName.ANY;
  }

  return RrCodeName.UNKNOWN;
}
