toThreatIntelIndicatorType method

ThreatIntelIndicatorType toThreatIntelIndicatorType()

Implementation

ThreatIntelIndicatorType toThreatIntelIndicatorType() {
  switch (this) {
    case 'DOMAIN':
      return ThreatIntelIndicatorType.domain;
    case 'EMAIL_ADDRESS':
      return ThreatIntelIndicatorType.emailAddress;
    case 'HASH_MD5':
      return ThreatIntelIndicatorType.hashMd5;
    case 'HASH_SHA1':
      return ThreatIntelIndicatorType.hashSha1;
    case 'HASH_SHA256':
      return ThreatIntelIndicatorType.hashSha256;
    case 'HASH_SHA512':
      return ThreatIntelIndicatorType.hashSha512;
    case 'IPV4_ADDRESS':
      return ThreatIntelIndicatorType.ipv4Address;
    case 'IPV6_ADDRESS':
      return ThreatIntelIndicatorType.ipv6Address;
    case 'MUTEX':
      return ThreatIntelIndicatorType.mutex;
    case 'PROCESS':
      return ThreatIntelIndicatorType.process;
    case 'URL':
      return ThreatIntelIndicatorType.url;
  }
  throw Exception('$this is not known in enum ThreatIntelIndicatorType');
}