Skip to content

Commit 6cfcbf2

Browse files
committed
[codegen] update to latest spec and generator
1 parent 9d7e0cf commit 6cfcbf2

38 files changed

+1043
-71
lines changed

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

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4195,12 +4195,11 @@ public final CompletableFuture<RankEvalResponse> rankEval(
41954195
* <li>When requested with <code>wait_for_completion=true</code> (default), the
41964196
* request fails if the node shuts down.</li>
41974197
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4198-
* returned, which can be used via the task management API to monitor, debug, or
4199-
* cancel the task. The task may disappear or fail if the node shuts down. When
4200-
* retrying a failed reindex operation, it might be necessary to set
4201-
* <code>conflicts=proceed</code> or to first delete the partial destination
4202-
* index. Additionally, dry runs, checking disk space, and fetching index
4203-
* recovery information can help address the root cause.</li>
4198+
* returned, for use with the task management APIs. The task may disappear or
4199+
* fail if the node shuts down. When retrying a failed reindex operation, it
4200+
* might be necessary to set <code>conflicts=proceed</code> or to first delete
4201+
* the partial destination index. Additionally, dry runs, checking disk space,
4202+
* and fetching index recovery information can help address the root cause.</li>
42044203
* </ul>
42054204
* <p>
42064205
* Refer to the linked documentation for examples of how to reindex documents.
@@ -4288,12 +4287,11 @@ public CompletableFuture<ReindexResponse> reindex(ReindexRequest request) {
42884287
* <li>When requested with <code>wait_for_completion=true</code> (default), the
42894288
* request fails if the node shuts down.</li>
42904289
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4291-
* returned, which can be used via the task management API to monitor, debug, or
4292-
* cancel the task. The task may disappear or fail if the node shuts down. When
4293-
* retrying a failed reindex operation, it might be necessary to set
4294-
* <code>conflicts=proceed</code> or to first delete the partial destination
4295-
* index. Additionally, dry runs, checking disk space, and fetching index
4296-
* recovery information can help address the root cause.</li>
4290+
* returned, for use with the task management APIs. The task may disappear or
4291+
* fail if the node shuts down. When retrying a failed reindex operation, it
4292+
* might be necessary to set <code>conflicts=proceed</code> or to first delete
4293+
* the partial destination index. Additionally, dry runs, checking disk space,
4294+
* and fetching index recovery information can help address the root cause.</li>
42974295
* </ul>
42984296
* <p>
42994297
* Refer to the linked documentation for examples of how to reindex documents.

java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4224,12 +4224,11 @@ public final RankEvalResponse rankEval(Function<RankEvalRequest.Builder, ObjectB
42244224
* <li>When requested with <code>wait_for_completion=true</code> (default), the
42254225
* request fails if the node shuts down.</li>
42264226
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4227-
* returned, which can be used via the task management API to monitor, debug, or
4228-
* cancel the task. The task may disappear or fail if the node shuts down. When
4229-
* retrying a failed reindex operation, it might be necessary to set
4230-
* <code>conflicts=proceed</code> or to first delete the partial destination
4231-
* index. Additionally, dry runs, checking disk space, and fetching index
4232-
* recovery information can help address the root cause.</li>
4227+
* returned, for use with the task management APIs. The task may disappear or
4228+
* fail if the node shuts down. When retrying a failed reindex operation, it
4229+
* might be necessary to set <code>conflicts=proceed</code> or to first delete
4230+
* the partial destination index. Additionally, dry runs, checking disk space,
4231+
* and fetching index recovery information can help address the root cause.</li>
42334232
* </ul>
42344233
* <p>
42354234
* Refer to the linked documentation for examples of how to reindex documents.
@@ -4317,12 +4316,11 @@ public ReindexResponse reindex(ReindexRequest request) throws IOException, Elast
43174316
* <li>When requested with <code>wait_for_completion=true</code> (default), the
43184317
* request fails if the node shuts down.</li>
43194318
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4320-
* returned, which can be used via the task management API to monitor, debug, or
4321-
* cancel the task. The task may disappear or fail if the node shuts down. When
4322-
* retrying a failed reindex operation, it might be necessary to set
4323-
* <code>conflicts=proceed</code> or to first delete the partial destination
4324-
* index. Additionally, dry runs, checking disk space, and fetching index
4325-
* recovery information can help address the root cause.</li>
4319+
* returned, for use with the task management APIs. The task may disappear or
4320+
* fail if the node shuts down. When retrying a failed reindex operation, it
4321+
* might be necessary to set <code>conflicts=proceed</code> or to first delete
4322+
* the partial destination index. Additionally, dry runs, checking disk space,
4323+
* and fetching index recovery information can help address the root cause.</li>
43264324
* </ul>
43274325
* <p>
43284326
* Refer to the linked documentation for examples of how to reindex documents.

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ArrayPercentilesItem.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
*/
6262
@JsonpDeserializable
6363
public class ArrayPercentilesItem implements JsonpSerializable {
64-
private final String key;
64+
private final double key;
6565

6666
@Nullable
6767
private final Double value;
@@ -73,7 +73,7 @@ public class ArrayPercentilesItem implements JsonpSerializable {
7373

7474
private ArrayPercentilesItem(Builder builder) {
7575

76-
this.key = ApiTypeHelper.requireNonNull(builder.key, this, "key");
76+
this.key = ApiTypeHelper.requireNonNull(builder.key, this, "key", 0);
7777
this.value = builder.value;
7878
this.valueAsString = builder.valueAsString;
7979

@@ -86,7 +86,7 @@ public static ArrayPercentilesItem of(Function<Builder, ObjectBuilder<ArrayPerce
8686
/**
8787
* Required - API name: {@code key}
8888
*/
89-
public final String key() {
89+
public final double key() {
9090
return this.key;
9191
}
9292

@@ -147,7 +147,7 @@ public String toString() {
147147
public static class Builder extends WithJsonObjectBuilderBase<Builder>
148148
implements
149149
ObjectBuilder<ArrayPercentilesItem> {
150-
private String key;
150+
private Double key;
151151

152152
@Nullable
153153
private Double value;
@@ -158,7 +158,7 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder>
158158
/**
159159
* Required - API name: {@code key}
160160
*/
161-
public final Builder key(String value) {
161+
public final Builder key(double value) {
162162
this.key = value;
163163
return this;
164164
}
@@ -207,7 +207,7 @@ public ArrayPercentilesItem build() {
207207

208208
protected static void setupArrayPercentilesItemDeserializer(ObjectDeserializer<ArrayPercentilesItem.Builder> op) {
209209

210-
op.add(Builder::key, JsonpDeserializer.stringDeserializer(), "key");
210+
op.add(Builder::key, JsonpDeserializer.doubleDeserializer(), "key");
211211
op.add(Builder::value, JsonpDeserializer.doubleDeserializer(), "value");
212212
op.add(Builder::valueAsString, JsonpDeserializer.stringDeserializer(), "value_as_string");
213213

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/BucketsPath.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import java.util.Map;
3939
import java.util.Objects;
4040
import java.util.function.Function;
41+
import java.util.stream.Collectors;
4142
import javax.annotation.Nullable;
4243

4344
//----------------------------------------------------------------
@@ -92,6 +93,21 @@ private BucketsPath(Kind kind, Object value) {
9293
this._value = value;
9394
}
9495

96+
public String _toJsonString() {
97+
switch (_kind) {
98+
case Array :
99+
return this.array().stream().map(v -> v).collect(Collectors.joining(","));
100+
case Dict :
101+
return this.dict().entrySet().stream().map(e -> e.getKey() + ":" + e.getValue())
102+
.collect(Collectors.joining(","));
103+
case Single :
104+
return this.single();
105+
106+
default :
107+
throw new IllegalStateException("Unknown kind " + _kind);
108+
}
109+
}
110+
95111
private BucketsPath(Builder builder) {
96112

97113
this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, "<variant kind>");

java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AliasesRequest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import co.elastic.clients.util.ObjectBuilder;
3333
import jakarta.json.stream.JsonGenerator;
3434
import java.lang.String;
35+
import java.util.Arrays;
3536
import java.util.HashMap;
3637
import java.util.List;
3738
import java.util.Map;
@@ -236,6 +237,20 @@ public final Builder h(String value, String... values) {
236237
return this;
237238
}
238239

240+
/**
241+
* A comma-separated list of columns names to display. It supports simple
242+
* wildcards.
243+
* <p>
244+
* API name: {@code h}
245+
* <p>
246+
* Adds one or more enum values to <code>h</code>.
247+
*/
248+
public final Builder h(CatAliasesColumn value, CatAliasesColumn... values) {
249+
this.h = _listAdd(this.h, value.jsonValue(),
250+
Arrays.stream(values).map(CatAliasesColumn::jsonValue).toArray(String[]::new));
251+
return this;
252+
}
253+
239254
/**
240255
* The period to wait for a connection to the master node. If the master node is
241256
* not available before the timeout expires, the request fails and returns an

java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import jakarta.json.stream.JsonGenerator;
3434
import java.lang.Boolean;
3535
import java.lang.String;
36+
import java.util.Arrays;
3637
import java.util.HashMap;
3738
import java.util.List;
3839
import java.util.Map;
@@ -232,6 +233,20 @@ public final Builder h(String value, String... values) {
232233
return this;
233234
}
234235

236+
/**
237+
* A comma-separated list of columns names to display. It supports simple
238+
* wildcards.
239+
* <p>
240+
* API name: {@code h}
241+
* <p>
242+
* Adds one or more enum values to <code>h</code>.
243+
*/
244+
public final Builder h(CatAllocationColumn value, CatAllocationColumn... values) {
245+
this.h = _listAdd(this.h, value.jsonValue(),
246+
Arrays.stream(values).map(CatAllocationColumn::jsonValue).toArray(String[]::new));
247+
return this;
248+
}
249+
235250
/**
236251
* If <code>true</code>, the request computes the list of selected nodes from
237252
* the local cluster state. If <code>false</code> the list of selected nodes are

java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import jakarta.json.stream.JsonGenerator;
3333
import java.lang.Boolean;
3434
import java.lang.String;
35+
import java.util.Arrays;
3536
import java.util.HashMap;
3637
import java.util.List;
3738
import java.util.Map;
@@ -208,6 +209,20 @@ public final Builder h(String value, String... values) {
208209
return this;
209210
}
210211

212+
/**
213+
* A comma-separated list of columns names to display. It supports simple
214+
* wildcards.
215+
* <p>
216+
* API name: {@code h}
217+
* <p>
218+
* Adds one or more enum values to <code>h</code>.
219+
*/
220+
public final Builder h(CatComponentColumn value, CatComponentColumn... values) {
221+
this.h = _listAdd(this.h, value.jsonValue(),
222+
Arrays.stream(values).map(CatComponentColumn::jsonValue).toArray(String[]::new));
223+
return this;
224+
}
225+
211226
/**
212227
* If <code>true</code>, the request computes the list of selected nodes from
213228
* the local cluster state. If <code>false</code> the list of selected nodes are

java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import co.elastic.clients.util.ObjectBuilder;
3131
import jakarta.json.stream.JsonGenerator;
3232
import java.lang.String;
33+
import java.util.Arrays;
3334
import java.util.HashMap;
3435
import java.util.List;
3536
import java.util.Map;
@@ -166,6 +167,20 @@ public final Builder h(String value, String... values) {
166167
return this;
167168
}
168169

170+
/**
171+
* A comma-separated list of columns names to display. It supports simple
172+
* wildcards.
173+
* <p>
174+
* API name: {@code h}
175+
* <p>
176+
* Adds one or more enum values to <code>h</code>.
177+
*/
178+
public final Builder h(CatCountColumn value, CatCountColumn... values) {
179+
this.h = _listAdd(this.h, value.jsonValue(),
180+
Arrays.stream(values).map(CatCountColumn::jsonValue).toArray(String[]::new));
181+
return this;
182+
}
183+
169184
/**
170185
* A comma-separated list of data streams, indices, and aliases used to limit
171186
* the request. It supports wildcards (<code>*</code>). To target all data

java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import co.elastic.clients.util.ObjectBuilder;
3232
import jakarta.json.stream.JsonGenerator;
3333
import java.lang.String;
34+
import java.util.Arrays;
3435
import java.util.HashMap;
3536
import java.util.List;
3637
import java.util.Map;
@@ -219,6 +220,20 @@ public final Builder h(String value, String... values) {
219220
return this;
220221
}
221222

223+
/**
224+
* A comma-separated list of columns names to display. It supports simple
225+
* wildcards.
226+
* <p>
227+
* API name: {@code h}
228+
* <p>
229+
* Adds one or more enum values to <code>h</code>.
230+
*/
231+
public final Builder h(CatFieldDataColumn value, CatFieldDataColumn... values) {
232+
this.h = _listAdd(this.h, value.jsonValue(),
233+
Arrays.stream(values).map(CatFieldDataColumn::jsonValue).toArray(String[]::new));
234+
return this;
235+
}
236+
222237
/**
223238
* List of columns that determine how the table should be sorted. Sorting
224239
* defaults to ascending and can be changed by setting <code>:asc</code> or

java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import jakarta.json.stream.JsonGenerator;
3535
import java.lang.Boolean;
3636
import java.lang.String;
37+
import java.util.Arrays;
3738
import java.util.Collections;
3839
import java.util.HashMap;
3940
import java.util.List;
@@ -258,6 +259,20 @@ public final Builder h(String value, String... values) {
258259
return this;
259260
}
260261

262+
/**
263+
* A comma-separated list of columns names to display. It supports simple
264+
* wildcards.
265+
* <p>
266+
* API name: {@code h}
267+
* <p>
268+
* Adds one or more enum values to <code>h</code>.
269+
*/
270+
public final Builder h(CatNodeColumn value, CatNodeColumn... values) {
271+
this.h = _listAdd(this.h, value.jsonValue(),
272+
Arrays.stream(values).map(CatNodeColumn::jsonValue).toArray(String[]::new));
273+
return this;
274+
}
275+
261276
/**
262277
* If true, the response includes information from segments that are not loaded
263278
* into memory.

0 commit comments

Comments
 (0)