toInstanceHealthReason method

InstanceHealthReason toInstanceHealthReason()

Implementation

InstanceHealthReason toInstanceHealthReason() {
  switch (this) {
    case 'Lb.RegistrationInProgress':
      return InstanceHealthReason.lbRegistrationInProgress;
    case 'Lb.InitialHealthChecking':
      return InstanceHealthReason.lbInitialHealthChecking;
    case 'Lb.InternalError':
      return InstanceHealthReason.lbInternalError;
    case 'Instance.ResponseCodeMismatch':
      return InstanceHealthReason.instanceResponseCodeMismatch;
    case 'Instance.Timeout':
      return InstanceHealthReason.instanceTimeout;
    case 'Instance.FailedHealthChecks':
      return InstanceHealthReason.instanceFailedHealthChecks;
    case 'Instance.NotRegistered':
      return InstanceHealthReason.instanceNotRegistered;
    case 'Instance.NotInUse':
      return InstanceHealthReason.instanceNotInUse;
    case 'Instance.DeregistrationInProgress':
      return InstanceHealthReason.instanceDeregistrationInProgress;
    case 'Instance.InvalidState':
      return InstanceHealthReason.instanceInvalidState;
    case 'Instance.IpUnusable':
      return InstanceHealthReason.instanceIpUnusable;
  }
  throw Exception('$this is not known in enum InstanceHealthReason');
}