Skip to content

Commit 327f1a0

Browse files
[codegen] update to latest spec (#1286)
Co-authored-by: Laura Trotta <laura.trotta@elastic.co>
1 parent 06efc9c commit 327f1a0

175 files changed

Lines changed: 22581 additions & 1457 deletions

File tree

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/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
import co.elastic.clients.elasticsearch.core.UpdateRequest;
117117
import co.elastic.clients.elasticsearch.core.UpdateResponse;
118118
import co.elastic.clients.elasticsearch.dangling_indices.ElasticsearchDanglingIndicesAsyncClient;
119+
import co.elastic.clients.elasticsearch.encryption.ElasticsearchEncryptionAsyncClient;
119120
import co.elastic.clients.elasticsearch.enrich.ElasticsearchEnrichAsyncClient;
120121
import co.elastic.clients.elasticsearch.eql.ElasticsearchEqlAsyncClient;
121122
import co.elastic.clients.elasticsearch.esql.ElasticsearchEsqlAsyncClient;
@@ -246,6 +247,10 @@ public ElasticsearchDanglingIndicesAsyncClient danglingIndices() {
246247
return new ElasticsearchDanglingIndicesAsyncClient(this.transport, this.transportOptions);
247248
}
248249

250+
public ElasticsearchEncryptionAsyncClient encryption() {
251+
return new ElasticsearchEncryptionAsyncClient(this.transport, this.transportOptions);
252+
}
253+
249254
public ElasticsearchEnrichAsyncClient enrich() {
250255
return new ElasticsearchEnrichAsyncClient(this.transport, this.transportOptions);
251256
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
import co.elastic.clients.elasticsearch.core.UpdateRequest;
118118
import co.elastic.clients.elasticsearch.core.UpdateResponse;
119119
import co.elastic.clients.elasticsearch.dangling_indices.ElasticsearchDanglingIndicesClient;
120+
import co.elastic.clients.elasticsearch.encryption.ElasticsearchEncryptionClient;
120121
import co.elastic.clients.elasticsearch.enrich.ElasticsearchEnrichClient;
121122
import co.elastic.clients.elasticsearch.eql.ElasticsearchEqlClient;
122123
import co.elastic.clients.elasticsearch.esql.ElasticsearchEsqlClient;
@@ -246,6 +247,10 @@ public ElasticsearchDanglingIndicesClient danglingIndices() {
246247
return new ElasticsearchDanglingIndicesClient(this.transport, this.transportOptions);
247248
}
248249

250+
public ElasticsearchEncryptionClient encryption() {
251+
return new ElasticsearchEncryptionClient(this.transport, this.transportOptions);
252+
}
253+
249254
public ElasticsearchEnrichClient enrich() {
250255
return new ElasticsearchEnrichClient(this.transport, this.transportOptions);
251256
}

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

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ public class FlushStats implements JsonpSerializable {
6868

6969
private final long totalTimeInMillis;
7070

71+
@Nullable
72+
private final Time totalTimeExcludingWaiting;
73+
74+
private final long totalTimeExcludingWaitingOnLockInMillis;
75+
7176
// ---------------------------------------------------------------------------------------------
7277

7378
private FlushStats(Builder builder) {
@@ -76,6 +81,9 @@ private FlushStats(Builder builder) {
7681
this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total", 0);
7782
this.totalTime = builder.totalTime;
7883
this.totalTimeInMillis = ApiTypeHelper.requireNonNull(builder.totalTimeInMillis, this, "totalTimeInMillis", 0);
84+
this.totalTimeExcludingWaiting = builder.totalTimeExcludingWaiting;
85+
this.totalTimeExcludingWaitingOnLockInMillis = ApiTypeHelper.requireNonNull(
86+
builder.totalTimeExcludingWaitingOnLockInMillis, this, "totalTimeExcludingWaitingOnLockInMillis", 0);
7987

8088
}
8189

@@ -112,6 +120,21 @@ public final long totalTimeInMillis() {
112120
return this.totalTimeInMillis;
113121
}
114122

123+
/**
124+
* API name: {@code total_time_excluding_waiting}
125+
*/
126+
@Nullable
127+
public final Time totalTimeExcludingWaiting() {
128+
return this.totalTimeExcludingWaiting;
129+
}
130+
131+
/**
132+
* Required - API name: {@code total_time_excluding_waiting_on_lock_in_millis}
133+
*/
134+
public final long totalTimeExcludingWaitingOnLockInMillis() {
135+
return this.totalTimeExcludingWaitingOnLockInMillis;
136+
}
137+
115138
/**
116139
* Serialize this object to JSON.
117140
*/
@@ -137,6 +160,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
137160
generator.writeKey("total_time_in_millis");
138161
generator.write(this.totalTimeInMillis);
139162

163+
if (this.totalTimeExcludingWaiting != null) {
164+
generator.writeKey("total_time_excluding_waiting");
165+
this.totalTimeExcludingWaiting.serialize(generator, mapper);
166+
167+
}
168+
generator.writeKey("total_time_excluding_waiting_on_lock_in_millis");
169+
generator.write(this.totalTimeExcludingWaitingOnLockInMillis);
170+
140171
}
141172

142173
@Override
@@ -160,13 +191,20 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
160191

161192
private Long totalTimeInMillis;
162193

194+
@Nullable
195+
private Time totalTimeExcludingWaiting;
196+
197+
private Long totalTimeExcludingWaitingOnLockInMillis;
198+
163199
public Builder() {
164200
}
165201
private Builder(FlushStats instance) {
166202
this.periodic = instance.periodic;
167203
this.total = instance.total;
168204
this.totalTime = instance.totalTime;
169205
this.totalTimeInMillis = instance.totalTimeInMillis;
206+
this.totalTimeExcludingWaiting = instance.totalTimeExcludingWaiting;
207+
this.totalTimeExcludingWaitingOnLockInMillis = instance.totalTimeExcludingWaitingOnLockInMillis;
170208

171209
}
172210
/**
@@ -208,6 +246,29 @@ public final Builder totalTimeInMillis(long value) {
208246
return this;
209247
}
210248

249+
/**
250+
* API name: {@code total_time_excluding_waiting}
251+
*/
252+
public final Builder totalTimeExcludingWaiting(@Nullable Time value) {
253+
this.totalTimeExcludingWaiting = value;
254+
return this;
255+
}
256+
257+
/**
258+
* API name: {@code total_time_excluding_waiting}
259+
*/
260+
public final Builder totalTimeExcludingWaiting(Function<Time.Builder, ObjectBuilder<Time>> fn) {
261+
return this.totalTimeExcludingWaiting(fn.apply(new Time.Builder()).build());
262+
}
263+
264+
/**
265+
* Required - API name: {@code total_time_excluding_waiting_on_lock_in_millis}
266+
*/
267+
public final Builder totalTimeExcludingWaitingOnLockInMillis(long value) {
268+
this.totalTimeExcludingWaitingOnLockInMillis = value;
269+
return this;
270+
}
271+
211272
@Override
212273
protected Builder self() {
213274
return this;
@@ -246,6 +307,9 @@ protected static void setupFlushStatsDeserializer(ObjectDeserializer<FlushStats.
246307
op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total");
247308
op.add(Builder::totalTime, Time._DESERIALIZER, "total_time");
248309
op.add(Builder::totalTimeInMillis, JsonpDeserializer.longDeserializer(), "total_time_in_millis");
310+
op.add(Builder::totalTimeExcludingWaiting, Time._DESERIALIZER, "total_time_excluding_waiting");
311+
op.add(Builder::totalTimeExcludingWaitingOnLockInMillis, JsonpDeserializer.longDeserializer(),
312+
"total_time_excluding_waiting_on_lock_in_millis");
249313

250314
}
251315

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public class GetStats implements JsonpSerializable {
7676
private final long missingTotal;
7777

7878
@Nullable
79-
private final Time time;
79+
private final Time gettime;
8080

8181
private final long timeInMillis;
8282

@@ -95,7 +95,7 @@ private GetStats(Builder builder) {
9595
this.missingTimeInMillis = ApiTypeHelper.requireNonNull(builder.missingTimeInMillis, this,
9696
"missingTimeInMillis", 0);
9797
this.missingTotal = ApiTypeHelper.requireNonNull(builder.missingTotal, this, "missingTotal", 0);
98-
this.time = builder.time;
98+
this.gettime = builder.gettime;
9999
this.timeInMillis = ApiTypeHelper.requireNonNull(builder.timeInMillis, this, "timeInMillis", 0);
100100
this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total", 0);
101101

@@ -157,11 +157,11 @@ public final long missingTotal() {
157157
}
158158

159159
/**
160-
* API name: {@code time}
160+
* API name: {@code getTime}
161161
*/
162162
@Nullable
163-
public final Time time() {
164-
return this.time;
163+
public final Time gettime() {
164+
return this.gettime;
165165
}
166166

167167
/**
@@ -214,9 +214,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
214214
generator.writeKey("missing_total");
215215
generator.write(this.missingTotal);
216216

217-
if (this.time != null) {
218-
generator.writeKey("time");
219-
this.time.serialize(generator, mapper);
217+
if (this.gettime != null) {
218+
generator.writeKey("getTime");
219+
this.gettime.serialize(generator, mapper);
220220

221221
}
222222
generator.writeKey("time_in_millis");
@@ -256,7 +256,7 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
256256
private Long missingTotal;
257257

258258
@Nullable
259-
private Time time;
259+
private Time gettime;
260260

261261
private Long timeInMillis;
262262

@@ -272,7 +272,7 @@ private Builder(GetStats instance) {
272272
this.missingTime = instance.missingTime;
273273
this.missingTimeInMillis = instance.missingTimeInMillis;
274274
this.missingTotal = instance.missingTotal;
275-
this.time = instance.time;
275+
this.gettime = instance.gettime;
276276
this.timeInMillis = instance.timeInMillis;
277277
this.total = instance.total;
278278

@@ -348,18 +348,18 @@ public final Builder missingTotal(long value) {
348348
}
349349

350350
/**
351-
* API name: {@code time}
351+
* API name: {@code getTime}
352352
*/
353-
public final Builder time(@Nullable Time value) {
354-
this.time = value;
353+
public final Builder gettime(@Nullable Time value) {
354+
this.gettime = value;
355355
return this;
356356
}
357357

358358
/**
359-
* API name: {@code time}
359+
* API name: {@code getTime}
360360
*/
361-
public final Builder time(Function<Time.Builder, ObjectBuilder<Time>> fn) {
362-
return this.time(fn.apply(new Time.Builder()).build());
361+
public final Builder gettime(Function<Time.Builder, ObjectBuilder<Time>> fn) {
362+
return this.gettime(fn.apply(new Time.Builder()).build());
363363
}
364364

365365
/**
@@ -419,7 +419,7 @@ protected static void setupGetStatsDeserializer(ObjectDeserializer<GetStats.Buil
419419
op.add(Builder::missingTime, Time._DESERIALIZER, "missing_time");
420420
op.add(Builder::missingTimeInMillis, JsonpDeserializer.longDeserializer(), "missing_time_in_millis");
421421
op.add(Builder::missingTotal, JsonpDeserializer.longDeserializer(), "missing_total");
422-
op.add(Builder::time, Time._DESERIALIZER, "time");
422+
op.add(Builder::gettime, Time._DESERIALIZER, "getTime");
423423
op.add(Builder::timeInMillis, JsonpDeserializer.longDeserializer(), "time_in_millis");
424424
op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total");
425425

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ public class IndexingStats implements JsonpSerializable {
9292

9393
private final long indexFailed;
9494

95+
private final long indexFailedDueToVersionConflict;
96+
9597
private final Map<String, IndexingStats> types;
9698

9799
@Nullable
@@ -122,6 +124,8 @@ private IndexingStats(Builder builder) {
122124
this.indexTimeInMillis = ApiTypeHelper.requireNonNull(builder.indexTimeInMillis, this, "indexTimeInMillis", 0);
123125
this.indexTotal = ApiTypeHelper.requireNonNull(builder.indexTotal, this, "indexTotal", 0);
124126
this.indexFailed = ApiTypeHelper.requireNonNull(builder.indexFailed, this, "indexFailed", 0);
127+
this.indexFailedDueToVersionConflict = ApiTypeHelper.requireNonNull(builder.indexFailedDueToVersionConflict,
128+
this, "indexFailedDueToVersionConflict", 0);
125129
this.types = ApiTypeHelper.unmodifiable(builder.types);
126130
this.writeLoad = builder.writeLoad;
127131
this.recentWriteLoad = builder.recentWriteLoad;
@@ -227,6 +231,13 @@ public final long indexFailed() {
227231
return this.indexFailed;
228232
}
229233

234+
/**
235+
* Required - API name: {@code index_failed_due_to_version_conflict}
236+
*/
237+
public final long indexFailedDueToVersionConflict() {
238+
return this.indexFailedDueToVersionConflict;
239+
}
240+
230241
/**
231242
* API name: {@code types}
232243
*/
@@ -314,6 +325,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
314325
generator.writeKey("index_failed");
315326
generator.write(this.indexFailed);
316327

328+
generator.writeKey("index_failed_due_to_version_conflict");
329+
generator.write(this.indexFailedDueToVersionConflict);
330+
317331
if (ApiTypeHelper.isDefined(this.types)) {
318332
generator.writeKey("types");
319333
generator.writeStartObject();
@@ -384,6 +398,8 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
384398

385399
private Long indexFailed;
386400

401+
private Long indexFailedDueToVersionConflict;
402+
387403
@Nullable
388404
private Map<String, IndexingStats> types;
389405

@@ -412,6 +428,7 @@ private Builder(IndexingStats instance) {
412428
this.indexTimeInMillis = instance.indexTimeInMillis;
413429
this.indexTotal = instance.indexTotal;
414430
this.indexFailed = instance.indexFailed;
431+
this.indexFailedDueToVersionConflict = instance.indexFailedDueToVersionConflict;
415432
this.types = instance.types;
416433
this.writeLoad = instance.writeLoad;
417434
this.recentWriteLoad = instance.recentWriteLoad;
@@ -543,6 +560,14 @@ public final Builder indexFailed(long value) {
543560
return this;
544561
}
545562

563+
/**
564+
* Required - API name: {@code index_failed_due_to_version_conflict}
565+
*/
566+
public final Builder indexFailedDueToVersionConflict(long value) {
567+
this.indexFailedDueToVersionConflict = value;
568+
return this;
569+
}
570+
546571
/**
547572
* API name: {@code types}
548573
* <p>
@@ -643,6 +668,8 @@ protected static void setupIndexingStatsDeserializer(ObjectDeserializer<Indexing
643668
op.add(Builder::indexTimeInMillis, JsonpDeserializer.longDeserializer(), "index_time_in_millis");
644669
op.add(Builder::indexTotal, JsonpDeserializer.longDeserializer(), "index_total");
645670
op.add(Builder::indexFailed, JsonpDeserializer.longDeserializer(), "index_failed");
671+
op.add(Builder::indexFailedDueToVersionConflict, JsonpDeserializer.longDeserializer(),
672+
"index_failed_due_to_version_conflict");
646673
op.add(Builder::types, JsonpDeserializer.stringMapDeserializer(IndexingStats._DESERIALIZER), "types");
647674
op.add(Builder::writeLoad, JsonpDeserializer.doubleDeserializer(), "write_load");
648675
op.add(Builder::recentWriteLoad, JsonpDeserializer.doubleDeserializer(), "recent_write_load");

0 commit comments

Comments
 (0)