diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/aggregations/TermsBucketBase.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/aggregations/TermsBucketBase.java index 9c23b45a2d..69fdb3f7ba 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/aggregations/TermsBucketBase.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/aggregations/TermsBucketBase.java @@ -61,7 +61,10 @@ protected TermsBucketBase(AbstractBuilder builder) { } /** + * Upper bound of the document count error. Only present when show_term_doc_count_error is true. + *

* API name: {@code doc_count_error} + *

*/ @Nullable public final Long docCountError() { @@ -96,7 +99,10 @@ protected AbstractBuilder(AbstractBuilder o) { } /** + * Upper bound of the document count error. Only present when show_term_doc_count_error is true. + *

* API name: {@code doc_count_error} + *

*/ @Nonnull public final BuilderT docCountError(@Nullable Long value) { diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/query_dsl/AgenticQuery.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/query_dsl/AgenticQuery.java new file mode 100644 index 0000000000..5543104a44 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/query_dsl/AgenticQuery.java @@ -0,0 +1,306 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * 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. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package org.opensearch.client.opensearch._types.query_dsl; + +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.CopyableBuilder; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ToCopyableBuilder; + +// typedef: _types.query_dsl.AgenticQuery + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class AgenticQuery extends QueryBase implements QueryVariant, ToCopyableBuilder { + + @Nullable + private final String memoryId; + + @Nonnull + private final List queryFields; + + @Nonnull + private final String queryText; + + // --------------------------------------------------------------------------------------------- + + private AgenticQuery(Builder builder) { + super(builder); + this.memoryId = builder.memoryId; + this.queryFields = ApiTypeHelper.unmodifiable(builder.queryFields); + this.queryText = ApiTypeHelper.requireNonNull(builder.queryText, this, "queryText"); + } + + public static AgenticQuery of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * {@link Query} variant kind. + */ + @Override + public Query.Kind _queryKind() { + return Query.Kind.Agentic; + } + + /** + * The memory ID from a previous response, used to continue a conversation with prior context. Applicable for conversational agents + * only. + *

+ * API name: {@code memory_id} + *

+ */ + @Nullable + public final String memoryId() { + return this.memoryId; + } + + /** + * A list of index fields that the agent should consider when generating the search query. + *

+ * API name: {@code query_fields} + *

+ */ + @Nonnull + public final List queryFields() { + return this.queryFields; + } + + /** + * Required - The natural language question to be answered by the agent. + *

+ * API name: {@code query_text} + *

+ */ + @Nonnull + public final String queryText() { + return this.queryText; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + super.serializeInternal(generator, mapper); + if (this.memoryId != null) { + generator.writeKey("memory_id"); + generator.write(this.memoryId); + } + + if (ApiTypeHelper.isDefined(this.queryFields)) { + generator.writeKey("query_fields"); + generator.writeStartArray(); + for (String item0 : this.queryFields) { + generator.write(item0); + } + generator.writeEnd(); + } + + generator.writeKey("query_text"); + generator.write(this.queryText); + } + + // --------------------------------------------------------------------------------------------- + + @Override + @Nonnull + public Builder toBuilder() { + return new Builder(this); + } + + @Nonnull + public static Builder builder() { + return new Builder(); + } + + /** + * Builder for {@link AgenticQuery}. + */ + public static class Builder extends QueryBase.AbstractBuilder implements CopyableBuilder { + @Nullable + private String memoryId; + @Nullable + private List queryFields; + private String queryText; + + public Builder() {} + + private Builder(AgenticQuery o) { + super(o); + this.memoryId = o.memoryId; + this.queryFields = _listCopy(o.queryFields); + this.queryText = o.queryText; + } + + private Builder(Builder o) { + super(o); + this.memoryId = o.memoryId; + this.queryFields = _listCopy(o.queryFields); + this.queryText = o.queryText; + } + + @Override + @Nonnull + public Builder copy() { + return new Builder(this); + } + + @Override + @Nonnull + protected Builder self() { + return this; + } + + /** + * The memory ID from a previous response, used to continue a conversation with prior context. Applicable for conversational agents + * only. + *

+ * API name: {@code memory_id} + *

+ */ + @Nonnull + public final Builder memoryId(@Nullable String value) { + this.memoryId = value; + return this; + } + + /** + * A list of index fields that the agent should consider when generating the search query. + *

+ * API name: {@code query_fields} + *

+ * + *

+ * Adds all elements of list to queryFields. + *

+ */ + @Nonnull + public final Builder queryFields(List list) { + this.queryFields = _listAddAll(this.queryFields, list); + return this; + } + + /** + * A list of index fields that the agent should consider when generating the search query. + *

+ * API name: {@code query_fields} + *

+ * + *

+ * Adds one or more values to queryFields. + *

+ */ + @Nonnull + public final Builder queryFields(String value, String... values) { + this.queryFields = _listAdd(this.queryFields, value, values); + return this; + } + + /** + * Required - The natural language question to be answered by the agent. + *

+ * API name: {@code query_text} + *

+ */ + @Nonnull + public final Builder queryText(String value) { + this.queryText = value; + return this; + } + + /** + * Builds a {@link AgenticQuery}. + * + * @throws NullPointerException if some of the required fields are null. + */ + @Override + @Nonnull + public AgenticQuery build() { + _checkSingleUse(); + + return new AgenticQuery(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link AgenticQuery} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + AgenticQuery::setupAgenticQueryDeserializer + ); + + protected static void setupAgenticQueryDeserializer(ObjectDeserializer op) { + setupQueryBaseDeserializer(op); + op.add(Builder::memoryId, JsonpDeserializer.stringDeserializer(), "memory_id"); + op.add(Builder::queryFields, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "query_fields"); + op.add(Builder::queryText, JsonpDeserializer.stringDeserializer(), "query_text"); + } + + @Override + public int hashCode() { + int result = super.hashCode(); + result = 31 * result + Objects.hashCode(this.memoryId); + result = 31 * result + Objects.hashCode(this.queryFields); + result = 31 * result + this.queryText.hashCode(); + return result; + } + + @Override + public boolean equals(Object o) { + if (!super.equals(o)) { + return false; + } + if (this == o) return true; + if (o == null || this.getClass() != o.getClass()) return false; + AgenticQuery other = (AgenticQuery) o; + return Objects.equals(this.memoryId, other.memoryId) + && Objects.equals(this.queryFields, other.queryFields) + && this.queryText.equals(other.queryText); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java index 6186db7e45..c3255666c1 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java @@ -68,6 +68,7 @@ public class Query implements TaggedUnion, AggregationVarian * {@link Query} variant kinds. */ public enum Kind implements JsonEnum { + Agentic("agentic"), Bool("bool"), Boosting("boosting"), CombinedFields("combined_fields"), @@ -173,6 +174,22 @@ public static Query of(Function> fn) { return fn.apply(new Builder()).build(); } + /** + * Is this variant instance of kind {@code agentic}? + */ + public boolean isAgentic() { + return _kind == Kind.Agentic; + } + + /** + * Get the {@code agentic} variant value. + * + * @throws IllegalStateException if the current variant is not the {@code agentic} kind. + */ + public AgenticQuery agentic() { + return TaggedUnionUtils.get(this, Kind.Agentic); + } + /** * Is this variant instance of kind {@code bool}? */ @@ -1127,6 +1144,16 @@ private Builder(Query o) { this._value = o._value; } + public ObjectBuilder agentic(AgenticQuery v) { + this._kind = Kind.Agentic; + this._value = v; + return this; + } + + public ObjectBuilder agentic(Function> fn) { + return this.agentic(fn.apply(new AgenticQuery.Builder()).build()); + } + public ObjectBuilder bool(BoolQuery v) { this._kind = Kind.Bool; this._value = v; @@ -1701,6 +1728,7 @@ public Query build() { } protected static void setupQueryDeserializer(ObjectDeserializer op) { + op.add(Builder::agentic, AgenticQuery._DESERIALIZER, "agentic"); op.add(Builder::bool, BoolQuery._DESERIALIZER, "bool"); op.add(Builder::boosting, BoostingQuery._DESERIALIZER, "boosting"); op.add(Builder::combinedFields, CombinedFieldsQuery._DESERIALIZER, "combined_fields"); diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java index ae3c17b27d..1fb6cde855 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/query_dsl/QueryBuilders.java @@ -50,6 +50,13 @@ public class QueryBuilders { private QueryBuilders() {} + /** + * Creates a builder for the {@link AgenticQuery agentic} {@code Query} variant. + */ + public static AgenticQuery.Builder agentic() { + return new AgenticQuery.Builder(); + } + /** * Creates a builder for the {@link BoolQuery bool} {@code Query} variant. */ diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorRequest.java index 5a8a817939..d9b6fd9ccb 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorRequest.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorRequest.java @@ -21,7 +21,6 @@ import javax.annotation.Generated; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -65,7 +64,7 @@ public final class CreateConnectorRequest extends RequestBase private final String name; @Nonnull - private final Map parameters; + private final Parameters parameters; @Nonnull private final ConnectorProtocol protocol; @@ -81,7 +80,7 @@ private CreateConnectorRequest(Builder builder) { this.credential = ApiTypeHelper.requireNonNull(builder.credential, this, "credential"); this.description = ApiTypeHelper.requireNonNull(builder.description, this, "description"); this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); - this.parameters = ApiTypeHelper.unmodifiableRequired(builder.parameters, this, "parameters"); + this.parameters = ApiTypeHelper.requireNonNull(builder.parameters, this, "parameters"); this.protocol = ApiTypeHelper.requireNonNull(builder.protocol, this, "protocol"); this.version = ApiTypeHelper.requireNonNull(builder.version, this, "version"); } @@ -134,7 +133,7 @@ public final String name() { * Required - API name: {@code parameters} */ @Nonnull - public final Map parameters() { + public final Parameters parameters() { return this.parameters; } @@ -186,12 +185,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.name); generator.writeKey("parameters"); - generator.writeStartObject(); - for (Map.Entry item0 : this.parameters.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - } - generator.writeEnd(); + this.parameters.serialize(generator, mapper); generator.writeKey("protocol"); this.protocol.serialize(generator, mapper); @@ -223,7 +217,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Credential credential; private String description; private String name; - private Map parameters; + private Parameters parameters; private ConnectorProtocol protocol; private Integer version; @@ -236,7 +230,7 @@ private Builder(CreateConnectorRequest o) { this.credential = o.credential; this.description = o.description; this.name = o.name; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.protocol = o.protocol; this.version = o.version; } @@ -248,7 +242,7 @@ private Builder(Builder o) { this.credential = o.credential; this.description = o.description; this.name = o.name; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.protocol = o.protocol; this.version = o.version; } @@ -357,28 +351,19 @@ public final Builder name(String value) { /** * Required - API name: {@code parameters} - * - *

- * Adds all elements of map to parameters. - *

*/ @Nonnull - public final Builder parameters(Map map) { - this.parameters = _mapPutAll(this.parameters, map); + public final Builder parameters(Parameters value) { + this.parameters = value; return this; } /** * Required - API name: {@code parameters} - * - *

- * Adds an entry to parameters. - *

*/ @Nonnull - public final Builder parameters(String key, JsonData value) { - this.parameters = _mapPut(this.parameters, key, value); - return this; + public final Builder parameters(Function> fn) { + return parameters(fn.apply(new Parameters.Builder()).build()); } /** @@ -429,7 +414,7 @@ protected static void setupCreateConnectorRequestDeserializer(ObjectDeserializer op.add(Builder::credential, Credential._DESERIALIZER, "credential"); op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters"); op.add(Builder::protocol, ConnectorProtocol._DESERIALIZER, "protocol"); op.add(Builder::version, JsonpDeserializer.integerDeserializer(), "version"); } diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteAgentRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteAgentRequest.java index c05e65554e..6f80d90413 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteAgentRequest.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteAgentRequest.java @@ -20,7 +20,6 @@ import javax.annotation.Generated; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -52,7 +51,7 @@ public final class ExecuteAgentRequest extends RequestBase private final String agentId; @Nonnull - private final Map parameters; + private final Parameters parameters; @Nullable private final Boolean parametersVerbose; @@ -62,7 +61,7 @@ public final class ExecuteAgentRequest extends RequestBase private ExecuteAgentRequest(Builder builder) { super(builder); this.agentId = ApiTypeHelper.requireNonNull(builder.agentId, this, "agentId"); - this.parameters = ApiTypeHelper.unmodifiableRequired(builder.parameters, this, "parameters"); + this.parameters = ApiTypeHelper.requireNonNull(builder.parameters, this, "parameters"); this.parametersVerbose = builder.parametersVerbose; } @@ -82,7 +81,7 @@ public final String agentId() { * Required - API name: {@code parameters} */ @Nonnull - public final Map parameters() { + public final Parameters parameters() { return this.parameters; } @@ -109,12 +108,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("parameters"); - generator.writeStartObject(); - for (Map.Entry item0 : this.parameters.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - } - generator.writeEnd(); + this.parameters.serialize(generator, mapper); if (this.parametersVerbose != null) { generator.writeKey("parameters.verbose"); @@ -140,7 +134,7 @@ public static Builder builder() { */ public static class Builder extends RequestBase.AbstractBuilder implements CopyableBuilder { private String agentId; - private Map parameters; + private Parameters parameters; @Nullable private Boolean parametersVerbose; @@ -149,14 +143,14 @@ public Builder() {} private Builder(ExecuteAgentRequest o) { super(o); this.agentId = o.agentId; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.parametersVerbose = o.parametersVerbose; } private Builder(Builder o) { super(o); this.agentId = o.agentId; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.parametersVerbose = o.parametersVerbose; } @@ -183,28 +177,19 @@ public final Builder agentId(String value) { /** * Required - API name: {@code parameters} - * - *

- * Adds all elements of map to parameters. - *

*/ @Nonnull - public final Builder parameters(Map map) { - this.parameters = _mapPutAll(this.parameters, map); + public final Builder parameters(Parameters value) { + this.parameters = value; return this; } /** * Required - API name: {@code parameters} - * - *

- * Adds an entry to parameters. - *

*/ @Nonnull - public final Builder parameters(String key, JsonData value) { - this.parameters = _mapPut(this.parameters, key, value); - return this; + public final Builder parameters(Function> fn) { + return parameters(fn.apply(new Parameters.Builder()).build()); } /** @@ -244,7 +229,7 @@ public ExecuteAgentRequest build() { ); protected static void setupExecuteAgentRequestDeserializer(ObjectDeserializer op) { - op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters"); op.add(Builder::parametersVerbose, JsonpDeserializer.booleanDeserializer(), "parameters.verbose"); } diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteAgentStreamRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteAgentStreamRequest.java index 2e4cd24e03..4b68e565c8 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteAgentStreamRequest.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteAgentStreamRequest.java @@ -18,7 +18,6 @@ import java.util.function.Function; import javax.annotation.Generated; import javax.annotation.Nonnull; -import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -50,14 +49,14 @@ public final class ExecuteAgentStreamRequest extends RequestBase private final String agentId; @Nonnull - private final Map parameters; + private final Parameters parameters; // --------------------------------------------------------------------------------------------- private ExecuteAgentStreamRequest(Builder builder) { super(builder); this.agentId = ApiTypeHelper.requireNonNull(builder.agentId, this, "agentId"); - this.parameters = ApiTypeHelper.unmodifiableRequired(builder.parameters, this, "parameters"); + this.parameters = ApiTypeHelper.requireNonNull(builder.parameters, this, "parameters"); } public static ExecuteAgentStreamRequest of(Function> fn) { @@ -76,7 +75,7 @@ public final String agentId() { * Required - API name: {@code parameters} */ @Nonnull - public final Map parameters() { + public final Parameters parameters() { return this.parameters; } @@ -92,12 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("parameters"); - generator.writeStartObject(); - for (Map.Entry item0 : this.parameters.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - } - generator.writeEnd(); + this.parameters.serialize(generator, mapper); } // --------------------------------------------------------------------------------------------- @@ -120,20 +114,20 @@ public static class Builder extends RequestBase.AbstractBuilder implements CopyableBuilder { private String agentId; - private Map parameters; + private Parameters parameters; public Builder() {} private Builder(ExecuteAgentStreamRequest o) { super(o); this.agentId = o.agentId; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; } private Builder(Builder o) { super(o); this.agentId = o.agentId; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; } @Override @@ -159,28 +153,19 @@ public final Builder agentId(String value) { /** * Required - API name: {@code parameters} - * - *

- * Adds all elements of map to parameters. - *

*/ @Nonnull - public final Builder parameters(Map map) { - this.parameters = _mapPutAll(this.parameters, map); + public final Builder parameters(Parameters value) { + this.parameters = value; return this; } /** * Required - API name: {@code parameters} - * - *

- * Adds an entry to parameters. - *

*/ @Nonnull - public final Builder parameters(String key, JsonData value) { - this.parameters = _mapPut(this.parameters, key, value); - return this; + public final Builder parameters(Function> fn) { + return parameters(fn.apply(new Parameters.Builder()).build()); } /** @@ -208,7 +193,7 @@ public ExecuteAgentStreamRequest build() { ); protected static void setupExecuteAgentStreamRequestDeserializer(ObjectDeserializer op) { - op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters"); } // --------------------------------------------------------------------------------------------- diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteToolRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteToolRequest.java index 62b5e47933..5eaf7fe1d2 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteToolRequest.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ExecuteToolRequest.java @@ -20,7 +20,6 @@ import javax.annotation.Generated; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -48,8 +47,8 @@ public final class ExecuteToolRequest extends RequestBase PlainJsonSerializable, ToCopyableBuilder { - @Nonnull - private final Map parameters; + @Nullable + private final Parameters parameters; @Nonnull private final ToolName toolName; @@ -58,7 +57,7 @@ public final class ExecuteToolRequest extends RequestBase private ExecuteToolRequest(Builder builder) { super(builder); - this.parameters = ApiTypeHelper.unmodifiable(builder.parameters); + this.parameters = builder.parameters; this.toolName = ApiTypeHelper.requireNonNull(builder.toolName, this, "toolName"); } @@ -69,8 +68,8 @@ public static ExecuteToolRequest of(Function parameters() { + @Nullable + public final Parameters parameters() { return this.parameters; } @@ -93,14 +92,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - if (ApiTypeHelper.isDefined(this.parameters)) { + if (this.parameters != null) { generator.writeKey("parameters"); - generator.writeStartObject(); - for (Map.Entry item0 : this.parameters.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - } - generator.writeEnd(); + this.parameters.serialize(generator, mapper); } } @@ -122,20 +116,20 @@ public static Builder builder() { */ public static class Builder extends RequestBase.AbstractBuilder implements CopyableBuilder { @Nullable - private Map parameters; + private Parameters parameters; private ToolName toolName; public Builder() {} private Builder(ExecuteToolRequest o) { super(o); - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.toolName = o.toolName; } private Builder(Builder o) { super(o); - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.toolName = o.toolName; } @@ -153,28 +147,19 @@ protected Builder self() { /** * API name: {@code parameters} - * - *

- * Adds all elements of map to parameters. - *

*/ @Nonnull - public final Builder parameters(Map map) { - this.parameters = _mapPutAll(this.parameters, map); + public final Builder parameters(@Nullable Parameters value) { + this.parameters = value; return this; } /** * API name: {@code parameters} - * - *

- * Adds an entry to parameters. - *

*/ @Nonnull - public final Builder parameters(String key, JsonData value) { - this.parameters = _mapPut(this.parameters, key, value); - return this; + public final Builder parameters(Function> fn) { + return parameters(fn.apply(new Parameters.Builder()).build()); } /** @@ -211,7 +196,7 @@ public ExecuteToolRequest build() { ); protected static void setupExecuteToolRequestDeserializer(ObjectDeserializer op) { - op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters"); } // --------------------------------------------------------------------------------------------- diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetConnectorResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetConnectorResponse.java index 5547557a82..27e23ac738 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetConnectorResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetConnectorResponse.java @@ -14,13 +14,11 @@ import jakarta.json.stream.JsonGenerator; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Generated; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -54,8 +52,8 @@ public class GetConnectorResponse implements PlainJsonSerializable, ToCopyableBu @Nullable private final String name; - @Nonnull - private final Map parameters; + @Nullable + private final Parameters parameters; @Nullable private final ConnectorProtocol protocol; @@ -71,7 +69,7 @@ private GetConnectorResponse(Builder builder) { this.description = builder.description; this.lastUpdatedTime = builder.lastUpdatedTime; this.name = builder.name; - this.parameters = ApiTypeHelper.unmodifiable(builder.parameters); + this.parameters = builder.parameters; this.protocol = builder.protocol; this.version = builder.version; } @@ -132,8 +130,8 @@ public final String name() { /** * API name: {@code parameters} */ - @Nonnull - public final Map parameters() { + @Nullable + public final Parameters parameters() { return this.parameters; } @@ -193,14 +191,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.name); } - if (ApiTypeHelper.isDefined(this.parameters)) { + if (this.parameters != null) { generator.writeKey("parameters"); - generator.writeStartObject(); - for (Map.Entry item0 : this.parameters.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - } - generator.writeEnd(); + this.parameters.serialize(generator, mapper); } if (this.protocol != null) { @@ -242,7 +235,7 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder @Nullable private String name; @Nullable - private Map parameters; + private Parameters parameters; @Nullable private ConnectorProtocol protocol; @Nullable @@ -256,7 +249,7 @@ private Builder(GetConnectorResponse o) { this.description = o.description; this.lastUpdatedTime = o.lastUpdatedTime; this.name = o.name; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.protocol = o.protocol; this.version = o.version; } @@ -267,7 +260,7 @@ private Builder(Builder o) { this.description = o.description; this.lastUpdatedTime = o.lastUpdatedTime; this.name = o.name; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.protocol = o.protocol; this.version = o.version; } @@ -363,28 +356,19 @@ public final Builder name(@Nullable String value) { /** * API name: {@code parameters} - * - *

- * Adds all elements of map to parameters. - *

*/ @Nonnull - public final Builder parameters(Map map) { - this.parameters = _mapPutAll(this.parameters, map); + public final Builder parameters(@Nullable Parameters value) { + this.parameters = value; return this; } /** * API name: {@code parameters} - * - *

- * Adds an entry to parameters. - *

*/ @Nonnull - public final Builder parameters(String key, JsonData value) { - this.parameters = _mapPut(this.parameters, key, value); - return this; + public final Builder parameters(Function> fn) { + return parameters(fn.apply(new Parameters.Builder()).build()); } /** @@ -435,7 +419,7 @@ protected static void setupGetConnectorResponseDeserializer(ObjectDeserializer parameters; + @Nullable + private final Parameters parameters; // --------------------------------------------------------------------------------------------- private LLM(Builder builder) { this.modelId = builder.modelId; - this.parameters = ApiTypeHelper.unmodifiable(builder.parameters); + this.parameters = builder.parameters; } public static LLM of(Function> fn) { @@ -66,8 +63,8 @@ public final String modelId() { /** * API name: {@code parameters} */ - @Nonnull - public final Map parameters() { + @Nullable + public final Parameters parameters() { return this.parameters; } @@ -87,14 +84,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.modelId); } - if (ApiTypeHelper.isDefined(this.parameters)) { + if (this.parameters != null) { generator.writeKey("parameters"); - generator.writeStartObject(); - for (Map.Entry item0 : this.parameters.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - } - generator.writeEnd(); + this.parameters.serialize(generator, mapper); } } @@ -118,18 +110,18 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder @Nullable private String modelId; @Nullable - private Map parameters; + private Parameters parameters; public Builder() {} private Builder(LLM o) { this.modelId = o.modelId; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; } private Builder(Builder o) { this.modelId = o.modelId; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; } @Override @@ -149,28 +141,19 @@ public final Builder modelId(@Nullable String value) { /** * API name: {@code parameters} - * - *

- * Adds all elements of map to parameters. - *

*/ @Nonnull - public final Builder parameters(Map map) { - this.parameters = _mapPutAll(this.parameters, map); + public final Builder parameters(@Nullable Parameters value) { + this.parameters = value; return this; } /** * API name: {@code parameters} - * - *

- * Adds an entry to parameters. - *

*/ @Nonnull - public final Builder parameters(String key, JsonData value) { - this.parameters = _mapPut(this.parameters, key, value); - return this; + public final Builder parameters(Function> fn) { + return parameters(fn.apply(new Parameters.Builder()).build()); } /** @@ -196,7 +179,7 @@ public LLM build() { protected static void setupLLMDeserializer(ObjectDeserializer op) { op.add(Builder::modelId, JsonpDeserializer.stringDeserializer(), "model_id"); - op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters"); } @Override diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/MemoryContainerConfiguration.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/MemoryContainerConfiguration.java index c6b19994c4..e0c2d446e4 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/MemoryContainerConfiguration.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/MemoryContainerConfiguration.java @@ -14,13 +14,11 @@ import jakarta.json.stream.JsonGenerator; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Generated; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -69,8 +67,8 @@ public class MemoryContainerConfiguration @Nullable private final Long maxInferSize; - @Nonnull - private final Map parameters; + @Nullable + private final Parameters parameters; @Nonnull private final List strategies; @@ -90,7 +88,7 @@ private MemoryContainerConfiguration(Builder builder) { this.indexSettings = builder.indexSettings; this.llmId = builder.llmId; this.maxInferSize = builder.maxInferSize; - this.parameters = ApiTypeHelper.unmodifiable(builder.parameters); + this.parameters = builder.parameters; this.strategies = ApiTypeHelper.unmodifiable(builder.strategies); this.useSystemIndex = builder.useSystemIndex; } @@ -200,8 +198,8 @@ public final Long maxInferSize() { /** * API name: {@code parameters} */ - @Nonnull - public final Map parameters() { + @Nullable + public final Parameters parameters() { return this.parameters; } @@ -280,14 +278,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.maxInferSize); } - if (ApiTypeHelper.isDefined(this.parameters)) { + if (this.parameters != null) { generator.writeKey("parameters"); - generator.writeStartObject(); - for (Map.Entry item0 : this.parameters.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - } - generator.writeEnd(); + this.parameters.serialize(generator, mapper); } if (ApiTypeHelper.isDefined(this.strategies)) { @@ -341,7 +334,7 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder @Nullable private Long maxInferSize; @Nullable - private Map parameters; + private Parameters parameters; @Nullable private List strategies; @Nullable @@ -359,7 +352,7 @@ private Builder(MemoryContainerConfiguration o) { this.indexSettings = o.indexSettings; this.llmId = o.llmId; this.maxInferSize = o.maxInferSize; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.strategies = _listCopy(o.strategies); this.useSystemIndex = o.useSystemIndex; } @@ -374,7 +367,7 @@ private Builder(Builder o) { this.indexSettings = o.indexSettings; this.llmId = o.llmId; this.maxInferSize = o.maxInferSize; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.strategies = _listCopy(o.strategies); this.useSystemIndex = o.useSystemIndex; } @@ -500,28 +493,19 @@ public final Builder maxInferSize(@Nullable Long value) { /** * API name: {@code parameters} - * - *

- * Adds all elements of map to parameters. - *

*/ @Nonnull - public final Builder parameters(Map map) { - this.parameters = _mapPutAll(this.parameters, map); + public final Builder parameters(@Nullable Parameters value) { + this.parameters = value; return this; } /** * API name: {@code parameters} - * - *

- * Adds an entry to parameters. - *

*/ @Nonnull - public final Builder parameters(String key, JsonData value) { - this.parameters = _mapPut(this.parameters, key, value); - return this; + public final Builder parameters(Function> fn) { + return parameters(fn.apply(new Parameters.Builder()).build()); } /** @@ -608,7 +592,7 @@ protected static void setupMemoryContainerConfigurationDeserializer(ObjectDeseri op.add(Builder::indexSettings, IndexSettings._DESERIALIZER, "index_settings"); op.add(Builder::llmId, JsonpDeserializer.stringDeserializer(), "llm_id"); op.add(Builder::maxInferSize, JsonpDeserializer.longDeserializer(), "max_infer_size"); - op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters"); op.add(Builder::strategies, JsonpDeserializer.arrayDeserializer(Strategy._DESERIALIZER), "strategies"); op.add(Builder::useSystemIndex, JsonpDeserializer.booleanDeserializer(), "use_system_index"); } diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Messages.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Messages.java new file mode 100644 index 0000000000..69f5a65bea --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Messages.java @@ -0,0 +1,207 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package org.opensearch.client.opensearch.ml; + +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.json.PlainJsonSerializable; +import org.opensearch.client.util.CopyableBuilder; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; +import org.opensearch.client.util.ToCopyableBuilder; + +// typedef: ml.Messages + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class Messages implements PlainJsonSerializable, ToCopyableBuilder { + + @Nullable + private final String content; + + @Nullable + private final String role; + + // --------------------------------------------------------------------------------------------- + + private Messages(Builder builder) { + this.content = builder.content; + this.role = builder.role; + } + + public static Messages of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * The content of the message. + *

+ * API name: {@code content} + *

+ */ + @Nullable + public final String content() { + return this.content; + } + + /** + * The role of the message. + *

+ * API name: {@code role} + *

+ */ + @Nullable + public final String role() { + return this.role; + } + + /** + * Serialize this object to JSON. + */ + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + if (this.content != null) { + generator.writeKey("content"); + generator.write(this.content); + } + + if (this.role != null) { + generator.writeKey("role"); + generator.write(this.role); + } + } + + // --------------------------------------------------------------------------------------------- + + @Override + @Nonnull + public Builder toBuilder() { + return new Builder(this); + } + + @Nonnull + public static Builder builder() { + return new Builder(); + } + + /** + * Builder for {@link Messages}. + */ + public static class Builder extends ObjectBuilderBase implements CopyableBuilder { + @Nullable + private String content; + @Nullable + private String role; + + public Builder() {} + + private Builder(Messages o) { + this.content = o.content; + this.role = o.role; + } + + private Builder(Builder o) { + this.content = o.content; + this.role = o.role; + } + + @Override + @Nonnull + public Builder copy() { + return new Builder(this); + } + + /** + * The content of the message. + *

+ * API name: {@code content} + *

+ */ + @Nonnull + public final Builder content(@Nullable String value) { + this.content = value; + return this; + } + + /** + * The role of the message. + *

+ * API name: {@code role} + *

+ */ + @Nonnull + public final Builder role(@Nullable String value) { + this.role = value; + return this; + } + + /** + * Builds a {@link Messages}. + * + * @throws NullPointerException if some of the required fields are null. + */ + @Override + @Nonnull + public Messages build() { + _checkSingleUse(); + + return new Messages(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Messages} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + Messages::setupMessagesDeserializer + ); + + protected static void setupMessagesDeserializer(ObjectDeserializer op) { + op.add(Builder::content, JsonpDeserializer.stringDeserializer(), "content"); + op.add(Builder::role, JsonpDeserializer.stringDeserializer(), "role"); + } + + @Override + public int hashCode() { + int result = 17; + result = 31 * result + Objects.hashCode(this.content); + result = 31 * result + Objects.hashCode(this.role); + return result; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || this.getClass() != o.getClass()) return false; + Messages other = (Messages) o; + return Objects.equals(this.content, other.content) && Objects.equals(this.role, other.role); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Parameters.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Parameters.java new file mode 100644 index 0000000000..0fc173cb57 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Parameters.java @@ -0,0 +1,349 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package org.opensearch.client.opensearch.ml; + +import jakarta.json.stream.JsonGenerator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import org.opensearch.client.json.JsonData; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.json.PlainJsonSerializable; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.CopyableBuilder; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; +import org.opensearch.client.util.ToCopyableBuilder; + +// typedef: ml.Parameters + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class Parameters implements PlainJsonSerializable, ToCopyableBuilder { + + @Nullable + private final String inputs; + + @Nullable + private final String llmInterface; + + @Nonnull + private final List messages; + + @Nonnull + private final Map metadata; + + @Nullable + private final String question; + + // --------------------------------------------------------------------------------------------- + + private Parameters(Builder builder) { + this.inputs = builder.inputs; + this.llmInterface = builder.llmInterface; + this.messages = ApiTypeHelper.unmodifiable(builder.messages); + this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); + this.question = builder.question; + } + + public static Parameters of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code inputs} + */ + @Nullable + public final String inputs() { + return this.inputs; + } + + /** + * API name: {@code _llm_interface} + */ + @Nullable + public final String llmInterface() { + return this.llmInterface; + } + + /** + * API name: {@code messages} + */ + @Nonnull + public final List messages() { + return this.messages; + } + + @Nonnull + public final Map metadata() { + return this.metadata; + } + + /** + * API name: {@code question} + */ + @Nullable + public final String question() { + return this.question; + } + + /** + * Serialize this object to JSON. + */ + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + for (Map.Entry item0 : this.metadata.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + } + if (this.inputs != null) { + generator.writeKey("inputs"); + generator.write(this.inputs); + } + + if (this.llmInterface != null) { + generator.writeKey("_llm_interface"); + generator.write(this.llmInterface); + } + + if (ApiTypeHelper.isDefined(this.messages)) { + generator.writeKey("messages"); + generator.writeStartArray(); + for (Messages item0 : this.messages) { + item0.serialize(generator, mapper); + } + generator.writeEnd(); + } + + if (this.question != null) { + generator.writeKey("question"); + generator.write(this.question); + } + } + + // --------------------------------------------------------------------------------------------- + + @Override + @Nonnull + public Builder toBuilder() { + return new Builder(this); + } + + @Nonnull + public static Builder builder() { + return new Builder(); + } + + /** + * Builder for {@link Parameters}. + */ + public static class Builder extends ObjectBuilderBase implements CopyableBuilder { + @Nullable + private String inputs; + @Nullable + private String llmInterface; + @Nullable + private List messages; + @Nullable + private Map metadata; + @Nullable + private String question; + + public Builder() {} + + private Builder(Parameters o) { + this.inputs = o.inputs; + this.llmInterface = o.llmInterface; + this.messages = _listCopy(o.messages); + this.metadata = _mapCopy(o.metadata); + this.question = o.question; + } + + private Builder(Builder o) { + this.inputs = o.inputs; + this.llmInterface = o.llmInterface; + this.messages = _listCopy(o.messages); + this.metadata = _mapCopy(o.metadata); + this.question = o.question; + } + + @Override + @Nonnull + public Builder copy() { + return new Builder(this); + } + + /** + * API name: {@code inputs} + */ + @Nonnull + public final Builder inputs(@Nullable String value) { + this.inputs = value; + return this; + } + + /** + * API name: {@code _llm_interface} + */ + @Nonnull + public final Builder llmInterface(@Nullable String value) { + this.llmInterface = value; + return this; + } + + /** + * API name: {@code messages} + * + *

+ * Adds all elements of list to messages. + *

+ */ + @Nonnull + public final Builder messages(List list) { + this.messages = _listAddAll(this.messages, list); + return this; + } + + /** + * API name: {@code messages} + * + *

+ * Adds one or more values to messages. + *

+ */ + @Nonnull + public final Builder messages(Messages value, Messages... values) { + this.messages = _listAdd(this.messages, value, values); + return this; + } + + /** + * API name: {@code messages} + * + *

+ * Adds a value to messages using a builder lambda. + *

+ */ + @Nonnull + public final Builder messages(Function> fn) { + return messages(fn.apply(new Messages.Builder()).build()); + } + + /** + * + *

+ * Adds all elements of map to metadata. + *

+ */ + @Nonnull + public final Builder metadata(Map map) { + this.metadata = _mapPutAll(this.metadata, map); + return this; + } + + /** + * + *

+ * Adds an entry to metadata. + *

+ */ + @Nonnull + public final Builder metadata(String key, JsonData value) { + this.metadata = _mapPut(this.metadata, key, value); + return this; + } + + /** + * API name: {@code question} + */ + @Nonnull + public final Builder question(@Nullable String value) { + this.question = value; + return this; + } + + /** + * Builds a {@link Parameters}. + * + * @throws NullPointerException if some of the required fields are null. + */ + @Override + @Nonnull + public Parameters build() { + _checkSingleUse(); + + return new Parameters(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Parameters} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + Parameters::setupParametersDeserializer + ); + + protected static void setupParametersDeserializer(ObjectDeserializer op) { + op.add(Builder::inputs, JsonpDeserializer.stringDeserializer(), "inputs"); + op.add(Builder::llmInterface, JsonpDeserializer.stringDeserializer(), "_llm_interface"); + op.add(Builder::messages, JsonpDeserializer.arrayDeserializer(Messages._DESERIALIZER), "messages"); + op.add(Builder::question, JsonpDeserializer.stringDeserializer(), "question"); + op.setUnknownFieldHandler((builder, name, parser, mapper) -> { + if (builder.metadata == null) { + builder.metadata = new HashMap<>(); + } + builder.metadata.put(name, JsonData._DESERIALIZER.deserialize(parser, mapper)); + }); + } + + @Override + public int hashCode() { + int result = 17; + result = 31 * result + Objects.hashCode(this.inputs); + result = 31 * result + Objects.hashCode(this.llmInterface); + result = 31 * result + Objects.hashCode(this.messages); + result = 31 * result + Objects.hashCode(this.metadata); + result = 31 * result + Objects.hashCode(this.question); + return result; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || this.getClass() != o.getClass()) return false; + Parameters other = (Parameters) o; + return Objects.equals(this.inputs, other.inputs) + && Objects.equals(this.llmInterface, other.llmInterface) + && Objects.equals(this.messages, other.messages) + && Objects.equals(this.metadata, other.metadata) + && Objects.equals(this.question, other.question); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/PredictModelStreamRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/PredictModelStreamRequest.java index ed3f164fd1..c7408b66fc 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/PredictModelStreamRequest.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/PredictModelStreamRequest.java @@ -18,7 +18,6 @@ import java.util.function.Function; import javax.annotation.Generated; import javax.annotation.Nonnull; -import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -50,14 +49,14 @@ public final class PredictModelStreamRequest extends RequestBase private final String modelId; @Nonnull - private final Map parameters; + private final Parameters parameters; // --------------------------------------------------------------------------------------------- private PredictModelStreamRequest(Builder builder) { super(builder); this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); - this.parameters = ApiTypeHelper.unmodifiableRequired(builder.parameters, this, "parameters"); + this.parameters = ApiTypeHelper.requireNonNull(builder.parameters, this, "parameters"); } public static PredictModelStreamRequest of(Function> fn) { @@ -76,7 +75,7 @@ public final String modelId() { * Required - API name: {@code parameters} */ @Nonnull - public final Map parameters() { + public final Parameters parameters() { return this.parameters; } @@ -92,12 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("parameters"); - generator.writeStartObject(); - for (Map.Entry item0 : this.parameters.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - } - generator.writeEnd(); + this.parameters.serialize(generator, mapper); } // --------------------------------------------------------------------------------------------- @@ -120,20 +114,20 @@ public static class Builder extends RequestBase.AbstractBuilder implements CopyableBuilder { private String modelId; - private Map parameters; + private Parameters parameters; public Builder() {} private Builder(PredictModelStreamRequest o) { super(o); this.modelId = o.modelId; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; } private Builder(Builder o) { super(o); this.modelId = o.modelId; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; } @Override @@ -159,28 +153,19 @@ public final Builder modelId(String value) { /** * Required - API name: {@code parameters} - * - *

- * Adds all elements of map to parameters. - *

*/ @Nonnull - public final Builder parameters(Map map) { - this.parameters = _mapPutAll(this.parameters, map); + public final Builder parameters(Parameters value) { + this.parameters = value; return this; } /** * Required - API name: {@code parameters} - * - *

- * Adds an entry to parameters. - *

*/ @Nonnull - public final Builder parameters(String key, JsonData value) { - this.parameters = _mapPut(this.parameters, key, value); - return this; + public final Builder parameters(Function> fn) { + return parameters(fn.apply(new Parameters.Builder()).build()); } /** @@ -208,7 +193,7 @@ public PredictModelStreamRequest build() { ); protected static void setupPredictModelStreamRequestDeserializer(ObjectDeserializer op) { - op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters"); } // --------------------------------------------------------------------------------------------- diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java index f2d070c942..637bca1c5f 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java @@ -21,7 +21,6 @@ import javax.annotation.Generated; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -64,8 +63,8 @@ public final class RegisterAgentsRequest extends RequestBase @Nonnull private final String name; - @Nonnull - private final Map parameters; + @Nullable + private final Parameters parameters; @Nonnull private final List tools; @@ -82,7 +81,7 @@ private RegisterAgentsRequest(Builder builder) { this.llm = builder.llm; this.memory = builder.memory; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); - this.parameters = ApiTypeHelper.unmodifiable(builder.parameters); + this.parameters = builder.parameters; this.tools = ApiTypeHelper.unmodifiable(builder.tools); this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); } @@ -134,8 +133,8 @@ public final String name() { /** * API name: {@code parameters} */ - @Nonnull - public final Map parameters() { + @Nullable + public final Parameters parameters() { return this.parameters; } @@ -189,14 +188,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("name"); generator.write(this.name); - if (ApiTypeHelper.isDefined(this.parameters)) { + if (this.parameters != null) { generator.writeKey("parameters"); - generator.writeStartObject(); - for (Map.Entry item0 : this.parameters.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - } - generator.writeEnd(); + this.parameters.serialize(generator, mapper); } if (ApiTypeHelper.isDefined(this.tools)) { @@ -239,7 +233,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Memory memory; private String name; @Nullable - private Map parameters; + private Parameters parameters; @Nullable private List tools; private String type; @@ -253,7 +247,7 @@ private Builder(RegisterAgentsRequest o) { this.llm = o.llm; this.memory = o.memory; this.name = o.name; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.tools = _listCopy(o.tools); this.type = o.type; } @@ -265,7 +259,7 @@ private Builder(Builder o) { this.llm = o.llm; this.memory = o.memory; this.name = o.name; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.tools = _listCopy(o.tools); this.type = o.type; } @@ -345,28 +339,19 @@ public final Builder name(String value) { /** * API name: {@code parameters} - * - *

- * Adds all elements of map to parameters. - *

*/ @Nonnull - public final Builder parameters(Map map) { - this.parameters = _mapPutAll(this.parameters, map); + public final Builder parameters(@Nullable Parameters value) { + this.parameters = value; return this; } /** * API name: {@code parameters} - * - *

- * Adds an entry to parameters. - *

*/ @Nonnull - public final Builder parameters(String key, JsonData value) { - this.parameters = _mapPut(this.parameters, key, value); - return this; + public final Builder parameters(Function> fn) { + return parameters(fn.apply(new Parameters.Builder()).build()); } /** @@ -446,7 +431,7 @@ protected static void setupRegisterAgentsRequestDeserializer(ObjectDeserializer< op.add(Builder::llm, LLM._DESERIALIZER, "llm"); op.add(Builder::memory, Memory._DESERIALIZER, "memory"); op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters"); op.add(Builder::tools, JsonpDeserializer.arrayDeserializer(ToolItems._DESERIALIZER), "tools"); op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); } diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ToolItems.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ToolItems.java index 6c8e1519a1..a42676e36e 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ToolItems.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ToolItems.java @@ -54,8 +54,8 @@ public class ToolItems implements PlainJsonSerializable, ToCopyableBuilder parameters; + @Nullable + private final Parameters parameters; @Nullable private final String type; @@ -68,7 +68,7 @@ private ToolItems(Builder builder) { this.includeOutputInAgentResponse = builder.includeOutputInAgentResponse; this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); this.name = builder.name; - this.parameters = ApiTypeHelper.unmodifiable(builder.parameters); + this.parameters = builder.parameters; this.type = builder.type; } @@ -116,8 +116,8 @@ public final String name() { /** * API name: {@code parameters} */ - @Nonnull - public final Map parameters() { + @Nullable + public final Parameters parameters() { return this.parameters; } @@ -164,14 +164,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.name); } - if (ApiTypeHelper.isDefined(this.parameters)) { + if (this.parameters != null) { generator.writeKey("parameters"); - generator.writeStartObject(); - for (Map.Entry item0 : this.parameters.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - } - generator.writeEnd(); + this.parameters.serialize(generator, mapper); } if (this.type != null) { @@ -208,7 +203,7 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder @Nullable private String name; @Nullable - private Map parameters; + private Parameters parameters; @Nullable private String type; @@ -220,7 +215,7 @@ private Builder(ToolItems o) { this.includeOutputInAgentResponse = o.includeOutputInAgentResponse; this.metadata = _mapCopy(o.metadata); this.name = o.name; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.type = o.type; } @@ -230,7 +225,7 @@ private Builder(Builder o) { this.includeOutputInAgentResponse = o.includeOutputInAgentResponse; this.metadata = _mapCopy(o.metadata); this.name = o.name; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.type = o.type; } @@ -310,28 +305,19 @@ public final Builder name(@Nullable String value) { /** * API name: {@code parameters} - * - *

- * Adds all elements of map to parameters. - *

*/ @Nonnull - public final Builder parameters(Map map) { - this.parameters = _mapPutAll(this.parameters, map); + public final Builder parameters(@Nullable Parameters value) { + this.parameters = value; return this; } /** * API name: {@code parameters} - * - *

- * Adds an entry to parameters. - *

*/ @Nonnull - public final Builder parameters(String key, JsonData value) { - this.parameters = _mapPut(this.parameters, key, value); - return this; + public final Builder parameters(Function> fn) { + return parameters(fn.apply(new Parameters.Builder()).build()); } /** @@ -372,7 +358,7 @@ protected static void setupToolItemsDeserializer(ObjectDeserializer { if (builder.metadata == null) { diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UpdateConnectorRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UpdateConnectorRequest.java index 9762493a63..765a6050a4 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UpdateConnectorRequest.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UpdateConnectorRequest.java @@ -21,7 +21,6 @@ import javax.annotation.Generated; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import org.opensearch.client.json.JsonData; import org.opensearch.client.json.JsonpDeserializable; import org.opensearch.client.json.JsonpDeserializer; import org.opensearch.client.json.JsonpMapper; @@ -70,8 +69,8 @@ public final class UpdateConnectorRequest extends RequestBase @Nullable private final String name; - @Nonnull - private final Map parameters; + @Nullable + private final Parameters parameters; @Nullable private final Boolean parametersSkipValidatingMissingParameters; @@ -93,7 +92,7 @@ private UpdateConnectorRequest(Builder builder) { this.credential = builder.credential; this.description = builder.description; this.name = builder.name; - this.parameters = ApiTypeHelper.unmodifiable(builder.parameters); + this.parameters = builder.parameters; this.parametersSkipValidatingMissingParameters = builder.parametersSkipValidatingMissingParameters; this.protocol = builder.protocol; this.version = builder.version; @@ -168,8 +167,8 @@ public final String name() { /** * API name: {@code parameters} */ - @Nonnull - public final Map parameters() { + @Nullable + public final Parameters parameters() { return this.parameters; } @@ -249,14 +248,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.name); } - if (ApiTypeHelper.isDefined(this.parameters)) { + if (this.parameters != null) { generator.writeKey("parameters"); - generator.writeStartObject(); - for (Map.Entry item0 : this.parameters.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - } - generator.writeEnd(); + this.parameters.serialize(generator, mapper); } if (this.parametersSkipValidatingMissingParameters != null) { @@ -306,7 +300,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private String name; @Nullable - private Map parameters; + private Parameters parameters; @Nullable private Boolean parametersSkipValidatingMissingParameters; @Nullable @@ -325,7 +319,7 @@ private Builder(UpdateConnectorRequest o) { this.credential = o.credential; this.description = o.description; this.name = o.name; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.parametersSkipValidatingMissingParameters = o.parametersSkipValidatingMissingParameters; this.protocol = o.protocol; this.version = o.version; @@ -340,7 +334,7 @@ private Builder(Builder o) { this.credential = o.credential; this.description = o.description; this.name = o.name; - this.parameters = _mapCopy(o.parameters); + this.parameters = o.parameters; this.parametersSkipValidatingMissingParameters = o.parametersSkipValidatingMissingParameters; this.protocol = o.protocol; this.version = o.version; @@ -486,28 +480,19 @@ public final Builder name(@Nullable String value) { /** * API name: {@code parameters} - * - *

- * Adds all elements of map to parameters. - *

*/ @Nonnull - public final Builder parameters(Map map) { - this.parameters = _mapPutAll(this.parameters, map); + public final Builder parameters(@Nullable Parameters value) { + this.parameters = value; return this; } /** * API name: {@code parameters} - * - *

- * Adds an entry to parameters. - *

*/ @Nonnull - public final Builder parameters(String key, JsonData value) { - this.parameters = _mapPut(this.parameters, key, value); - return this; + public final Builder parameters(Function> fn) { + return parameters(fn.apply(new Parameters.Builder()).build()); } /** @@ -571,7 +556,7 @@ protected static void setupUpdateConnectorRequestDeserializer(ObjectDeserializer op.add(Builder::credential, Credential._DESERIALIZER, "credential"); op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); - op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters"); op.add( Builder::parametersSkipValidatingMissingParameters, JsonpDeserializer.booleanDeserializer(), diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticContextResponseProcessor.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticContextResponseProcessor.java new file mode 100644 index 0000000000..0831c90647 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticContextResponseProcessor.java @@ -0,0 +1,345 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * 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. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package org.opensearch.client.opensearch.search_pipeline; + +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.json.PlainJsonSerializable; +import org.opensearch.client.util.CopyableBuilder; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; +import org.opensearch.client.util.ToCopyableBuilder; + +// typedef: search_pipeline.AgenticContextResponseProcessor + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class AgenticContextResponseProcessor + implements + ResponseProcessorVariant, + PlainJsonSerializable, + ToCopyableBuilder { + + @Nullable + private final Boolean agentStepsSummary; + + @Nullable + private final String description; + + @Nullable + private final Boolean dslQuery; + + @Nullable + private final Boolean ignoreFailure; + + @Nullable + private final String tag; + + // --------------------------------------------------------------------------------------------- + + private AgenticContextResponseProcessor(Builder builder) { + this.agentStepsSummary = builder.agentStepsSummary; + this.description = builder.description; + this.dslQuery = builder.dslQuery; + this.ignoreFailure = builder.ignoreFailure; + this.tag = builder.tag; + } + + public static AgenticContextResponseProcessor of( + Function> fn + ) { + return fn.apply(new Builder()).build(); + } + + /** + * {@link ResponseProcessor} variant kind. + */ + @Override + public ResponseProcessor.Kind _responseProcessorKind() { + return ResponseProcessor.Kind.AgenticContext; + } + + /** + * Whether to include the agent's execution step summary in the response. Available for conversational agents only. + *

+ * API name: {@code agent_steps_summary} + *

+ */ + @Nullable + public final Boolean agentStepsSummary() { + return this.agentStepsSummary; + } + + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * Whether to include the generated DSL query in the response. Available for both conversational and flow agents. + *

+ * API name: {@code dsl_query} + *

+ */ + @Nullable + public final Boolean dslQuery() { + return this.dslQuery; + } + + /** + * API name: {@code ignore_failure} + */ + @Nullable + public final Boolean ignoreFailure() { + return this.ignoreFailure; + } + + /** + * API name: {@code tag} + */ + @Nullable + public final String tag() { + return this.tag; + } + + /** + * Serialize this object to JSON. + */ + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + if (this.agentStepsSummary != null) { + generator.writeKey("agent_steps_summary"); + generator.write(this.agentStepsSummary); + } + + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + } + + if (this.dslQuery != null) { + generator.writeKey("dsl_query"); + generator.write(this.dslQuery); + } + + if (this.ignoreFailure != null) { + generator.writeKey("ignore_failure"); + generator.write(this.ignoreFailure); + } + + if (this.tag != null) { + generator.writeKey("tag"); + generator.write(this.tag); + } + } + + // --------------------------------------------------------------------------------------------- + + @Override + @Nonnull + public Builder toBuilder() { + return new Builder(this); + } + + @Nonnull + public static Builder builder() { + return new Builder(); + } + + /** + * Builder for {@link AgenticContextResponseProcessor}. + */ + public static class Builder extends ObjectBuilderBase implements CopyableBuilder { + @Nullable + private Boolean agentStepsSummary; + @Nullable + private String description; + @Nullable + private Boolean dslQuery; + @Nullable + private Boolean ignoreFailure; + @Nullable + private String tag; + + public Builder() {} + + private Builder(AgenticContextResponseProcessor o) { + this.agentStepsSummary = o.agentStepsSummary; + this.description = o.description; + this.dslQuery = o.dslQuery; + this.ignoreFailure = o.ignoreFailure; + this.tag = o.tag; + } + + private Builder(Builder o) { + this.agentStepsSummary = o.agentStepsSummary; + this.description = o.description; + this.dslQuery = o.dslQuery; + this.ignoreFailure = o.ignoreFailure; + this.tag = o.tag; + } + + @Override + @Nonnull + public Builder copy() { + return new Builder(this); + } + + /** + * Whether to include the agent's execution step summary in the response. Available for conversational agents only. + *

+ * API name: {@code agent_steps_summary} + *

+ */ + @Nonnull + public final Builder agentStepsSummary(@Nullable Boolean value) { + this.agentStepsSummary = value; + return this; + } + + /** + * API name: {@code description} + */ + @Nonnull + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * Whether to include the generated DSL query in the response. Available for both conversational and flow agents. + *

+ * API name: {@code dsl_query} + *

+ */ + @Nonnull + public final Builder dslQuery(@Nullable Boolean value) { + this.dslQuery = value; + return this; + } + + /** + * API name: {@code ignore_failure} + */ + @Nonnull + public final Builder ignoreFailure(@Nullable Boolean value) { + this.ignoreFailure = value; + return this; + } + + /** + * API name: {@code tag} + */ + @Nonnull + public final Builder tag(@Nullable String value) { + this.tag = value; + return this; + } + + /** + * Builds a {@link AgenticContextResponseProcessor}. + * + * @throws NullPointerException if some of the required fields are null. + */ + @Override + @Nonnull + public AgenticContextResponseProcessor build() { + _checkSingleUse(); + + return new AgenticContextResponseProcessor(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link AgenticContextResponseProcessor} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + AgenticContextResponseProcessor::setupAgenticContextResponseProcessorDeserializer + ); + + protected static void setupAgenticContextResponseProcessorDeserializer(ObjectDeserializer op) { + op.add(Builder::agentStepsSummary, JsonpDeserializer.booleanDeserializer(), "agent_steps_summary"); + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::dslQuery, JsonpDeserializer.booleanDeserializer(), "dsl_query"); + op.add(Builder::ignoreFailure, JsonpDeserializer.booleanDeserializer(), "ignore_failure"); + op.add(Builder::tag, JsonpDeserializer.stringDeserializer(), "tag"); + } + + @Override + public int hashCode() { + int result = 17; + result = 31 * result + Objects.hashCode(this.agentStepsSummary); + result = 31 * result + Objects.hashCode(this.description); + result = 31 * result + Objects.hashCode(this.dslQuery); + result = 31 * result + Objects.hashCode(this.ignoreFailure); + result = 31 * result + Objects.hashCode(this.tag); + return result; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || this.getClass() != o.getClass()) return false; + AgenticContextResponseProcessor other = (AgenticContextResponseProcessor) o; + return Objects.equals(this.agentStepsSummary, other.agentStepsSummary) + && Objects.equals(this.description, other.description) + && Objects.equals(this.dslQuery, other.dslQuery) + && Objects.equals(this.ignoreFailure, other.ignoreFailure) + && Objects.equals(this.tag, other.tag); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticQueryTranslatorRequestProcessor.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticQueryTranslatorRequestProcessor.java new file mode 100644 index 0000000000..b90a865561 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticQueryTranslatorRequestProcessor.java @@ -0,0 +1,306 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +/* + * 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. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +//---------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------- + +package org.opensearch.client.opensearch.search_pipeline; + +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Generated; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.JsonpMapper; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.json.PlainJsonSerializable; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.CopyableBuilder; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; +import org.opensearch.client.util.ToCopyableBuilder; + +// typedef: search_pipeline.AgenticQueryTranslatorRequestProcessor + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class AgenticQueryTranslatorRequestProcessor + implements + RequestProcessorVariant, + PlainJsonSerializable, + ToCopyableBuilder { + + @Nonnull + private final String agentId; + + @Nullable + private final String description; + + @Nullable + private final Boolean ignoreFailure; + + @Nullable + private final String tag; + + // --------------------------------------------------------------------------------------------- + + private AgenticQueryTranslatorRequestProcessor(Builder builder) { + this.agentId = ApiTypeHelper.requireNonNull(builder.agentId, this, "agentId"); + this.description = builder.description; + this.ignoreFailure = builder.ignoreFailure; + this.tag = builder.tag; + } + + public static AgenticQueryTranslatorRequestProcessor of( + Function> fn + ) { + return fn.apply(new Builder()).build(); + } + + /** + * {@link RequestProcessor} variant kind. + */ + @Override + public RequestProcessor.Kind _requestProcessorKind() { + return RequestProcessor.Kind.AgenticQueryTranslator; + } + + /** + * Required - The ID of the agent to use for query translation. + *

+ * API name: {@code agent_id} + *

+ */ + @Nonnull + public final String agentId() { + return this.agentId; + } + + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * API name: {@code ignore_failure} + */ + @Nullable + public final Boolean ignoreFailure() { + return this.ignoreFailure; + } + + /** + * API name: {@code tag} + */ + @Nullable + public final String tag() { + return this.tag; + } + + /** + * Serialize this object to JSON. + */ + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeKey("agent_id"); + generator.write(this.agentId); + + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + } + + if (this.ignoreFailure != null) { + generator.writeKey("ignore_failure"); + generator.write(this.ignoreFailure); + } + + if (this.tag != null) { + generator.writeKey("tag"); + generator.write(this.tag); + } + } + + // --------------------------------------------------------------------------------------------- + + @Override + @Nonnull + public Builder toBuilder() { + return new Builder(this); + } + + @Nonnull + public static Builder builder() { + return new Builder(); + } + + /** + * Builder for {@link AgenticQueryTranslatorRequestProcessor}. + */ + public static class Builder extends ObjectBuilderBase implements CopyableBuilder { + private String agentId; + @Nullable + private String description; + @Nullable + private Boolean ignoreFailure; + @Nullable + private String tag; + + public Builder() {} + + private Builder(AgenticQueryTranslatorRequestProcessor o) { + this.agentId = o.agentId; + this.description = o.description; + this.ignoreFailure = o.ignoreFailure; + this.tag = o.tag; + } + + private Builder(Builder o) { + this.agentId = o.agentId; + this.description = o.description; + this.ignoreFailure = o.ignoreFailure; + this.tag = o.tag; + } + + @Override + @Nonnull + public Builder copy() { + return new Builder(this); + } + + /** + * Required - The ID of the agent to use for query translation. + *

+ * API name: {@code agent_id} + *

+ */ + @Nonnull + public final Builder agentId(String value) { + this.agentId = value; + return this; + } + + /** + * API name: {@code description} + */ + @Nonnull + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * API name: {@code ignore_failure} + */ + @Nonnull + public final Builder ignoreFailure(@Nullable Boolean value) { + this.ignoreFailure = value; + return this; + } + + /** + * API name: {@code tag} + */ + @Nonnull + public final Builder tag(@Nullable String value) { + this.tag = value; + return this; + } + + /** + * Builds a {@link AgenticQueryTranslatorRequestProcessor}. + * + * @throws NullPointerException if some of the required fields are null. + */ + @Override + @Nonnull + public AgenticQueryTranslatorRequestProcessor build() { + _checkSingleUse(); + + return new AgenticQueryTranslatorRequestProcessor(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link AgenticQueryTranslatorRequestProcessor} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + AgenticQueryTranslatorRequestProcessor::setupAgenticQueryTranslatorRequestProcessorDeserializer + ); + + protected static void setupAgenticQueryTranslatorRequestProcessorDeserializer( + ObjectDeserializer op + ) { + op.add(Builder::agentId, JsonpDeserializer.stringDeserializer(), "agent_id"); + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::ignoreFailure, JsonpDeserializer.booleanDeserializer(), "ignore_failure"); + op.add(Builder::tag, JsonpDeserializer.stringDeserializer(), "tag"); + } + + @Override + public int hashCode() { + int result = 17; + result = 31 * result + this.agentId.hashCode(); + result = 31 * result + Objects.hashCode(this.description); + result = 31 * result + Objects.hashCode(this.ignoreFailure); + result = 31 * result + Objects.hashCode(this.tag); + return result; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || this.getClass() != o.getClass()) return false; + AgenticQueryTranslatorRequestProcessor other = (AgenticQueryTranslatorRequestProcessor) o; + return this.agentId.equals(other.agentId) + && Objects.equals(this.description, other.description) + && Objects.equals(this.ignoreFailure, other.ignoreFailure) + && Objects.equals(this.tag, other.tag); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessor.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessor.java index f2bca8e292..39fd740da3 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessor.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessor.java @@ -64,6 +64,7 @@ public class RequestProcessor implements TaggedUnion agenticQueryTranslator(AgenticQueryTranslatorRequestProcessor v) { + this._kind = Kind.AgenticQueryTranslator; + this._value = v; + return this; + } + + public ObjectBuilder agenticQueryTranslator( + Function> fn + ) { + return this.agenticQueryTranslator(fn.apply(new AgenticQueryTranslatorRequestProcessor.Builder()).build()); + } + public ObjectBuilder filterQuery(FilterQueryRequestProcessor v) { this._kind = Kind.FilterQuery; this._value = v; @@ -259,6 +288,7 @@ public RequestProcessor build() { } protected static void setupRequestProcessorDeserializer(ObjectDeserializer op) { + op.add(Builder::agenticQueryTranslator, AgenticQueryTranslatorRequestProcessor._DESERIALIZER, "agentic_query_translator"); op.add(Builder::filterQuery, FilterQueryRequestProcessor._DESERIALIZER, "filter_query"); op.add(Builder::neuralQueryEnricher, NeuralQueryEnricherRequestProcessor._DESERIALIZER, "neural_query_enricher"); op.add(Builder::oversample, OversampleRequestProcessor._DESERIALIZER, "oversample"); diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessorBuilders.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessorBuilders.java index 81d157b04a..282c0c7ea6 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessorBuilders.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessorBuilders.java @@ -45,6 +45,13 @@ public class RequestProcessorBuilders { private RequestProcessorBuilders() {} + /** + * Creates a builder for the {@link AgenticQueryTranslatorRequestProcessor agentic_query_translator} {@code RequestProcessor} variant. + */ + public static AgenticQueryTranslatorRequestProcessor.Builder agenticQueryTranslator() { + return new AgenticQueryTranslatorRequestProcessor.Builder(); + } + /** * Creates a builder for the {@link FilterQueryRequestProcessor filter_query} {@code RequestProcessor} variant. */ diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessor.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessor.java index b780af7028..37aa18aa3d 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessor.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessor.java @@ -64,6 +64,7 @@ public class ResponseProcessor implements TaggedUnion agenticContext(AgenticContextResponseProcessor v) { + this._kind = Kind.AgenticContext; + this._value = v; + return this; + } + + public ObjectBuilder agenticContext( + Function> fn + ) { + return this.agenticContext(fn.apply(new AgenticContextResponseProcessor.Builder()).build()); + } + public ObjectBuilder collapse(CollapseResponseProcessor v) { this._kind = Kind.Collapse; this._value = v; @@ -371,6 +400,7 @@ public ResponseProcessor build() { } protected static void setupResponseProcessorDeserializer(ObjectDeserializer op) { + op.add(Builder::agenticContext, AgenticContextResponseProcessor._DESERIALIZER, "agentic_context"); op.add(Builder::collapse, CollapseResponseProcessor._DESERIALIZER, "collapse"); op.add(Builder::personalizeSearchRanking, PersonalizeSearchRankingResponseProcessor._DESERIALIZER, "personalize_search_ranking"); op.add(Builder::renameField, RenameFieldResponseProcessor._DESERIALIZER, "rename_field"); diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessorBuilders.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessorBuilders.java index 4ce4ed3a6e..4f56eafaeb 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessorBuilders.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessorBuilders.java @@ -45,6 +45,13 @@ public class ResponseProcessorBuilders { private ResponseProcessorBuilders() {} + /** + * Creates a builder for the {@link AgenticContextResponseProcessor agentic_context} {@code ResponseProcessor} variant. + */ + public static AgenticContextResponseProcessor.Builder agenticContext() { + return new AgenticContextResponseProcessor.Builder(); + } + /** * Creates a builder for the {@link CollapseResponseProcessor collapse} {@code ResponseProcessor} variant. */ diff --git a/java-codegen/opensearch-openapi.yaml b/java-codegen/opensearch-openapi.yaml index d691f2ed75..1e7c2f76f2 100644 --- a/java-codegen/opensearch-openapi.yaml +++ b/java-codegen/opensearch-openapi.yaml @@ -30814,7 +30814,7 @@ components: - $ref: '#/components/schemas/_core.bulk___UpdateAction' - type: object additionalProperties: true - x-protobuf-type: bytes + x-protobuf-data-type: bytes title: object description: The operation definition and data (action-data pairs), separated by newlines required: true @@ -31780,6 +31780,7 @@ components: application/json: schema: type: object + title: MLExecuteAgentStreamRequestBody properties: parameters: $ref: '#/components/schemas/ml._common___Parameters' @@ -31907,6 +31908,7 @@ components: application/json: schema: type: object + title: MLPredictModelStreamRequestBody properties: parameters: $ref: '#/components/schemas/ml._common___Parameters' @@ -32741,6 +32743,7 @@ components: aggs: description: Defines the aggregations that are run as part of the search request. type: object + x-protobuf-excluded: true additionalProperties: $ref: '#/components/schemas/_common.aggregations___AggregationContainer' collapse: @@ -39597,7 +39600,7 @@ components: $ref: '#/components/schemas/_common___Routing' _source: type: object - x-protobuf-type: bytes + x-protobuf-data-type: bytes description: The source of the document. additionalProperties: true additionalProperties: @@ -41051,13 +41054,13 @@ components: oneOf: - type: boolean - type: string - x-protobuf-type: bool + x-protobuf-data-type: bool _common___StringifiedDouble: oneOf: - type: number format: double - type: string - x-protobuf-type: double + x-protobuf-data-type: double _common___StringifiedEpochTimeUnitMillis: description: |- Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures @@ -41089,13 +41092,13 @@ components: - type: integer - type: string pattern: ^[+-]?\d+$ - x-protobuf-type: int32 + x-protobuf-data-type: int32 _common___StringifiedLong: oneOf: - type: integer format: int64 - type: string - x-protobuf-type: int64 + x-protobuf-data-type: int64 _common___StringifiedVersionNumber: description: |- Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures @@ -44614,7 +44617,6 @@ components: $ref: '#/components/schemas/_common.aggregations___ValueType' order: $ref: '#/components/schemas/_common.aggregations___AggregateOrder' - x-protobuf-excluded: true shard_size: description: |- The number of candidate terms produced by each shard. @@ -44663,6 +44665,7 @@ components: doc_count_error: type: integer format: int64 + description: Upper bound of the document count error. Only present when `show_term_doc_count_error` is true. _common.aggregations___TermsExclude: oneOf: - title: regexp @@ -48063,6 +48066,25 @@ components: - xy_shape required: - type + _common.query_dsl___AgenticQuery: + x-version-added: '3.2' + allOf: + - $ref: '#/components/schemas/_common.query_dsl___QueryBase' + - type: object + properties: + query_text: + description: The natural language question to be answered by the agent. + type: string + query_fields: + description: A list of index fields that the agent should consider when generating the search query. + type: array + items: + $ref: '#/components/schemas/_common___Field' + memory_id: + description: The memory ID from a previous response, used to continue a conversation with prior context. Applicable for conversational agents only. + type: string + required: + - query_text _common.query_dsl___BoolQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl___QueryBase' @@ -49408,6 +49430,8 @@ components: _common.query_dsl___QueryContainer: type: object properties: + agentic: + $ref: '#/components/schemas/_common.query_dsl___AgenticQuery' bool: $ref: '#/components/schemas/_common.query_dsl___BoolQuery' boosting: @@ -50443,7 +50467,7 @@ components: doc: description: A partial update to an existing document. type: object - x-protobuf-type: bytes + x-protobuf-data-type: bytes doc_as_upsert: description: When `true`, uses the contents of `doc` as the value of `upsert`. type: boolean @@ -50466,7 +50490,7 @@ components: If the document does not already exist, the contents of `upsert` are inserted as a new document. If the document exists, the `script` is executed. type: object - x-protobuf-type: bytes + x-protobuf-data-type: bytes _core.bulk___UpdateOperation: allOf: - $ref: '#/components/schemas/_core.bulk___OperationBase' @@ -52639,7 +52663,7 @@ components: - score _core.search___TDocument: x-is-generic-type-parameter: true - x-protobuf-type: bytes + x-protobuf-data-type: bytes _core.search___TermSuggest: allOf: - $ref: '#/components/schemas/_core.search___SuggestBase' @@ -63147,6 +63171,15 @@ components: type: array items: $ref: '#/components/schemas/ml._common___Content' + ml._common___Messages: + type: object + properties: + role: + type: string + description: The role of the message. + content: + type: string + description: The content of the message. ml._common___Metadata: type: object additionalProperties: true @@ -63499,6 +63532,17 @@ components: - name ml._common___Parameters: type: object + properties: + messages: + type: array + items: + $ref: '#/components/schemas/ml._common___Messages' + inputs: + type: string + _llm_interface: + type: string + question: + type: string additionalProperties: true ml._common___PayloadType: type: string @@ -68317,6 +68361,39 @@ components: target_field: type: string description: The field name to use in the target index for the terms aggregation results. + search_pipeline._common___AgenticContextResponseProcessor: + x-version-added: '3.3' + type: object + properties: + tag: + type: string + description: + type: string + ignore_failure: + type: boolean + agent_steps_summary: + description: Whether to include the agent's execution step summary in the response. Available for conversational agents only. + type: boolean + default: false + dsl_query: + description: Whether to include the generated DSL query in the response. Available for both conversational and flow agents. + type: boolean + default: false + search_pipeline._common___AgenticQueryTranslatorRequestProcessor: + x-version-added: '3.2' + type: object + properties: + tag: + type: string + description: + type: string + ignore_failure: + type: boolean + agent_id: + description: The ID of the agent to use for query translation. + type: string + required: + - agent_id search_pipeline._common___CollapseResponseProcessor: type: object properties: @@ -68452,6 +68529,14 @@ components: - target_field search_pipeline._common___RequestProcessor: oneOf: + - x-version-added: '3.2' + type: object + title: agentic_query_translator + properties: + agentic_query_translator: + $ref: '#/components/schemas/search_pipeline._common___AgenticQueryTranslatorRequestProcessor' + required: + - agentic_query_translator - type: object title: filter_query properties: @@ -68504,6 +68589,14 @@ components: $ref: '#/components/schemas/search_pipeline._common___RerankContext' search_pipeline._common___ResponseProcessor: oneOf: + - x-version-added: '3.3' + type: object + title: agentic_context + properties: + agentic_context: + $ref: '#/components/schemas/search_pipeline._common___AgenticContextResponseProcessor' + required: + - agentic_context - type: object title: personalize_search_ranking properties: