toPortProtocol method

PortProtocol toPortProtocol()

Implementation

PortProtocol toPortProtocol() {
  switch (this) {
    case 'http':
      return PortProtocol.http;
    case 'tcp':
      return PortProtocol.tcp;
    case 'http2':
      return PortProtocol.http2;
    case 'grpc':
      return PortProtocol.grpc;
  }
  throw Exception('$this is not known in enum PortProtocol');
}