Skip to content

Commit

Permalink
Generate DanglingIndicesClient
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia committed Aug 2, 2024
1 parent 2580454 commit e3798df
Show file tree
Hide file tree
Showing 8 changed files with 593 additions and 168 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.opensearch.client.opensearch._types.OpenSearchException;
import org.opensearch.client.opensearch.core.InfoRequest;
import org.opensearch.client.opensearch.core.InfoResponse;
import org.opensearch.client.opensearch.dangling_indices.OpenSearchDanglingIndicesAsyncClient;
import org.opensearch.client.transport.OpenSearchTransport;
import org.opensearch.client.transport.TransportOptions;

Expand All @@ -64,6 +65,12 @@ public OpenSearchAsyncClient withTransportOptions(@Nullable TransportOptions tra
return new OpenSearchAsyncClient(this.transport, transportOptions);
}

// ----- Child clients

public OpenSearchDanglingIndicesAsyncClient danglingIndices() {
return new OpenSearchDanglingIndicesAsyncClient(this.transport, this.transportOptions);
}

// ----- Endpoint: info

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.opensearch.client.opensearch._types.OpenSearchException;
import org.opensearch.client.opensearch.core.InfoRequest;
import org.opensearch.client.opensearch.core.InfoResponse;
import org.opensearch.client.opensearch.dangling_indices.OpenSearchDanglingIndicesClient;
import org.opensearch.client.transport.OpenSearchTransport;
import org.opensearch.client.transport.TransportOptions;

Expand All @@ -63,6 +64,12 @@ public OpenSearchClient withTransportOptions(@Nullable TransportOptions transpor
return new OpenSearchClient(this.transport, transportOptions);
}

// ----- Child clients

public OpenSearchDanglingIndicesClient danglingIndices() {
return new OpenSearchDanglingIndicesClient(this.transport, this.transportOptions);
}

// ----- Endpoint: info

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@
* GitHub history for details.
*/

//----------------------------------------------------
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------

package org.opensearch.client.opensearch.dangling_indices;

import java.io.IOException;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import org.opensearch.client.ApiClient;
import org.opensearch.client.opensearch._types.ErrorResponse;
Expand All @@ -47,8 +52,8 @@
/**
* Client for the dangling_indices namespace.
*/
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class OpenSearchDanglingIndicesAsyncClient extends ApiClient<OpenSearchTransport, OpenSearchDanglingIndicesAsyncClient> {

public OpenSearchDanglingIndicesAsyncClient(OpenSearchTransport transport) {
super(transport, null);
}
Expand All @@ -65,10 +70,8 @@ public OpenSearchDanglingIndicesAsyncClient withTransportOptions(@Nullable Trans
// ----- Endpoint: dangling_indices.delete_dangling_index

/**
* Deletes the specified dangling index
*
* Deletes the specified dangling index.
*/

public CompletableFuture<DeleteDanglingIndexResponse> deleteDanglingIndex(DeleteDanglingIndexRequest request) throws IOException,
OpenSearchException {
@SuppressWarnings("unchecked")
Expand All @@ -81,14 +84,10 @@ public CompletableFuture<DeleteDanglingIndexResponse> deleteDanglingIndex(Delete
}

/**
* Deletes the specified dangling index
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteDanglingIndexRequest}
* Deletes the specified dangling index.
*
* @param fn a function that initializes a builder to create the {@link DeleteDanglingIndexRequest}
*/

public final CompletableFuture<DeleteDanglingIndexResponse> deleteDanglingIndex(
Function<DeleteDanglingIndexRequest.Builder, ObjectBuilder<DeleteDanglingIndexRequest>> fn
) throws IOException, OpenSearchException {
Expand All @@ -98,11 +97,8 @@ public final CompletableFuture<DeleteDanglingIndexResponse> deleteDanglingIndex(
// ----- Endpoint: dangling_indices.import_dangling_index

/**
* Imports the specified dangling index
*
*
* Imports the specified dangling index.
*/

public CompletableFuture<ImportDanglingIndexResponse> importDanglingIndex(ImportDanglingIndexRequest request) throws IOException,
OpenSearchException {
@SuppressWarnings("unchecked")
Expand All @@ -115,14 +111,10 @@ public CompletableFuture<ImportDanglingIndexResponse> importDanglingIndex(Import
}

/**
* Imports the specified dangling index
*
* @param fn
* a function that initializes a builder to create the
* {@link ImportDanglingIndexRequest}
* Imports the specified dangling index.
*
* @param fn a function that initializes a builder to create the {@link ImportDanglingIndexRequest}
*/

public final CompletableFuture<ImportDanglingIndexResponse> importDanglingIndex(
Function<ImportDanglingIndexRequest.Builder, ObjectBuilder<ImportDanglingIndexRequest>> fn
) throws IOException, OpenSearchException {
Expand All @@ -133,8 +125,6 @@ public final CompletableFuture<ImportDanglingIndexResponse> importDanglingIndex(

/**
* Returns all dangling indices.
*
*
*/
public CompletableFuture<ListDanglingIndicesResponse> listDanglingIndices() throws IOException, OpenSearchException {
return this.transport.performRequestAsync(
Expand All @@ -143,5 +133,4 @@ public CompletableFuture<ListDanglingIndicesResponse> listDanglingIndices() thro
this.transportOptions
);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@
* GitHub history for details.
*/

//----------------------------------------------------
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------

package org.opensearch.client.opensearch.dangling_indices;

import java.io.IOException;
import java.util.function.Function;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import org.opensearch.client.ApiClient;
import org.opensearch.client.opensearch._types.ErrorResponse;
Expand All @@ -46,8 +51,8 @@
/**
* Client for the dangling_indices namespace.
*/
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class OpenSearchDanglingIndicesClient extends ApiClient<OpenSearchTransport, OpenSearchDanglingIndicesClient> {

public OpenSearchDanglingIndicesClient(OpenSearchTransport transport) {
super(transport, null);
}
Expand All @@ -64,11 +69,8 @@ public OpenSearchDanglingIndicesClient withTransportOptions(@Nullable TransportO
// ----- Endpoint: dangling_indices.delete_dangling_index

/**
* Deletes the specified dangling index
*
*
* Deletes the specified dangling index.
*/

public DeleteDanglingIndexResponse deleteDanglingIndex(DeleteDanglingIndexRequest request) throws IOException, OpenSearchException {
@SuppressWarnings("unchecked")
JsonEndpoint<DeleteDanglingIndexRequest, DeleteDanglingIndexResponse, ErrorResponse> endpoint = (JsonEndpoint<
Expand All @@ -80,14 +82,10 @@ public DeleteDanglingIndexResponse deleteDanglingIndex(DeleteDanglingIndexReques
}

/**
* Deletes the specified dangling index
*
* @param fn
* a function that initializes a builder to create the
* {@link DeleteDanglingIndexRequest}
* Deletes the specified dangling index.
*
* @param fn a function that initializes a builder to create the {@link DeleteDanglingIndexRequest}
*/

public final DeleteDanglingIndexResponse deleteDanglingIndex(
Function<DeleteDanglingIndexRequest.Builder, ObjectBuilder<DeleteDanglingIndexRequest>> fn
) throws IOException, OpenSearchException {
Expand All @@ -97,11 +95,8 @@ public final DeleteDanglingIndexResponse deleteDanglingIndex(
// ----- Endpoint: dangling_indices.import_dangling_index

/**
* Imports the specified dangling index
*
*
* Imports the specified dangling index.
*/

public ImportDanglingIndexResponse importDanglingIndex(ImportDanglingIndexRequest request) throws IOException, OpenSearchException {
@SuppressWarnings("unchecked")
JsonEndpoint<ImportDanglingIndexRequest, ImportDanglingIndexResponse, ErrorResponse> endpoint = (JsonEndpoint<
Expand All @@ -113,14 +108,10 @@ public ImportDanglingIndexResponse importDanglingIndex(ImportDanglingIndexReques
}

/**
* Imports the specified dangling index
*
* @param fn
* a function that initializes a builder to create the
* {@link ImportDanglingIndexRequest}
* Imports the specified dangling index.
*
* @param fn a function that initializes a builder to create the {@link ImportDanglingIndexRequest}
*/

public final ImportDanglingIndexResponse importDanglingIndex(
Function<ImportDanglingIndexRequest.Builder, ObjectBuilder<ImportDanglingIndexRequest>> fn
) throws IOException, OpenSearchException {
Expand All @@ -131,8 +122,6 @@ public final ImportDanglingIndexResponse importDanglingIndex(

/**
* Returns all dangling indices.
*
*
*/
public ListDanglingIndicesResponse listDanglingIndices() throws IOException, OpenSearchException {
return this.transport.performRequest(
Expand All @@ -141,5 +130,4 @@ public ListDanglingIndicesResponse listDanglingIndices() throws IOException, Ope
this.transportOptions
);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@ public OpenSearchClusterAsyncClient cluster() {
return new OpenSearchClusterAsyncClient(this.transport, this.transportOptions);
}

public OpenSearchDanglingIndicesAsyncClient danglingIndices() {
return new OpenSearchDanglingIndicesAsyncClient(this.transport, this.transportOptions);
}

public OpenSearchFeaturesAsyncClient features() {
return new OpenSearchFeaturesAsyncClient(this.transport, this.transportOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ public OpenSearchClusterClient cluster() {
return new OpenSearchClusterClient(this.transport, this.transportOptions);
}

public OpenSearchDanglingIndicesClient danglingIndices() {
return new OpenSearchDanglingIndicesClient(this.transport, this.transportOptions);
}

public OpenSearchFeaturesClient features() {
return new OpenSearchFeaturesClient(this.transport, this.transportOptions);
}
Expand Down
Loading

0 comments on commit e3798df

Please sign in to comment.