Skip to content

Commit

Permalink
Merge pull request #264 from aws/WithHelperAddition
Browse files Browse the repository at this point in the history
add support for withHelper for config field
  • Loading branch information
skotambkar authored Jan 22, 2021
2 parents 9d27659 + e8f79b0 commit 0df1483
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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

0 comments on commit 0df1483

Please sign in to comment.