private void pruneShapesThatMatchConditions(ServiceModel serviceModel) {
        Map<String, Shape> shapes = copy(serviceModel.getShapes());
        serviceModel.getShapes().forEach((shapeName, shape) -> {
            if (PRUNE_CONDITIONS.stream().anyMatch(p -> p.test(shape) && !config.getShapesToSkipPruning().contains(shapeName))) {
                shapes.remove(shapeName);
                log("Pruned shape [%s] that matched prune condition", shapeName);
            }
        });
        serviceModel.setShapes(shapes);
    }
Prune top-level shapes that match any of the provided {@link #PRUNE_CONDITIONS}.
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/customization/processors/PruneUnsupportedShapesProcessor.java