toProtocolEnum method

ProtocolEnum toProtocolEnum()

Implementation

ProtocolEnum toProtocolEnum() {
  switch (this) {
    case 'HTTP':
      return ProtocolEnum.http;
    case 'HTTPS':
      return ProtocolEnum.https;
    case 'TCP':
      return ProtocolEnum.tcp;
    case 'TLS':
      return ProtocolEnum.tls;
    case 'UDP':
      return ProtocolEnum.udp;
    case 'TCP_UDP':
      return ProtocolEnum.tcpUdp;
    case 'GENEVE':
      return ProtocolEnum.geneve;
  }
  throw Exception('$this is not known in enum ProtocolEnum');
}