private static String scalarSetters(LeafCNode n) {
            String name = n.getName();

            String signalInitialized = (n.getDefaultValue() == null) ? "  " + INTERNAL_PREFIX + "uninitialized.remove(\"" + name + "\");\n"
                    : "";

            String bType = builderType(n);
            String privateSetter = "";
            if ( ! Set.of("String", "FileReference", "ModelReference", "Optional<FileReference>").contains(bType)) {
                String type = boxedDataType(n);
                if ("UrlReference".equals(bType))
                    type = bType;
                //
                privateSetter = String.format("""

                                                      private Builder %s(String %svalue) {
                                                        return %s(%s.valueOf(%svalue));
                                                      }""", name, INTERNAL_PREFIX, name, type, INTERNAL_PREFIX);
            } else if ("Optional<FileReference>".equals(bType)) {
                //
                privateSetter = String.format("""

                                                      private Builder %s(FileReference %svalue) {
                                                        return %s(Optional.of(%svalue));
                                                      }""", name, INTERNAL_PREFIX, name, INTERNAL_PREFIX);
            }

            String getNullGuard = bType.equals(boxedBuilderType(n)) ? String.format(
                    "\nif (%svalue == null) throw new IllegalArgumentException(\"Null value is not allowed.\");", INTERNAL_PREFIX) : "";

            return String.format("public Builder %s(%s %svalue) {%s\n" +
                    "  %s = %svalue;\n" + //
                    "%s", name, bType, INTERNAL_PREFIX, getNullGuard, name, INTERNAL_PREFIX, signalInitialized) +
                    "  return this;" + "\n}\n" + privateSetter;
        }
\n" + //
                    " * Make a new builder and run the supplied function on it before using it as the value\n" + //
                    " * @param __func lambda that modifies the given builder\n" + //
                    " * @return this builder\n" + //
                    "
configgen/src/main/java/com/yahoo/config/codegen/BuilderGenerator.java