Skip to content

Commit 4d5487d

Browse files
committed
[codegen] update to latest spec
1 parent 95209b5 commit 4d5487d

File tree

9 files changed

+103
-51
lines changed

9 files changed

+103
-51
lines changed

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import co.elastic.clients.json.ObjectDeserializer;
2727
import co.elastic.clients.util.ObjectBuilder;
2828
import jakarta.json.stream.JsonGenerator;
29+
import java.lang.String;
2930
import java.util.Objects;
3031
import java.util.function.Function;
3132
import javax.annotation.Nullable;
@@ -61,13 +62,17 @@ public class IcuNormalizationCharFilter extends CharFilterBase implements CharFi
6162
@Nullable
6263
private final IcuNormalizationType name;
6364

65+
@Nullable
66+
private final String unicodeSetFilter;
67+
6468
// ---------------------------------------------------------------------------------------------
6569

6670
private IcuNormalizationCharFilter(Builder builder) {
6771
super(builder);
6872

6973
this.mode = builder.mode;
7074
this.name = builder.name;
75+
this.unicodeSetFilter = builder.unicodeSetFilter;
7176

7277
}
7378

@@ -99,6 +104,14 @@ public final IcuNormalizationType name() {
99104
return this.name;
100105
}
101106

107+
/**
108+
* API name: {@code unicode_set_filter}
109+
*/
110+
@Nullable
111+
public final String unicodeSetFilter() {
112+
return this.unicodeSetFilter;
113+
}
114+
102115
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
103116

104117
generator.write("type", "icu_normalizer");
@@ -111,6 +124,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
111124
generator.writeKey("name");
112125
this.name.serialize(generator, mapper);
113126
}
127+
if (this.unicodeSetFilter != null) {
128+
generator.writeKey("unicode_set_filter");
129+
generator.write(this.unicodeSetFilter);
130+
131+
}
114132

115133
}
116134

@@ -129,6 +147,9 @@ public static class Builder extends CharFilterBase.AbstractBuilder<Builder>
129147
@Nullable
130148
private IcuNormalizationType name;
131149

150+
@Nullable
151+
private String unicodeSetFilter;
152+
132153
/**
133154
* API name: {@code mode}
134155
*/
@@ -145,6 +166,14 @@ public final Builder name(@Nullable IcuNormalizationType value) {
145166
return this;
146167
}
147168

169+
/**
170+
* API name: {@code unicode_set_filter}
171+
*/
172+
public final Builder unicodeSetFilter(@Nullable String value) {
173+
this.unicodeSetFilter = value;
174+
return this;
175+
}
176+
148177
@Override
149178
protected Builder self() {
150179
return this;
@@ -176,6 +205,7 @@ protected static void setupIcuNormalizationCharFilterDeserializer(
176205
CharFilterBase.setupCharFilterBaseDeserializer(op);
177206
op.add(Builder::mode, IcuNormalizationMode._DESERIALIZER, "mode");
178207
op.add(Builder::name, IcuNormalizationType._DESERIALIZER, "name");
208+
op.add(Builder::unicodeSetFilter, JsonpDeserializer.stringDeserializer(), "unicode_set_filter");
179209

180210
op.ignore("type");
181211
}

java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/ShardProfile.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import co.elastic.clients.util.ObjectBuilder;
3131
import co.elastic.clients.util.WithJsonObjectBuilderBase;
3232
import jakarta.json.stream.JsonGenerator;
33-
import java.lang.Long;
33+
import java.lang.Integer;
3434
import java.lang.String;
3535
import java.util.List;
3636
import java.util.Objects;
@@ -80,7 +80,7 @@ public class ShardProfile implements JsonpSerializable {
8080

8181
private final List<SearchProfile> searches;
8282

83-
private final long shardId;
83+
private final int shardId;
8484

8585
// ---------------------------------------------------------------------------------------------
8686

@@ -163,7 +163,7 @@ public final List<SearchProfile> searches() {
163163
/**
164164
* Required - API name: {@code shard_id}
165165
*/
166-
public final long shardId() {
166+
public final int shardId() {
167167
return this.shardId;
168168
}
169169

@@ -255,7 +255,7 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
255255

256256
private List<SearchProfile> searches;
257257

258-
private Long shardId;
258+
private Integer shardId;
259259

260260
/**
261261
* Required - API name: {@code aggregations}
@@ -380,7 +380,7 @@ public final Builder searches(Function<SearchProfile.Builder, ObjectBuilder<Sear
380380
/**
381381
* Required - API name: {@code shard_id}
382382
*/
383-
public final Builder shardId(long value) {
383+
public final Builder shardId(int value) {
384384
this.shardId = value;
385385
return this;
386386
}
@@ -422,7 +422,7 @@ protected static void setupShardProfileDeserializer(ObjectDeserializer<ShardProf
422422
op.add(Builder::index, JsonpDeserializer.stringDeserializer(), "index");
423423
op.add(Builder::nodeId, JsonpDeserializer.stringDeserializer(), "node_id");
424424
op.add(Builder::searches, JsonpDeserializer.arrayDeserializer(SearchProfile._DESERIALIZER), "searches");
425-
op.add(Builder::shardId, JsonpDeserializer.longDeserializer(), "shard_id");
425+
op.add(Builder::shardId, JsonpDeserializer.integerDeserializer(), "shard_id");
426426

427427
}
428428

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -674,19 +674,19 @@
674674
'_types.analysis.HungarianAnalyzer': '_types/analysis/analyzers.ts#L195-L200',
675675
'_types.analysis.HunspellTokenFilter': '_types/analysis/token_filters.ts#L201-L207',
676676
'_types.analysis.HyphenationDecompounderTokenFilter': '_types/analysis/token_filters.ts#L57-L59',
677-
'_types.analysis.IcuAnalyzer': '_types/analysis/icu-plugin.ts#L67-L71',
678-
'_types.analysis.IcuCollationAlternate': '_types/analysis/icu-plugin.ts#L89-L92',
679-
'_types.analysis.IcuCollationCaseFirst': '_types/analysis/icu-plugin.ts#L94-L97',
680-
'_types.analysis.IcuCollationDecomposition': '_types/analysis/icu-plugin.ts#L99-L102',
681-
'_types.analysis.IcuCollationStrength': '_types/analysis/icu-plugin.ts#L104-L110',
682-
'_types.analysis.IcuCollationTokenFilter': '_types/analysis/icu-plugin.ts#L51-L65',
683-
'_types.analysis.IcuFoldingTokenFilter': '_types/analysis/icu-plugin.ts#L46-L49',
684-
'_types.analysis.IcuNormalizationCharFilter': '_types/analysis/icu-plugin.ts#L40-L44',
685-
'_types.analysis.IcuNormalizationMode': '_types/analysis/icu-plugin.ts#L78-L81',
677+
'_types.analysis.IcuAnalyzer': '_types/analysis/icu-plugin.ts#L68-L72',
678+
'_types.analysis.IcuCollationAlternate': '_types/analysis/icu-plugin.ts#L90-L93',
679+
'_types.analysis.IcuCollationCaseFirst': '_types/analysis/icu-plugin.ts#L95-L98',
680+
'_types.analysis.IcuCollationDecomposition': '_types/analysis/icu-plugin.ts#L100-L103',
681+
'_types.analysis.IcuCollationStrength': '_types/analysis/icu-plugin.ts#L105-L111',
682+
'_types.analysis.IcuCollationTokenFilter': '_types/analysis/icu-plugin.ts#L52-L66',
683+
'_types.analysis.IcuFoldingTokenFilter': '_types/analysis/icu-plugin.ts#L47-L50',
684+
'_types.analysis.IcuNormalizationCharFilter': '_types/analysis/icu-plugin.ts#L40-L45',
685+
'_types.analysis.IcuNormalizationMode': '_types/analysis/icu-plugin.ts#L79-L82',
686686
'_types.analysis.IcuNormalizationTokenFilter': '_types/analysis/icu-plugin.ts#L35-L38',
687-
'_types.analysis.IcuNormalizationType': '_types/analysis/icu-plugin.ts#L83-L87',
687+
'_types.analysis.IcuNormalizationType': '_types/analysis/icu-plugin.ts#L84-L88',
688688
'_types.analysis.IcuTokenizer': '_types/analysis/icu-plugin.ts#L30-L33',
689-
'_types.analysis.IcuTransformDirection': '_types/analysis/icu-plugin.ts#L73-L76',
689+
'_types.analysis.IcuTransformDirection': '_types/analysis/icu-plugin.ts#L74-L77',
690690
'_types.analysis.IcuTransformTokenFilter': '_types/analysis/icu-plugin.ts#L24-L28',
691691
'_types.analysis.IndonesianAnalyzer': '_types/analysis/analyzers.ts#L202-L207',
692692
'_types.analysis.IrishAnalyzer': '_types/analysis/analyzers.ts#L209-L214',
@@ -1539,7 +1539,7 @@
15391539
'indices.delete_data_stream.Response': 'indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L24',
15401540
'indices.delete_index_template.Request': 'indices/delete_index_template/IndicesDeleteIndexTemplateRequest.ts#L24-L54',
15411541
'indices.delete_index_template.Response': 'indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L24',
1542-
'indices.delete_template.Request': 'indices/delete_template/IndicesDeleteTemplateRequest.ts#L24-L53',
1542+
'indices.delete_template.Request': 'indices/delete_template/IndicesDeleteTemplateRequest.ts#L24-L55',
15431543
'indices.delete_template.Response': 'indices/delete_template/IndicesDeleteTemplateResponse.ts#L22-L24',
15441544
'indices.disk_usage.Request': 'indices/disk_usage/IndicesDiskUsageRequest.ts#L23-L78',
15451545
'indices.disk_usage.Response': 'indices/disk_usage/IndicesDiskUsageResponse.ts#L22-L25',
@@ -1590,7 +1590,7 @@
15901590
'indices.get_mapping.Response': 'indices/get_mapping/IndicesGetMappingResponse.ts#L24-L27',
15911591
'indices.get_settings.Request': 'indices/get_settings/IndicesGetSettingsRequest.ts#L24-L93',
15921592
'indices.get_settings.Response': 'indices/get_settings/IndicesGetSettingsResponse.ts#L24-L27',
1593-
'indices.get_template.Request': 'indices/get_template/IndicesGetTemplateRequest.ts#L24-L62',
1593+
'indices.get_template.Request': 'indices/get_template/IndicesGetTemplateRequest.ts#L24-L63',
15941594
'indices.get_template.Response': 'indices/get_template/IndicesGetTemplateResponse.ts#L23-L26',
15951595
'indices.migrate_to_data_stream.Request': 'indices/migrate_to_data_stream/IndicesMigrateToDataStreamRequest.ts#L24-L59',
15961596
'indices.migrate_to_data_stream.Response': 'indices/migrate_to_data_stream/IndicesMigrateToDataStreamResponse.ts#L22-L24',
@@ -1613,7 +1613,7 @@
16131613
'indices.put_mapping.Response': 'indices/put_mapping/IndicesPutMappingResponse.ts#L22-L24',
16141614
'indices.put_settings.Request': 'indices/put_settings/IndicesPutSettingsRequest.ts#L25-L108',
16151615
'indices.put_settings.Response': 'indices/put_settings/IndicesPutSettingsResponse.ts#L22-L24',
1616-
'indices.put_template.Request': 'indices/put_template/IndicesPutTemplateRequest.ts#L29-L118',
1616+
'indices.put_template.Request': 'indices/put_template/IndicesPutTemplateRequest.ts#L29-L119',
16171617
'indices.put_template.Response': 'indices/put_template/IndicesPutTemplateResponse.ts#L22-L24',
16181618
'indices.recovery.FileDetails': 'indices/recovery/types.ts#L50-L54',
16191619
'indices.recovery.RecoveryBytes': 'indices/recovery/types.ts#L38-L48',
@@ -2703,7 +2703,7 @@
27032703
'snapshot._types.SharedFileSystemRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L104-L108',
27042704
'snapshot._types.SnapshotIndexStats': 'snapshot/_types/SnapshotIndexStats.ts#L25-L29',
27052705
'snapshot._types.SnapshotInfo': 'snapshot/_types/SnapshotInfo.ts#L41-L71',
2706-
'snapshot._types.SnapshotShardFailure': 'snapshot/_types/SnapshotShardFailure.ts#L22-L29',
2706+
'snapshot._types.SnapshotShardFailure': 'snapshot/_types/SnapshotShardFailure.ts#L23-L30',
27072707
'snapshot._types.SnapshotShardsStatus': 'snapshot/_types/SnapshotShardsStatus.ts#L24-L27',
27082708
'snapshot._types.SnapshotSort': 'snapshot/_types/SnapshotInfo.ts#L73-L93',
27092709
'snapshot._types.SnapshotStats': 'snapshot/_types/SnapshotStats.ts#L23-L29',
@@ -3050,10 +3050,10 @@
30503050
if (hash.length > 1) {
30513051
hash = hash.substring(1);
30523052
}
3053-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/3103b4ed2a6294fd7b1a0a2cc171c190a40bf2d8/specification/" + (paths[hash] || "");
3053+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/205fe259533d5ccf98399758c3545e354e059a5e/specification/" + (paths[hash] || "");
30543054
</script>
30553055
</head>
30563056
<body>
3057-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/3103b4ed2a6294fd7b1a0a2cc171c190a40bf2d8/specification/">Elasticsearch API specification</a>.
3057+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/205fe259533d5ccf98399758c3545e354e059a5e/specification/">Elasticsearch API specification</a>.
30583058
</body>
30593059
</html>

java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteTemplateRequest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,15 @@
5656
// typedef: indices.delete_template.Request
5757

5858
/**
59-
* Delete a legacy index template.
59+
* Delete a legacy index template. IMPORTANT: This documentation is about legacy
60+
* index templates, which are deprecated and will be replaced by the composable
61+
* templates introduced in Elasticsearch 7.8.
6062
*
6163
* @see <a href="../doc-files/api-spec.html#indices.delete_template.Request">API
6264
* specification</a>
65+
* @deprecated 7.8.0
6366
*/
64-
67+
@Deprecated
6568
public class DeleteTemplateRequest extends RequestBase {
6669
@Nullable
6770
private final Time masterTimeout;
@@ -122,7 +125,7 @@ public final Time timeout() {
122125
/**
123126
* Builder for {@link DeleteTemplateRequest}.
124127
*/
125-
128+
@Deprecated
126129
public static class Builder extends RequestBase.AbstractBuilder<Builder>
127130
implements
128131
ObjectBuilder<DeleteTemplateRequest> {

java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,9 @@ public final CompletableFuture<DeleteIndexTemplateResponse> deleteIndexTemplate(
850850
// ----- Endpoint: indices.delete_template
851851

852852
/**
853-
* Delete a legacy index template.
853+
* Delete a legacy index template. IMPORTANT: This documentation is about legacy
854+
* index templates, which are deprecated and will be replaced by the composable
855+
* templates introduced in Elasticsearch 7.8.
854856
*
855857
* @see <a href=
856858
* "https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-template-v1.html">Documentation
@@ -865,7 +867,9 @@ public CompletableFuture<DeleteTemplateResponse> deleteTemplate(DeleteTemplateRe
865867
}
866868

867869
/**
868-
* Delete a legacy index template.
870+
* Delete a legacy index template. IMPORTANT: This documentation is about legacy
871+
* index templates, which are deprecated and will be replaced by the composable
872+
* templates introduced in Elasticsearch 7.8.
869873
*
870874
* @param fn
871875
* a function that initializes a builder to create the
@@ -1959,7 +1963,8 @@ public CompletableFuture<GetIndicesSettingsResponse> getSettings() {
19591963
// ----- Endpoint: indices.get_template
19601964

19611965
/**
1962-
* Get index templates. Get information about one or more index templates.
1966+
* Get legacy index templates. Get information about one or more index
1967+
* templates.
19631968
* <p>
19641969
* IMPORTANT: This documentation is about legacy index templates, which are
19651970
* deprecated and will be replaced by the composable templates introduced in
@@ -1978,7 +1983,8 @@ public CompletableFuture<GetTemplateResponse> getTemplate(GetTemplateRequest req
19781983
}
19791984

19801985
/**
1981-
* Get index templates. Get information about one or more index templates.
1986+
* Get legacy index templates. Get information about one or more index
1987+
* templates.
19821988
* <p>
19831989
* IMPORTANT: This documentation is about legacy index templates, which are
19841990
* deprecated and will be replaced by the composable templates introduced in
@@ -1998,7 +2004,8 @@ public final CompletableFuture<GetTemplateResponse> getTemplate(
19982004
}
19992005

20002006
/**
2001-
* Get index templates. Get information about one or more index templates.
2007+
* Get legacy index templates. Get information about one or more index
2008+
* templates.
20022009
* <p>
20032010
* IMPORTANT: This documentation is about legacy index templates, which are
20042011
* deprecated and will be replaced by the composable templates introduced in
@@ -2642,7 +2649,7 @@ public CompletableFuture<PutIndicesSettingsResponse> putSettings() {
26422649
// ----- Endpoint: indices.put_template
26432650

26442651
/**
2645-
* Create or update an index template. Index templates define settings,
2652+
* Create or update a legacy index template. Index templates define settings,
26462653
* mappings, and aliases that can be applied automatically to new indices.
26472654
* Elasticsearch applies templates to new indices based on an index pattern that
26482655
* matches the index name.
@@ -2686,7 +2693,7 @@ public CompletableFuture<PutTemplateResponse> putTemplate(PutTemplateRequest req
26862693
}
26872694

26882695
/**
2689-
* Create or update an index template. Index templates define settings,
2696+
* Create or update a legacy index template. Index templates define settings,
26902697
* mappings, and aliases that can be applied automatically to new indices.
26912698
* Elasticsearch applies templates to new indices based on an index pattern that
26922699
* matches the index name.

java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,9 @@ public final DeleteIndexTemplateResponse deleteIndexTemplate(
859859
// ----- Endpoint: indices.delete_template
860860

861861
/**
862-
* Delete a legacy index template.
862+
* Delete a legacy index template. IMPORTANT: This documentation is about legacy
863+
* index templates, which are deprecated and will be replaced by the composable
864+
* templates introduced in Elasticsearch 7.8.
863865
*
864866
* @see <a href=
865867
* "https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-template-v1.html">Documentation
@@ -875,7 +877,9 @@ public DeleteTemplateResponse deleteTemplate(DeleteTemplateRequest request)
875877
}
876878

877879
/**
878-
* Delete a legacy index template.
880+
* Delete a legacy index template. IMPORTANT: This documentation is about legacy
881+
* index templates, which are deprecated and will be replaced by the composable
882+
* templates introduced in Elasticsearch 7.8.
879883
*
880884
* @param fn
881885
* a function that initializes a builder to create the
@@ -1987,7 +1991,8 @@ public GetIndicesSettingsResponse getSettings() throws IOException, Elasticsearc
19871991
// ----- Endpoint: indices.get_template
19881992

19891993
/**
1990-
* Get index templates. Get information about one or more index templates.
1994+
* Get legacy index templates. Get information about one or more index
1995+
* templates.
19911996
* <p>
19921997
* IMPORTANT: This documentation is about legacy index templates, which are
19931998
* deprecated and will be replaced by the composable templates introduced in
@@ -2006,7 +2011,8 @@ public GetTemplateResponse getTemplate(GetTemplateRequest request) throws IOExce
20062011
}
20072012

20082013
/**
2009-
* Get index templates. Get information about one or more index templates.
2014+
* Get legacy index templates. Get information about one or more index
2015+
* templates.
20102016
* <p>
20112017
* IMPORTANT: This documentation is about legacy index templates, which are
20122018
* deprecated and will be replaced by the composable templates introduced in
@@ -2027,7 +2033,8 @@ public final GetTemplateResponse getTemplate(
20272033
}
20282034

20292035
/**
2030-
* Get index templates. Get information about one or more index templates.
2036+
* Get legacy index templates. Get information about one or more index
2037+
* templates.
20312038
* <p>
20322039
* IMPORTANT: This documentation is about legacy index templates, which are
20332040
* deprecated and will be replaced by the composable templates introduced in
@@ -2684,7 +2691,7 @@ public PutIndicesSettingsResponse putSettings() throws IOException, Elasticsearc
26842691
// ----- Endpoint: indices.put_template
26852692

26862693
/**
2687-
* Create or update an index template. Index templates define settings,
2694+
* Create or update a legacy index template. Index templates define settings,
26882695
* mappings, and aliases that can be applied automatically to new indices.
26892696
* Elasticsearch applies templates to new indices based on an index pattern that
26902697
* matches the index name.
@@ -2728,7 +2735,7 @@ public PutTemplateResponse putTemplate(PutTemplateRequest request) throws IOExce
27282735
}
27292736

27302737
/**
2731-
* Create or update an index template. Index templates define settings,
2738+
* Create or update a legacy index template. Index templates define settings,
27322739
* mappings, and aliases that can be applied automatically to new indices.
27332740
* Elasticsearch applies templates to new indices based on an index pattern that
27342741
* matches the index name.

0 commit comments

Comments
 (0)