toTargetHealthStateEnum method

TargetHealthStateEnum toTargetHealthStateEnum()

Implementation

TargetHealthStateEnum toTargetHealthStateEnum() {
  switch (this) {
    case 'initial':
      return TargetHealthStateEnum.initial;
    case 'healthy':
      return TargetHealthStateEnum.healthy;
    case 'unhealthy':
      return TargetHealthStateEnum.unhealthy;
    case 'unused':
      return TargetHealthStateEnum.unused;
    case 'draining':
      return TargetHealthStateEnum.draining;
    case 'unavailable':
      return TargetHealthStateEnum.unavailable;
  }
  throw Exception('$this is not known in enum TargetHealthStateEnum');
}