Skip to content

Commit d2b3b06

Browse files
committed
[codegen] Update serveless code
1 parent 1c7fce1 commit d2b3b06

File tree

1,756 files changed

+51286
-9242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,756 files changed

+51286
-9242
lines changed

java-client-serverless/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java

Lines changed: 155 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
* under the License.
1818
*/
1919

20-
//----------------------------------------------------
21-
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
22-
//----------------------------------------------------
23-
2420
package co.elastic.clients.elasticsearch;
2521

2622
import co.elastic.clients.ApiClient;
@@ -46,6 +42,8 @@
4642
import co.elastic.clients.elasticsearch.core.DeleteScriptResponse;
4743
import co.elastic.clients.elasticsearch.core.ExistsRequest;
4844
import co.elastic.clients.elasticsearch.core.ExistsSourceRequest;
45+
import co.elastic.clients.elasticsearch.core.ExplainRequest;
46+
import co.elastic.clients.elasticsearch.core.ExplainResponse;
4947
import co.elastic.clients.elasticsearch.core.FieldCapsRequest;
5048
import co.elastic.clients.elasticsearch.core.FieldCapsResponse;
5149
import co.elastic.clients.elasticsearch.core.GetRequest;
@@ -73,6 +71,8 @@
7371
import co.elastic.clients.elasticsearch.core.PutScriptResponse;
7472
import co.elastic.clients.elasticsearch.core.RankEvalRequest;
7573
import co.elastic.clients.elasticsearch.core.RankEvalResponse;
74+
import co.elastic.clients.elasticsearch.core.ReindexRequest;
75+
import co.elastic.clients.elasticsearch.core.ReindexResponse;
7676
import co.elastic.clients.elasticsearch.core.RenderSearchTemplateRequest;
7777
import co.elastic.clients.elasticsearch.core.RenderSearchTemplateResponse;
7878
import co.elastic.clients.elasticsearch.core.ScriptsPainlessExecuteRequest;
@@ -93,15 +93,20 @@
9393
import co.elastic.clients.elasticsearch.core.UpdateRequest;
9494
import co.elastic.clients.elasticsearch.core.UpdateResponse;
9595
import co.elastic.clients.elasticsearch.enrich.ElasticsearchEnrichAsyncClient;
96+
import co.elastic.clients.elasticsearch.eql.ElasticsearchEqlAsyncClient;
9697
import co.elastic.clients.elasticsearch.graph.ElasticsearchGraphAsyncClient;
9798
import co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesAsyncClient;
99+
import co.elastic.clients.elasticsearch.inference.ElasticsearchInferenceAsyncClient;
98100
import co.elastic.clients.elasticsearch.ingest.ElasticsearchIngestAsyncClient;
101+
import co.elastic.clients.elasticsearch.license.ElasticsearchLicenseAsyncClient;
99102
import co.elastic.clients.elasticsearch.logstash.ElasticsearchLogstashAsyncClient;
100103
import co.elastic.clients.elasticsearch.ml.ElasticsearchMlAsyncClient;
101104
import co.elastic.clients.elasticsearch.query_ruleset.ElasticsearchQueryRulesetAsyncClient;
102105
import co.elastic.clients.elasticsearch.search_application.ElasticsearchSearchApplicationAsyncClient;
103106
import co.elastic.clients.elasticsearch.security.ElasticsearchSecurityAsyncClient;
107+
import co.elastic.clients.elasticsearch.sql.ElasticsearchSqlAsyncClient;
104108
import co.elastic.clients.elasticsearch.synonyms.ElasticsearchSynonymsAsyncClient;
109+
import co.elastic.clients.elasticsearch.tasks.ElasticsearchTasksAsyncClient;
105110
import co.elastic.clients.elasticsearch.transform.ElasticsearchTransformAsyncClient;
106111
import co.elastic.clients.transport.ElasticsearchTransport;
107112
import co.elastic.clients.transport.Endpoint;
@@ -117,6 +122,21 @@
117122
import java.util.function.Function;
118123
import javax.annotation.Nullable;
119124

125+
//----------------------------------------------------------------
126+
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
127+
//----------------------------------------------------------------
128+
//
129+
// This code is generated from the Elasticsearch API specification
130+
// at https://github.com/elastic/elasticsearch-specification
131+
//
132+
// Manual updates to this file will be lost when the code is
133+
// re-generated.
134+
//
135+
// If you find a property that is missing or wrongly typed, please
136+
// open an issue or a PR on the API specification repository.
137+
//
138+
//----------------------------------------------------------------
139+
120140
/**
121141
* Client for the namespace.
122142
*/
@@ -153,6 +173,10 @@ public ElasticsearchEnrichAsyncClient enrich() {
153173
return new ElasticsearchEnrichAsyncClient(this.transport, this.transportOptions);
154174
}
155175

176+
public ElasticsearchEqlAsyncClient eql() {
177+
return new ElasticsearchEqlAsyncClient(this.transport, this.transportOptions);
178+
}
179+
156180
public ElasticsearchGraphAsyncClient graph() {
157181
return new ElasticsearchGraphAsyncClient(this.transport, this.transportOptions);
158182
}
@@ -161,10 +185,18 @@ public ElasticsearchIndicesAsyncClient indices() {
161185
return new ElasticsearchIndicesAsyncClient(this.transport, this.transportOptions);
162186
}
163187

188+
public ElasticsearchInferenceAsyncClient inference() {
189+
return new ElasticsearchInferenceAsyncClient(this.transport, this.transportOptions);
190+
}
191+
164192
public ElasticsearchIngestAsyncClient ingest() {
165193
return new ElasticsearchIngestAsyncClient(this.transport, this.transportOptions);
166194
}
167195

196+
public ElasticsearchLicenseAsyncClient license() {
197+
return new ElasticsearchLicenseAsyncClient(this.transport, this.transportOptions);
198+
}
199+
168200
public ElasticsearchLogstashAsyncClient logstash() {
169201
return new ElasticsearchLogstashAsyncClient(this.transport, this.transportOptions);
170202
}
@@ -185,10 +217,18 @@ public ElasticsearchSecurityAsyncClient security() {
185217
return new ElasticsearchSecurityAsyncClient(this.transport, this.transportOptions);
186218
}
187219

220+
public ElasticsearchSqlAsyncClient sql() {
221+
return new ElasticsearchSqlAsyncClient(this.transport, this.transportOptions);
222+
}
223+
188224
public ElasticsearchSynonymsAsyncClient synonyms() {
189225
return new ElasticsearchSynonymsAsyncClient(this.transport, this.transportOptions);
190226
}
191227

228+
public ElasticsearchTasksAsyncClient tasks() {
229+
return new ElasticsearchTasksAsyncClient(this.transport, this.transportOptions);
230+
}
231+
192232
public ElasticsearchTransformAsyncClient transform() {
193233
return new ElasticsearchTransformAsyncClient(this.transport, this.transportOptions);
194234
}
@@ -570,6 +610,76 @@ public final CompletableFuture<BooleanResponse> existsSource(
570610
return existsSource(fn.apply(new ExistsSourceRequest.Builder()).build());
571611
}
572612

613+
// ----- Endpoint: explain
614+
615+
/**
616+
* Returns information about why a specific matches (or doesn't match) a query.
617+
*
618+
* @see <a href=
619+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html">Documentation
620+
* on elastic.co</a>
621+
*/
622+
623+
public <TDocument> CompletableFuture<ExplainResponse<TDocument>> explain(ExplainRequest request,
624+
Class<TDocument> tDocumentClass) {
625+
@SuppressWarnings("unchecked")
626+
JsonEndpoint<ExplainRequest, ExplainResponse<TDocument>, ErrorResponse> endpoint = (JsonEndpoint<ExplainRequest, ExplainResponse<TDocument>, ErrorResponse>) ExplainRequest._ENDPOINT;
627+
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
628+
"co.elastic.clients:Deserializer:_global.explain.TDocument", getDeserializer(tDocumentClass));
629+
630+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
631+
}
632+
633+
/**
634+
* Returns information about why a specific matches (or doesn't match) a query.
635+
*
636+
* @param fn
637+
* a function that initializes a builder to create the
638+
* {@link ExplainRequest}
639+
* @see <a href=
640+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html">Documentation
641+
* on elastic.co</a>
642+
*/
643+
644+
public final <TDocument> CompletableFuture<ExplainResponse<TDocument>> explain(
645+
Function<ExplainRequest.Builder, ObjectBuilder<ExplainRequest>> fn, Class<TDocument> tDocumentClass) {
646+
return explain(fn.apply(new ExplainRequest.Builder()).build(), tDocumentClass);
647+
}
648+
649+
/**
650+
* Returns information about why a specific matches (or doesn't match) a query.
651+
*
652+
* @see <a href=
653+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html">Documentation
654+
* on elastic.co</a>
655+
*/
656+
657+
public <TDocument> CompletableFuture<ExplainResponse<TDocument>> explain(ExplainRequest request,
658+
Type tDocumentType) {
659+
@SuppressWarnings("unchecked")
660+
JsonEndpoint<ExplainRequest, ExplainResponse<TDocument>, ErrorResponse> endpoint = (JsonEndpoint<ExplainRequest, ExplainResponse<TDocument>, ErrorResponse>) ExplainRequest._ENDPOINT;
661+
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
662+
"co.elastic.clients:Deserializer:_global.explain.TDocument", getDeserializer(tDocumentType));
663+
664+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
665+
}
666+
667+
/**
668+
* Returns information about why a specific matches (or doesn't match) a query.
669+
*
670+
* @param fn
671+
* a function that initializes a builder to create the
672+
* {@link ExplainRequest}
673+
* @see <a href=
674+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html">Documentation
675+
* on elastic.co</a>
676+
*/
677+
678+
public final <TDocument> CompletableFuture<ExplainResponse<TDocument>> explain(
679+
Function<ExplainRequest.Builder, ObjectBuilder<ExplainRequest>> fn, Type tDocumentType) {
680+
return explain(fn.apply(new ExplainRequest.Builder()).build(), tDocumentType);
681+
}
682+
573683
// ----- Endpoint: field_caps
574684

575685
/**
@@ -1207,6 +1317,43 @@ public final CompletableFuture<RankEvalResponse> rankEval(
12071317
return rankEval(fn.apply(new RankEvalRequest.Builder()).build());
12081318
}
12091319

1320+
// ----- Endpoint: reindex
1321+
1322+
/**
1323+
* Allows to copy documents from one index to another, optionally filtering the
1324+
* source documents by a query, changing the destination index settings, or
1325+
* fetching the documents from a remote cluster.
1326+
*
1327+
* @see <a href=
1328+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html">Documentation
1329+
* on elastic.co</a>
1330+
*/
1331+
1332+
public CompletableFuture<ReindexResponse> reindex(ReindexRequest request) {
1333+
@SuppressWarnings("unchecked")
1334+
JsonEndpoint<ReindexRequest, ReindexResponse, ErrorResponse> endpoint = (JsonEndpoint<ReindexRequest, ReindexResponse, ErrorResponse>) ReindexRequest._ENDPOINT;
1335+
1336+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
1337+
}
1338+
1339+
/**
1340+
* Allows to copy documents from one index to another, optionally filtering the
1341+
* source documents by a query, changing the destination index settings, or
1342+
* fetching the documents from a remote cluster.
1343+
*
1344+
* @param fn
1345+
* a function that initializes a builder to create the
1346+
* {@link ReindexRequest}
1347+
* @see <a href=
1348+
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html">Documentation
1349+
* on elastic.co</a>
1350+
*/
1351+
1352+
public final CompletableFuture<ReindexResponse> reindex(
1353+
Function<ReindexRequest.Builder, ObjectBuilder<ReindexRequest>> fn) {
1354+
return reindex(fn.apply(new ReindexRequest.Builder()).build());
1355+
}
1356+
12101357
// ----- Endpoint: render_search_template
12111358

12121359
/**
@@ -1718,7 +1865,8 @@ public final <TDocument, TPartialDocument> CompletableFuture<UpdateResponse<TDoc
17181865
// ----- Endpoint: update_by_query
17191866

17201867
/**
1721-
* Performs an update on every document in the index without changing the
1868+
* Updates documents that match the specified query. If no query is specified,
1869+
* performs an update on every document in the index without changing the
17221870
* source, for example to pick up a mapping change.
17231871
*
17241872
* @see <a href=
@@ -1734,7 +1882,8 @@ public CompletableFuture<UpdateByQueryResponse> updateByQuery(UpdateByQueryReque
17341882
}
17351883

17361884
/**
1737-
* Performs an update on every document in the index without changing the
1885+
* Updates documents that match the specified query. If no query is specified,
1886+
* performs an update on every document in the index without changing the
17381887
* source, for example to pick up a mapping change.
17391888
*
17401889
* @param fn

0 commit comments

Comments
 (0)