toLifecycleState method

LifecycleState toLifecycleState()

Implementation

LifecycleState toLifecycleState() {
  switch (this) {
    case 'Pending':
      return LifecycleState.pending;
    case 'Pending:Wait':
      return LifecycleState.pendingWait;
    case 'Pending:Proceed':
      return LifecycleState.pendingProceed;
    case 'Quarantined':
      return LifecycleState.quarantined;
    case 'InService':
      return LifecycleState.inService;
    case 'Terminating':
      return LifecycleState.terminating;
    case 'Terminating:Wait':
      return LifecycleState.terminatingWait;
    case 'Terminating:Proceed':
      return LifecycleState.terminatingProceed;
    case 'Terminated':
      return LifecycleState.terminated;
    case 'Detaching':
      return LifecycleState.detaching;
    case 'Detached':
      return LifecycleState.detached;
    case 'EnteringStandby':
      return LifecycleState.enteringStandby;
    case 'Standby':
      return LifecycleState.standby;
  }
  throw Exception('$this is not known in enum LifecycleState');
}