Skip to content

Commit 743a383

Browse files
committed
[codegen] update to latest spec
1 parent 7510b44 commit 743a383

29 files changed

+2551
-103
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ public class SubmitRequest extends RequestBase implements JsonpSerializable {
164164

165165
private final List<Map<String, Double>> indicesBoost;
166166

167+
@Nullable
168+
private final Time keepAlive;
169+
167170
@Nullable
168171
private final Boolean keepOnCompletion;
169172

@@ -278,6 +281,7 @@ private SubmitRequest(Builder builder) {
278281
this.ignoreUnavailable = builder.ignoreUnavailable;
279282
this.index = ApiTypeHelper.unmodifiable(builder.index);
280283
this.indicesBoost = ApiTypeHelper.unmodifiable(builder.indicesBoost);
284+
this.keepAlive = builder.keepAlive;
281285
this.keepOnCompletion = builder.keepOnCompletion;
282286
this.knn = ApiTypeHelper.unmodifiable(builder.knn);
283287
this.lenient = builder.lenient;
@@ -542,6 +546,17 @@ public final List<Map<String, Double>> indicesBoost() {
542546
return this.indicesBoost;
543547
}
544548

549+
/**
550+
* Specifies how long the async search needs to be available. Ongoing async
551+
* searches and any saved search results are deleted after this period.
552+
* <p>
553+
* API name: {@code keep_alive}
554+
*/
555+
@Nullable
556+
public final Time keepAlive() {
557+
return this.keepAlive;
558+
}
559+
545560
/**
546561
* If <code>true</code>, results are stored for later retrieval when the search
547562
* completes within the <code>wait_for_completion_timeout</code>.
@@ -1196,6 +1211,9 @@ public static class Builder extends RequestBase.AbstractBuilder<Builder> impleme
11961211
@Nullable
11971212
private List<Map<String, Double>> indicesBoost;
11981213

1214+
@Nullable
1215+
private Time keepAlive;
1216+
11991217
@Nullable
12001218
private Boolean keepOnCompletion;
12011219

@@ -1681,6 +1699,27 @@ public final Builder indicesBoost(Map<String, Double> value, Map<String, Double>
16811699
return this;
16821700
}
16831701

1702+
/**
1703+
* Specifies how long the async search needs to be available. Ongoing async
1704+
* searches and any saved search results are deleted after this period.
1705+
* <p>
1706+
* API name: {@code keep_alive}
1707+
*/
1708+
public final Builder keepAlive(@Nullable Time value) {
1709+
this.keepAlive = value;
1710+
return this;
1711+
}
1712+
1713+
/**
1714+
* Specifies how long the async search needs to be available. Ongoing async
1715+
* searches and any saved search results are deleted after this period.
1716+
* <p>
1717+
* API name: {@code keep_alive}
1718+
*/
1719+
public final Builder keepAlive(Function<Time.Builder, ObjectBuilder<Time>> fn) {
1720+
return this.keepAlive(fn.apply(new Time.Builder()).build());
1721+
}
1722+
16841723
/**
16851724
* If <code>true</code>, results are stored for later retrieval when the search
16861725
* completes within the <code>wait_for_completion_timeout</code>.
@@ -2499,6 +2538,9 @@ protected static void setupSubmitRequestDeserializer(ObjectDeserializer<SubmitRe
24992538
if (request.defaultOperator != null) {
25002539
params.put("default_operator", request.defaultOperator.jsonValue());
25012540
}
2541+
if (request.keepAlive != null) {
2542+
params.put("keep_alive", request.keepAlive._toJsonString());
2543+
}
25022544
if (request.requestCache != null) {
25032545
params.put("request_cache", String.valueOf(request.requestCache));
25042546
}

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

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@
7575
public class AliasesRequest extends CatRequestBase {
7676
private final List<ExpandWildcard> expandWildcards;
7777

78+
private final List<String> h;
79+
7880
@Nullable
7981
private final Boolean local;
8082

@@ -83,14 +85,18 @@ public class AliasesRequest extends CatRequestBase {
8385

8486
private final List<String> name;
8587

88+
private final List<String> s;
89+
8690
// ---------------------------------------------------------------------------------------------
8791

8892
private AliasesRequest(Builder builder) {
8993

9094
this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards);
95+
this.h = ApiTypeHelper.unmodifiable(builder.h);
9196
this.local = builder.local;
9297
this.masterTimeout = builder.masterTimeout;
9398
this.name = ApiTypeHelper.unmodifiable(builder.name);
99+
this.s = ApiTypeHelper.unmodifiable(builder.s);
94100

95101
}
96102

@@ -110,6 +116,15 @@ public final List<ExpandWildcard> expandWildcards() {
110116
return this.expandWildcards;
111117
}
112118

119+
/**
120+
* List of columns to appear in the response. Supports simple wildcards.
121+
* <p>
122+
* API name: {@code h}
123+
*/
124+
public final List<String> h() {
125+
return this.h;
126+
}
127+
113128
/**
114129
* If <code>true</code>, the request computes the list of selected nodes from
115130
* the local cluster state. If <code>false</code> the list of selected nodes are
@@ -148,6 +163,17 @@ public final List<String> name() {
148163
return this.name;
149164
}
150165

166+
/**
167+
* List of columns that determine how the table should be sorted. Sorting
168+
* defaults to ascending and can be changed by setting <code>:asc</code> or
169+
* <code>:desc</code> as a suffix to the column name.
170+
* <p>
171+
* API name: {@code s}
172+
*/
173+
public final List<String> s() {
174+
return this.s;
175+
}
176+
151177
// ---------------------------------------------------------------------------------------------
152178

153179
/**
@@ -160,6 +186,9 @@ public static class Builder extends CatRequestBase.AbstractBuilder<Builder>
160186
@Nullable
161187
private List<ExpandWildcard> expandWildcards;
162188

189+
@Nullable
190+
private List<String> h;
191+
163192
@Nullable
164193
private Boolean local;
165194

@@ -169,6 +198,9 @@ public static class Builder extends CatRequestBase.AbstractBuilder<Builder>
169198
@Nullable
170199
private List<String> name;
171200

201+
@Nullable
202+
private List<String> s;
203+
172204
/**
173205
* The type of index that wildcard patterns can match. If the request can target
174206
* data streams, this argument determines whether wildcard expressions match
@@ -199,6 +231,30 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val
199231
return this;
200232
}
201233

234+
/**
235+
* List of columns to appear in the response. Supports simple wildcards.
236+
* <p>
237+
* API name: {@code h}
238+
* <p>
239+
* Adds all elements of <code>list</code> to <code>h</code>.
240+
*/
241+
public final Builder h(List<String> list) {
242+
this.h = _listAddAll(this.h, list);
243+
return this;
244+
}
245+
246+
/**
247+
* List of columns to appear in the response. Supports simple wildcards.
248+
* <p>
249+
* API name: {@code h}
250+
* <p>
251+
* Adds one or more values to <code>h</code>.
252+
*/
253+
public final Builder h(String value, String... values) {
254+
this.h = _listAdd(this.h, value, values);
255+
return this;
256+
}
257+
202258
/**
203259
* If <code>true</code>, the request computes the list of selected nodes from
204260
* the local cluster state. If <code>false</code> the list of selected nodes are
@@ -266,6 +322,34 @@ public final Builder name(String value, String... values) {
266322
return this;
267323
}
268324

325+
/**
326+
* List of columns that determine how the table should be sorted. Sorting
327+
* defaults to ascending and can be changed by setting <code>:asc</code> or
328+
* <code>:desc</code> as a suffix to the column name.
329+
* <p>
330+
* API name: {@code s}
331+
* <p>
332+
* Adds all elements of <code>list</code> to <code>s</code>.
333+
*/
334+
public final Builder s(List<String> list) {
335+
this.s = _listAddAll(this.s, list);
336+
return this;
337+
}
338+
339+
/**
340+
* List of columns that determine how the table should be sorted. Sorting
341+
* defaults to ascending and can be changed by setting <code>:asc</code> or
342+
* <code>:desc</code> as a suffix to the column name.
343+
* <p>
344+
* API name: {@code s}
345+
* <p>
346+
* Adds one or more values to <code>s</code>.
347+
*/
348+
public final Builder s(String value, String... values) {
349+
this.s = _listAdd(this.s, value, values);
350+
return this;
351+
}
352+
269353
@Override
270354
protected Builder self() {
271355
return this;
@@ -350,10 +434,16 @@ public AliasesRequest build() {
350434
if (request.masterTimeout != null) {
351435
params.put("master_timeout", request.masterTimeout._toJsonString());
352436
}
437+
if (ApiTypeHelper.isDefined(request.s)) {
438+
params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(",")));
439+
}
353440
if (ApiTypeHelper.isDefined(request.expandWildcards)) {
354441
params.put("expand_wildcards",
355442
request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(",")));
356443
}
444+
if (ApiTypeHelper.isDefined(request.h)) {
445+
params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(",")));
446+
}
357447
if (request.local != null) {
358448
params.put("local", String.valueOf(request.local));
359449
}

0 commit comments

Comments
 (0)