Skip to content

Commit a3ee856

Browse files
committed
[codegen] update to latest spec
1 parent 8d1f785 commit a3ee856

File tree

313 files changed

+31405
-5372
lines changed

Some content is hidden

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

313 files changed

+31405
-5372
lines changed

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

Lines changed: 4232 additions & 245 deletions
Large diffs are not rendered by default.

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

Lines changed: 4232 additions & 245 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public final String type() {
121121
}
122122

123123
/**
124-
* A human-readable explanation of the error, in english
124+
* A human-readable explanation of the error, in English.
125125
* <p>
126126
* API name: {@code reason}
127127
*/
@@ -287,7 +287,7 @@ public final Builder type(@Nullable String value) {
287287
}
288288

289289
/**
290-
* A human-readable explanation of the error, in english
290+
* A human-readable explanation of the error, in English.
291291
* <p>
292292
* API name: {@code reason}
293293
*/

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public enum ExpandWildcard implements JsonEnum {
6262
Closed("closed"),
6363

6464
/**
65-
* Match hidden data streams and hidden indices. Must be combined with open,
66-
* closed, or both.
65+
* Match hidden data streams and hidden indices. Must be combined with
66+
* <code>open</code>, <code>closed</code>, or <code>both</code>.
6767
*/
6868
Hidden("hidden"),
6969

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,18 @@ public static Retries of(Function<Builder, ObjectBuilder<Retries>> fn) {
7676
}
7777

7878
/**
79-
* Required - API name: {@code bulk}
79+
* Required - The number of bulk actions retried.
80+
* <p>
81+
* API name: {@code bulk}
8082
*/
8183
public final long bulk() {
8284
return this.bulk;
8385
}
8486

8587
/**
86-
* Required - API name: {@code search}
88+
* Required - The number of search actions retried.
89+
* <p>
90+
* API name: {@code search}
8791
*/
8892
public final long search() {
8993
return this.search;
@@ -125,15 +129,19 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
125129
private Long search;
126130

127131
/**
128-
* Required - API name: {@code bulk}
132+
* Required - The number of bulk actions retried.
133+
* <p>
134+
* API name: {@code bulk}
129135
*/
130136
public final Builder bulk(long value) {
131137
this.bulk = value;
132138
return this;
133139
}
134140

135141
/**
136-
* Required - API name: {@code search}
142+
* Required - The number of search actions retried.
143+
* <p>
144+
* API name: {@code search}
137145
*/
138146
public final Builder search(long value) {
139147
this.search = value;

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,17 @@ public static ShardStatistics of(Function<Builder, ObjectBuilder<ShardStatistics
8888
}
8989

9090
/**
91-
* Required - API name: {@code failed}
91+
* Required - The number of shards the operation or search attempted to run on
92+
* but failed.
93+
* <p>
94+
* API name: {@code failed}
9295
*/
9396
public final Number failed() {
9497
return this.failed;
9598
}
9699

97100
/**
98-
* Required - Indicates how many shards have successfully run the search.
101+
* Required - The number of shards the operation or search succeeded on.
99102
* <p>
100103
* API name: {@code successful}
101104
*/
@@ -104,7 +107,7 @@ public final Number successful() {
104107
}
105108

106109
/**
107-
* Required - Indicates how many shards the search will run on overall.
110+
* Required - The number of shards the operation or search will run on overall.
108111
* <p>
109112
* API name: {@code total}
110113
*/
@@ -190,15 +193,18 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
190193
private Number skipped;
191194

192195
/**
193-
* Required - API name: {@code failed}
196+
* Required - The number of shards the operation or search attempted to run on
197+
* but failed.
198+
* <p>
199+
* API name: {@code failed}
194200
*/
195201
public final Builder failed(Number value) {
196202
this.failed = value;
197203
return this;
198204
}
199205

200206
/**
201-
* Required - Indicates how many shards have successfully run the search.
207+
* Required - The number of shards the operation or search succeeded on.
202208
* <p>
203209
* API name: {@code successful}
204210
*/
@@ -208,7 +214,7 @@ public final Builder successful(Number value) {
208214
}
209215

210216
/**
211-
* Required - Indicates how many shards the search will run on overall.
217+
* Required - The number of shards the operation or search will run on overall.
212218
* <p>
213219
* API name: {@code total}
214220
*/

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ public static StoredScript of(Function<Builder, ObjectBuilder<StoredScript>> fn)
8181
}
8282

8383
/**
84-
* Required - Specifies the language the script is written in.
84+
* Required - The language the script is written in. For serach templates, use
85+
* <code>mustache</code>.
8586
* <p>
8687
* API name: {@code lang}
8788
*/
@@ -97,7 +98,8 @@ public final Map<String, String> options() {
9798
}
9899

99100
/**
100-
* Required - The script source.
101+
* Required - The script source. For search templates, an object containing the
102+
* search template.
101103
* <p>
102104
* API name: {@code source}
103105
*/
@@ -155,7 +157,8 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
155157
private String source;
156158

157159
/**
158-
* Required - Specifies the language the script is written in.
160+
* Required - The language the script is written in. For serach templates, use
161+
* <code>mustache</code>.
159162
* <p>
160163
* API name: {@code lang}
161164
*/
@@ -165,7 +168,8 @@ public final Builder lang(String value) {
165168
}
166169

167170
/**
168-
* Required - Specifies the language the script is written in.
171+
* Required - The language the script is written in. For serach templates, use
172+
* <code>mustache</code>.
169173
* <p>
170174
* API name: {@code lang}
171175
*/
@@ -195,7 +199,8 @@ public final Builder options(String key, String value) {
195199
}
196200

197201
/**
198-
* Required - The script source.
202+
* Required - The script source. For search templates, an object containing the
203+
* search template.
199204
* <p>
200205
* API name: {@code source}
201206
*/

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,23 @@ public enum VersionType implements JsonEnum {
5252
Internal("internal"),
5353

5454
/**
55-
* Only index the document if the given version is strictly higher than the
55+
* Only index the document if the specified version is strictly higher than the
5656
* version of the stored document or if there is no existing document.
5757
*/
5858
External("external"),
5959

6060
/**
61-
* Only index the document if the given version is equal or higher than the
62-
* version of the stored document or if there is no existing document. Note: the
63-
* external_gte version type is meant for special use cases and should be used
64-
* with care. If used incorrectly, it can result in loss of data.
61+
* Only index the document if the specified version is equal or higher than the
62+
* version of the stored document or if there is no existing document. NOTE: The
63+
* <code>external_gte</code> version type is meant for special use cases and
64+
* should be used with care. If used incorrectly, it can result in loss of data.
6565
*/
6666
ExternalGte("external_gte"),
6767

68+
/**
69+
* This option is deprecated because it can cause primary and replica shards to
70+
* diverge.
71+
*/
6872
Force("force"),
6973

7074
;

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

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,26 @@ protected WriteResponseBase(AbstractBuilder<?> builder) {
9696
}
9797

9898
/**
99-
* Required - API name: {@code _id}
99+
* Required - The unique identifier for the added document.
100+
* <p>
101+
* API name: {@code _id}
100102
*/
101103
public final String id() {
102104
return this.id;
103105
}
104106

105107
/**
106-
* Required - API name: {@code _index}
108+
* Required - The name of the index the document was added to.
109+
* <p>
110+
* API name: {@code _index}
107111
*/
108112
public final String index() {
109113
return this.index;
110114
}
111115

112116
/**
117+
* The primary term assigned to the document for the indexing operation.
118+
* <p>
113119
* API name: {@code _primary_term}
114120
*/
115121
@Nullable
@@ -118,13 +124,20 @@ public final Long primaryTerm() {
118124
}
119125

120126
/**
121-
* Required - API name: {@code result}
127+
* Required - The result of the indexing operation: <code>created</code> or
128+
* <code>updated</code>.
129+
* <p>
130+
* API name: {@code result}
122131
*/
123132
public final Result result() {
124133
return this.result;
125134
}
126135

127136
/**
137+
* The sequence number assigned to the document for the indexing operation.
138+
* Sequence numbers are used to ensure an older version of a document doesn't
139+
* overwrite a newer version.
140+
* <p>
128141
* API name: {@code _seq_no}
129142
*/
130143
@Nullable
@@ -133,14 +146,19 @@ public final Long seqNo() {
133146
}
134147

135148
/**
136-
* Required - API name: {@code _shards}
149+
* Required - Information about the replication process of the operation.
150+
* <p>
151+
* API name: {@code _shards}
137152
*/
138153
public final ShardStatistics shards() {
139154
return this.shards;
140155
}
141156

142157
/**
143-
* Required - API name: {@code _version}
158+
* Required - The document version, which is incremented each time the document
159+
* is updated.
160+
* <p>
161+
* API name: {@code _version}
144162
*/
145163
public final long version() {
146164
return this.version;
@@ -225,22 +243,28 @@ public abstract static class AbstractBuilder<BuilderT extends AbstractBuilder<Bu
225243
private Boolean forcedRefresh;
226244

227245
/**
228-
* Required - API name: {@code _id}
246+
* Required - The unique identifier for the added document.
247+
* <p>
248+
* API name: {@code _id}
229249
*/
230250
public final BuilderT id(String value) {
231251
this.id = value;
232252
return self();
233253
}
234254

235255
/**
236-
* Required - API name: {@code _index}
256+
* Required - The name of the index the document was added to.
257+
* <p>
258+
* API name: {@code _index}
237259
*/
238260
public final BuilderT index(String value) {
239261
this.index = value;
240262
return self();
241263
}
242264

243265
/**
266+
* The primary term assigned to the document for the indexing operation.
267+
* <p>
244268
* API name: {@code _primary_term}
245269
*/
246270
public final BuilderT primaryTerm(@Nullable Long value) {
@@ -249,14 +273,21 @@ public final BuilderT primaryTerm(@Nullable Long value) {
249273
}
250274

251275
/**
252-
* Required - API name: {@code result}
276+
* Required - The result of the indexing operation: <code>created</code> or
277+
* <code>updated</code>.
278+
* <p>
279+
* API name: {@code result}
253280
*/
254281
public final BuilderT result(Result value) {
255282
this.result = value;
256283
return self();
257284
}
258285

259286
/**
287+
* The sequence number assigned to the document for the indexing operation.
288+
* Sequence numbers are used to ensure an older version of a document doesn't
289+
* overwrite a newer version.
290+
* <p>
260291
* API name: {@code _seq_no}
261292
*/
262293
public final BuilderT seqNo(@Nullable Long value) {
@@ -265,22 +296,29 @@ public final BuilderT seqNo(@Nullable Long value) {
265296
}
266297

267298
/**
268-
* Required - API name: {@code _shards}
299+
* Required - Information about the replication process of the operation.
300+
* <p>
301+
* API name: {@code _shards}
269302
*/
270303
public final BuilderT shards(ShardStatistics value) {
271304
this.shards = value;
272305
return self();
273306
}
274307

275308
/**
276-
* Required - API name: {@code _shards}
309+
* Required - Information about the replication process of the operation.
310+
* <p>
311+
* API name: {@code _shards}
277312
*/
278313
public final BuilderT shards(Function<ShardStatistics.Builder, ObjectBuilder<ShardStatistics>> fn) {
279314
return this.shards(fn.apply(new ShardStatistics.Builder()).build());
280315
}
281316

282317
/**
283-
* Required - API name: {@code _version}
318+
* Required - The document version, which is incremented each time the document
319+
* is updated.
320+
* <p>
321+
* API name: {@code _version}
284322
*/
285323
public final BuilderT version(long value) {
286324
this.version = value;

0 commit comments

Comments
 (0)