toBackupLifecycle method

BackupLifecycle toBackupLifecycle()

Implementation

BackupLifecycle toBackupLifecycle() {
  switch (this) {
    case 'AVAILABLE':
      return BackupLifecycle.available;
    case 'CREATING':
      return BackupLifecycle.creating;
    case 'TRANSFERRING':
      return BackupLifecycle.transferring;
    case 'DELETED':
      return BackupLifecycle.deleted;
    case 'FAILED':
      return BackupLifecycle.failed;
    case 'PENDING':
      return BackupLifecycle.pending;
  }
  throw Exception('$this is not known in enum BackupLifecycle');
}