Skip to content

Commit dcc437b

Browse files
committed
[codegen] update to latest spec
1 parent 58f6bf9 commit dcc437b

File tree

5 files changed

+239
-95
lines changed

5 files changed

+239
-95
lines changed

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

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ public abstract class RangeQueryBase<T> extends QueryBase {
7272
@Nullable
7373
private final T lte;
7474

75-
@Nullable
76-
private final T from;
77-
78-
@Nullable
79-
private final T to;
80-
8175
@Nullable
8276
private final JsonpSerializer<T> tSerializer;
8377

@@ -91,8 +85,6 @@ protected RangeQueryBase(AbstractBuilder<T, ?> builder) {
9185
this.gte = builder.gte;
9286
this.lt = builder.lt;
9387
this.lte = builder.lte;
94-
this.from = builder.from;
95-
this.to = builder.to;
9688
this.tSerializer = builder.tSerializer;
9789

9890
}
@@ -147,28 +139,6 @@ public final T lte() {
147139
return this.lte;
148140
}
149141

150-
/**
151-
* API name: {@code from}
152-
*
153-
* @deprecated 8.16.0 Use gte or gt instead
154-
*/
155-
@Deprecated
156-
@Nullable
157-
public final T from() {
158-
return this.from;
159-
}
160-
161-
/**
162-
* API name: {@code to}
163-
*
164-
* @deprecated 8.16.0 Use lte or lt instead
165-
*/
166-
@Deprecated
167-
@Nullable
168-
public final T to() {
169-
return this.to;
170-
}
171-
172142
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
173143

174144
super.serializeInternal(generator, mapper);
@@ -196,16 +166,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
196166
JsonpUtils.serialize(this.lte, generator, tSerializer, mapper);
197167

198168
}
199-
if (this.from != null) {
200-
generator.writeKey("from");
201-
JsonpUtils.serialize(this.from, generator, tSerializer, mapper);
202-
203-
}
204-
if (this.to != null) {
205-
generator.writeKey("to");
206-
JsonpUtils.serialize(this.to, generator, tSerializer, mapper);
207-
208-
}
209169

210170
}
211171

@@ -227,12 +187,6 @@ public abstract static class AbstractBuilder<T, BuilderT extends AbstractBuilder
227187
@Nullable
228188
private T lte;
229189

230-
@Nullable
231-
private T from;
232-
233-
@Nullable
234-
private T to;
235-
236190
@Nullable
237191
private JsonpSerializer<T> tSerializer;
238192

@@ -286,28 +240,6 @@ public final BuilderT lte(@Nullable T value) {
286240
return self();
287241
}
288242

289-
/**
290-
* API name: {@code from}
291-
*
292-
* @deprecated 8.16.0 Use gte or gt instead
293-
*/
294-
@Deprecated
295-
public final BuilderT from(@Nullable T value) {
296-
this.from = value;
297-
return self();
298-
}
299-
300-
/**
301-
* API name: {@code to}
302-
*
303-
* @deprecated 8.16.0 Use lte or lt instead
304-
*/
305-
@Deprecated
306-
public final BuilderT to(@Nullable T value) {
307-
this.to = value;
308-
return self();
309-
}
310-
311243
/**
312244
* Serializer for T. If not set, an attempt will be made to find a serializer
313245
* from the JSON context.
@@ -328,8 +260,6 @@ protected static <T, BuilderT extends AbstractBuilder<T, BuilderT>> void setupRa
328260
op.add(AbstractBuilder::gte, tDeserializer, "gte");
329261
op.add(AbstractBuilder::lt, tDeserializer, "lt");
330262
op.add(AbstractBuilder::lte, tDeserializer, "lte");
331-
op.add(AbstractBuilder::from, tDeserializer, "from");
332-
op.add(AbstractBuilder::to, tDeserializer, "to");
333263

334264
}
335265

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

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@
904904
'_types.query_dsl.ConstantScoreQuery': '_types/query_dsl/compound.ts#L76-L86',
905905
'_types.query_dsl.DateDecayFunction': '_types/query_dsl/compound.ts#L209-L209',
906906
'_types.query_dsl.DateDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L71-L74',
907-
'_types.query_dsl.DateRangeQuery': '_types/query_dsl/term.ts#L161-L170',
907+
'_types.query_dsl.DateRangeQuery': '_types/query_dsl/term.ts#L157-L166',
908908
'_types.query_dsl.DecayFunction': '_types/query_dsl/compound.ts#L215-L224',
909909
'_types.query_dsl.DecayFunctionBase': '_types/query_dsl/compound.ts#L191-L202',
910910
'_types.query_dsl.DecayPlacement': '_types/query_dsl/compound.ts#L170-L189',
@@ -956,7 +956,7 @@
956956
'_types.query_dsl.MultiMatchQuery': '_types/query_dsl/fulltext.ts#L471-L557',
957957
'_types.query_dsl.MultiValueMode': '_types/query_dsl/compound.ts#L368-L385',
958958
'_types.query_dsl.NestedQuery': '_types/query_dsl/joining.ts#L112-L139',
959-
'_types.query_dsl.NumberRangeQuery': '_types/query_dsl/term.ts#L172-L172',
959+
'_types.query_dsl.NumberRangeQuery': '_types/query_dsl/term.ts#L168-L168',
960960
'_types.query_dsl.NumericDecayFunction': '_types/query_dsl/compound.ts#L208-L208',
961961
'_types.query_dsl.Operator': '_types/query_dsl/Operator.ts#L22-L27',
962962
'_types.query_dsl.ParentIdQuery': '_types/query_dsl/joining.ts#L141-L158',
@@ -968,16 +968,16 @@
968968
'_types.query_dsl.QueryContainer': '_types/query_dsl/abstractions.ts#L103-L434',
969969
'_types.query_dsl.QueryStringQuery': '_types/query_dsl/fulltext.ts#L598-L721',
970970
'_types.query_dsl.RandomScoreFunction': '_types/query_dsl/compound.ts#L144-L147',
971-
'_types.query_dsl.RangeQuery': '_types/query_dsl/term.ts#L176-L186',
972-
'_types.query_dsl.RangeQueryBase': '_types/query_dsl/term.ts#L122-L148',
973-
'_types.query_dsl.RangeRelation': '_types/query_dsl/term.ts#L188-L201',
971+
'_types.query_dsl.RangeQuery': '_types/query_dsl/term.ts#L172-L182',
972+
'_types.query_dsl.RangeQueryBase': '_types/query_dsl/term.ts#L122-L144',
973+
'_types.query_dsl.RangeRelation': '_types/query_dsl/term.ts#L184-L197',
974974
'_types.query_dsl.RankFeatureFunction': '_types/query_dsl/specialized.ts#L280-L280',
975975
'_types.query_dsl.RankFeatureFunctionLinear': '_types/query_dsl/specialized.ts#L282-L282',
976976
'_types.query_dsl.RankFeatureFunctionLogarithm': '_types/query_dsl/specialized.ts#L284-L289',
977977
'_types.query_dsl.RankFeatureFunctionSaturation': '_types/query_dsl/specialized.ts#L291-L296',
978978
'_types.query_dsl.RankFeatureFunctionSigmoid': '_types/query_dsl/specialized.ts#L298-L307',
979979
'_types.query_dsl.RankFeatureQuery': '_types/query_dsl/specialized.ts#L309-L335',
980-
'_types.query_dsl.RegexpQuery': '_types/query_dsl/term.ts#L203-L236',
980+
'_types.query_dsl.RegexpQuery': '_types/query_dsl/term.ts#L199-L232',
981981
'_types.query_dsl.RuleQuery': '_types/query_dsl/specialized.ts#L398-L405',
982982
'_types.query_dsl.ScriptQuery': '_types/query_dsl/specialized.ts#L337-L346',
983983
'_types.query_dsl.ScriptScoreFunction': '_types/query_dsl/compound.ts#L137-L142',
@@ -998,21 +998,21 @@
998998
'_types.query_dsl.SpanTermQuery': '_types/query_dsl/span.ts#L134-L141',
999999
'_types.query_dsl.SpanWithinQuery': '_types/query_dsl/span.ts#L143-L157',
10001000
'_types.query_dsl.SparseVectorQuery': '_types/query_dsl/SparseVectorQuery.ts#L26-L80',
1001-
'_types.query_dsl.TermQuery': '_types/query_dsl/term.ts#L238-L255',
1002-
'_types.query_dsl.TermRangeQuery': '_types/query_dsl/term.ts#L174-L174',
1003-
'_types.query_dsl.TermsLookup': '_types/query_dsl/term.ts#L270-L275',
1004-
'_types.query_dsl.TermsQuery': '_types/query_dsl/term.ts#L257-L263',
1005-
'_types.query_dsl.TermsQueryField': '_types/query_dsl/term.ts#L265-L268',
1006-
'_types.query_dsl.TermsSetQuery': '_types/query_dsl/term.ts#L277-L299',
1001+
'_types.query_dsl.TermQuery': '_types/query_dsl/term.ts#L234-L251',
1002+
'_types.query_dsl.TermRangeQuery': '_types/query_dsl/term.ts#L170-L170',
1003+
'_types.query_dsl.TermsLookup': '_types/query_dsl/term.ts#L266-L271',
1004+
'_types.query_dsl.TermsQuery': '_types/query_dsl/term.ts#L253-L259',
1005+
'_types.query_dsl.TermsQueryField': '_types/query_dsl/term.ts#L261-L264',
1006+
'_types.query_dsl.TermsSetQuery': '_types/query_dsl/term.ts#L273-L295',
10071007
'_types.query_dsl.TextExpansionQuery': '_types/query_dsl/TextExpansionQuery.ts#L23-L36',
10081008
'_types.query_dsl.TextQueryType': '_types/query_dsl/fulltext.ts#L559-L585',
10091009
'_types.query_dsl.TokenPruningConfig': '_types/query_dsl/TokenPruningConfig.ts#L22-L35',
1010-
'_types.query_dsl.TypeQuery': '_types/query_dsl/term.ts#L301-L303',
1010+
'_types.query_dsl.TypeQuery': '_types/query_dsl/term.ts#L297-L299',
10111011
'_types.query_dsl.UntypedDecayFunction': '_types/query_dsl/compound.ts#L204-L207',
10121012
'_types.query_dsl.UntypedDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L61-L64',
1013-
'_types.query_dsl.UntypedRangeQuery': '_types/query_dsl/term.ts#L150-L159',
1013+
'_types.query_dsl.UntypedRangeQuery': '_types/query_dsl/term.ts#L146-L155',
10141014
'_types.query_dsl.WeightedTokensQuery': '_types/query_dsl/WeightedTokensQuery.ts#L25-L33',
1015-
'_types.query_dsl.WildcardQuery': '_types/query_dsl/term.ts#L305-L325',
1015+
'_types.query_dsl.WildcardQuery': '_types/query_dsl/term.ts#L301-L321',
10161016
'_types.query_dsl.WrapperQuery': '_types/query_dsl/abstractions.ts#L508-L517',
10171017
'_types.query_dsl.ZeroTermsQuery': '_types/query_dsl/fulltext.ts#L587-L596',
10181018
'async_search._types.AsyncSearch': 'async_search/_types/AsyncSearch.ts#L30-L56',
@@ -1795,10 +1795,11 @@
17951795
'inference._types.HuggingFaceServiceSettings': 'inference/_types/CommonTypes.ts#L871-L892',
17961796
'inference._types.HuggingFaceServiceType': 'inference/_types/CommonTypes.ts#L898-L900',
17971797
'inference._types.HuggingFaceTaskType': 'inference/_types/CommonTypes.ts#L894-L896',
1798-
'inference._types.InferenceChunkingSettings': 'inference/_types/Services.ts#L71-L100',
1799-
'inference._types.InferenceEndpoint': 'inference/_types/Services.ts#L24-L44',
1800-
'inference._types.InferenceEndpointInfo': 'inference/_types/Services.ts#L46-L58',
1801-
'inference._types.InferenceEndpointInfoJinaAi': 'inference/_types/Services.ts#L60-L69',
1798+
'inference._types.InferenceChunkingSettings': 'inference/_types/Services.ts#L86-L115',
1799+
'inference._types.InferenceEndpoint': 'inference/_types/Services.ts#L28-L48',
1800+
'inference._types.InferenceEndpointInfo': 'inference/_types/Services.ts#L50-L62',
1801+
'inference._types.InferenceEndpointInfoAlibabaCloudAI': 'inference/_types/Services.ts#L75-L84',
1802+
'inference._types.InferenceEndpointInfoJinaAi': 'inference/_types/Services.ts#L64-L73',
18021803
'inference._types.InferenceResult': 'inference/_types/Results.ts#L117-L128',
18031804
'inference._types.JinaAIServiceSettings': 'inference/_types/CommonTypes.ts#L902-L931',
18041805
'inference._types.JinaAIServiceType': 'inference/_types/CommonTypes.ts#L961-L963',
@@ -1816,12 +1817,13 @@
18161817
'inference._types.OpenAITaskSettings': 'inference/_types/CommonTypes.ts#L1059-L1065',
18171818
'inference._types.OpenAITaskType': 'inference/_types/CommonTypes.ts#L1067-L1071',
18181819
'inference._types.RankedDocument': 'inference/_types/Results.ts#L91-L101',
1819-
'inference._types.RateLimitSetting': 'inference/_types/Services.ts#L106-L111',
1820+
'inference._types.RateLimitSetting': 'inference/_types/Services.ts#L121-L126',
18201821
'inference._types.RequestChatCompletion': 'inference/_types/CommonTypes.ts#L25-L60',
18211822
'inference._types.RerankedInferenceResult': 'inference/_types/Results.ts#L103-L108',
18221823
'inference._types.SparseEmbeddingInferenceResult': 'inference/_types/Results.ts#L40-L45',
18231824
'inference._types.SparseEmbeddingResult': 'inference/_types/Results.ts#L36-L38',
18241825
'inference._types.TaskType': 'inference/_types/TaskType.ts#L20-L29',
1826+
'inference._types.TaskTypeAlibabaCloudAI': 'inference/_types/TaskType.ts#L36-L41',
18251827
'inference._types.TaskTypeJinaAi': 'inference/_types/TaskType.ts#L31-L34',
18261828
'inference._types.TextEmbeddingByteResult': 'inference/_types/Results.ts#L53-L58',
18271829
'inference._types.TextEmbeddingInferenceResult': 'inference/_types/Results.ts#L67-L75',
@@ -3222,10 +3224,10 @@
32223224
if (hash.length > 1) {
32233225
hash = hash.substring(1);
32243226
}
3225-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/775d8a426268c989aae248f4ab1e99f70032cf15/specification/" + (paths[hash] || "");
3227+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/707cbdd537c7167d43fcb82aeee39c89ab7b883c/specification/" + (paths[hash] || "");
32263228
</script>
32273229
</head>
32283230
<body>
3229-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/775d8a426268c989aae248f4ab1e99f70032cf15/specification/">Elasticsearch API specification</a>.
3231+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/707cbdd537c7167d43fcb82aeee39c89ab7b883c/specification/">Elasticsearch API specification</a>.
32303232
</body>
32313233
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package co.elastic.clients.elasticsearch.inference;
21+
22+
import co.elastic.clients.json.JsonpDeserializable;
23+
import co.elastic.clients.json.JsonpDeserializer;
24+
import co.elastic.clients.json.JsonpMapper;
25+
import co.elastic.clients.json.ObjectBuilderDeserializer;
26+
import co.elastic.clients.json.ObjectDeserializer;
27+
import co.elastic.clients.util.ApiTypeHelper;
28+
import co.elastic.clients.util.ObjectBuilder;
29+
import co.elastic.clients.util.WithJsonObjectBuilderBase;
30+
import jakarta.json.stream.JsonGenerator;
31+
import java.lang.String;
32+
import java.util.Objects;
33+
import javax.annotation.Nullable;
34+
35+
//----------------------------------------------------------------
36+
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
37+
//----------------------------------------------------------------
38+
//
39+
// This code is generated from the Elasticsearch API specification
40+
// at https://github.com/elastic/elasticsearch-specification
41+
//
42+
// Manual updates to this file will be lost when the code is
43+
// re-generated.
44+
//
45+
// If you find a property that is missing or wrongly typed, please
46+
// open an issue or a PR on the API specification repository.
47+
//
48+
//----------------------------------------------------------------
49+
50+
// typedef: inference._types.InferenceEndpointInfoAlibabaCloudAI
51+
52+
/**
53+
*
54+
* @see <a href=
55+
* "../doc-files/api-spec.html#inference._types.InferenceEndpointInfoAlibabaCloudAI">API
56+
* specification</a>
57+
*/
58+
59+
public abstract class InferenceEndpointInfoAlibabaCloudAI extends InferenceEndpoint {
60+
private final String inferenceId;
61+
62+
private final TaskTypeAlibabaCloudAI taskType;
63+
64+
// ---------------------------------------------------------------------------------------------
65+
66+
protected InferenceEndpointInfoAlibabaCloudAI(AbstractBuilder<?> builder) {
67+
super(builder);
68+
69+
this.inferenceId = ApiTypeHelper.requireNonNull(builder.inferenceId, this, "inferenceId");
70+
this.taskType = ApiTypeHelper.requireNonNull(builder.taskType, this, "taskType");
71+
72+
}
73+
74+
/**
75+
* Required - The inference Id
76+
* <p>
77+
* API name: {@code inference_id}
78+
*/
79+
public final String inferenceId() {
80+
return this.inferenceId;
81+
}
82+
83+
/**
84+
* Required - The task type
85+
* <p>
86+
* API name: {@code task_type}
87+
*/
88+
public final TaskTypeAlibabaCloudAI taskType() {
89+
return this.taskType;
90+
}
91+
92+
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
93+
94+
super.serializeInternal(generator, mapper);
95+
generator.writeKey("inference_id");
96+
generator.write(this.inferenceId);
97+
98+
generator.writeKey("task_type");
99+
this.taskType.serialize(generator, mapper);
100+
101+
}
102+
103+
public abstract static class AbstractBuilder<BuilderT extends AbstractBuilder<BuilderT>>
104+
extends
105+
InferenceEndpoint.AbstractBuilder<BuilderT> {
106+
private String inferenceId;
107+
108+
private TaskTypeAlibabaCloudAI taskType;
109+
110+
/**
111+
* Required - The inference Id
112+
* <p>
113+
* API name: {@code inference_id}
114+
*/
115+
public final BuilderT inferenceId(String value) {
116+
this.inferenceId = value;
117+
return self();
118+
}
119+
120+
/**
121+
* Required - The task type
122+
* <p>
123+
* API name: {@code task_type}
124+
*/
125+
public final BuilderT taskType(TaskTypeAlibabaCloudAI value) {
126+
this.taskType = value;
127+
return self();
128+
}
129+
130+
}
131+
132+
// ---------------------------------------------------------------------------------------------
133+
protected static <BuilderT extends AbstractBuilder<BuilderT>> void setupInferenceEndpointInfoAlibabaCloudAIDeserializer(
134+
ObjectDeserializer<BuilderT> op) {
135+
InferenceEndpoint.setupInferenceEndpointDeserializer(op);
136+
op.add(AbstractBuilder::inferenceId, JsonpDeserializer.stringDeserializer(), "inference_id");
137+
op.add(AbstractBuilder::taskType, TaskTypeAlibabaCloudAI._DESERIALIZER, "task_type");
138+
139+
}
140+
141+
}

0 commit comments

Comments
 (0)