private void generateShapesInService(C context, ServiceShape serviceShape) {
        LOGGER.fine(() -> String.format("Generating shapes for %s in %s order",
                directedCodegen.getClass().getName(),
                this.shapeGenerationOrder.name()));
        Set<Shape> shapes = new Walker(context.model()).walkShapes(serviceShape);
        ShapeGenerator<W, C, S> generator = new ShapeGenerator<>(context, serviceShape, directedCodegen);
        List<Shape> orderedShapes = new ArrayList<>();

        switch (this.shapeGenerationOrder) {
            case ALPHABETICAL:
                orderedShapes.addAll(shapes);
                orderedShapes.sort(Comparator.comparing(s -> s.getId().getName(serviceShape)));
                break;
            case NONE:
                orderedShapes.addAll(shapes);
                break;
            case TOPOLOGICAL:
            default:
                TopologicalIndex topologicalIndex = TopologicalIndex.of(context.model());
                for (Shape shape : topologicalIndex.getOrderedShapes()) {
                    if (shapes.contains(shape)) {
                        orderedShapes.add(shape);
                    }
                }
                for (Shape shape : topologicalIndex.getRecursiveShapes()) {
                    if (shapes.contains(shape)) {
                        orderedShapes.add(shape);
                    }
                }
        }

        for (Shape shape : orderedShapes) {
            if (shapes.contains(shape)) {
                shape.accept(generator);
            }
        }
        LOGGER.finest(() -> "Finished generating shapes for " + directedCodegen.getClass().getName());
    }
Finalizes the Runner and performs directed code generation.

@throws IllegalStateException if a required value has not been provided.
smithy-codegen-core/src/main/java/software/amazon/smithy/codegen/core/directed/CodegenDirector.java