list) {
+ this.failures = _listAddAll(this.failures, list);
+ return this;
+ }
+
+ /**
+ * API name: {@code failures}
+ *
+ * Adds one or more values to failures
.
+ */
+ public final Builder failures(ShardFailure value, ShardFailure... values) {
+ this.failures = _listAdd(this.failures, value, values);
+ return this;
+ }
+
+ /**
+ * API name: {@code failures}
+ *
+ * Adds a value to failures
using a builder lambda.
+ */
+ public final Builder failures(Function> fn) {
+ return failures(fn.apply(new ShardFailure.Builder()).build());
+ }
+
+ @Override
+ protected Builder self() {
+ return this;
+ }
+
+ /**
+ * Builds a {@link ClusterDetails}.
+ *
+ * @throws NullPointerException
+ * if some of the required fields are null.
+ */
+ public ClusterDetails build() {
+ _checkSingleUse();
+
+ return new ClusterDetails(this);
+ }
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Json deserializer for {@link ClusterDetails}
+ */
+ public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new,
+ ClusterDetails::setupClusterDetailsDeserializer);
+
+ protected static void setupClusterDetailsDeserializer(ObjectDeserializer op) {
+
+ op.add(Builder::status, ClusterSearchStatus._DESERIALIZER, "status");
+ op.add(Builder::indices, JsonpDeserializer.stringDeserializer(), "indices");
+ op.add(Builder::took, JsonpDeserializer.longDeserializer(), "took");
+ op.add(Builder::timedOut, JsonpDeserializer.booleanDeserializer(), "timed_out");
+ op.add(Builder::shards, ShardStatistics._DESERIALIZER, "_shards");
+ op.add(Builder::failures, JsonpDeserializer.arrayDeserializer(ShardFailure._DESERIALIZER), "failures");
+
+ }
+
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterSearchStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterSearchStatus.java
new file mode 100644
index 000000000..07253da2c
--- /dev/null
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ClusterSearchStatus.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//----------------------------------------------------
+// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
+//----------------------------------------------------
+
+package co.elastic.clients.elasticsearch._types;
+
+import co.elastic.clients.json.JsonEnum;
+import co.elastic.clients.json.JsonpDeserializable;
+import co.elastic.clients.json.JsonpDeserializer;
+
+/**
+ *
+ * @see API
+ * specification
+ */
+@JsonpDeserializable
+public enum ClusterSearchStatus implements JsonEnum {
+ Running("running"),
+
+ Successful("successful"),
+
+ Partial("partial"),
+
+ Skipped("skipped"),
+
+ Failed("failed"),
+
+ ;
+
+ private final String jsonValue;
+
+ ClusterSearchStatus(String jsonValue) {
+ this.jsonValue = jsonValue;
+ }
+
+ public String jsonValue() {
+ return this.jsonValue;
+ }
+
+ public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>(
+ ClusterSearchStatus.values());
+}
diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java
index 437abb717..777f0e51a 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutTrainedModelVocabularyRequest.java
@@ -36,6 +36,7 @@
import co.elastic.clients.util.ApiTypeHelper;
import co.elastic.clients.util.ObjectBuilder;
import jakarta.json.stream.JsonGenerator;
+import java.lang.Double;
import java.lang.String;
import java.util.Collections;
import java.util.HashMap;
@@ -63,6 +64,8 @@ public class PutTrainedModelVocabularyRequest extends RequestBase implements Jso
private final String modelId;
+ private final List scores;
+
private final List vocabulary;
// ---------------------------------------------------------------------------------------------
@@ -71,6 +74,7 @@ private PutTrainedModelVocabularyRequest(Builder builder) {
this.merges = ApiTypeHelper.unmodifiable(builder.merges);
this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId");
+ this.scores = ApiTypeHelper.unmodifiable(builder.scores);
this.vocabulary = ApiTypeHelper.unmodifiableRequired(builder.vocabulary, this, "vocabulary");
}
@@ -98,6 +102,15 @@ public final String modelId() {
return this.modelId;
}
+ /**
+ * The optional vocabulary value scores if required by the tokenizer.
+ *
+ * API name: {@code scores}
+ */
+ public final List scores() {
+ return this.scores;
+ }
+
/**
* Required - The model vocabulary, which must not be empty.
*
@@ -127,6 +140,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
}
generator.writeEnd();
+ }
+ if (ApiTypeHelper.isDefined(this.scores)) {
+ generator.writeKey("scores");
+ generator.writeStartArray();
+ for (Double item0 : this.scores) {
+ generator.write(item0);
+
+ }
+ generator.writeEnd();
+
}
if (ApiTypeHelper.isDefined(this.vocabulary)) {
generator.writeKey("vocabulary");
@@ -155,6 +178,9 @@ public static class Builder extends RequestBase.AbstractBuilder
private String modelId;
+ @Nullable
+ private List scores;
+
private List vocabulary;
/**
@@ -191,6 +217,30 @@ public final Builder modelId(String value) {
return this;
}
+ /**
+ * The optional vocabulary value scores if required by the tokenizer.
+ *
+ * API name: {@code scores}
+ *
+ * Adds all elements of list
to scores
.
+ */
+ public final Builder scores(List list) {
+ this.scores = _listAddAll(this.scores, list);
+ return this;
+ }
+
+ /**
+ * The optional vocabulary value scores if required by the tokenizer.
+ *
+ * API name: {@code scores}
+ *
+ * Adds one or more values to scores
.
+ */
+ public final Builder scores(Double value, Double... values) {
+ this.scores = _listAdd(this.scores, value, values);
+ return this;
+ }
+
/**
* Required - The model vocabulary, which must not be empty.
*
@@ -245,6 +295,7 @@ protected static void setupPutTrainedModelVocabularyRequestDeserializer(
ObjectDeserializer op) {
op.add(Builder::merges, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "merges");
+ op.add(Builder::scores, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.doubleDeserializer()), "scores");
op.add(Builder::vocabulary, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()),
"vocabulary");