// Create action.
DeleteCustomTargetingKeys action = new DeleteCustomTargetingKeys();
// Perform action.
UpdateResult result = customTargetingService.performCustomTargetingKeyAction(
action, statementBuilder.toStatement());
// Display results.
if (result != null && result.getNumChanges() > 0) {
System.out.println("Number of custom targeting keys deleted: " + result.getNumChanges());
} else {
System.out.println("No custom targeting keys were deleted.");
}
}
} catch (Exception e) {