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

java-client/src/main/java/co/elastic/clients/elasticsearch/indices/update_aliases/Action.java The Builder of Action of updateAliases should use [return self()] instead of [return this] and change the return type to [Builder] #884

Open
Jiuyoung opened this issue Sep 19, 2024 · 0 comments

Comments

@Jiuyoung
Copy link

Java API client version

8.15.1

Java version

11

Elasticsearch Version

8.15.0

Problem description

The following is the relevant code, which is causing the inability to achieve chaining as expected.

public static class Builder extends WithJsonObjectBuilderBase<Builder> implements ObjectBuilder<Action> {
private Kind _kind;
private Object _value;
@Override
protected Builder self() {
return this;
}
public ObjectBuilder<Action> add(AddAction v) {
this._kind = Kind.Add;
this._value = v;
return this;
}
public ObjectBuilder<Action> add(Function<AddAction.Builder, ObjectBuilder<AddAction>> fn) {
return this.add(fn.apply(new AddAction.Builder()).build());
}
public ObjectBuilder<Action> remove(RemoveAction v) {
this._kind = Kind.Remove;
this._value = v;
return this;
}
public ObjectBuilder<Action> remove(Function<RemoveAction.Builder, ObjectBuilder<RemoveAction>> fn) {
return this.remove(fn.apply(new RemoveAction.Builder()).build());
}
public ObjectBuilder<Action> removeIndex(RemoveIndexAction v) {
this._kind = Kind.RemoveIndex;
this._value = v;
return this;
}

@Jiuyoung Jiuyoung changed the title The Builder of Action of updateAliases should use [return self()] instead of [return this] and change the return type to [Builder] java-client/src/main/java/co/elastic/clients/elasticsearch/indices/update_aliases/Action.java The Builder of Action of updateAliases should use [return self()] instead of [return this] and change the return type to [Builder] Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant