toTargetHealthReason method

TargetHealthReason toTargetHealthReason()

Implementation

TargetHealthReason toTargetHealthReason() {
  switch (this) {
    case 'UNREACHABLE':
      return TargetHealthReason.unreachable;
    case 'CONNECTION_FAILED':
      return TargetHealthReason.connectionFailed;
    case 'AUTH_FAILURE':
      return TargetHealthReason.authFailure;
    case 'PENDING_PROXY_CAPACITY':
      return TargetHealthReason.pendingProxyCapacity;
  }
  throw Exception('$this is not known in enum TargetHealthReason');
}