hardDelete method

Future<void> hardDelete(
  1. ProjectDeletionImpactResponse impact, {
  2. bool confirmed = false,
})

Implementation

Future<void> hardDelete(
  pb.ProjectDeletionImpactResponse impact, {
  bool confirmed = false,
}) async {
  if (impact.projectId != projectId) {
    throw ArgumentError('deletion impact belongs to a different Project');
  }
  if (!confirmed ||
      impact.impactSnapshotId.isEmpty ||
      impact.impactSnapshotHash.isEmpty) {
    throw ArgumentError(
      'hard-delete requires a server impact snapshot and confirmed=true',
    );
  }
  await client.hardDeleteProject(impact, confirmed: confirmed);
}