Skip to content

Commit 6a6e9b7

Browse files
committed
[codegen] update to latest spec
1 parent 0bbfb5e commit 6a6e9b7

File tree

319 files changed

+6655
-4471
lines changed

Some content is hidden

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

319 files changed

+6655
-4471
lines changed

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

Lines changed: 113 additions & 78 deletions
Large diffs are not rendered by default.

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

Lines changed: 113 additions & 78 deletions
Large diffs are not rendered by default.

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
package co.elastic.clients.elasticsearch.async_search;
2121

22+
import co.elastic.clients.elasticsearch._types.ErrorCause;
2223
import co.elastic.clients.json.JsonpDeserializable;
2324
import co.elastic.clients.json.JsonpDeserializer;
2425
import co.elastic.clients.json.JsonpMapper;
@@ -35,6 +36,7 @@
3536
import java.lang.Long;
3637
import java.lang.String;
3738
import java.util.Objects;
39+
import java.util.function.Function;
3840
import javax.annotation.Nullable;
3941

4042
//----------------------------------------------------------------
@@ -85,6 +87,9 @@ public abstract class AsyncSearchResponseBase implements JsonpSerializable {
8587
@Nullable
8688
private final Long completionTimeInMillis;
8789

90+
@Nullable
91+
private final ErrorCause error;
92+
8893
// ---------------------------------------------------------------------------------------------
8994

9095
protected AsyncSearchResponseBase(AbstractBuilder<?> builder) {
@@ -99,6 +104,7 @@ protected AsyncSearchResponseBase(AbstractBuilder<?> builder) {
99104
this.startTimeInMillis = ApiTypeHelper.requireNonNull(builder.startTimeInMillis, this, "startTimeInMillis", 0);
100105
this.completionTime = builder.completionTime;
101106
this.completionTimeInMillis = builder.completionTimeInMillis;
107+
this.error = builder.error;
102108

103109
}
104110

@@ -189,6 +195,14 @@ public final Long completionTimeInMillis() {
189195
return this.completionTimeInMillis;
190196
}
191197

198+
/**
199+
* API name: {@code error}
200+
*/
201+
@Nullable
202+
public final ErrorCause error() {
203+
return this.error;
204+
}
205+
192206
/**
193207
* Serialize this object to JSON.
194208
*/
@@ -234,6 +248,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
234248
generator.write(this.completionTimeInMillis);
235249

236250
}
251+
if (this.error != null) {
252+
generator.writeKey("error");
253+
this.error.serialize(generator, mapper);
254+
255+
}
237256

238257
}
239258

@@ -268,6 +287,9 @@ public abstract static class AbstractBuilder<BuilderT extends AbstractBuilder<Bu
268287
@Nullable
269288
private Long completionTimeInMillis;
270289

290+
@Nullable
291+
private ErrorCause error;
292+
271293
/**
272294
* API name: {@code id}
273295
*/
@@ -359,6 +381,21 @@ public final BuilderT completionTimeInMillis(@Nullable Long value) {
359381
return self();
360382
}
361383

384+
/**
385+
* API name: {@code error}
386+
*/
387+
public final BuilderT error(@Nullable ErrorCause value) {
388+
this.error = value;
389+
return self();
390+
}
391+
392+
/**
393+
* API name: {@code error}
394+
*/
395+
public final BuilderT error(Function<ErrorCause.Builder, ObjectBuilder<ErrorCause>> fn) {
396+
return this.error(fn.apply(new ErrorCause.Builder()).build());
397+
}
398+
362399
protected abstract BuilderT self();
363400

364401
}
@@ -378,6 +415,7 @@ protected static <BuilderT extends AbstractBuilder<BuilderT>> void setupAsyncSea
378415
op.add(AbstractBuilder::completionTime, DateTime._DESERIALIZER, "completion_time");
379416
op.add(AbstractBuilder::completionTimeInMillis, JsonpDeserializer.longDeserializer(),
380417
"completion_time_in_millis");
418+
op.add(AbstractBuilder::error, ErrorCause._DESERIALIZER, "error");
381419

382420
}
383421

java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ElasticsearchCcrAsyncClient.java

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,12 @@ public final CompletableFuture<DeleteAutoFollowPatternResponse> deleteAutoFollow
105105
// ----- Endpoint: ccr.follow
106106

107107
/**
108-
* Create a follower. Create a cross-cluster replication follower index that
109-
* follows a specific leader index. When the API returns, the follower index
110-
* exists and cross-cluster replication starts replicating operations from the
111-
* leader index to the follower index.
108+
* Create a follower.
109+
* <p>
110+
* Create a cross-cluster replication follower index that follows a specific
111+
* leader index. When the API returns, the follower index exists and
112+
* cross-cluster replication starts replicating operations from the leader index
113+
* to the follower index.
112114
*
113115
* @see <a href=
114116
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow">Documentation
@@ -123,10 +125,12 @@ public CompletableFuture<FollowResponse> follow(FollowRequest request) {
123125
}
124126

125127
/**
126-
* Create a follower. Create a cross-cluster replication follower index that
127-
* follows a specific leader index. When the API returns, the follower index
128-
* exists and cross-cluster replication starts replicating operations from the
129-
* leader index to the follower index.
128+
* Create a follower.
129+
* <p>
130+
* Create a cross-cluster replication follower index that follows a specific
131+
* leader index. When the API returns, the follower index exists and
132+
* cross-cluster replication starts replicating operations from the leader index
133+
* to the follower index.
130134
*
131135
* @param fn
132136
* a function that initializes a builder to create the
@@ -226,8 +230,10 @@ public final CompletableFuture<FollowStatsResponse> followStats(
226230
// ----- Endpoint: ccr.forget_follower
227231

228232
/**
229-
* Forget a follower. Remove the cross-cluster replication follower retention
230-
* leases from the leader.
233+
* Forget a follower.
234+
* <p>
235+
* Remove the cross-cluster replication follower retention leases from the
236+
* leader.
231237
* <p>
232238
* A following index takes out retention leases on its leader index. These
233239
* leases are used to increase the likelihood that the shards of the leader
@@ -261,8 +267,10 @@ public CompletableFuture<ForgetFollowerResponse> forgetFollower(ForgetFollowerRe
261267
}
262268

263269
/**
264-
* Forget a follower. Remove the cross-cluster replication follower retention
265-
* leases from the leader.
270+
* Forget a follower.
271+
* <p>
272+
* Remove the cross-cluster replication follower retention leases from the
273+
* leader.
266274
* <p>
267275
* A following index takes out retention leases on its leader index. These
268276
* leases are used to increase the likelihood that the shards of the leader
@@ -450,12 +458,13 @@ public final CompletableFuture<PauseFollowResponse> pauseFollow(
450458
// ----- Endpoint: ccr.put_auto_follow_pattern
451459

452460
/**
453-
* Create or update auto-follow patterns. Create a collection of cross-cluster
454-
* replication auto-follow patterns for a remote cluster. Newly created indices
455-
* on the remote cluster that match any of the patterns are automatically
456-
* configured as follower indices. Indices on the remote cluster that were
457-
* created before the auto-follow pattern was created will not be auto-followed
458-
* even if they match the pattern.
461+
* Create or update auto-follow patterns.
462+
* <p>
463+
* Create a collection of cross-cluster replication auto-follow patterns for a
464+
* remote cluster. Newly created indices on the remote cluster that match any of
465+
* the patterns are automatically configured as follower indices. Indices on the
466+
* remote cluster that were created before the auto-follow pattern was created
467+
* will not be auto-followed even if they match the pattern.
459468
* <p>
460469
* This API can also be used to update auto-follow patterns. NOTE: Follower
461470
* indices that were configured automatically before updating an auto-follow
@@ -475,12 +484,13 @@ public CompletableFuture<PutAutoFollowPatternResponse> putAutoFollowPattern(PutA
475484
}
476485

477486
/**
478-
* Create or update auto-follow patterns. Create a collection of cross-cluster
479-
* replication auto-follow patterns for a remote cluster. Newly created indices
480-
* on the remote cluster that match any of the patterns are automatically
481-
* configured as follower indices. Indices on the remote cluster that were
482-
* created before the auto-follow pattern was created will not be auto-followed
483-
* even if they match the pattern.
487+
* Create or update auto-follow patterns.
488+
* <p>
489+
* Create a collection of cross-cluster replication auto-follow patterns for a
490+
* remote cluster. Newly created indices on the remote cluster that match any of
491+
* the patterns are automatically configured as follower indices. Indices on the
492+
* remote cluster that were created before the auto-follow pattern was created
493+
* will not be auto-followed even if they match the pattern.
484494
* <p>
485495
* This API can also be used to update auto-follow patterns. NOTE: Follower
486496
* indices that were configured automatically before updating an auto-follow
@@ -549,11 +559,13 @@ public final CompletableFuture<ResumeAutoFollowPatternResponse> resumeAutoFollow
549559
// ----- Endpoint: ccr.resume_follow
550560

551561
/**
552-
* Resume a follower. Resume a cross-cluster replication follower index that was
553-
* paused. The follower index could have been paused with the pause follower
554-
* API. Alternatively it could be paused due to replication that cannot be
555-
* retried due to failures during following tasks. When this API returns, the
556-
* follower index will resume fetching operations from the leader index.
562+
* Resume a follower.
563+
* <p>
564+
* Resume a cross-cluster replication follower index that was paused. The
565+
* follower index could have been paused with the pause follower API.
566+
* Alternatively it could be paused due to replication that cannot be retried
567+
* due to failures during following tasks. When this API returns, the follower
568+
* index will resume fetching operations from the leader index.
557569
*
558570
* @see <a href=
559571
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-follow">Documentation
@@ -568,11 +580,13 @@ public CompletableFuture<ResumeFollowResponse> resumeFollow(ResumeFollowRequest
568580
}
569581

570582
/**
571-
* Resume a follower. Resume a cross-cluster replication follower index that was
572-
* paused. The follower index could have been paused with the pause follower
573-
* API. Alternatively it could be paused due to replication that cannot be
574-
* retried due to failures during following tasks. When this API returns, the
575-
* follower index will resume fetching operations from the leader index.
583+
* Resume a follower.
584+
* <p>
585+
* Resume a cross-cluster replication follower index that was paused. The
586+
* follower index could have been paused with the pause follower API.
587+
* Alternatively it could be paused due to replication that cannot be retried
588+
* due to failures during following tasks. When this API returns, the follower
589+
* index will resume fetching operations from the leader index.
576590
*
577591
* @param fn
578592
* a function that initializes a builder to create the

java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/ElasticsearchCcrClient.java

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,12 @@ public final DeleteAutoFollowPatternResponse deleteAutoFollowPattern(
107107
// ----- Endpoint: ccr.follow
108108

109109
/**
110-
* Create a follower. Create a cross-cluster replication follower index that
111-
* follows a specific leader index. When the API returns, the follower index
112-
* exists and cross-cluster replication starts replicating operations from the
113-
* leader index to the follower index.
110+
* Create a follower.
111+
* <p>
112+
* Create a cross-cluster replication follower index that follows a specific
113+
* leader index. When the API returns, the follower index exists and
114+
* cross-cluster replication starts replicating operations from the leader index
115+
* to the follower index.
114116
*
115117
* @see <a href=
116118
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-follow">Documentation
@@ -125,10 +127,12 @@ public FollowResponse follow(FollowRequest request) throws IOException, Elastics
125127
}
126128

127129
/**
128-
* Create a follower. Create a cross-cluster replication follower index that
129-
* follows a specific leader index. When the API returns, the follower index
130-
* exists and cross-cluster replication starts replicating operations from the
131-
* leader index to the follower index.
130+
* Create a follower.
131+
* <p>
132+
* Create a cross-cluster replication follower index that follows a specific
133+
* leader index. When the API returns, the follower index exists and
134+
* cross-cluster replication starts replicating operations from the leader index
135+
* to the follower index.
132136
*
133137
* @param fn
134138
* a function that initializes a builder to create the
@@ -229,8 +233,10 @@ public final FollowStatsResponse followStats(
229233
// ----- Endpoint: ccr.forget_follower
230234

231235
/**
232-
* Forget a follower. Remove the cross-cluster replication follower retention
233-
* leases from the leader.
236+
* Forget a follower.
237+
* <p>
238+
* Remove the cross-cluster replication follower retention leases from the
239+
* leader.
234240
* <p>
235241
* A following index takes out retention leases on its leader index. These
236242
* leases are used to increase the likelihood that the shards of the leader
@@ -265,8 +271,10 @@ public ForgetFollowerResponse forgetFollower(ForgetFollowerRequest request)
265271
}
266272

267273
/**
268-
* Forget a follower. Remove the cross-cluster replication follower retention
269-
* leases from the leader.
274+
* Forget a follower.
275+
* <p>
276+
* Remove the cross-cluster replication follower retention leases from the
277+
* leader.
270278
* <p>
271279
* A following index takes out retention leases on its leader index. These
272280
* leases are used to increase the likelihood that the shards of the leader
@@ -459,12 +467,13 @@ public final PauseFollowResponse pauseFollow(
459467
// ----- Endpoint: ccr.put_auto_follow_pattern
460468

461469
/**
462-
* Create or update auto-follow patterns. Create a collection of cross-cluster
463-
* replication auto-follow patterns for a remote cluster. Newly created indices
464-
* on the remote cluster that match any of the patterns are automatically
465-
* configured as follower indices. Indices on the remote cluster that were
466-
* created before the auto-follow pattern was created will not be auto-followed
467-
* even if they match the pattern.
470+
* Create or update auto-follow patterns.
471+
* <p>
472+
* Create a collection of cross-cluster replication auto-follow patterns for a
473+
* remote cluster. Newly created indices on the remote cluster that match any of
474+
* the patterns are automatically configured as follower indices. Indices on the
475+
* remote cluster that were created before the auto-follow pattern was created
476+
* will not be auto-followed even if they match the pattern.
468477
* <p>
469478
* This API can also be used to update auto-follow patterns. NOTE: Follower
470479
* indices that were configured automatically before updating an auto-follow
@@ -485,12 +494,13 @@ public PutAutoFollowPatternResponse putAutoFollowPattern(PutAutoFollowPatternReq
485494
}
486495

487496
/**
488-
* Create or update auto-follow patterns. Create a collection of cross-cluster
489-
* replication auto-follow patterns for a remote cluster. Newly created indices
490-
* on the remote cluster that match any of the patterns are automatically
491-
* configured as follower indices. Indices on the remote cluster that were
492-
* created before the auto-follow pattern was created will not be auto-followed
493-
* even if they match the pattern.
497+
* Create or update auto-follow patterns.
498+
* <p>
499+
* Create a collection of cross-cluster replication auto-follow patterns for a
500+
* remote cluster. Newly created indices on the remote cluster that match any of
501+
* the patterns are automatically configured as follower indices. Indices on the
502+
* remote cluster that were created before the auto-follow pattern was created
503+
* will not be auto-followed even if they match the pattern.
494504
* <p>
495505
* This API can also be used to update auto-follow patterns. NOTE: Follower
496506
* indices that were configured automatically before updating an auto-follow
@@ -561,11 +571,13 @@ public final ResumeAutoFollowPatternResponse resumeAutoFollowPattern(
561571
// ----- Endpoint: ccr.resume_follow
562572

563573
/**
564-
* Resume a follower. Resume a cross-cluster replication follower index that was
565-
* paused. The follower index could have been paused with the pause follower
566-
* API. Alternatively it could be paused due to replication that cannot be
567-
* retried due to failures during following tasks. When this API returns, the
568-
* follower index will resume fetching operations from the leader index.
574+
* Resume a follower.
575+
* <p>
576+
* Resume a cross-cluster replication follower index that was paused. The
577+
* follower index could have been paused with the pause follower API.
578+
* Alternatively it could be paused due to replication that cannot be retried
579+
* due to failures during following tasks. When this API returns, the follower
580+
* index will resume fetching operations from the leader index.
569581
*
570582
* @see <a href=
571583
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-follow">Documentation
@@ -580,11 +592,13 @@ public ResumeFollowResponse resumeFollow(ResumeFollowRequest request) throws IOE
580592
}
581593

582594
/**
583-
* Resume a follower. Resume a cross-cluster replication follower index that was
584-
* paused. The follower index could have been paused with the pause follower
585-
* API. Alternatively it could be paused due to replication that cannot be
586-
* retried due to failures during following tasks. When this API returns, the
587-
* follower index will resume fetching operations from the leader index.
595+
* Resume a follower.
596+
* <p>
597+
* Resume a cross-cluster replication follower index that was paused. The
598+
* follower index could have been paused with the pause follower API.
599+
* Alternatively it could be paused due to replication that cannot be retried
600+
* due to failures during following tasks. When this API returns, the follower
601+
* index will resume fetching operations from the leader index.
588602
*
589603
* @param fn
590604
* a function that initializes a builder to create the

java-client/src/main/java/co/elastic/clients/elasticsearch/ccr/FollowRequest.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@
6262
// typedef: ccr.follow.Request
6363

6464
/**
65-
* Create a follower. Create a cross-cluster replication follower index that
66-
* follows a specific leader index. When the API returns, the follower index
67-
* exists and cross-cluster replication starts replicating operations from the
68-
* leader index to the follower index.
65+
* Create a follower.
66+
* <p>
67+
* Create a cross-cluster replication follower index that follows a specific
68+
* leader index. When the API returns, the follower index exists and
69+
* cross-cluster replication starts replicating operations from the leader index
70+
* to the follower index.
6971
*
7072
* @see <a href="../doc-files/api-spec.html#ccr.follow.Request">API
7173
* specification</a>

0 commit comments

Comments
 (0)