Skip to content

Commit 146cbb8

Browse files
[codegen] update to latest spec (#1252)
Co-authored-by: Laura Trotta <laura.trotta@elastic.co>
1 parent fe6dfb5 commit 146cbb8

3 files changed

Lines changed: 22 additions & 24 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3509,10 +3509,10 @@
35093509
if (hash.length > 1) {
35103510
hash = hash.substring(1);
35113511
}
3512-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/5ee1f7c137b141a3057b1800333cd6d4b1fc9dce/specification/" + (paths[hash] || "");
3512+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/31789f4216047ef7ba7969e31610fa2bbfe696b1/specification/" + (paths[hash] || "");
35133513
</script>
35143514
</head>
35153515
<body>
3516-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/5ee1f7c137b141a3057b1800333cd6d4b1fc9dce/specification/">Elasticsearch API specification</a>.
3516+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/31789f4216047ef7ba7969e31610fa2bbfe696b1/specification/">Elasticsearch API specification</a>.
35173517
</body>
35183518
</html>

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public class JinaAIServiceSettings implements JsonpSerializable {
7575
private final Integer dimensions;
7676

7777
@Nullable
78-
private final JinaAIElementType elementType;
78+
private final JinaAIElementType embeddingType;
7979

8080
// ---------------------------------------------------------------------------------------------
8181

@@ -86,7 +86,7 @@ private JinaAIServiceSettings(Builder builder) {
8686
this.rateLimit = builder.rateLimit;
8787
this.similarity = builder.similarity;
8888
this.dimensions = builder.dimensions;
89-
this.elementType = builder.elementType;
89+
this.embeddingType = builder.embeddingType;
9090

9191
}
9292

@@ -161,11 +161,11 @@ public final Integer dimensions() {
161161
* are encoded as bytes with signed int8 precision (this is a synonym of
162162
* <code>bit</code>). Use <code>float</code> for the default float embeddings.
163163
* <p>
164-
* API name: {@code element_type}
164+
* API name: {@code embedding_type}
165165
*/
166166
@Nullable
167-
public final JinaAIElementType elementType() {
168-
return this.elementType;
167+
public final JinaAIElementType embeddingType() {
168+
return this.embeddingType;
169169
}
170170

171171
/**
@@ -199,9 +199,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
199199
generator.write(this.dimensions);
200200

201201
}
202-
if (this.elementType != null) {
203-
generator.writeKey("element_type");
204-
this.elementType.serialize(generator, mapper);
202+
if (this.embeddingType != null) {
203+
generator.writeKey("embedding_type");
204+
this.embeddingType.serialize(generator, mapper);
205205
}
206206

207207
}
@@ -234,7 +234,7 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder>
234234
private Integer dimensions;
235235

236236
@Nullable
237-
private JinaAIElementType elementType;
237+
private JinaAIElementType embeddingType;
238238

239239
public Builder() {
240240
}
@@ -244,7 +244,7 @@ private Builder(JinaAIServiceSettings instance) {
244244
this.rateLimit = instance.rateLimit;
245245
this.similarity = instance.similarity;
246246
this.dimensions = instance.dimensions;
247-
this.elementType = instance.elementType;
247+
this.embeddingType = instance.embeddingType;
248248

249249
}
250250
/**
@@ -327,10 +327,10 @@ public final Builder dimensions(@Nullable Integer value) {
327327
* are encoded as bytes with signed int8 precision (this is a synonym of
328328
* <code>bit</code>). Use <code>float</code> for the default float embeddings.
329329
* <p>
330-
* API name: {@code element_type}
330+
* API name: {@code embedding_type}
331331
*/
332-
public final Builder elementType(@Nullable JinaAIElementType value) {
333-
this.elementType = value;
332+
public final Builder embeddingType(@Nullable JinaAIElementType value) {
333+
this.embeddingType = value;
334334
return this;
335335
}
336336

@@ -373,7 +373,7 @@ protected static void setupJinaAIServiceSettingsDeserializer(ObjectDeserializer<
373373
op.add(Builder::rateLimit, RateLimitSetting._DESERIALIZER, "rate_limit");
374374
op.add(Builder::similarity, JinaAISimilarityType._DESERIALIZER, "similarity");
375375
op.add(Builder::dimensions, JsonpDeserializer.integerDeserializer(), "dimensions");
376-
op.add(Builder::elementType, JinaAIElementType._DESERIALIZER, "element_type");
376+
op.add(Builder::embeddingType, JinaAIElementType._DESERIALIZER, "embedding_type");
377377

378378
}
379379

java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelRequest.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,9 @@ public final TrainedModelType modelType() {
253253
* processor architecture and OS combination, then this field specifies which.
254254
* The format of the string must match the platform identifiers used by
255255
* Elasticsearch, so one of, <code>linux-x86_64</code>,
256-
* <code>linux-aarch64</code>, <code>darwin-x86_64</code>,
257-
* <code>darwin-aarch64</code>, or <code>windows-x86_64</code>. For portable
258-
* models (those that work independent of processor architecture or OS
259-
* features), leave this field unset.
256+
* <code>linux-aarch64</code>, <code>darwin-aarch64</code>, or
257+
* <code>windows-x86_64</code>. For portable models (those that work independent
258+
* of processor architecture or OS features), leave this field unset.
260259
* <p>
261260
* API name: {@code platform_architecture}
262261
*/
@@ -597,10 +596,9 @@ public final Builder modelType(@Nullable TrainedModelType value) {
597596
* processor architecture and OS combination, then this field specifies which.
598597
* The format of the string must match the platform identifiers used by
599598
* Elasticsearch, so one of, <code>linux-x86_64</code>,
600-
* <code>linux-aarch64</code>, <code>darwin-x86_64</code>,
601-
* <code>darwin-aarch64</code>, or <code>windows-x86_64</code>. For portable
602-
* models (those that work independent of processor architecture or OS
603-
* features), leave this field unset.
599+
* <code>linux-aarch64</code>, <code>darwin-aarch64</code>, or
600+
* <code>windows-x86_64</code>. For portable models (those that work independent
601+
* of processor architecture or OS features), leave this field unset.
604602
* <p>
605603
* API name: {@code platform_architecture}
606604
*/

0 commit comments

Comments
 (0)