private static StructureShape createSyntheticShape(
            Model model,
            OperationShape operation,
            String suffix,
            StructureShape source,
            Trait inputOutputTrait
    ) {
        ShapeId newId = createSyntheticShapeId(model, operation, suffix);

        // Special handling for copying unit types (that, you don't copy unit types)
        StructureShape.Builder builder = source.getId().equals(UnitTypeTrait.UNIT)
                ? StructureShape.builder()
                : source.toBuilder();

        builder.source(source.getSourceLocation());
        builder.id(newId);
        builder.addTrait(inputOutputTrait);

        if (!newId.equals(source.getId())) {
            builder.addTrait(new OriginalShapeIdTrait(source.getId()));
        }

        LOGGER.fine(() -> "Creating synthetic " + inputOutputTrait.toShapeId().getName() + " shape " + newId);
        return builder.build();
    }
@see ModelTransformer#createDedicatedInputAndOutput(Model, String, String)
smithy-model/src/main/java/software/amazon/smithy/model/transform/CreateDedicatedInputAndOutput.java