Skip to content

Commit

Permalink
Generate indices.upgrade
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia committed Dec 18, 2024
1 parent 63fef99 commit 4423966
Show file tree
Hide file tree
Showing 10 changed files with 672 additions and 286 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1080,4 +1080,33 @@ public final CompletableFuture<UpdateAliasesResponse> updateAliases(
public final CompletableFuture<UpdateAliasesResponse> updateAliases() throws IOException, OpenSearchException {
return updateAliases(new UpdateAliasesRequest.Builder().build());
}

// ----- Endpoint: indices.upgrade

/**
* The <code>_upgrade</code> API is no longer useful and will be removed.
*/
@Deprecated
public CompletableFuture<UpgradeResponse> upgrade(UpgradeRequest request) throws IOException, OpenSearchException {
return this.transport.performRequestAsync(request, UpgradeRequest._ENDPOINT, this.transportOptions);
}

/**
* The <code>_upgrade</code> API is no longer useful and will be removed.
*
* @param fn a function that initializes a builder to create the {@link UpgradeRequest}
*/
@Deprecated
public final CompletableFuture<UpgradeResponse> upgrade(Function<UpgradeRequest.Builder, ObjectBuilder<UpgradeRequest>> fn)
throws IOException, OpenSearchException {
return upgrade(fn.apply(new UpgradeRequest.Builder()).build());
}

/**
* The <code>_upgrade</code> API is no longer useful and will be removed.
*/
@Deprecated
public final CompletableFuture<UpgradeResponse> upgrade() throws IOException, OpenSearchException {
return upgrade(new UpgradeRequest.Builder().build());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1059,4 +1059,33 @@ public final UpdateAliasesResponse updateAliases(Function<UpdateAliasesRequest.B
public final UpdateAliasesResponse updateAliases() throws IOException, OpenSearchException {
return updateAliases(new UpdateAliasesRequest.Builder().build());
}

// ----- Endpoint: indices.upgrade

/**
* The <code>_upgrade</code> API is no longer useful and will be removed.
*/
@Deprecated
public UpgradeResponse upgrade(UpgradeRequest request) throws IOException, OpenSearchException {
return this.transport.performRequest(request, UpgradeRequest._ENDPOINT, this.transportOptions);
}

/**
* The <code>_upgrade</code> API is no longer useful and will be removed.
*
* @param fn a function that initializes a builder to create the {@link UpgradeRequest}
*/
@Deprecated
public final UpgradeResponse upgrade(Function<UpgradeRequest.Builder, ObjectBuilder<UpgradeRequest>> fn) throws IOException,
OpenSearchException {
return upgrade(fn.apply(new UpgradeRequest.Builder()).build());
}

/**
* The <code>_upgrade</code> API is no longer useful and will be removed.
*/
@Deprecated
public final UpgradeResponse upgrade() throws IOException, OpenSearchException {
return upgrade(new UpgradeRequest.Builder().build());
}
}
Loading

0 comments on commit 4423966

Please sign in to comment.