Skip to content

Commit 242d398

Browse files
committed
[codegen] update to latest API spec
1 parent b606096 commit 242d398

File tree

6 files changed

+25
-641
lines changed

6 files changed

+25
-641
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
'_global.field_caps.Response': '_global/field_caps/FieldCapabilitiesResponse.ts#L24-L29',
4444
'_global.get.GetResult': '_global/get/types.ts#L31-L43',
4545
'_global.get.Request': '_global/get/GetRequest.ts#L32-L88',
46-
'_global.get.Response': '_global/get/GetResponse.ts#L22-L24',
46+
'_global.get.Response': '_global/get/GetResponse.ts#L23-L25',
4747
'_global.get_script.Request': '_global/get_script/GetScriptRequest.ts#L24-L37',
4848
'_global.get_script.Response': '_global/get_script/GetScriptResponse.ts#L23-L29',
4949
'_global.get_script_context.Context': '_global/get_script_context/types.ts#L22-L25',
@@ -1899,10 +1899,12 @@
18991899
'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L192-L194',
19001900
'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L26-L39',
19011901
'security._types.ClusterNode': 'security/_types/ClusterNode.ts#L22-L24',
1902+
'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L41-L79',
19021903
'security._types.CreatedStatus': 'security/_types/CreatedStatus.ts#L20-L22',
19031904
'security._types.FieldRule': 'security/_types/RoleMappingRule.ts#L33-L42',
19041905
'security._types.FieldSecurity': 'security/_types/FieldSecurity.ts#L22-L25',
19051906
'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L188-L190',
1907+
'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L165-L186',
19061908
'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L81-L104',
19071909
'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L196-L198',
19081910
'security._types.Realm': 'security/_types/RoleMappingRule.ts#L44-L46',
@@ -2094,9 +2096,8 @@
20942096
'ssl.certificates.Request': 'ssl/certificates/GetCertificatesRequest.ts#L22-L27',
20952097
'ssl.certificates.Response': 'ssl/certificates/GetCertificatesResponse.ts#L22-L24',
20962098
'tasks._types.GroupBy': 'tasks/_types/GroupBy.ts#L20-L24',
2097-
'tasks._types.Info': 'tasks/_types/TaskInfo.ts#L24-L38',
2099+
'tasks._types.Info': 'tasks/_types/TaskInfo.ts#L25-L39',
20982100
'tasks._types.State': 'tasks/_types/TaskState.ts#L24-L36',
2099-
'tasks._types.Status': 'tasks/_types/TaskStatus.ts#L24-L42',
21002101
'tasks._types.TaskExecutingNode': 'tasks/_types/TaskExecutingNode.ts#L25-L27',
21012102
'tasks.cancel.Request': 'tasks/cancel/CancelTasksRequest.ts#L23-L38',
21022103
'tasks.cancel.Response': 'tasks/cancel/CancelTasksResponse.ts#L24-L29',
@@ -2317,10 +2318,10 @@
23172318
if (hash.length > 1) {
23182319
hash = hash.substring(1);
23192320
}
2320-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/3f7a4959ff4ed2023c554e3a138de270f7e6c2a7/specification/" + (paths[hash] || "");
2321+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/4a27c639bb874a77e19e1d5513062ea10e133909/specification/" + (paths[hash] || "");
23212322
</script>
23222323
</head>
23232324
<body>
2324-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/3f7a4959ff4ed2023c554e3a138de270f7e6c2a7/specification/">Elasticsearch API specification</a>.
2325+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/4a27c639bb874a77e19e1d5513062ea10e133909/specification/">Elasticsearch API specification</a>.
23252326
</body>
23262327
</html>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
package co.elastic.clients.elasticsearch.security.has_privileges;
2525

26+
import co.elastic.clients.elasticsearch.security.IndexPrivilege;
2627
import co.elastic.clients.json.JsonpDeserializable;
2728
import co.elastic.clients.json.JsonpDeserializer;
2829
import co.elastic.clients.json.JsonpMapper;

java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksResponse.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
package co.elastic.clients.elasticsearch.tasks;
2525

2626
import co.elastic.clients.elasticsearch._types.ErrorCause;
27+
import co.elastic.clients.json.JsonData;
2728
import co.elastic.clients.json.JsonpDeserializable;
2829
import co.elastic.clients.json.JsonpDeserializer;
2930
import co.elastic.clients.json.JsonpMapper;
@@ -54,7 +55,7 @@ public class GetTasksResponse implements JsonpSerializable {
5455
private final Info task;
5556

5657
@Nullable
57-
private final Status response;
58+
private final JsonData response;
5859

5960
@Nullable
6061
private final ErrorCause error;
@@ -92,7 +93,7 @@ public final Info task() {
9293
* API name: {@code response}
9394
*/
9495
@Nullable
95-
public final Status response() {
96+
public final JsonData response() {
9697
return this.response;
9798
}
9899

@@ -151,7 +152,7 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
151152
private Info task;
152153

153154
@Nullable
154-
private Status response;
155+
private JsonData response;
155156

156157
@Nullable
157158
private ErrorCause error;
@@ -182,18 +183,11 @@ public final Builder task(Function<Info.Builder, ObjectBuilder<Info>> fn) {
182183
/**
183184
* API name: {@code response}
184185
*/
185-
public final Builder response(@Nullable Status value) {
186+
public final Builder response(@Nullable JsonData value) {
186187
this.response = value;
187188
return this;
188189
}
189190

190-
/**
191-
* API name: {@code response}
192-
*/
193-
public final Builder response(Function<Status.Builder, ObjectBuilder<Status>> fn) {
194-
return this.response(fn.apply(new Status.Builder()).build());
195-
}
196-
197191
/**
198192
* API name: {@code error}
199193
*/
@@ -239,7 +233,7 @@ protected static void setupGetTasksResponseDeserializer(ObjectDeserializer<GetTa
239233

240234
op.add(Builder::completed, JsonpDeserializer.booleanDeserializer(), "completed");
241235
op.add(Builder::task, Info._DESERIALIZER, "task");
242-
op.add(Builder::response, Status._DESERIALIZER, "response");
236+
op.add(Builder::response, JsonData._DESERIALIZER, "response");
243237
op.add(Builder::error, ErrorCause._DESERIALIZER, "error");
244238

245239
}

java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/Info.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
package co.elastic.clients.elasticsearch.tasks;
2525

26+
import co.elastic.clients.json.JsonData;
2627
import co.elastic.clients.json.JsonpDeserializable;
2728
import co.elastic.clients.json.JsonpDeserializer;
2829
import co.elastic.clients.json.JsonpMapper;
@@ -75,7 +76,7 @@ public class Info implements JsonpSerializable {
7576
private final long startTimeInMillis;
7677

7778
@Nullable
78-
private final Status status;
79+
private final JsonData status;
7980

8081
private final String type;
8182

@@ -182,7 +183,7 @@ public final long startTimeInMillis() {
182183
* API name: {@code status}
183184
*/
184185
@Nullable
185-
public final Status status() {
186+
public final JsonData status() {
186187
return this.status;
187188
}
188189

@@ -320,7 +321,7 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
320321
private Long startTimeInMillis;
321322

322323
@Nullable
323-
private Status status;
324+
private JsonData status;
324325

325326
private String type;
326327

@@ -443,18 +444,11 @@ public final Builder startTimeInMillis(long value) {
443444
/**
444445
* API name: {@code status}
445446
*/
446-
public final Builder status(@Nullable Status value) {
447+
public final Builder status(@Nullable JsonData value) {
447448
this.status = value;
448449
return this;
449450
}
450451

451-
/**
452-
* API name: {@code status}
453-
*/
454-
public final Builder status(Function<Status.Builder, ObjectBuilder<Status>> fn) {
455-
return this.status(fn.apply(new Status.Builder()).build());
456-
}
457-
458452
/**
459453
* Required - API name: {@code type}
460454
*/
@@ -510,7 +504,7 @@ protected static void setupInfoDeserializer(ObjectDeserializer<Info.Builder> op)
510504
op.add(Builder::node, JsonpDeserializer.stringDeserializer(), "node");
511505
op.add(Builder::runningTimeInNanos, JsonpDeserializer.longDeserializer(), "running_time_in_nanos");
512506
op.add(Builder::startTimeInMillis, JsonpDeserializer.longDeserializer(), "start_time_in_millis");
513-
op.add(Builder::status, Status._DESERIALIZER, "status");
507+
op.add(Builder::status, JsonData._DESERIALIZER, "status");
514508
op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type");
515509
op.add(Builder::parentTaskId, JsonpDeserializer.stringDeserializer(), "parent_task_id");
516510

java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/State.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
package co.elastic.clients.elasticsearch.tasks;
2525

26+
import co.elastic.clients.json.JsonData;
2627
import co.elastic.clients.json.JsonpDeserializable;
2728
import co.elastic.clients.json.JsonpDeserializer;
2829
import co.elastic.clients.json.JsonpMapper;
@@ -73,7 +74,7 @@ public class State implements JsonpSerializable {
7374
private final long startTimeInMillis;
7475

7576
@Nullable
76-
private final Status status;
77+
private final JsonData status;
7778

7879
private final String type;
7980

@@ -168,7 +169,7 @@ public final long startTimeInMillis() {
168169
* API name: {@code status}
169170
*/
170171
@Nullable
171-
public final Status status() {
172+
public final JsonData status() {
172173
return this.status;
173174
}
174175

@@ -279,7 +280,7 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
279280
private Long startTimeInMillis;
280281

281282
@Nullable
282-
private Status status;
283+
private JsonData status;
283284

284285
private String type;
285286

@@ -370,18 +371,11 @@ public final Builder startTimeInMillis(long value) {
370371
/**
371372
* API name: {@code status}
372373
*/
373-
public final Builder status(@Nullable Status value) {
374+
public final Builder status(@Nullable JsonData value) {
374375
this.status = value;
375376
return this;
376377
}
377378

378-
/**
379-
* API name: {@code status}
380-
*/
381-
public final Builder status(Function<Status.Builder, ObjectBuilder<Status>> fn) {
382-
return this.status(fn.apply(new Status.Builder()).build());
383-
}
384-
385379
/**
386380
* Required - API name: {@code type}
387381
*/
@@ -428,7 +422,7 @@ protected static void setupStateDeserializer(ObjectDeserializer<State.Builder> o
428422
op.add(Builder::parentTaskId, JsonpDeserializer.stringDeserializer(), "parent_task_id");
429423
op.add(Builder::runningTimeInNanos, JsonpDeserializer.longDeserializer(), "running_time_in_nanos");
430424
op.add(Builder::startTimeInMillis, JsonpDeserializer.longDeserializer(), "start_time_in_millis");
431-
op.add(Builder::status, Status._DESERIALIZER, "status");
425+
op.add(Builder::status, JsonData._DESERIALIZER, "status");
432426
op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type");
433427

434428
}

0 commit comments

Comments
 (0)