Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for withHelper for config field #264

Merged
merged 1 commit into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private void generateConfig() {
});
});

getAllConfigFields().stream().filter(ConfigField::withHelper)
getAllConfigFields().stream().filter(ConfigField::getWithHelper)
.forEach(configField -> {
writer.writeDocs(
String.format("With%s returns a functional option for setting the Client's %s option.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public Symbol getType() {
/**
* @return Returns if the config option should have a with helper or not.
*/
public Boolean withHelper() {
public Boolean getWithHelper() {
return withHelper;
}

Expand All @@ -67,7 +67,7 @@ public Optional<String> getDocumentation() {

@Override
public SmithyBuilder<ConfigField> toBuilder() {
return builder().type(type).name(name).documentation(documentation);
return builder().type(type).name(name).documentation(documentation).withHelper(withHelper);
}

public static Builder builder() {
Expand All @@ -85,12 +85,13 @@ public boolean equals(Object o) {
ConfigField that = (ConfigField) o;
return Objects.equals(getName(), that.getName())
&& Objects.equals(getType(), that.getType())
&& Objects.equals(getDocumentation(), that.getDocumentation());
&& Objects.equals(getDocumentation(), that.getDocumentation())
&& Objects.equals(getWithHelper(), that.getWithHelper());
}

@Override
public int hashCode() {
return Objects.hash(getName(), getType(), getDocumentation());
return Objects.hash(getName(), getType(), getDocumentation(), getWithHelper());
}

/**
Expand Down