Skip to content

Commit d439d7a

Browse files
committed
[codegen] update to latest spec
1 parent f3de209 commit d439d7a

16 files changed

+280
-1127
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/health/HealthResponseBody.java

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import co.elastic.clients.util.WithJsonObjectBuilderBase;
3434
import jakarta.json.stream.JsonGenerator;
3535
import java.lang.Boolean;
36+
import java.lang.Double;
3637
import java.lang.Integer;
3738
import java.lang.Long;
3839
import java.lang.String;
@@ -70,7 +71,10 @@ public abstract class HealthResponseBody implements JsonpSerializable {
7071

7172
private final int activeShards;
7273

73-
private final String activeShardsPercentAsNumber;
74+
@Nullable
75+
private final String activeShardsPercent;
76+
77+
private final double activeShardsPercentAsNumber;
7478

7579
private final String clusterName;
7680

@@ -110,8 +114,9 @@ protected HealthResponseBody(AbstractBuilder<?> builder) {
110114
this.activePrimaryShards = ApiTypeHelper.requireNonNull(builder.activePrimaryShards, this,
111115
"activePrimaryShards", 0);
112116
this.activeShards = ApiTypeHelper.requireNonNull(builder.activeShards, this, "activeShards", 0);
117+
this.activeShardsPercent = builder.activeShardsPercent;
113118
this.activeShardsPercentAsNumber = ApiTypeHelper.requireNonNull(builder.activeShardsPercentAsNumber, this,
114-
"activeShardsPercentAsNumber");
119+
"activeShardsPercentAsNumber", 0);
115120
this.clusterName = ApiTypeHelper.requireNonNull(builder.clusterName, this, "clusterName");
116121
this.delayedUnassignedShards = ApiTypeHelper.requireNonNull(builder.delayedUnassignedShards, this,
117122
"delayedUnassignedShards", 0);
@@ -154,13 +159,24 @@ public final int activeShards() {
154159
return this.activeShards;
155160
}
156161

162+
/**
163+
* The ratio of active shards in the cluster expressed as a string formatted
164+
* percentage.
165+
* <p>
166+
* API name: {@code active_shards_percent}
167+
*/
168+
@Nullable
169+
public final String activeShardsPercent() {
170+
return this.activeShardsPercent;
171+
}
172+
157173
/**
158174
* Required - The ratio of active shards in the cluster expressed as a
159175
* percentage.
160176
* <p>
161177
* API name: {@code active_shards_percent_as_number}
162178
*/
163-
public final String activeShardsPercentAsNumber() {
179+
public final double activeShardsPercentAsNumber() {
164180
return this.activeShardsPercentAsNumber;
165181
}
166182

@@ -317,6 +333,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
317333
generator.writeKey("active_shards");
318334
generator.write(this.activeShards);
319335

336+
if (this.activeShardsPercent != null) {
337+
generator.writeKey("active_shards_percent");
338+
generator.write(this.activeShardsPercent);
339+
340+
}
320341
generator.writeKey("active_shards_percent_as_number");
321342
generator.write(this.activeShardsPercentAsNumber);
322343

@@ -388,7 +409,10 @@ public abstract static class AbstractBuilder<BuilderT extends AbstractBuilder<Bu
388409

389410
private Integer activeShards;
390411

391-
private String activeShardsPercentAsNumber;
412+
@Nullable
413+
private String activeShardsPercent;
414+
415+
private Double activeShardsPercentAsNumber;
392416

393417
private String clusterName;
394418

@@ -442,13 +466,24 @@ public final BuilderT activeShards(int value) {
442466
return self();
443467
}
444468

469+
/**
470+
* The ratio of active shards in the cluster expressed as a string formatted
471+
* percentage.
472+
* <p>
473+
* API name: {@code active_shards_percent}
474+
*/
475+
public final BuilderT activeShardsPercent(@Nullable String value) {
476+
this.activeShardsPercent = value;
477+
return self();
478+
}
479+
445480
/**
446481
* Required - The ratio of active shards in the cluster expressed as a
447482
* percentage.
448483
* <p>
449484
* API name: {@code active_shards_percent_as_number}
450485
*/
451-
public final BuilderT activeShardsPercentAsNumber(String value) {
486+
public final BuilderT activeShardsPercentAsNumber(double value) {
452487
this.activeShardsPercentAsNumber = value;
453488
return self();
454489
}
@@ -644,7 +679,8 @@ protected static <BuilderT extends AbstractBuilder<BuilderT>> void setupHealthRe
644679

645680
op.add(AbstractBuilder::activePrimaryShards, JsonpDeserializer.integerDeserializer(), "active_primary_shards");
646681
op.add(AbstractBuilder::activeShards, JsonpDeserializer.integerDeserializer(), "active_shards");
647-
op.add(AbstractBuilder::activeShardsPercentAsNumber, JsonpDeserializer.stringDeserializer(),
682+
op.add(AbstractBuilder::activeShardsPercent, JsonpDeserializer.stringDeserializer(), "active_shards_percent");
683+
op.add(AbstractBuilder::activeShardsPercentAsNumber, JsonpDeserializer.doubleDeserializer(),
648684
"active_shards_percent_as_number");
649685
op.add(AbstractBuilder::clusterName, JsonpDeserializer.stringDeserializer(), "cluster_name");
650686
op.add(AbstractBuilder::delayedUnassignedShards, JsonpDeserializer.integerDeserializer(),

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

Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@
11711171
'cluster.get_component_template.Response': 'cluster/get_component_template/ClusterGetComponentTemplateResponse.ts#L22-L24',
11721172
'cluster.get_settings.Request': 'cluster/get_settings/ClusterGetSettingsRequest.ts#L23-L63',
11731173
'cluster.get_settings.Response': 'cluster/get_settings/ClusterGetSettingsResponse.ts#L23-L29',
1174-
'cluster.health.HealthResponseBody': 'cluster/health/ClusterHealthResponse.ts#L40-L75',
1174+
'cluster.health.HealthResponseBody': 'cluster/health/ClusterHealthResponse.ts#L40-L77',
11751175
'cluster.health.IndexHealthStats': 'cluster/health/types.ts#L24-L35',
11761176
'cluster.health.Request': 'cluster/health/ClusterHealthRequest.ts#L32-L118',
11771177
'cluster.health.Response': 'cluster/health/ClusterHealthResponse.ts#L26-L38',
@@ -1759,9 +1759,6 @@
17591759
'inference._types.CompletionToolType': 'inference/_types/CommonTypes.ts#L79-L82',
17601760
'inference._types.ContentObject': 'inference/_types/CommonTypes.ts#L84-L96',
17611761
'inference._types.DeleteInferenceEndpointResult': 'inference/_types/Results.ts#L110-L115',
1762-
'inference._types.EisServiceSettings': 'inference/_types/CommonTypes.ts#L684-L694',
1763-
'inference._types.EisServiceType': 'inference/_types/CommonTypes.ts#L700-L702',
1764-
'inference._types.EisTaskType': 'inference/_types/CommonTypes.ts#L696-L698',
17651762
'inference._types.ElasticsearchServiceSettings': 'inference/_types/CommonTypes.ts#L704-L738',
17661763
'inference._types.ElasticsearchServiceType': 'inference/_types/CommonTypes.ts#L754-L756',
17671764
'inference._types.ElasticsearchTaskSettings': 'inference/_types/CommonTypes.ts#L740-L746',
@@ -1824,8 +1821,6 @@
18241821
'inference.delete.Response': 'inference/delete/DeleteResponse.ts#L22-L25',
18251822
'inference.get.Request': 'inference/get/GetRequest.ts#L24-L56',
18261823
'inference.get.Response': 'inference/get/GetResponse.ts#L22-L26',
1827-
'inference.post_eis_chat_completion.Request': 'inference/post_eis_chat_completion/PostEisChatCompletionRequest.ts#L23-L48',
1828-
'inference.post_eis_chat_completion.Response': 'inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts#L22-L25',
18291824
'inference.put.Request': 'inference/put/PutRequest.ts#L25-L65',
18301825
'inference.put.Response': 'inference/put/PutResponse.ts#L22-L25',
18311826
'inference.put_alibabacloud.Request': 'inference/put_alibabacloud/PutAlibabaCloudRequest.ts#L30-L83',
@@ -1840,8 +1835,6 @@
18401835
'inference.put_azureopenai.Response': 'inference/put_azureopenai/PutAzureOpenAiResponse.ts#L22-L25',
18411836
'inference.put_cohere.Request': 'inference/put_cohere/PutCohereRequest.ts#L30-L84',
18421837
'inference.put_cohere.Response': 'inference/put_cohere/PutCohereResponse.ts#L22-L25',
1843-
'inference.put_eis.Request': 'inference/put_eis/PutEisRequest.ts#L28-L66',
1844-
'inference.put_eis.Response': 'inference/put_eis/PutEisResponse.ts#L22-L25',
18451838
'inference.put_elasticsearch.Request': 'inference/put_elasticsearch/PutElasticsearchRequest.ts#L30-L91',
18461839
'inference.put_elasticsearch.Response': 'inference/put_elasticsearch/PutElasticsearchResponse.ts#L22-L25',
18471840
'inference.put_elser.Request': 'inference/put_elser/PutElserRequest.ts#L29-L86',
@@ -1901,45 +1894,46 @@
19011894
'ingest._types.GrokProcessor': 'ingest/_types/Processors.ts#L951-L982',
19021895
'ingest._types.GsubProcessor': 'ingest/_types/Processors.ts#L984-L1008',
19031896
'ingest._types.HtmlStripProcessor': 'ingest/_types/Processors.ts#L1010-L1026',
1904-
'ingest._types.InferenceConfig': 'ingest/_types/Processors.ts#L1049-L1061',
1905-
'ingest._types.InferenceConfigClassification': 'ingest/_types/Processors.ts#L1076-L1102',
1906-
'ingest._types.InferenceConfigRegression': 'ingest/_types/Processors.ts#L1063-L1074',
1907-
'ingest._types.InferenceProcessor': 'ingest/_types/Processors.ts#L1028-L1047',
1897+
'ingest._types.InferenceConfig': 'ingest/_types/Processors.ts#L1067-L1079',
1898+
'ingest._types.InferenceConfigClassification': 'ingest/_types/Processors.ts#L1094-L1120',
1899+
'ingest._types.InferenceConfigRegression': 'ingest/_types/Processors.ts#L1081-L1092',
1900+
'ingest._types.InferenceProcessor': 'ingest/_types/Processors.ts#L1028-L1060',
19081901
'ingest._types.Ingest': 'ingest/_types/Simulation.ts#L29-L37',
1902+
'ingest._types.InputConfig': 'ingest/_types/Processors.ts#L1062-L1065',
19091903
'ingest._types.IpLocationProcessor': 'ingest/_types/Processors.ts#L479-L513',
19101904
'ingest._types.Ipinfo': 'ingest/_types/Database.ts#L59-L59',
1911-
'ingest._types.JoinProcessor': 'ingest/_types/Processors.ts#L1104-L1119',
1912-
'ingest._types.JsonProcessor': 'ingest/_types/Processors.ts#L1121-L1150',
1913-
'ingest._types.JsonProcessorConflictStrategy': 'ingest/_types/Processors.ts#L1152-L1157',
1914-
'ingest._types.KeyValueProcessor': 'ingest/_types/Processors.ts#L1159-L1211',
1905+
'ingest._types.JoinProcessor': 'ingest/_types/Processors.ts#L1122-L1137',
1906+
'ingest._types.JsonProcessor': 'ingest/_types/Processors.ts#L1139-L1168',
1907+
'ingest._types.JsonProcessorConflictStrategy': 'ingest/_types/Processors.ts#L1170-L1175',
1908+
'ingest._types.KeyValueProcessor': 'ingest/_types/Processors.ts#L1177-L1229',
19151909
'ingest._types.Local': 'ingest/_types/Database.ts#L63-L65',
1916-
'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L1213-L1229',
1910+
'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L1231-L1247',
19171911
'ingest._types.Maxmind': 'ingest/_types/Database.ts#L55-L57',
1918-
'ingest._types.NetworkDirectionProcessor': 'ingest/_types/Processors.ts#L1231-L1265',
1912+
'ingest._types.NetworkDirectionProcessor': 'ingest/_types/Processors.ts#L1249-L1283',
19191913
'ingest._types.Pipeline': 'ingest/_types/Pipeline.ts#L23-L51',
19201914
'ingest._types.PipelineConfig': 'ingest/_types/Pipeline.ts#L67-L81',
1921-
'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L1267-L1278',
1915+
'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L1285-L1296',
19221916
'ingest._types.PipelineSimulation': 'ingest/_types/Simulation.ts#L52-L60',
19231917
'ingest._types.ProcessorBase': 'ingest/_types/Processors.ts#L304-L327',
19241918
'ingest._types.ProcessorContainer': 'ingest/_types/Processors.ts#L28-L302',
19251919
'ingest._types.Redact': 'ingest/_types/Simulation.ts#L39-L44',
1926-
'ingest._types.RedactProcessor': 'ingest/_types/Processors.ts#L1280-L1321',
1927-
'ingest._types.RegisteredDomainProcessor': 'ingest/_types/Processors.ts#L1323-L1339',
1928-
'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L1341-L1355',
1929-
'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L1357-L1373',
1930-
'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L1375-L1403',
1931-
'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1405-L1425',
1932-
'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1427-L1461',
1933-
'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1463-L1472',
1934-
'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1474-L1477',
1920+
'ingest._types.RedactProcessor': 'ingest/_types/Processors.ts#L1298-L1339',
1921+
'ingest._types.RegisteredDomainProcessor': 'ingest/_types/Processors.ts#L1341-L1357',
1922+
'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L1359-L1373',
1923+
'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L1375-L1391',
1924+
'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L1393-L1421',
1925+
'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1423-L1443',
1926+
'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1445-L1479',
1927+
'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1481-L1490',
1928+
'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1492-L1495',
19351929
'ingest._types.SimulateDocumentResult': 'ingest/_types/Simulation.ts#L46-L50',
1936-
'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1479-L1495',
1937-
'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1497-L1522',
1938-
'ingest._types.TerminateProcessor': 'ingest/_types/Processors.ts#L1524-L1524',
1939-
'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1526-L1542',
1940-
'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1544-L1560',
1941-
'ingest._types.UriPartsProcessor': 'ingest/_types/Processors.ts#L1580-L1606',
1942-
'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1562-L1578',
1930+
'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1497-L1513',
1931+
'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1515-L1540',
1932+
'ingest._types.TerminateProcessor': 'ingest/_types/Processors.ts#L1542-L1542',
1933+
'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1544-L1560',
1934+
'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1562-L1578',
1935+
'ingest._types.UriPartsProcessor': 'ingest/_types/Processors.ts#L1598-L1624',
1936+
'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1580-L1596',
19431937
'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L515-L546',
19441938
'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L548-L554',
19451939
'ingest._types.Web': 'ingest/_types/Database.ts#L61-L61',
@@ -2866,7 +2860,7 @@
28662860
'snapshot.cleanup_repository.CleanupRepositoryResults': 'snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L37',
28672861
'snapshot.cleanup_repository.Request': 'snapshot/cleanup_repository/SnapshotCleanupRepositoryRequest.ts#L24-L63',
28682862
'snapshot.cleanup_repository.Response': 'snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L22-L27',
2869-
'snapshot.clone.Request': 'snapshot/clone/SnapshotCloneRequest.ts#L24-L76',
2863+
'snapshot.clone.Request': 'snapshot/clone/SnapshotCloneRequest.ts#L24-L70',
28702864
'snapshot.clone.Response': 'snapshot/clone/SnapshotCloneResponse.ts#L22-L25',
28712865
'snapshot.create.Request': 'snapshot/create/SnapshotCreateRequest.ts#L24-L126',
28722866
'snapshot.create.Response': 'snapshot/create/SnapshotCreateResponse.ts#L22-L35',
@@ -3121,7 +3115,7 @@
31213115
'watcher.stats.WatcherState': 'watcher/stats/types.ts#L26-L31',
31223116
'watcher.stop.Request': 'watcher/stop/WatcherStopRequest.ts#L23-L47',
31233117
'watcher.stop.Response': 'watcher/stop/WatcherStopResponse.ts#L22-L25',
3124-
'watcher.update_settings.Request': 'watcher/update_settings/WatcherUpdateSettingsRequest.ts#L24-L58',
3118+
'watcher.update_settings.Request': 'watcher/update_settings/WatcherUpdateSettingsRequest.ts#L24-L61',
31253119
'watcher.update_settings.Response': 'watcher/update_settings/WatcherUpdateSettingsResponse.ts#L20-L24',
31263120
'xpack.info.BuildInformation': 'xpack/info/types.ts#L24-L27',
31273121
'xpack.info.Feature': 'xpack/info/types.ts#L84-L89',
@@ -3203,10 +3197,10 @@
32033197
if (hash.length > 1) {
32043198
hash = hash.substring(1);
32053199
}
3206-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/69cbe7cbe9f49a2886bb419ec847cffb58f8b4fb/specification/" + (paths[hash] || "");
3200+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/60a81659be928bfe6cec53708c7f7613555a5eaf/specification/" + (paths[hash] || "");
32073201
</script>
32083202
</head>
32093203
<body>
3210-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/69cbe7cbe9f49a2886bb419ec847cffb58f8b4fb/specification/">Elasticsearch API specification</a>.
3204+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/60a81659be928bfe6cec53708c7f7613555a5eaf/specification/">Elasticsearch API specification</a>.
32113205
</body>
32123206
</html>

java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EisServiceType.java

Lines changed: 0 additions & 64 deletions
This file was deleted.

java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EisTaskType.java

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)