toFailureType method

FailureType toFailureType()

Implementation

FailureType toFailureType() {
  switch (this) {
    case 'UpdateCancelled':
      return FailureType.updateCancelled;
    case 'CancellationFailed':
      return FailureType.cancellationFailed;
    case 'RollbackFailed':
      return FailureType.rollbackFailed;
    case 'RollbackSuccessful':
      return FailureType.rollbackSuccessful;
    case 'InternalFailure':
      return FailureType.internalFailure;
    case 'InvalidEnvironmentState':
      return FailureType.invalidEnvironmentState;
    case 'PermissionsError':
      return FailureType.permissionsError;
  }
  throw Exception('$this is not known in enum FailureType');
}