Skip to content

Commit 27c8dc8

Browse files
retaopensearch-trigger-bot[bot]github-actions[bot]
authored
Re-generated client code using latest OpenSearch API specification (#1829) (#1832)
* Re-generate client code using latest OpenSearch API specification (2025-12-16) * Fixing codegen compilation issues --------- (cherry picked from commit 9377014) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Andriy Redko <drreta@gmail.com> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 35f87b0 commit 27c8dc8

45 files changed

Lines changed: 3665 additions & 1168 deletions

Some content is hidden

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

java-client/src/generated/java/org/opensearch/client/opensearch/OpenSearchAsyncClientBase.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
import org.opensearch.client.opensearch.security.OpenSearchSecurityAsyncClient;
115115
import org.opensearch.client.opensearch.snapshot.OpenSearchSnapshotAsyncClient;
116116
import org.opensearch.client.opensearch.tasks.OpenSearchTasksAsyncClient;
117+
import org.opensearch.client.opensearch.ubi.OpenSearchUbiAsyncClient;
117118
import org.opensearch.client.transport.JsonEndpoint;
118119
import org.opensearch.client.transport.OpenSearchTransport;
119120
import org.opensearch.client.transport.TransportOptions;
@@ -200,6 +201,10 @@ public OpenSearchTasksAsyncClient tasks() {
200201
return new OpenSearchTasksAsyncClient(this.transport, this.transportOptions);
201202
}
202203

204+
public OpenSearchUbiAsyncClient ubi() {
205+
return new OpenSearchUbiAsyncClient(this.transport, this.transportOptions);
206+
}
207+
203208
// ----- Endpoint: clear_scroll
204209

205210
/**

java-client/src/generated/java/org/opensearch/client/opensearch/OpenSearchClientBase.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
import org.opensearch.client.opensearch.security.OpenSearchSecurityClient;
114114
import org.opensearch.client.opensearch.snapshot.OpenSearchSnapshotClient;
115115
import org.opensearch.client.opensearch.tasks.OpenSearchTasksClient;
116+
import org.opensearch.client.opensearch.ubi.OpenSearchUbiClient;
116117
import org.opensearch.client.transport.JsonEndpoint;
117118
import org.opensearch.client.transport.OpenSearchTransport;
118119
import org.opensearch.client.transport.TransportOptions;
@@ -199,6 +200,10 @@ public OpenSearchTasksClient tasks() {
199200
return new OpenSearchTasksClient(this.transport, this.transportOptions);
200201
}
201202

203+
public OpenSearchUbiClient ubi() {
204+
return new OpenSearchUbiClient(this.transport, this.transportOptions);
205+
}
206+
202207
// ----- Endpoint: clear_scroll
203208

204209
/**

java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ public class ErrorCause implements PlainJsonSerializable, ToCopyableBuilder<Erro
6767
@Nullable
6868
private final ErrorCause causedBy;
6969

70+
@Nonnull
71+
private final Map<String, List<String>> header;
72+
7073
@Nonnull
7174
private final Map<String, JsonData> metadata;
7275

@@ -89,6 +92,7 @@ public class ErrorCause implements PlainJsonSerializable, ToCopyableBuilder<Erro
8992

9093
private ErrorCause(Builder builder) {
9194
this.causedBy = builder.causedBy;
95+
this.header = ApiTypeHelper.unmodifiable(builder.header);
9296
this.metadata = ApiTypeHelper.unmodifiable(builder.metadata);
9397
this.reason = builder.reason;
9498
this.rootCause = ApiTypeHelper.unmodifiable(builder.rootCause);
@@ -109,6 +113,14 @@ public final ErrorCause causedBy() {
109113
return this.causedBy;
110114
}
111115

116+
/**
117+
* API name: {@code header}
118+
*/
119+
@Nonnull
120+
public final Map<String, List<String>> header() {
121+
return this.header;
122+
}
123+
112124
/**
113125
* Any additional information about the error.
114126
*/
@@ -186,6 +198,22 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
186198
this.causedBy.serialize(generator, mapper);
187199
}
188200

201+
if (ApiTypeHelper.isDefined(this.header)) {
202+
generator.writeKey("header");
203+
generator.writeStartObject();
204+
for (Map.Entry<String, List<String>> item0 : this.header.entrySet()) {
205+
generator.writeKey(item0.getKey());
206+
generator.writeStartArray();
207+
if (item0.getValue() != null) {
208+
for (String item1 : item0.getValue()) {
209+
generator.write(item1);
210+
}
211+
}
212+
generator.writeEnd();
213+
}
214+
generator.writeEnd();
215+
}
216+
189217
if (this.reason != null) {
190218
generator.writeKey("reason");
191219
generator.write(this.reason);
@@ -238,6 +266,8 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder
238266
@Nullable
239267
private ErrorCause causedBy;
240268
@Nullable
269+
private Map<String, List<String>> header;
270+
@Nullable
241271
private Map<String, JsonData> metadata;
242272
@Nullable
243273
private String reason;
@@ -253,6 +283,7 @@ public Builder() {}
253283

254284
private Builder(ErrorCause o) {
255285
this.causedBy = o.causedBy;
286+
this.header = _mapCopy(o.header);
256287
this.metadata = _mapCopy(o.metadata);
257288
this.reason = o.reason;
258289
this.rootCause = _listCopy(o.rootCause);
@@ -263,6 +294,7 @@ private Builder(ErrorCause o) {
263294

264295
private Builder(Builder o) {
265296
this.causedBy = o.causedBy;
297+
this.header = _mapCopy(o.header);
266298
this.metadata = _mapCopy(o.metadata);
267299
this.reason = o.reason;
268300
this.rootCause = _listCopy(o.rootCause);
@@ -294,6 +326,32 @@ public final Builder causedBy(Function<ErrorCause.Builder, ObjectBuilder<ErrorCa
294326
return causedBy(fn.apply(new ErrorCause.Builder()).build());
295327
}
296328

329+
/**
330+
* API name: {@code header}
331+
*
332+
* <p>
333+
* Adds all elements of <code>map</code> to <code>header</code>.
334+
* </p>
335+
*/
336+
@Nonnull
337+
public final Builder header(Map<String, List<String>> map) {
338+
this.header = _mapPutAll(this.header, map);
339+
return this;
340+
}
341+
342+
/**
343+
* API name: {@code header}
344+
*
345+
* <p>
346+
* Adds an entry to <code>header</code>.
347+
* </p>
348+
*/
349+
@Nonnull
350+
public final Builder header(String key, List<String> value) {
351+
this.header = _mapPut(this.header, key, value);
352+
return this;
353+
}
354+
297355
/**
298356
* Any additional information about the error.
299357
*
@@ -458,6 +516,11 @@ public ErrorCause build() {
458516

459517
protected static void setupErrorCauseDeserializer(ObjectDeserializer<ErrorCause.Builder> op) {
460518
op.add(Builder::causedBy, ErrorCause._DESERIALIZER, "caused_by");
519+
op.add(
520+
Builder::header,
521+
JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer())),
522+
"header"
523+
);
461524
op.add(Builder::reason, JsonpDeserializer.stringDeserializer(), "reason");
462525
op.add(Builder::rootCause, JsonpDeserializer.arrayDeserializer(ErrorCause._DESERIALIZER), "root_cause");
463526
op.add(Builder::stackTrace, JsonpDeserializer.stringDeserializer(), "stack_trace");
@@ -475,6 +538,7 @@ protected static void setupErrorCauseDeserializer(ObjectDeserializer<ErrorCause.
475538
public int hashCode() {
476539
int result = 17;
477540
result = 31 * result + Objects.hashCode(this.causedBy);
541+
result = 31 * result + Objects.hashCode(this.header);
478542
result = 31 * result + Objects.hashCode(this.metadata);
479543
result = 31 * result + Objects.hashCode(this.reason);
480544
result = 31 * result + Objects.hashCode(this.rootCause);
@@ -490,6 +554,7 @@ public boolean equals(Object o) {
490554
if (o == null || this.getClass() != o.getClass()) return false;
491555
ErrorCause other = (ErrorCause) o;
492556
return Objects.equals(this.causedBy, other.causedBy)
557+
&& Objects.equals(this.header, other.header)
493558
&& Objects.equals(this.metadata, other.metadata)
494559
&& Objects.equals(this.reason, other.reason)
495560
&& Objects.equals(this.rootCause, other.rootCause)

java-client/src/generated/java/org/opensearch/client/opensearch/_types/PhaseTook.java

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@
6161
@Generated("org.opensearch.client.codegen.CodeGenerator")
6262
public class PhaseTook implements PlainJsonSerializable, ToCopyableBuilder<PhaseTook.Builder, PhaseTook> {
6363

64-
private final int canMatch;
64+
private final long canMatch;
6565

66-
private final int dfsPreQuery;
66+
private final long dfsPreQuery;
6767

68-
private final int dfsQuery;
68+
private final long dfsQuery;
6969

70-
private final int expand;
70+
private final long expand;
7171

72-
private final int fetch;
72+
private final long fetch;
7373

74-
private final int query;
74+
private final long query;
7575

7676
// ---------------------------------------------------------------------------------------------
7777

@@ -94,7 +94,7 @@ public static PhaseTook of(Function<PhaseTook.Builder, ObjectBuilder<PhaseTook>>
9494
* API name: {@code can_match}
9595
* </p>
9696
*/
97-
public final int canMatch() {
97+
public final long canMatch() {
9898
return this.canMatch;
9999
}
100100

@@ -104,7 +104,7 @@ public final int canMatch() {
104104
* API name: {@code dfs_pre_query}
105105
* </p>
106106
*/
107-
public final int dfsPreQuery() {
107+
public final long dfsPreQuery() {
108108
return this.dfsPreQuery;
109109
}
110110

@@ -114,7 +114,7 @@ public final int dfsPreQuery() {
114114
* API name: {@code dfs_query}
115115
* </p>
116116
*/
117-
public final int dfsQuery() {
117+
public final long dfsQuery() {
118118
return this.dfsQuery;
119119
}
120120

@@ -124,7 +124,7 @@ public final int dfsQuery() {
124124
* API name: {@code expand}
125125
* </p>
126126
*/
127-
public final int expand() {
127+
public final long expand() {
128128
return this.expand;
129129
}
130130

@@ -134,7 +134,7 @@ public final int expand() {
134134
* API name: {@code fetch}
135135
* </p>
136136
*/
137-
public final int fetch() {
137+
public final long fetch() {
138138
return this.fetch;
139139
}
140140

@@ -144,7 +144,7 @@ public final int fetch() {
144144
* API name: {@code query}
145145
* </p>
146146
*/
147-
public final int query() {
147+
public final long query() {
148148
return this.query;
149149
}
150150

@@ -195,12 +195,12 @@ public static Builder builder() {
195195
* Builder for {@link PhaseTook}.
196196
*/
197197
public static class Builder extends ObjectBuilderBase implements CopyableBuilder<Builder, PhaseTook> {
198-
private Integer canMatch;
199-
private Integer dfsPreQuery;
200-
private Integer dfsQuery;
201-
private Integer expand;
202-
private Integer fetch;
203-
private Integer query;
198+
private Long canMatch;
199+
private Long dfsPreQuery;
200+
private Long dfsQuery;
201+
private Long expand;
202+
private Long fetch;
203+
private Long query;
204204

205205
public Builder() {}
206206

@@ -235,7 +235,7 @@ public Builder copy() {
235235
* </p>
236236
*/
237237
@Nonnull
238-
public final Builder canMatch(int value) {
238+
public final Builder canMatch(long value) {
239239
this.canMatch = value;
240240
return this;
241241
}
@@ -247,7 +247,7 @@ public final Builder canMatch(int value) {
247247
* </p>
248248
*/
249249
@Nonnull
250-
public final Builder dfsPreQuery(int value) {
250+
public final Builder dfsPreQuery(long value) {
251251
this.dfsPreQuery = value;
252252
return this;
253253
}
@@ -259,7 +259,7 @@ public final Builder dfsPreQuery(int value) {
259259
* </p>
260260
*/
261261
@Nonnull
262-
public final Builder dfsQuery(int value) {
262+
public final Builder dfsQuery(long value) {
263263
this.dfsQuery = value;
264264
return this;
265265
}
@@ -271,7 +271,7 @@ public final Builder dfsQuery(int value) {
271271
* </p>
272272
*/
273273
@Nonnull
274-
public final Builder expand(int value) {
274+
public final Builder expand(long value) {
275275
this.expand = value;
276276
return this;
277277
}
@@ -283,7 +283,7 @@ public final Builder expand(int value) {
283283
* </p>
284284
*/
285285
@Nonnull
286-
public final Builder fetch(int value) {
286+
public final Builder fetch(long value) {
287287
this.fetch = value;
288288
return this;
289289
}
@@ -295,7 +295,7 @@ public final Builder fetch(int value) {
295295
* </p>
296296
*/
297297
@Nonnull
298-
public final Builder query(int value) {
298+
public final Builder query(long value) {
299299
this.query = value;
300300
return this;
301301
}
@@ -325,23 +325,23 @@ public PhaseTook build() {
325325
);
326326

327327
protected static void setupPhaseTookDeserializer(ObjectDeserializer<PhaseTook.Builder> op) {
328-
op.add(Builder::canMatch, JsonpDeserializer.integerDeserializer(), "can_match");
329-
op.add(Builder::dfsPreQuery, JsonpDeserializer.integerDeserializer(), "dfs_pre_query");
330-
op.add(Builder::dfsQuery, JsonpDeserializer.integerDeserializer(), "dfs_query");
331-
op.add(Builder::expand, JsonpDeserializer.integerDeserializer(), "expand");
332-
op.add(Builder::fetch, JsonpDeserializer.integerDeserializer(), "fetch");
333-
op.add(Builder::query, JsonpDeserializer.integerDeserializer(), "query");
328+
op.add(Builder::canMatch, JsonpDeserializer.longDeserializer(), "can_match");
329+
op.add(Builder::dfsPreQuery, JsonpDeserializer.longDeserializer(), "dfs_pre_query");
330+
op.add(Builder::dfsQuery, JsonpDeserializer.longDeserializer(), "dfs_query");
331+
op.add(Builder::expand, JsonpDeserializer.longDeserializer(), "expand");
332+
op.add(Builder::fetch, JsonpDeserializer.longDeserializer(), "fetch");
333+
op.add(Builder::query, JsonpDeserializer.longDeserializer(), "query");
334334
}
335335

336336
@Override
337337
public int hashCode() {
338338
int result = 17;
339-
result = 31 * result + Integer.hashCode(this.canMatch);
340-
result = 31 * result + Integer.hashCode(this.dfsPreQuery);
341-
result = 31 * result + Integer.hashCode(this.dfsQuery);
342-
result = 31 * result + Integer.hashCode(this.expand);
343-
result = 31 * result + Integer.hashCode(this.fetch);
344-
result = 31 * result + Integer.hashCode(this.query);
339+
result = 31 * result + Long.hashCode(this.canMatch);
340+
result = 31 * result + Long.hashCode(this.dfsPreQuery);
341+
result = 31 * result + Long.hashCode(this.dfsQuery);
342+
result = 31 * result + Long.hashCode(this.expand);
343+
result = 31 * result + Long.hashCode(this.fetch);
344+
result = 31 * result + Long.hashCode(this.query);
345345
return result;
346346
}
347347

0 commit comments

Comments
 (0)