Skip to content

Commit b06528f

Browse files
[8.19] Regenerate client (#1204)
* [codegen] update to latest spec * revert unwanted changes * fix esql params --------- Co-authored-by: Laura Trotta <laura.trotta@elastic.co>
1 parent 7d71843 commit b06528f

File tree

4 files changed

+124
-75
lines changed

4 files changed

+124
-75
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/core/bulk/BulkResponseItem.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,9 @@ public final Long primaryTerm() {
197197
}
198198

199199
/**
200-
* The result of the operation. Successful values are <code>created</code>,
201-
* <code>deleted</code>, and <code>updated</code>.
200+
* The result of the operation. Possible values are <code>created</code>,
201+
* <code>updated</code>, <code>deleted</code>, <code>noop</code>, and
202+
* <code>not_found</code>.
202203
* <p>
203204
* API name: {@code result}
204205
*/
@@ -475,8 +476,9 @@ public final Builder primaryTerm(@Nullable Long value) {
475476
}
476477

477478
/**
478-
* The result of the operation. Successful values are <code>created</code>,
479-
* <code>deleted</code>, and <code>updated</code>.
479+
* The result of the operation. Possible values are <code>created</code>,
480+
* <code>updated</code>, <code>deleted</code>, <code>noop</code>, and
481+
* <code>not_found</code>.
480482
* <p>
481483
* API name: {@code result}
482484
*/

java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,7 @@
14501450
'eql.search.ResultPosition': 'eql/search/types.ts#L20-L32',
14511451
'esql._types.TableValuesContainer': 'esql/_types/TableValuesContainer.ts#L22-L28',
14521452
'esql.query.EsqlFormat': 'esql/query/QueryParameters.ts#L20-L29',
1453-
'esql.query.Request': 'esql/query/QueryRequest.ts#L27-L118',
1453+
'esql.query.Request': 'esql/query/QueryRequest.ts#L28-L119',
14541454
'esql.query.Response': 'esql/query/QueryResponse.ts#L22-L25',
14551455
'features._types.Feature': 'features/_types/Feature.ts#L20-L23',
14561456
'features.get_features.Request': 'features/get_features/GetFeaturesRequest.ts#L24-L55',
@@ -2752,41 +2752,41 @@
27522752
'security._types.Access': 'security/_types/Access.ts#L22-L31',
27532753
'security._types.ApiKey': 'security/_types/ApiKey.ts#L27-L113',
27542754
'security._types.ApiKeyType': 'security/_types/ApiKey.ts#L115-L118',
2755-
'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L434-L436',
2756-
'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L27-L40',
2755+
'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L398-L400',
2756+
'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L28-L41',
27572757
'security._types.BulkError': 'security/_types/Bulk.ts#L24-L33',
27582758
'security._types.ClusterNode': 'security/_types/ClusterNode.ts#L22-L24',
2759-
'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L42-L199',
2759+
'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L43-L200',
27602760
'security._types.CreatedStatus': 'security/_types/CreatedStatus.ts#L20-L22',
27612761
'security._types.FieldRule': 'security/_types/RoleMappingRule.ts#L35-L43',
27622762
'security._types.FieldSecurity': 'security/_types/FieldSecurity.ts#L22-L25',
2763-
'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L430-L432',
2763+
'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L394-L396',
27642764
'security._types.GrantType': 'security/_types/GrantType.ts#L20-L30',
2765-
'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L386-L428',
2766-
'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L216-L242',
2767-
'security._types.IndicesPrivilegesQuery': 'security/_types/Privileges.ts#L341-L349',
2768-
'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L438-L440',
2765+
'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L350-L392',
2766+
'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L244-L244',
2767+
'security._types.IndicesPrivilegesQuery': 'security/_types/Privileges.ts#L305-L313',
2768+
'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L402-L404',
27692769
'security._types.RealmInfo': 'security/_types/RealmInfo.ts#L22-L25',
2770-
'security._types.RemoteClusterPrivilege': 'security/_types/Privileges.ts#L201-L213',
2771-
'security._types.RemoteClusterPrivileges': 'security/_types/Privileges.ts#L278-L290',
2772-
'security._types.RemoteIndicesPrivileges': 'security/_types/Privileges.ts#L244-L276',
2773-
'security._types.RemoteUserIndicesPrivileges': 'security/_types/Privileges.ts#L316-L339',
2774-
'security._types.ReplicationAccess': 'security/_types/Privileges.ts#L442-L452',
2770+
'security._types.RemoteClusterPrivilege': 'security/_types/Privileges.ts#L202-L214',
2771+
'security._types.RemoteClusterPrivileges': 'security/_types/Privileges.ts#L258-L270',
2772+
'security._types.RemoteIndicesPrivileges': 'security/_types/Privileges.ts#L246-L256',
2773+
'security._types.RemoteUserIndicesPrivileges': 'security/_types/Privileges.ts#L299-L303',
2774+
'security._types.ReplicationAccess': 'security/_types/Privileges.ts#L406-L416',
27752775
'security._types.Restriction': 'security/_types/RoleDescriptor.ts#L90-L96',
27762776
'security._types.RestrictionWorkflow': 'security/_types/RoleDescriptor.ts#L98-L101',
27772777
'security._types.RoleDescriptor': 'security/_types/RoleDescriptor.ts#L33-L83',
27782778
'security._types.RoleDescriptorRead': 'security/_types/RoleDescriptor.ts#L85-L88',
27792779
'security._types.RoleMapping': 'security/_types/RoleMapping.ts#L25-L33',
27802780
'security._types.RoleMappingRule': 'security/_types/RoleMappingRule.ts#L22-L33',
27812781
'security._types.RoleTemplate': 'security/_types/RoleTemplate.ts#L28-L31',
2782-
'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L383-L384',
2783-
'security._types.RoleTemplateQuery': 'security/_types/Privileges.ts#L351-L361',
2784-
'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L363-L381',
2785-
'security._types.SearchAccess': 'security/_types/Privileges.ts#L454-L474',
2782+
'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L347-L348',
2783+
'security._types.RoleTemplateQuery': 'security/_types/Privileges.ts#L315-L325',
2784+
'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L327-L345',
2785+
'security._types.SearchAccess': 'security/_types/Privileges.ts#L418-L438',
27862786
'security._types.SecuritySettings': 'security/_types/SecuritySettings.ts#L22-L24',
27872787
'security._types.TemplateFormat': 'security/_types/RoleTemplate.ts#L22-L25',
27882788
'security._types.User': 'security/_types/User.ts#L23-L31',
2789-
'security._types.UserIndicesPrivileges': 'security/_types/Privileges.ts#L292-L314',
2789+
'security._types.UserIndicesPrivileges': 'security/_types/Privileges.ts#L296-L297',
27902790
'security._types.UserProfile': 'security/_types/UserProfile.ts#L41-L47',
27912791
'security._types.UserProfileHitMetadata': 'security/_types/UserProfile.ts#L27-L30',
27922792
'security._types.UserProfileUser': 'security/_types/UserProfile.ts#L32-L39',
@@ -3132,10 +3132,10 @@
31323132
'transform._types.PivotGroupByContainer': 'transform/_types/Transform.ts#L70-L78',
31333133
'transform._types.RetentionPolicy': 'transform/_types/Transform.ts#L88-L96',
31343134
'transform._types.RetentionPolicyContainer': 'transform/_types/Transform.ts#L80-L86',
3135-
'transform._types.Settings': 'transform/_types/Transform.ts#L98-L154',
3136-
'transform._types.Source': 'transform/_types/Transform.ts#L156-L175',
3137-
'transform._types.SyncContainer': 'transform/_types/Transform.ts#L179-L185',
3138-
'transform._types.TimeSync': 'transform/_types/Transform.ts#L187-L199',
3135+
'transform._types.Settings': 'transform/_types/Transform.ts#L98-L166',
3136+
'transform._types.Source': 'transform/_types/Transform.ts#L168-L187',
3137+
'transform._types.SyncContainer': 'transform/_types/Transform.ts#L191-L197',
3138+
'transform._types.TimeSync': 'transform/_types/Transform.ts#L199-L211',
31393139
'transform.delete_transform.Request': 'transform/delete_transform/DeleteTransformRequest.ts#L24-L65',
31403140
'transform.delete_transform.Response': 'transform/delete_transform/DeleteTransformResponse.ts#L22-L24',
31413141
'transform.get_node_stats.Request': 'transform/get_node_stats/GetNodeStatsRequest.ts#L23-L40',
@@ -3378,10 +3378,10 @@
33783378
if (hash.length > 1) {
33793379
hash = hash.substring(1);
33803380
}
3381-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/3666dcf13c05c73516c9dd5fc0fcaeed0e557da2/specification/" + (paths[hash] || "");
3381+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/6ee016a765be615b0205fc209d3d3c515044689d/specification/" + (paths[hash] || "");
33823382
</script>
33833383
</head>
33843384
<body>
3385-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/3666dcf13c05c73516c9dd5fc0fcaeed0e557da2/specification/">Elasticsearch API specification</a>.
3385+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/6ee016a765be615b0205fc209d3d3c515044689d/specification/">Elasticsearch API specification</a>.
33863386
</body>
33873387
</html>

java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteUserIndicesPrivileges.java

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
*/
6464
@JsonpDeserializable
6565
public class RemoteUserIndicesPrivileges implements JsonpSerializable {
66+
private final List<String> clusters;
67+
6668
private final List<FieldSecurity> fieldSecurity;
6769

6870
private final List<String> names;
@@ -73,26 +75,31 @@ public class RemoteUserIndicesPrivileges implements JsonpSerializable {
7375

7476
private final boolean allowRestrictedIndices;
7577

76-
private final List<String> clusters;
77-
7878
// ---------------------------------------------------------------------------------------------
7979

8080
private RemoteUserIndicesPrivileges(Builder builder) {
8181

82+
this.clusters = ApiTypeHelper.unmodifiableRequired(builder.clusters, this, "clusters");
8283
this.fieldSecurity = ApiTypeHelper.unmodifiable(builder.fieldSecurity);
8384
this.names = ApiTypeHelper.unmodifiableRequired(builder.names, this, "names");
8485
this.privileges = ApiTypeHelper.unmodifiableRequired(builder.privileges, this, "privileges");
8586
this.query = ApiTypeHelper.unmodifiable(builder.query);
8687
this.allowRestrictedIndices = ApiTypeHelper.requireNonNull(builder.allowRestrictedIndices, this,
8788
"allowRestrictedIndices", false);
88-
this.clusters = ApiTypeHelper.unmodifiableRequired(builder.clusters, this, "clusters");
8989

9090
}
9191

9292
public static RemoteUserIndicesPrivileges of(Function<Builder, ObjectBuilder<RemoteUserIndicesPrivileges>> fn) {
9393
return fn.apply(new Builder()).build();
9494
}
9595

96+
/**
97+
* Required - API name: {@code clusters}
98+
*/
99+
public final List<String> clusters() {
100+
return this.clusters;
101+
}
102+
96103
/**
97104
* The document fields that the owners of the role have read access to.
98105
* <p>
@@ -147,13 +154,6 @@ public final boolean allowRestrictedIndices() {
147154
return this.allowRestrictedIndices;
148155
}
149156

150-
/**
151-
* Required - API name: {@code clusters}
152-
*/
153-
public final List<String> clusters() {
154-
return this.clusters;
155-
}
156-
157157
/**
158158
* Serialize this object to JSON.
159159
*/
@@ -165,6 +165,16 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
165165

166166
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
167167

168+
if (ApiTypeHelper.isDefined(this.clusters)) {
169+
generator.writeKey("clusters");
170+
generator.writeStartArray();
171+
for (String item0 : this.clusters) {
172+
generator.write(item0);
173+
174+
}
175+
generator.writeEnd();
176+
177+
}
168178
if (ApiTypeHelper.isDefined(this.fieldSecurity)) {
169179
generator.writeKey("field_security");
170180
generator.writeStartArray();
@@ -208,17 +218,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
208218
generator.writeKey("allow_restricted_indices");
209219
generator.write(this.allowRestrictedIndices);
210220

211-
if (ApiTypeHelper.isDefined(this.clusters)) {
212-
generator.writeKey("clusters");
213-
generator.writeStartArray();
214-
for (String item0 : this.clusters) {
215-
generator.write(item0);
216-
217-
}
218-
generator.writeEnd();
219-
220-
}
221-
222221
}
223222

224223
@Override
@@ -235,6 +234,8 @@ public String toString() {
235234
public static class Builder extends WithJsonObjectBuilderBase<Builder>
236235
implements
237236
ObjectBuilder<RemoteUserIndicesPrivileges> {
237+
private List<String> clusters;
238+
238239
@Nullable
239240
private List<FieldSecurity> fieldSecurity;
240241

@@ -247,19 +248,37 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder>
247248

248249
private Boolean allowRestrictedIndices;
249250

250-
private List<String> clusters;
251-
252251
public Builder() {
253252
}
254253
private Builder(RemoteUserIndicesPrivileges instance) {
254+
this.clusters = instance.clusters;
255255
this.fieldSecurity = instance.fieldSecurity;
256256
this.names = instance.names;
257257
this.privileges = instance.privileges;
258258
this.query = instance.query;
259259
this.allowRestrictedIndices = instance.allowRestrictedIndices;
260-
this.clusters = instance.clusters;
261260

262261
}
262+
/**
263+
* Required - API name: {@code clusters}
264+
* <p>
265+
* Adds all elements of <code>list</code> to <code>clusters</code>.
266+
*/
267+
public final Builder clusters(List<String> list) {
268+
this.clusters = _listAddAll(this.clusters, list);
269+
return this;
270+
}
271+
272+
/**
273+
* Required - API name: {@code clusters}
274+
* <p>
275+
* Adds one or more values to <code>clusters</code>.
276+
*/
277+
public final Builder clusters(String value, String... values) {
278+
this.clusters = _listAdd(this.clusters, value, values);
279+
return this;
280+
}
281+
263282
/**
264283
* The document fields that the owners of the role have read access to.
265284
* <p>
@@ -417,26 +436,6 @@ public final Builder allowRestrictedIndices(boolean value) {
417436
return this;
418437
}
419438

420-
/**
421-
* Required - API name: {@code clusters}
422-
* <p>
423-
* Adds all elements of <code>list</code> to <code>clusters</code>.
424-
*/
425-
public final Builder clusters(List<String> list) {
426-
this.clusters = _listAddAll(this.clusters, list);
427-
return this;
428-
}
429-
430-
/**
431-
* Required - API name: {@code clusters}
432-
* <p>
433-
* Adds one or more values to <code>clusters</code>.
434-
*/
435-
public final Builder clusters(String value, String... values) {
436-
this.clusters = _listAdd(this.clusters, value, values);
437-
return this;
438-
}
439-
440439
@Override
441440
protected Builder self() {
442441
return this;
@@ -472,15 +471,15 @@ public Builder rebuild() {
472471
protected static void setupRemoteUserIndicesPrivilegesDeserializer(
473472
ObjectDeserializer<RemoteUserIndicesPrivileges.Builder> op) {
474473

474+
op.add(Builder::clusters, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()),
475+
"clusters");
475476
op.add(Builder::fieldSecurity, JsonpDeserializer.arrayDeserializer(FieldSecurity._DESERIALIZER),
476477
"field_security");
477478
op.add(Builder::names, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "names");
478479
op.add(Builder::privileges, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()),
479480
"privileges");
480481
op.add(Builder::query, JsonpDeserializer.arrayDeserializer(IndicesPrivilegesQuery._DESERIALIZER), "query");
481482
op.add(Builder::allowRestrictedIndices, JsonpDeserializer.booleanDeserializer(), "allow_restricted_indices");
482-
op.add(Builder::clusters, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()),
483-
"clusters");
484483

485484
}
486485

0 commit comments

Comments
 (0)