From 6c3cb7304a847be95379e1f88cd841eced3d22a9 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Wed, 26 Jun 2024 16:51:40 +1200 Subject: [PATCH] Re-run generator Signed-off-by: Thomas Farr --- .../opensearch/OpenSearchAsyncClient.java | 72 +++++++++++++++++++ .../client/opensearch/OpenSearchClient.java | 71 ++++++++++++++++++ .../client/opensearch/core/InfoRequest.java | 2 +- 3 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 java-client/src/generated/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java create mode 100644 java-client/src/generated/java/org/opensearch/client/opensearch/OpenSearchClient.java diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java b/java-client/src/generated/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java new file mode 100644 index 0000000000..77f05da118 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/OpenSearchAsyncClient.java @@ -0,0 +1,72 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package org.opensearch.client.opensearch; + +import java.io.IOException; +import java.util.concurrent.CompletableFuture; +import javax.annotation.Generated; +import javax.annotation.Nullable; +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.transport.OpenSearchTransport; +import org.opensearch.client.transport.TransportOptions; + +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class OpenSearchAsyncClient extends OpenSearchAsyncClientBase { + public OpenSearchAsyncClient(OpenSearchTransport transport) { + super(transport, null); + } + + public OpenSearchAsyncClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public OpenSearchAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new OpenSearchAsyncClient(this.transport, transportOptions); + } + + // ----- Endpoint: info + + /** + * Returns basic information about the cluster. + */ + public CompletableFuture info() throws IOException, OpenSearchException { + return this.transport.performRequestAsync(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/OpenSearchClient.java b/java-client/src/generated/java/org/opensearch/client/opensearch/OpenSearchClient.java new file mode 100644 index 0000000000..87e3cdc45a --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/OpenSearchClient.java @@ -0,0 +1,71 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package org.opensearch.client.opensearch; + +import java.io.IOException; +import javax.annotation.Generated; +import javax.annotation.Nullable; +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.transport.OpenSearchTransport; +import org.opensearch.client.transport.TransportOptions; + +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class OpenSearchClient extends OpenSearchClientBase { + public OpenSearchClient(OpenSearchTransport transport) { + super(transport, null); + } + + public OpenSearchClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public OpenSearchClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new OpenSearchClient(this.transport, transportOptions); + } + + // ----- Endpoint: info + + /** + * Returns basic information about the cluster. + */ + public InfoResponse info() throws IOException, OpenSearchException { + return this.transport.performRequest(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoRequest.java index ab8265f76e..6c9e5d2202 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoRequest.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoRequest.java @@ -42,7 +42,7 @@ import org.opensearch.client.transport.Endpoint; import org.opensearch.client.transport.endpoints.SimpleEndpoint; -// typedef: info.Request +// typedef: _global.info.Request /** * Returns basic information about the cluster.