// DO NOT EDIT - auto-generated by alef
package {{ package }};

/// Builder for creating instances of {} with sensible defaults
public class {{ type_name }}Builder {
{% for field in fields -%}
    private {{ field.type }} {{ field.name_lower }};
{% endfor %}

    public {{ type_name }}Builder() {
{% for field in fields -%}
        this.{{ field.name_lower }} = {{ field.default }};
{% endfor -%}
    }

{% for field in fields -%}
    public {{ type_name }}Builder {{ field.method_name }}({{ field.type }} value) {
        this.{{ field.name_lower }} = value;
        return this;
    }

{% endfor -%}
    public {{ type_name }} build() {
        return new {{ type_name }}(
{% for field in fields -%}
            this.{{ field.name_lower }}{{ "," if not loop.last else "" }}
{% endfor -%}
        );
    }
}
