Skip to content

Commit 9660794

Browse files
committed
[codegen] update to latest spec
1 parent e7120d4 commit 9660794

34 files changed

+2614
-147
lines changed

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
@@ -74,18 +74,24 @@
7474
public class AliasesRequest extends CatRequestBase {
7575
private final List<ExpandWildcard> expandWildcards;
7676

77+
private final List<String> h;
78+
7779
@Nullable
7880
private final Time masterTimeout;
7981

8082
private final List<String> name;
8183

84+
private final List<String> s;
85+
8286
// ---------------------------------------------------------------------------------------------
8387

8488
private AliasesRequest(Builder builder) {
8589

8690
this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards);
91+
this.h = ApiTypeHelper.unmodifiable(builder.h);
8792
this.masterTimeout = builder.masterTimeout;
8893
this.name = ApiTypeHelper.unmodifiable(builder.name);
94+
this.s = ApiTypeHelper.unmodifiable(builder.s);
8995

9096
}
9197

@@ -105,6 +111,15 @@ public final List<ExpandWildcard> expandWildcards() {
105111
return this.expandWildcards;
106112
}
107113

114+
/**
115+
* List of columns to appear in the response. Supports simple wildcards.
116+
* <p>
117+
* API name: {@code h}
118+
*/
119+
public final List<String> h() {
120+
return this.h;
121+
}
122+
108123
/**
109124
* The period to wait for a connection to the master node. If the master node is
110125
* not available before the timeout expires, the request fails and returns an
@@ -129,6 +144,17 @@ public final List<String> name() {
129144
return this.name;
130145
}
131146

147+
/**
148+
* List of columns that determine how the table should be sorted. Sorting
149+
* defaults to ascending and can be changed by setting <code>:asc</code> or
150+
* <code>:desc</code> as a suffix to the column name.
151+
* <p>
152+
* API name: {@code s}
153+
*/
154+
public final List<String> s() {
155+
return this.s;
156+
}
157+
132158
// ---------------------------------------------------------------------------------------------
133159

134160
/**
@@ -141,12 +167,18 @@ public static class Builder extends CatRequestBase.AbstractBuilder<Builder>
141167
@Nullable
142168
private List<ExpandWildcard> expandWildcards;
143169

170+
@Nullable
171+
private List<String> h;
172+
144173
@Nullable
145174
private Time masterTimeout;
146175

147176
@Nullable
148177
private List<String> name;
149178

179+
@Nullable
180+
private List<String> s;
181+
150182
/**
151183
* The type of index that wildcard patterns can match. If the request can target
152184
* data streams, this argument determines whether wildcard expressions match
@@ -177,6 +209,30 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val
177209
return this;
178210
}
179211

212+
/**
213+
* List of columns to appear in the response. Supports simple wildcards.
214+
* <p>
215+
* API name: {@code h}
216+
* <p>
217+
* Adds all elements of <code>list</code> to <code>h</code>.
218+
*/
219+
public final Builder h(List<String> list) {
220+
this.h = _listAddAll(this.h, list);
221+
return this;
222+
}
223+
224+
/**
225+
* List of columns to appear in the response. Supports simple wildcards.
226+
* <p>
227+
* API name: {@code h}
228+
* <p>
229+
* Adds one or more values to <code>h</code>.
230+
*/
231+
public final Builder h(String value, String... values) {
232+
this.h = _listAdd(this.h, value, values);
233+
return this;
234+
}
235+
180236
/**
181237
* The period to wait for a connection to the master node. If the master node is
182238
* not available before the timeout expires, the request fails and returns an
@@ -230,6 +286,34 @@ public final Builder name(String value, String... values) {
230286
return this;
231287
}
232288

289+
/**
290+
* List of columns that determine how the table should be sorted. Sorting
291+
* defaults to ascending and can be changed by setting <code>:asc</code> or
292+
* <code>:desc</code> as a suffix to the column name.
293+
* <p>
294+
* API name: {@code s}
295+
* <p>
296+
* Adds all elements of <code>list</code> to <code>s</code>.
297+
*/
298+
public final Builder s(List<String> list) {
299+
this.s = _listAddAll(this.s, list);
300+
return this;
301+
}
302+
303+
/**
304+
* List of columns that determine how the table should be sorted. Sorting
305+
* defaults to ascending and can be changed by setting <code>:asc</code> or
306+
* <code>:desc</code> as a suffix to the column name.
307+
* <p>
308+
* API name: {@code s}
309+
* <p>
310+
* Adds one or more values to <code>s</code>.
311+
*/
312+
public final Builder s(String value, String... values) {
313+
this.s = _listAdd(this.s, value, values);
314+
return this;
315+
}
316+
233317
@Override
234318
protected Builder self() {
235319
return this;
@@ -314,10 +398,16 @@ public AliasesRequest build() {
314398
if (request.masterTimeout != null) {
315399
params.put("master_timeout", request.masterTimeout._toJsonString());
316400
}
401+
if (ApiTypeHelper.isDefined(request.s)) {
402+
params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(",")));
403+
}
317404
if (ApiTypeHelper.isDefined(request.expandWildcards)) {
318405
params.put("expand_wildcards",
319406
request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(",")));
320407
}
408+
if (ApiTypeHelper.isDefined(request.h)) {
409+
params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(",")));
410+
}
321411
return params;
322412

323413
}, SimpleEndpoint.emptyMap(), false, AliasesResponse._DESERIALIZER);

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

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ public class AllocationRequest extends CatRequestBase {
7575
@Nullable
7676
private final Bytes bytes;
7777

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

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

8486
private final List<String> nodeId;
8587

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

8892
private AllocationRequest(Builder builder) {
8993

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

95101
}
96102

@@ -108,6 +114,15 @@ public final Bytes bytes() {
108114
return this.bytes;
109115
}
110116

117+
/**
118+
* List of columns to appear in the response. Supports simple wildcards.
119+
* <p>
120+
* API name: {@code h}
121+
*/
122+
public final List<String> h() {
123+
return this.h;
124+
}
125+
111126
/**
112127
* If <code>true</code>, the request computes the list of selected nodes from
113128
* the local cluster state. If <code>false</code> the list of selected nodes are
@@ -142,6 +157,17 @@ public final List<String> nodeId() {
142157
return this.nodeId;
143158
}
144159

160+
/**
161+
* List of columns that determine how the table should be sorted. Sorting
162+
* defaults to ascending and can be changed by setting <code>:asc</code> or
163+
* <code>:desc</code> as a suffix to the column name.
164+
* <p>
165+
* API name: {@code s}
166+
*/
167+
public final List<String> s() {
168+
return this.s;
169+
}
170+
145171
// ---------------------------------------------------------------------------------------------
146172

147173
/**
@@ -154,6 +180,9 @@ public static class Builder extends CatRequestBase.AbstractBuilder<Builder>
154180
@Nullable
155181
private Bytes bytes;
156182

183+
@Nullable
184+
private List<String> h;
185+
157186
@Nullable
158187
private Boolean local;
159188

@@ -163,6 +192,9 @@ public static class Builder extends CatRequestBase.AbstractBuilder<Builder>
163192
@Nullable
164193
private List<String> nodeId;
165194

195+
@Nullable
196+
private List<String> s;
197+
166198
/**
167199
* The unit used to display byte values.
168200
* <p>
@@ -173,6 +205,30 @@ public final Builder bytes(@Nullable Bytes value) {
173205
return this;
174206
}
175207

208+
/**
209+
* List of columns to appear in the response. Supports simple wildcards.
210+
* <p>
211+
* API name: {@code h}
212+
* <p>
213+
* Adds all elements of <code>list</code> to <code>h</code>.
214+
*/
215+
public final Builder h(List<String> list) {
216+
this.h = _listAddAll(this.h, list);
217+
return this;
218+
}
219+
220+
/**
221+
* List of columns to appear in the response. Supports simple wildcards.
222+
* <p>
223+
* API name: {@code h}
224+
* <p>
225+
* Adds one or more values to <code>h</code>.
226+
*/
227+
public final Builder h(String value, String... values) {
228+
this.h = _listAdd(this.h, value, values);
229+
return this;
230+
}
231+
176232
/**
177233
* If <code>true</code>, the request computes the list of selected nodes from
178234
* the local cluster state. If <code>false</code> the list of selected nodes are
@@ -232,6 +288,34 @@ public final Builder nodeId(String value, String... values) {
232288
return this;
233289
}
234290

291+
/**
292+
* List of columns that determine how the table should be sorted. Sorting
293+
* defaults to ascending and can be changed by setting <code>:asc</code> or
294+
* <code>:desc</code> as a suffix to the column name.
295+
* <p>
296+
* API name: {@code s}
297+
* <p>
298+
* Adds all elements of <code>list</code> to <code>s</code>.
299+
*/
300+
public final Builder s(List<String> list) {
301+
this.s = _listAddAll(this.s, list);
302+
return this;
303+
}
304+
305+
/**
306+
* List of columns that determine how the table should be sorted. Sorting
307+
* defaults to ascending and can be changed by setting <code>:asc</code> or
308+
* <code>:desc</code> as a suffix to the column name.
309+
* <p>
310+
* API name: {@code s}
311+
* <p>
312+
* Adds one or more values to <code>s</code>.
313+
*/
314+
public final Builder s(String value, String... values) {
315+
this.s = _listAdd(this.s, value, values);
316+
return this;
317+
}
318+
235319
@Override
236320
protected Builder self() {
237321
return this;
@@ -317,9 +401,15 @@ public AllocationRequest build() {
317401
if (request.masterTimeout != null) {
318402
params.put("master_timeout", request.masterTimeout._toJsonString());
319403
}
404+
if (ApiTypeHelper.isDefined(request.s)) {
405+
params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(",")));
406+
}
320407
if (request.bytes != null) {
321408
params.put("bytes", request.bytes.jsonValue());
322409
}
410+
if (ApiTypeHelper.isDefined(request.h)) {
411+
params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(",")));
412+
}
323413
if (request.local != null) {
324414
params.put("local", String.valueOf(request.local));
325415
}

0 commit comments

Comments
 (0)