diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java index 5184be7b16..c029456c39 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java @@ -379,6 +379,7 @@ public ErrorCause build() { return new ErrorCause(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ShardFailure.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ShardFailure.java index 76397fa257..2d45c839e0 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ShardFailure.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ShardFailure.java @@ -227,6 +227,7 @@ public ShardFailure build() { return new ShardFailure(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ShardStatistics.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ShardStatistics.java index e86b002fe3..5f4edc4aef 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ShardStatistics.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ShardStatistics.java @@ -245,6 +245,7 @@ public ShardStatistics build() { return new ShardStatistics(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/WriteResponseBase.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/WriteResponseBase.java index 83a031739d..10fc56bb6b 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/WriteResponseBase.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/WriteResponseBase.java @@ -264,6 +264,7 @@ public final BuilderT version(long value) { protected abstract BuilderT self(); } + // --------------------------------------------------------------------------------------------- protected static > void setupWriteResponseBaseDeserializer(ObjectDeserializer op) { diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Action.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Action.java new file mode 100644 index 0000000000..e9912634cc --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Action.java @@ -0,0 +1,289 @@ +/* + * 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.function.Function; +import javax.annotation.Generated; +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.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.Action + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class Action implements PlainJsonSerializable { + + @Nullable + private final String actionType; + + @Nullable + private final Headers headers; + + @Nullable + private final String method; + + @Nullable + private final String postProcessFunction; + + @Nullable + private final String preProcessFunction; + + @Nullable + private final String requestBody; + + @Nullable + private final String url; + + // --------------------------------------------------------------------------------------------- + + private Action(Builder builder) { + this.actionType = builder.actionType; + this.headers = builder.headers; + this.method = builder.method; + this.postProcessFunction = builder.postProcessFunction; + this.preProcessFunction = builder.preProcessFunction; + this.requestBody = builder.requestBody; + this.url = builder.url; + } + + public static Action of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code action_type} + */ + @Nullable + public final String actionType() { + return this.actionType; + } + + /** + * API name: {@code headers} + */ + @Nullable + public final Headers headers() { + return this.headers; + } + + /** + * API name: {@code method} + */ + @Nullable + public final String method() { + return this.method; + } + + /** + * API name: {@code post_process_function} + */ + @Nullable + public final String postProcessFunction() { + return this.postProcessFunction; + } + + /** + * API name: {@code pre_process_function} + */ + @Nullable + public final String preProcessFunction() { + return this.preProcessFunction; + } + + /** + * API name: {@code request_body} + */ + @Nullable + public final String requestBody() { + return this.requestBody; + } + + /** + * API name: {@code url} + */ + @Nullable + public final String url() { + return this.url; + } + + /** + * 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.actionType != null) { + generator.writeKey("action_type"); + generator.write(this.actionType); + } + + if (this.headers != null) { + generator.writeKey("headers"); + this.headers.serialize(generator, mapper); + } + + if (this.method != null) { + generator.writeKey("method"); + generator.write(this.method); + } + + if (this.postProcessFunction != null) { + generator.writeKey("post_process_function"); + generator.write(this.postProcessFunction); + } + + if (this.preProcessFunction != null) { + generator.writeKey("pre_process_function"); + generator.write(this.preProcessFunction); + } + + if (this.requestBody != null) { + generator.writeKey("request_body"); + generator.write(this.requestBody); + } + + if (this.url != null) { + generator.writeKey("url"); + generator.write(this.url); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Action}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String actionType; + @Nullable + private Headers headers; + @Nullable + private String method; + @Nullable + private String postProcessFunction; + @Nullable + private String preProcessFunction; + @Nullable + private String requestBody; + @Nullable + private String url; + + /** + * API name: {@code action_type} + */ + public final Builder actionType(@Nullable String value) { + this.actionType = value; + return this; + } + + /** + * API name: {@code headers} + */ + public final Builder headers(@Nullable Headers value) { + this.headers = value; + return this; + } + + /** + * API name: {@code headers} + */ + public final Builder headers(Function> fn) { + return headers(fn.apply(new Headers.Builder()).build()); + } + + /** + * API name: {@code method} + */ + public final Builder method(@Nullable String value) { + this.method = value; + return this; + } + + /** + * API name: {@code post_process_function} + */ + public final Builder postProcessFunction(@Nullable String value) { + this.postProcessFunction = value; + return this; + } + + /** + * API name: {@code pre_process_function} + */ + public final Builder preProcessFunction(@Nullable String value) { + this.preProcessFunction = value; + return this; + } + + /** + * API name: {@code request_body} + */ + public final Builder requestBody(@Nullable String value) { + this.requestBody = value; + return this; + } + + /** + * API name: {@code url} + */ + public final Builder url(@Nullable String value) { + this.url = value; + return this; + } + + /** + * Builds a {@link Action}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public Action build() { + _checkSingleUse(); + + return new Action(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Action} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + Action::setupActionDeserializer + ); + + protected static void setupActionDeserializer(ObjectDeserializer op) { + op.add(Builder::actionType, JsonpDeserializer.stringDeserializer(), "action_type"); + op.add(Builder::headers, Headers._DESERIALIZER, "headers"); + op.add(Builder::method, JsonpDeserializer.stringDeserializer(), "method"); + op.add(Builder::postProcessFunction, JsonpDeserializer.stringDeserializer(), "post_process_function"); + op.add(Builder::preProcessFunction, JsonpDeserializer.stringDeserializer(), "pre_process_function"); + op.add(Builder::requestBody, JsonpDeserializer.stringDeserializer(), "request_body"); + op.add(Builder::url, JsonpDeserializer.stringDeserializer(), "url"); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ClientConfig.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ClientConfig.java new file mode 100644 index 0000000000..e3907e7f59 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ClientConfig.java @@ -0,0 +1,282 @@ +/* + * 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.function.Function; +import javax.annotation.Generated; +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.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.ClientConfig + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class ClientConfig implements PlainJsonSerializable { + + @Nullable + private final Integer connectionTimeout; + + @Nullable + private final Integer maxConnection; + + @Nullable + private final Integer maxRetryTimes; + + @Nullable + private final Integer readTimeout; + + @Nullable + private final Integer retryBackoffMillis; + + @Nullable + private final String retryBackoffPolicy; + + @Nullable + private final Integer retryTimeoutSeconds; + + // --------------------------------------------------------------------------------------------- + + private ClientConfig(Builder builder) { + this.connectionTimeout = builder.connectionTimeout; + this.maxConnection = builder.maxConnection; + this.maxRetryTimes = builder.maxRetryTimes; + this.readTimeout = builder.readTimeout; + this.retryBackoffMillis = builder.retryBackoffMillis; + this.retryBackoffPolicy = builder.retryBackoffPolicy; + this.retryTimeoutSeconds = builder.retryTimeoutSeconds; + } + + public static ClientConfig of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code connection_timeout} + */ + @Nullable + public final Integer connectionTimeout() { + return this.connectionTimeout; + } + + /** + * API name: {@code max_connection} + */ + @Nullable + public final Integer maxConnection() { + return this.maxConnection; + } + + /** + * API name: {@code max_retry_times} + */ + @Nullable + public final Integer maxRetryTimes() { + return this.maxRetryTimes; + } + + /** + * API name: {@code read_timeout} + */ + @Nullable + public final Integer readTimeout() { + return this.readTimeout; + } + + /** + * API name: {@code retry_backoff_millis} + */ + @Nullable + public final Integer retryBackoffMillis() { + return this.retryBackoffMillis; + } + + /** + * API name: {@code retry_backoff_policy} + */ + @Nullable + public final String retryBackoffPolicy() { + return this.retryBackoffPolicy; + } + + /** + * API name: {@code retry_timeout_seconds} + */ + @Nullable + public final Integer retryTimeoutSeconds() { + return this.retryTimeoutSeconds; + } + + /** + * 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.connectionTimeout != null) { + generator.writeKey("connection_timeout"); + generator.write(this.connectionTimeout); + } + + if (this.maxConnection != null) { + generator.writeKey("max_connection"); + generator.write(this.maxConnection); + } + + if (this.maxRetryTimes != null) { + generator.writeKey("max_retry_times"); + generator.write(this.maxRetryTimes); + } + + if (this.readTimeout != null) { + generator.writeKey("read_timeout"); + generator.write(this.readTimeout); + } + + if (this.retryBackoffMillis != null) { + generator.writeKey("retry_backoff_millis"); + generator.write(this.retryBackoffMillis); + } + + if (this.retryBackoffPolicy != null) { + generator.writeKey("retry_backoff_policy"); + generator.write(this.retryBackoffPolicy); + } + + if (this.retryTimeoutSeconds != null) { + generator.writeKey("retry_timeout_seconds"); + generator.write(this.retryTimeoutSeconds); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ClientConfig}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private Integer connectionTimeout; + @Nullable + private Integer maxConnection; + @Nullable + private Integer maxRetryTimes; + @Nullable + private Integer readTimeout; + @Nullable + private Integer retryBackoffMillis; + @Nullable + private String retryBackoffPolicy; + @Nullable + private Integer retryTimeoutSeconds; + + /** + * API name: {@code connection_timeout} + */ + public final Builder connectionTimeout(@Nullable Integer value) { + this.connectionTimeout = value; + return this; + } + + /** + * API name: {@code max_connection} + */ + public final Builder maxConnection(@Nullable Integer value) { + this.maxConnection = value; + return this; + } + + /** + * API name: {@code max_retry_times} + */ + public final Builder maxRetryTimes(@Nullable Integer value) { + this.maxRetryTimes = value; + return this; + } + + /** + * API name: {@code read_timeout} + */ + public final Builder readTimeout(@Nullable Integer value) { + this.readTimeout = value; + return this; + } + + /** + * API name: {@code retry_backoff_millis} + */ + public final Builder retryBackoffMillis(@Nullable Integer value) { + this.retryBackoffMillis = value; + return this; + } + + /** + * API name: {@code retry_backoff_policy} + */ + public final Builder retryBackoffPolicy(@Nullable String value) { + this.retryBackoffPolicy = value; + return this; + } + + /** + * API name: {@code retry_timeout_seconds} + */ + public final Builder retryTimeoutSeconds(@Nullable Integer value) { + this.retryTimeoutSeconds = value; + return this; + } + + /** + * Builds a {@link ClientConfig}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public ClientConfig build() { + _checkSingleUse(); + + return new ClientConfig(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ClientConfig} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + ClientConfig::setupClientConfigDeserializer + ); + + protected static void setupClientConfigDeserializer(ObjectDeserializer op) { + op.add(Builder::connectionTimeout, JsonpDeserializer.integerDeserializer(), "connection_timeout"); + op.add(Builder::maxConnection, JsonpDeserializer.integerDeserializer(), "max_connection"); + op.add(Builder::maxRetryTimes, JsonpDeserializer.integerDeserializer(), "max_retry_times"); + op.add(Builder::readTimeout, JsonpDeserializer.integerDeserializer(), "read_timeout"); + op.add(Builder::retryBackoffMillis, JsonpDeserializer.integerDeserializer(), "retry_backoff_millis"); + op.add(Builder::retryBackoffPolicy, JsonpDeserializer.stringDeserializer(), "retry_backoff_policy"); + op.add(Builder::retryTimeoutSeconds, JsonpDeserializer.integerDeserializer(), "retry_timeout_seconds"); + } +} 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 new file mode 100644 index 0000000000..f9233dd6a9 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorRequest.java @@ -0,0 +1,368 @@ +/* + * 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.List; +import java.util.Map; +import java.util.function.Function; +import javax.annotation.Generated; +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.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.RequestBase; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.endpoints.SimpleEndpoint; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.create_connector.Request + +/** + * Creates a standalone connector. + */ +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class CreateConnectorRequest extends RequestBase implements PlainJsonSerializable { + + private final List actions; + + @Nullable + private final ClientConfig clientConfig; + + private final Credential credential; + + private final String description; + + private final String name; + + private final Map parameters; + + private final String protocol; + + private final int version; + + // --------------------------------------------------------------------------------------------- + + private CreateConnectorRequest(Builder builder) { + this.actions = ApiTypeHelper.unmodifiableRequired(builder.actions, this, "actions"); + this.clientConfig = builder.clientConfig; + 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.protocol = ApiTypeHelper.requireNonNull(builder.protocol, this, "protocol"); + this.version = ApiTypeHelper.requireNonNull(builder.version, this, "version"); + } + + public static CreateConnectorRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code actions} + */ + public final List actions() { + return this.actions; + } + + /** + * API name: {@code client_config} + */ + @Nullable + public final ClientConfig clientConfig() { + return this.clientConfig; + } + + /** + * Required - API name: {@code credential} + */ + public final Credential credential() { + return this.credential; + } + + /** + * Required - API name: {@code description} + */ + public final String description() { + return this.description; + } + + /** + * Required - API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * Required - API name: {@code parameters} + */ + public final Map parameters() { + return this.parameters; + } + + /** + * Required - API name: {@code protocol} + */ + public final String protocol() { + return this.protocol; + } + + /** + * Required - API name: {@code version} + */ + public final int version() { + return this.version; + } + + /** + * 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("actions"); + generator.writeStartArray(); + for (Action item0 : this.actions) { + item0.serialize(generator, mapper); + } + generator.writeEnd(); + + if (this.clientConfig != null) { + generator.writeKey("client_config"); + this.clientConfig.serialize(generator, mapper); + } + + generator.writeKey("credential"); + this.credential.serialize(generator, mapper); + + generator.writeKey("description"); + generator.write(this.description); + + generator.writeKey("name"); + 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(); + + generator.writeKey("protocol"); + generator.write(this.protocol); + + generator.writeKey("version"); + generator.write(this.version); + } + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CreateConnectorRequest}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private List actions; + @Nullable + private ClientConfig clientConfig; + private Credential credential; + private String description; + private String name; + private Map parameters; + private String protocol; + private Integer version; + + /** + * Required - API name: {@code actions} + * + *

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

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

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

+ */ + public final Builder actions(Action value, Action... values) { + this.actions = _listAdd(this.actions, value, values); + return this; + } + + /** + * Required - API name: {@code actions} + * + *

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

+ */ + public final Builder actions(Function> fn) { + return actions(fn.apply(new Action.Builder()).build()); + } + + /** + * API name: {@code client_config} + */ + public final Builder clientConfig(@Nullable ClientConfig value) { + this.clientConfig = value; + return this; + } + + /** + * API name: {@code client_config} + */ + public final Builder clientConfig(Function> fn) { + return clientConfig(fn.apply(new ClientConfig.Builder()).build()); + } + + /** + * Required - API name: {@code credential} + */ + public final Builder credential(Credential value) { + this.credential = value; + return this; + } + + /** + * Required - API name: {@code credential} + */ + public final Builder credential(Function> fn) { + return credential(fn.apply(new Credential.Builder()).build()); + } + + /** + * Required - API name: {@code description} + */ + public final Builder description(String value) { + this.description = value; + return this; + } + + /** + * Required - API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + /** + * Required - API name: {@code parameters} + * + *

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

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

+ * Adds an entry to parameters. + *

+ */ + public final Builder parameters(String key, JsonData value) { + this.parameters = _mapPut(this.parameters, key, value); + return this; + } + + /** + * Required - API name: {@code protocol} + */ + public final Builder protocol(String value) { + this.protocol = value; + return this; + } + + /** + * Required - API name: {@code version} + */ + public final Builder version(int value) { + this.version = value; + return this; + } + + /** + * Builds a {@link CreateConnectorRequest}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public CreateConnectorRequest build() { + _checkSingleUse(); + + return new CreateConnectorRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CreateConnectorRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + CreateConnectorRequest::setupCreateConnectorRequestDeserializer + ); + + protected static void setupCreateConnectorRequestDeserializer(ObjectDeserializer op) { + op.add(Builder::actions, JsonpDeserializer.arrayDeserializer(Action._DESERIALIZER), "actions"); + op.add(Builder::clientConfig, ClientConfig._DESERIALIZER, "client_config"); + 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::protocol, JsonpDeserializer.stringDeserializer(), "protocol"); + op.add(Builder::version, JsonpDeserializer.integerDeserializer(), "version"); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code ml.create_connector}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request method + request -> "POST", + // Request path + request -> "/_plugins/_ml/connectors/_create", + // Request parameters + SimpleEndpoint.emptyMap(), + SimpleEndpoint.emptyMap(), + true, + CreateConnectorResponse._DESERIALIZER + ); +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorResponse.java new file mode 100644 index 0000000000..5bed16c40a --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/CreateConnectorResponse.java @@ -0,0 +1,114 @@ +/* + * 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.function.Function; +import javax.annotation.Generated; +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.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.create_connector.Response + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class CreateConnectorResponse implements PlainJsonSerializable { + + @Nullable + private final String connectorId; + + // --------------------------------------------------------------------------------------------- + + private CreateConnectorResponse(Builder builder) { + this.connectorId = builder.connectorId; + } + + public static CreateConnectorResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code connector_id} + */ + @Nullable + public final String connectorId() { + return this.connectorId; + } + + /** + * 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.connectorId != null) { + generator.writeKey("connector_id"); + generator.write(this.connectorId); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CreateConnectorResponse}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String connectorId; + + /** + * API name: {@code connector_id} + */ + public final Builder connectorId(@Nullable String value) { + this.connectorId = value; + return this; + } + + /** + * Builds a {@link CreateConnectorResponse}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public CreateConnectorResponse build() { + _checkSingleUse(); + + return new CreateConnectorResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CreateConnectorResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + CreateConnectorResponse::setupCreateConnectorResponseDeserializer + ); + + protected static void setupCreateConnectorResponseDeserializer(ObjectDeserializer op) { + op.add(Builder::connectorId, JsonpDeserializer.stringDeserializer(), "connector_id"); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Credential.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Credential.java new file mode 100644 index 0000000000..8e32830e5e --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Credential.java @@ -0,0 +1,217 @@ +/* + * 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.Map; +import java.util.function.Function; +import javax.annotation.Generated; +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.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.Credential + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class Credential implements PlainJsonSerializable { + + @Nullable + private final String accessKey; + + @Nullable + private final String secretKey; + + @Nullable + private final String sessionToken; + + private final Map metadata; + + // --------------------------------------------------------------------------------------------- + + private Credential(Builder builder) { + this.accessKey = builder.accessKey; + this.secretKey = builder.secretKey; + this.sessionToken = builder.sessionToken; + this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); + } + + public static Credential of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code access_key} + */ + @Nullable + public final String accessKey() { + return this.accessKey; + } + + /** + * API name: {@code secret_key} + */ + @Nullable + public final String secretKey() { + return this.secretKey; + } + + /** + * API name: {@code session_token} + */ + @Nullable + public final String sessionToken() { + return this.sessionToken; + } + + /** + */ + public final Map metadata() { + return this.metadata; + } + + /** + * 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.accessKey != null) { + generator.writeKey("access_key"); + generator.write(this.accessKey); + } + + if (this.secretKey != null) { + generator.writeKey("secret_key"); + generator.write(this.secretKey); + } + + if (this.sessionToken != null) { + generator.writeKey("session_token"); + generator.write(this.sessionToken); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Credential}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String accessKey; + @Nullable + private String secretKey; + @Nullable + private String sessionToken; + @Nullable + private Map metadata; + + /** + * API name: {@code access_key} + */ + public final Builder accessKey(@Nullable String value) { + this.accessKey = value; + return this; + } + + /** + * API name: {@code secret_key} + */ + public final Builder secretKey(@Nullable String value) { + this.secretKey = value; + return this; + } + + /** + * API name: {@code session_token} + */ + public final Builder sessionToken(@Nullable String value) { + this.sessionToken = value; + return this; + } + + /** + * + *

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

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

+ * Adds an entry to metadata. + *

+ */ + public final Builder metadata(String key, JsonData value) { + this.metadata = _mapPut(this.metadata, key, value); + return this; + } + + /** + * Builds a {@link Credential}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public Credential build() { + _checkSingleUse(); + + return new Credential(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Credential} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + Credential::setupCredentialDeserializer + ); + + protected static void setupCredentialDeserializer(ObjectDeserializer op) { + op.add(Builder::accessKey, JsonpDeserializer.stringDeserializer(), "access_key"); + op.add(Builder::secretKey, JsonpDeserializer.stringDeserializer(), "secret_key"); + op.add(Builder::sessionToken, JsonpDeserializer.stringDeserializer(), "session_token"); + op.setUnknownFieldHandler((builder, name, parser, mapper) -> { + if (builder.metadata == null) { + builder.metadata = new HashMap<>(); + } + builder.metadata.put(name, JsonData._DESERIALIZER.deserialize(parser, mapper)); + }); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteAgentRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteAgentRequest.java new file mode 100644 index 0000000000..74f9771997 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteAgentRequest.java @@ -0,0 +1,101 @@ +/* + * 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 java.util.function.Function; +import javax.annotation.Generated; +import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.RequestBase; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.endpoints.SimpleEndpoint; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.delete_agent.Request + +/** + * Delete an agent. + */ +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class DeleteAgentRequest extends RequestBase { + + private final String agentId; + + // --------------------------------------------------------------------------------------------- + + private DeleteAgentRequest(Builder builder) { + this.agentId = ApiTypeHelper.requireNonNull(builder.agentId, this, "agentId"); + } + + public static DeleteAgentRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code agent_id} + */ + public final String agentId() { + return this.agentId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteAgentRequest}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String agentId; + + /** + * Required - API name: {@code agent_id} + */ + public final Builder agentId(String value) { + this.agentId = value; + return this; + } + + /** + * Builds a {@link DeleteAgentRequest}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public DeleteAgentRequest build() { + _checkSingleUse(); + + return new DeleteAgentRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code ml.delete_agent}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request method + request -> "DELETE", + // Request path + request -> { + StringBuilder buf = new StringBuilder(); + buf.append("/_plugins/_ml/agents/"); + SimpleEndpoint.pathEncode(request.agentId, buf); + return buf.toString(); + }, + // Request parameters + SimpleEndpoint.emptyMap(), + SimpleEndpoint.emptyMap(), + false, + DeleteAgentResponse._DESERIALIZER + ); +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteAgentResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteAgentResponse.java new file mode 100644 index 0000000000..8624845cc7 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteAgentResponse.java @@ -0,0 +1,76 @@ +/* + * 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 java.util.function.Function; +import javax.annotation.Generated; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch._types.WriteResponseBase; +import org.opensearch.client.util.ObjectBuilder; + +// typedef: ml.delete_agent.Response + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class DeleteAgentResponse extends WriteResponseBase { + + // --------------------------------------------------------------------------------------------- + + private DeleteAgentResponse(Builder builder) { + super(builder); + } + + public static DeleteAgentResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteAgentResponse}. + */ + public static class Builder extends WriteResponseBase.AbstractBuilder implements ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DeleteAgentResponse}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public DeleteAgentResponse build() { + _checkSingleUse(); + + return new DeleteAgentResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DeleteAgentResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + DeleteAgentResponse::setupDeleteAgentResponseDeserializer + ); + + protected static void setupDeleteAgentResponseDeserializer(ObjectDeserializer op) { + WriteResponseBase.setupWriteResponseBaseDeserializer(op); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteConnectorRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteConnectorRequest.java new file mode 100644 index 0000000000..30e0f7d202 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteConnectorRequest.java @@ -0,0 +1,101 @@ +/* + * 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 java.util.function.Function; +import javax.annotation.Generated; +import org.opensearch.client.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.RequestBase; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.endpoints.SimpleEndpoint; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.delete_connector.Request + +/** + * Deletes a standalone connector. + */ +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class DeleteConnectorRequest extends RequestBase { + + private final String connectorId; + + // --------------------------------------------------------------------------------------------- + + private DeleteConnectorRequest(Builder builder) { + this.connectorId = ApiTypeHelper.requireNonNull(builder.connectorId, this, "connectorId"); + } + + public static DeleteConnectorRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code connector_id} + */ + public final String connectorId() { + return this.connectorId; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteConnectorRequest}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private String connectorId; + + /** + * Required - API name: {@code connector_id} + */ + public final Builder connectorId(String value) { + this.connectorId = value; + return this; + } + + /** + * Builds a {@link DeleteConnectorRequest}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public DeleteConnectorRequest build() { + _checkSingleUse(); + + return new DeleteConnectorRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code ml.delete_connector}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request method + request -> "DELETE", + // Request path + request -> { + StringBuilder buf = new StringBuilder(); + buf.append("/_plugins/_ml/connectors/"); + SimpleEndpoint.pathEncode(request.connectorId, buf); + return buf.toString(); + }, + // Request parameters + SimpleEndpoint.emptyMap(), + SimpleEndpoint.emptyMap(), + false, + DeleteConnectorResponse._DESERIALIZER + ); +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteConnectorResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteConnectorResponse.java new file mode 100644 index 0000000000..1ba0900cc8 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteConnectorResponse.java @@ -0,0 +1,76 @@ +/* + * 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 java.util.function.Function; +import javax.annotation.Generated; +import org.opensearch.client.json.JsonpDeserializable; +import org.opensearch.client.json.JsonpDeserializer; +import org.opensearch.client.json.ObjectBuilderDeserializer; +import org.opensearch.client.json.ObjectDeserializer; +import org.opensearch.client.opensearch._types.WriteResponseBase; +import org.opensearch.client.util.ObjectBuilder; + +// typedef: ml.delete_connector.Response + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class DeleteConnectorResponse extends WriteResponseBase { + + // --------------------------------------------------------------------------------------------- + + private DeleteConnectorResponse(Builder builder) { + super(builder); + } + + public static DeleteConnectorResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DeleteConnectorResponse}. + */ + public static class Builder extends WriteResponseBase.AbstractBuilder implements ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DeleteConnectorResponse}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public DeleteConnectorResponse build() { + _checkSingleUse(); + + return new DeleteConnectorResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DeleteConnectorResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + DeleteConnectorResponse::setupDeleteConnectorResponseDeserializer + ); + + protected static void setupDeleteConnectorResponseDeserializer(ObjectDeserializer op) { + WriteResponseBase.setupWriteResponseBaseDeserializer(op); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelGroupResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelGroupResponse.java index d46916f638..742257bf99 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelGroupResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelGroupResponse.java @@ -59,6 +59,7 @@ public DeleteModelGroupResponse build() { return new DeleteModelGroupResponse(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelResponse.java index dcf77c93aa..1395e93e08 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteModelResponse.java @@ -59,6 +59,7 @@ public DeleteModelResponse build() { return new DeleteModelResponse(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteTaskResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteTaskResponse.java index f6d5e8c95d..93e33ffd2c 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteTaskResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeleteTaskResponse.java @@ -59,6 +59,7 @@ public DeleteTaskResponse build() { return new DeleteTaskResponse(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeployModelResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeployModelResponse.java index 6ba333cde4..23b01f8025 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeployModelResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/DeployModelResponse.java @@ -142,6 +142,7 @@ public DeployModelResponse build() { return new DeployModelResponse(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetModelGroupResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetModelGroupResponse.java index 4a8321c607..9ca56a1e29 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetModelGroupResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetModelGroupResponse.java @@ -237,6 +237,7 @@ public GetModelGroupResponse build() { return new GetModelGroupResponse(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetTaskResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetTaskResponse.java index 610b2c1cb4..6e0f7522e2 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetTaskResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/GetTaskResponse.java @@ -365,6 +365,7 @@ public GetTaskResponse build() { return new GetTaskResponse(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Headers.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Headers.java new file mode 100644 index 0000000000..837e3b4332 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Headers.java @@ -0,0 +1,161 @@ +/* + * 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.Map; +import java.util.function.Function; +import javax.annotation.Generated; +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.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.Headers + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class Headers implements PlainJsonSerializable { + + @Nullable + private final String contentType; + + private final Map metadata; + + // --------------------------------------------------------------------------------------------- + + private Headers(Builder builder) { + this.contentType = builder.contentType; + this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); + } + + public static Headers of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code content_type} + */ + @Nullable + public final String contentType() { + return this.contentType; + } + + /** + */ + public final Map metadata() { + return this.metadata; + } + + /** + * 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.contentType != null) { + generator.writeKey("content_type"); + generator.write(this.contentType); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Headers}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String contentType; + @Nullable + private Map metadata; + + /** + * API name: {@code content_type} + */ + public final Builder contentType(@Nullable String value) { + this.contentType = value; + return this; + } + + /** + * + *

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

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

+ * Adds an entry to metadata. + *

+ */ + public final Builder metadata(String key, JsonData value) { + this.metadata = _mapPut(this.metadata, key, value); + return this; + } + + /** + * Builds a {@link Headers}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public Headers build() { + _checkSingleUse(); + + return new Headers(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Headers} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + Headers::setupHeadersDeserializer + ); + + protected static void setupHeadersDeserializer(ObjectDeserializer op) { + op.add(Builder::contentType, JsonpDeserializer.stringDeserializer(), "content_type"); + op.setUnknownFieldHandler((builder, name, parser, mapper) -> { + if (builder.metadata == null) { + builder.metadata = new HashMap<>(); + } + builder.metadata.put(name, JsonData._DESERIALIZER.deserialize(parser, mapper)); + }); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/LLM.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/LLM.java new file mode 100644 index 0000000000..77a786f256 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/LLM.java @@ -0,0 +1,161 @@ +/* + * 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.Map; +import java.util.function.Function; +import javax.annotation.Generated; +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.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.LLM + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class LLM implements PlainJsonSerializable { + + @Nullable + private final String modelId; + + private final Map parameters; + + // --------------------------------------------------------------------------------------------- + + private LLM(Builder builder) { + this.modelId = builder.modelId; + this.parameters = ApiTypeHelper.unmodifiable(builder.parameters); + } + + public static LLM of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code model_id} + */ + @Nullable + public final String modelId() { + return this.modelId; + } + + /** + * API name: {@code parameters} + */ + public final Map parameters() { + return this.parameters; + } + + /** + * 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.modelId != null) { + generator.writeKey("model_id"); + generator.write(this.modelId); + } + + if (ApiTypeHelper.isDefined(this.parameters)) { + generator.writeKey("parameters"); + generator.writeStartObject(); + for (Map.Entry item0 : this.parameters.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + } + generator.writeEnd(); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LLM}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String modelId; + @Nullable + private Map parameters; + + /** + * API name: {@code model_id} + */ + public final Builder modelId(@Nullable String value) { + this.modelId = value; + return this; + } + + /** + * API name: {@code parameters} + * + *

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

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

+ * Adds an entry to parameters. + *

+ */ + public final Builder parameters(String key, JsonData value) { + this.parameters = _mapPut(this.parameters, key, value); + return this; + } + + /** + * Builds a {@link LLM}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public LLM build() { + _checkSingleUse(); + + return new LLM(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LLM} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, LLM::setupLLMDeserializer); + + protected static void setupLLMDeserializer(ObjectDeserializer op) { + op.add(Builder::modelId, JsonpDeserializer.stringDeserializer(), "model_id"); + op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Memory.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Memory.java new file mode 100644 index 0000000000..dfc0a9083c --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Memory.java @@ -0,0 +1,114 @@ +/* + * 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.function.Function; +import javax.annotation.Generated; +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.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.Memory + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class Memory implements PlainJsonSerializable { + + @Nullable + private final String type; + + // --------------------------------------------------------------------------------------------- + + private Memory(Builder builder) { + this.type = builder.type; + } + + public static Memory of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code type} + */ + @Nullable + public final String type() { + return this.type; + } + + /** + * 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.type != null) { + generator.writeKey("type"); + generator.write(this.type); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Memory}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String type; + + /** + * API name: {@code type} + */ + public final Builder type(@Nullable String value) { + this.type = value; + return this; + } + + /** + * Builds a {@link Memory}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public Memory build() { + _checkSingleUse(); + + return new Memory(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Memory} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + Memory::setupMemoryDeserializer + ); + + protected static void setupMemoryDeserializer(ObjectDeserializer op) { + op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/OpenSearchMlAsyncClient.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/OpenSearchMlAsyncClient.java index 8f2ab231ba..4f5332eb7f 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/OpenSearchMlAsyncClient.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/OpenSearchMlAsyncClient.java @@ -18,9 +18,7 @@ import javax.annotation.Generated; import javax.annotation.Nullable; import org.opensearch.client.ApiClient; -import org.opensearch.client.opensearch._types.ErrorResponse; import org.opensearch.client.opensearch._types.OpenSearchException; -import org.opensearch.client.transport.JsonEndpoint; import org.opensearch.client.transport.OpenSearchTransport; import org.opensearch.client.transport.TransportOptions; import org.opensearch.client.util.ObjectBuilder; @@ -43,19 +41,75 @@ public OpenSearchMlAsyncClient withTransportOptions(@Nullable TransportOptions t return new OpenSearchMlAsyncClient(this.transport, transportOptions); } + // ----- Endpoint: ml.create_connector + + /** + * Creates a standalone connector. + */ + public CompletableFuture createConnector(CreateConnectorRequest request) throws IOException, + OpenSearchException { + return this.transport.performRequestAsync(request, CreateConnectorRequest._ENDPOINT, this.transportOptions); + } + + /** + * Creates a standalone connector. + * + * @param fn a function that initializes a builder to create the {@link CreateConnectorRequest} + */ + public final CompletableFuture createConnector( + Function> fn + ) throws IOException, OpenSearchException { + return createConnector(fn.apply(new CreateConnectorRequest.Builder()).build()); + } + + // ----- Endpoint: ml.delete_agent + + /** + * Delete an agent. + */ + public CompletableFuture deleteAgent(DeleteAgentRequest request) throws IOException, OpenSearchException { + return this.transport.performRequestAsync(request, DeleteAgentRequest._ENDPOINT, this.transportOptions); + } + + /** + * Delete an agent. + * + * @param fn a function that initializes a builder to create the {@link DeleteAgentRequest} + */ + public final CompletableFuture deleteAgent( + Function> fn + ) throws IOException, OpenSearchException { + return deleteAgent(fn.apply(new DeleteAgentRequest.Builder()).build()); + } + + // ----- Endpoint: ml.delete_connector + + /** + * Deletes a standalone connector. + */ + public CompletableFuture deleteConnector(DeleteConnectorRequest request) throws IOException, + OpenSearchException { + return this.transport.performRequestAsync(request, DeleteConnectorRequest._ENDPOINT, this.transportOptions); + } + + /** + * Deletes a standalone connector. + * + * @param fn a function that initializes a builder to create the {@link DeleteConnectorRequest} + */ + public final CompletableFuture deleteConnector( + Function> fn + ) throws IOException, OpenSearchException { + return deleteConnector(fn.apply(new DeleteConnectorRequest.Builder()).build()); + } + // ----- Endpoint: ml.delete_model /** * Deletes a model. */ public CompletableFuture deleteModel(DeleteModelRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - DeleteModelRequest, - DeleteModelResponse, - ErrorResponse>) DeleteModelRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + return this.transport.performRequestAsync(request, DeleteModelRequest._ENDPOINT, this.transportOptions); } /** @@ -76,13 +130,7 @@ public final CompletableFuture deleteModel( */ public CompletableFuture deleteModelGroup(DeleteModelGroupRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - DeleteModelGroupRequest, - DeleteModelGroupResponse, - ErrorResponse>) DeleteModelGroupRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + return this.transport.performRequestAsync(request, DeleteModelGroupRequest._ENDPOINT, this.transportOptions); } /** @@ -102,13 +150,7 @@ public final CompletableFuture deleteModelGroup( * Deletes a task. */ public CompletableFuture deleteTask(DeleteTaskRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - DeleteTaskRequest, - DeleteTaskResponse, - ErrorResponse>) DeleteTaskRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + return this.transport.performRequestAsync(request, DeleteTaskRequest._ENDPOINT, this.transportOptions); } /** @@ -127,13 +169,7 @@ public final CompletableFuture deleteTask(Function deployModel(DeployModelRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - DeployModelRequest, - DeployModelResponse, - ErrorResponse>) DeployModelRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + return this.transport.performRequestAsync(request, DeployModelRequest._ENDPOINT, this.transportOptions); } /** @@ -153,13 +189,7 @@ public final CompletableFuture deployModel( * Retrieves a model group. */ public CompletableFuture getModelGroup(GetModelGroupRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - GetModelGroupRequest, - GetModelGroupResponse, - ErrorResponse>) GetModelGroupRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + return this.transport.performRequestAsync(request, GetModelGroupRequest._ENDPOINT, this.transportOptions); } /** @@ -179,13 +209,7 @@ public final CompletableFuture getModelGroup( * Retrieves a task. */ public CompletableFuture getTask(GetTaskRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - GetTaskRequest, - GetTaskResponse, - ErrorResponse>) GetTaskRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + return this.transport.performRequestAsync(request, GetTaskRequest._ENDPOINT, this.transportOptions); } /** @@ -198,19 +222,33 @@ public final CompletableFuture getTask(Function registerAgents(RegisterAgentsRequest request) throws IOException, OpenSearchException { + return this.transport.performRequestAsync(request, RegisterAgentsRequest._ENDPOINT, this.transportOptions); + } + + /** + * Register an agent. + * + * @param fn a function that initializes a builder to create the {@link RegisterAgentsRequest} + */ + public final CompletableFuture registerAgents( + Function> fn + ) throws IOException, OpenSearchException { + return registerAgents(fn.apply(new RegisterAgentsRequest.Builder()).build()); + } + // ----- Endpoint: ml.register_model /** * Registers a model. */ public CompletableFuture registerModel(RegisterModelRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - RegisterModelRequest, - RegisterModelResponse, - ErrorResponse>) RegisterModelRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + return this.transport.performRequestAsync(request, RegisterModelRequest._ENDPOINT, this.transportOptions); } /** @@ -231,13 +269,7 @@ public final CompletableFuture registerModel( */ public CompletableFuture registerModelGroup(RegisterModelGroupRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - RegisterModelGroupRequest, - RegisterModelGroupResponse, - ErrorResponse>) RegisterModelGroupRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + return this.transport.performRequestAsync(request, RegisterModelGroupRequest._ENDPOINT, this.transportOptions); } /** @@ -257,13 +289,7 @@ public final CompletableFuture registerModelGroup( * Undeploys a model. */ public CompletableFuture undeployModel(UndeployModelRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - UndeployModelRequest, - UndeployModelResponse, - ErrorResponse>) UndeployModelRequest._ENDPOINT; - - return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + return this.transport.performRequestAsync(request, UndeployModelRequest._ENDPOINT, this.transportOptions); } /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/OpenSearchMlClient.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/OpenSearchMlClient.java index d3aba915be..a93402b689 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/OpenSearchMlClient.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/OpenSearchMlClient.java @@ -17,9 +17,7 @@ import javax.annotation.Generated; import javax.annotation.Nullable; import org.opensearch.client.ApiClient; -import org.opensearch.client.opensearch._types.ErrorResponse; import org.opensearch.client.opensearch._types.OpenSearchException; -import org.opensearch.client.transport.JsonEndpoint; import org.opensearch.client.transport.OpenSearchTransport; import org.opensearch.client.transport.TransportOptions; import org.opensearch.client.util.ObjectBuilder; @@ -42,19 +40,70 @@ public OpenSearchMlClient withTransportOptions(@Nullable TransportOptions transp return new OpenSearchMlClient(this.transport, transportOptions); } + // ----- Endpoint: ml.create_connector + + /** + * Creates a standalone connector. + */ + public CreateConnectorResponse createConnector(CreateConnectorRequest request) throws IOException, OpenSearchException { + return this.transport.performRequest(request, CreateConnectorRequest._ENDPOINT, this.transportOptions); + } + + /** + * Creates a standalone connector. + * + * @param fn a function that initializes a builder to create the {@link CreateConnectorRequest} + */ + public final CreateConnectorResponse createConnector(Function> fn) + throws IOException, OpenSearchException { + return createConnector(fn.apply(new CreateConnectorRequest.Builder()).build()); + } + + // ----- Endpoint: ml.delete_agent + + /** + * Delete an agent. + */ + public DeleteAgentResponse deleteAgent(DeleteAgentRequest request) throws IOException, OpenSearchException { + return this.transport.performRequest(request, DeleteAgentRequest._ENDPOINT, this.transportOptions); + } + + /** + * Delete an agent. + * + * @param fn a function that initializes a builder to create the {@link DeleteAgentRequest} + */ + public final DeleteAgentResponse deleteAgent(Function> fn) + throws IOException, OpenSearchException { + return deleteAgent(fn.apply(new DeleteAgentRequest.Builder()).build()); + } + + // ----- Endpoint: ml.delete_connector + + /** + * Deletes a standalone connector. + */ + public DeleteConnectorResponse deleteConnector(DeleteConnectorRequest request) throws IOException, OpenSearchException { + return this.transport.performRequest(request, DeleteConnectorRequest._ENDPOINT, this.transportOptions); + } + + /** + * Deletes a standalone connector. + * + * @param fn a function that initializes a builder to create the {@link DeleteConnectorRequest} + */ + public final DeleteConnectorResponse deleteConnector(Function> fn) + throws IOException, OpenSearchException { + return deleteConnector(fn.apply(new DeleteConnectorRequest.Builder()).build()); + } + // ----- Endpoint: ml.delete_model /** * Deletes a model. */ public DeleteModelResponse deleteModel(DeleteModelRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - DeleteModelRequest, - DeleteModelResponse, - ErrorResponse>) DeleteModelRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); + return this.transport.performRequest(request, DeleteModelRequest._ENDPOINT, this.transportOptions); } /** @@ -73,13 +122,7 @@ public final DeleteModelResponse deleteModel(Function endpoint = (JsonEndpoint< - DeleteModelGroupRequest, - DeleteModelGroupResponse, - ErrorResponse>) DeleteModelGroupRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); + return this.transport.performRequest(request, DeleteModelGroupRequest._ENDPOINT, this.transportOptions); } /** @@ -99,13 +142,7 @@ public final DeleteModelGroupResponse deleteModelGroup( * Deletes a task. */ public DeleteTaskResponse deleteTask(DeleteTaskRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - DeleteTaskRequest, - DeleteTaskResponse, - ErrorResponse>) DeleteTaskRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); + return this.transport.performRequest(request, DeleteTaskRequest._ENDPOINT, this.transportOptions); } /** @@ -124,13 +161,7 @@ public final DeleteTaskResponse deleteTask(Function endpoint = (JsonEndpoint< - DeployModelRequest, - DeployModelResponse, - ErrorResponse>) DeployModelRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); + return this.transport.performRequest(request, DeployModelRequest._ENDPOINT, this.transportOptions); } /** @@ -149,13 +180,7 @@ public final DeployModelResponse deployModel(Function endpoint = (JsonEndpoint< - GetModelGroupRequest, - GetModelGroupResponse, - ErrorResponse>) GetModelGroupRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); + return this.transport.performRequest(request, GetModelGroupRequest._ENDPOINT, this.transportOptions); } /** @@ -174,13 +199,7 @@ public final GetModelGroupResponse getModelGroup(Function endpoint = (JsonEndpoint< - GetTaskRequest, - GetTaskResponse, - ErrorResponse>) GetTaskRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); + return this.transport.performRequest(request, GetTaskRequest._ENDPOINT, this.transportOptions); } /** @@ -193,19 +212,32 @@ public final GetTaskResponse getTask(Function> fn) + throws IOException, OpenSearchException { + return registerAgents(fn.apply(new RegisterAgentsRequest.Builder()).build()); + } + // ----- Endpoint: ml.register_model /** * Registers a model. */ public RegisterModelResponse registerModel(RegisterModelRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - RegisterModelRequest, - RegisterModelResponse, - ErrorResponse>) RegisterModelRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); + return this.transport.performRequest(request, RegisterModelRequest._ENDPOINT, this.transportOptions); } /** @@ -224,13 +256,7 @@ public final RegisterModelResponse registerModel(Function endpoint = (JsonEndpoint< - RegisterModelGroupRequest, - RegisterModelGroupResponse, - ErrorResponse>) RegisterModelGroupRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); + return this.transport.performRequest(request, RegisterModelGroupRequest._ENDPOINT, this.transportOptions); } /** @@ -250,13 +276,7 @@ public final RegisterModelGroupResponse registerModelGroup( * Undeploys a model. */ public UndeployModelResponse undeployModel(UndeployModelRequest request) throws IOException, OpenSearchException { - @SuppressWarnings("unchecked") - JsonEndpoint endpoint = (JsonEndpoint< - UndeployModelRequest, - UndeployModelResponse, - ErrorResponse>) UndeployModelRequest._ENDPOINT; - - return this.transport.performRequest(request, endpoint, this.transportOptions); + return this.transport.performRequest(request, UndeployModelRequest._ENDPOINT, this.transportOptions); } /** 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 new file mode 100644 index 0000000000..155e0de881 --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java @@ -0,0 +1,389 @@ +/* + * 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.List; +import java.util.Map; +import java.util.function.Function; +import javax.annotation.Generated; +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.opensearch._types.ErrorResponse; +import org.opensearch.client.opensearch._types.RequestBase; +import org.opensearch.client.transport.Endpoint; +import org.opensearch.client.transport.endpoints.SimpleEndpoint; +import org.opensearch.client.util.ApiTypeHelper; +import org.opensearch.client.util.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.register_agents.Request + +/** + * Register an agent. + */ +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class RegisterAgentsRequest extends RequestBase implements PlainJsonSerializable { + + @Nullable + private final String appType; + + @Nullable + private final String description; + + @Nullable + private final LLM llm; + + @Nullable + private final Memory memory; + + private final String name; + + private final Map parameters; + + private final List tools; + + private final String type; + + // --------------------------------------------------------------------------------------------- + + private RegisterAgentsRequest(Builder builder) { + this.appType = builder.appType; + this.description = builder.description; + this.llm = builder.llm; + this.memory = builder.memory; + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.parameters = ApiTypeHelper.unmodifiable(builder.parameters); + this.tools = ApiTypeHelper.unmodifiable(builder.tools); + this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); + } + + public static RegisterAgentsRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code app_type} + */ + @Nullable + public final String appType() { + return this.appType; + } + + /** + * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * API name: {@code llm} + */ + @Nullable + public final LLM llm() { + return this.llm; + } + + /** + * API name: {@code memory} + */ + @Nullable + public final Memory memory() { + return this.memory; + } + + /** + * Required - API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * API name: {@code parameters} + */ + public final Map parameters() { + return this.parameters; + } + + /** + * API name: {@code tools} + */ + public final List tools() { + return this.tools; + } + + /** + * Required - API name: {@code type} + */ + public final String type() { + return this.type; + } + + /** + * 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.appType != null) { + generator.writeKey("app_type"); + generator.write(this.appType); + } + + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + } + + if (this.llm != null) { + generator.writeKey("llm"); + this.llm.serialize(generator, mapper); + } + + if (this.memory != null) { + generator.writeKey("memory"); + this.memory.serialize(generator, mapper); + } + + generator.writeKey("name"); + generator.write(this.name); + + if (ApiTypeHelper.isDefined(this.parameters)) { + generator.writeKey("parameters"); + generator.writeStartObject(); + for (Map.Entry item0 : this.parameters.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + } + generator.writeEnd(); + } + + if (ApiTypeHelper.isDefined(this.tools)) { + generator.writeKey("tools"); + generator.writeStartArray(); + for (ToolItems item0 : this.tools) { + item0.serialize(generator, mapper); + } + generator.writeEnd(); + } + + generator.writeKey("type"); + generator.write(this.type); + } + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RegisterAgentsRequest}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String appType; + @Nullable + private String description; + @Nullable + private LLM llm; + @Nullable + private Memory memory; + private String name; + @Nullable + private Map parameters; + @Nullable + private List tools; + private String type; + + /** + * API name: {@code app_type} + */ + public final Builder appType(@Nullable String value) { + this.appType = value; + return this; + } + + /** + * API name: {@code description} + */ + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * API name: {@code llm} + */ + public final Builder llm(@Nullable LLM value) { + this.llm = value; + return this; + } + + /** + * API name: {@code llm} + */ + public final Builder llm(Function> fn) { + return llm(fn.apply(new LLM.Builder()).build()); + } + + /** + * API name: {@code memory} + */ + public final Builder memory(@Nullable Memory value) { + this.memory = value; + return this; + } + + /** + * API name: {@code memory} + */ + public final Builder memory(Function> fn) { + return memory(fn.apply(new Memory.Builder()).build()); + } + + /** + * Required - API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + /** + * API name: {@code parameters} + * + *

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

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

+ * Adds an entry to parameters. + *

+ */ + public final Builder parameters(String key, JsonData value) { + this.parameters = _mapPut(this.parameters, key, value); + return this; + } + + /** + * API name: {@code tools} + * + *

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

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

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

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

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

+ */ + public final Builder tools(Function> fn) { + return tools(fn.apply(new ToolItems.Builder()).build()); + } + + /** + * Required - API name: {@code type} + */ + public final Builder type(String value) { + this.type = value; + return this; + } + + /** + * Builds a {@link RegisterAgentsRequest}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public RegisterAgentsRequest build() { + _checkSingleUse(); + + return new RegisterAgentsRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RegisterAgentsRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + RegisterAgentsRequest::setupRegisterAgentsRequestDeserializer + ); + + protected static void setupRegisterAgentsRequestDeserializer(ObjectDeserializer op) { + op.add(Builder::appType, JsonpDeserializer.stringDeserializer(), "app_type"); + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + 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::tools, JsonpDeserializer.arrayDeserializer(ToolItems._DESERIALIZER), "tools"); + op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code ml.register_agents}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + // Request method + request -> "POST", + // Request path + request -> "/_plugins/_ml/agents/_register", + // Request parameters + SimpleEndpoint.emptyMap(), + SimpleEndpoint.emptyMap(), + true, + RegisterAgentsResponse._DESERIALIZER + ); +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsResponse.java new file mode 100644 index 0000000000..e69ff9e0de --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsResponse.java @@ -0,0 +1,114 @@ +/* + * 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.function.Function; +import javax.annotation.Generated; +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.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.register_agents.Response + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class RegisterAgentsResponse implements PlainJsonSerializable { + + @Nullable + private final String agentId; + + // --------------------------------------------------------------------------------------------- + + private RegisterAgentsResponse(Builder builder) { + this.agentId = builder.agentId; + } + + public static RegisterAgentsResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code agent_id} + */ + @Nullable + public final String agentId() { + return this.agentId; + } + + /** + * 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.agentId != null) { + generator.writeKey("agent_id"); + generator.write(this.agentId); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RegisterAgentsResponse}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String agentId; + + /** + * API name: {@code agent_id} + */ + public final Builder agentId(@Nullable String value) { + this.agentId = value; + return this; + } + + /** + * Builds a {@link RegisterAgentsResponse}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public RegisterAgentsResponse build() { + _checkSingleUse(); + + return new RegisterAgentsResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RegisterAgentsResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + RegisterAgentsResponse::setupRegisterAgentsResponseDeserializer + ); + + protected static void setupRegisterAgentsResponseDeserializer(ObjectDeserializer op) { + op.add(Builder::agentId, JsonpDeserializer.stringDeserializer(), "agent_id"); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupRequest.java index ca633f61e5..2cf102fca7 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupRequest.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupRequest.java @@ -259,6 +259,7 @@ public RegisterModelGroupRequest build() { return new RegisterModelGroupRequest(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupResponse.java index 6a04cf66ad..240993a8c8 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelGroupResponse.java @@ -128,6 +128,7 @@ public RegisterModelGroupResponse build() { return new RegisterModelGroupResponse(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelRequest.java index c94be40813..98fb7909fd 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelRequest.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelRequest.java @@ -227,6 +227,7 @@ public RegisterModelRequest build() { return new RegisterModelRequest(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelResponse.java index 3b42ed8903..af781c3769 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterModelResponse.java @@ -114,6 +114,7 @@ public RegisterModelResponse build() { return new RegisterModelResponse(this); } } + // --------------------------------------------------------------------------------------------- /** 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 new file mode 100644 index 0000000000..b52d7fae3a --- /dev/null +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ToolItems.java @@ -0,0 +1,236 @@ +/* + * 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.Map; +import java.util.function.Function; +import javax.annotation.Generated; +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.ObjectBuilder; +import org.opensearch.client.util.ObjectBuilderBase; + +// typedef: ml.ToolItems + +@JsonpDeserializable +@Generated("org.opensearch.client.codegen.CodeGenerator") +public class ToolItems implements PlainJsonSerializable { + + @Nullable + private final String name; + + private final Map parameters; + + @Nullable + private final String type; + + private final Map metadata; + + // --------------------------------------------------------------------------------------------- + + private ToolItems(Builder builder) { + this.name = builder.name; + this.parameters = ApiTypeHelper.unmodifiable(builder.parameters); + this.type = builder.type; + this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); + } + + public static ToolItems of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * API name: {@code parameters} + */ + public final Map parameters() { + return this.parameters; + } + + /** + * API name: {@code type} + */ + @Nullable + public final String type() { + return this.type; + } + + /** + */ + public final Map metadata() { + return this.metadata; + } + + /** + * 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.name != null) { + generator.writeKey("name"); + generator.write(this.name); + } + + if (ApiTypeHelper.isDefined(this.parameters)) { + generator.writeKey("parameters"); + generator.writeStartObject(); + for (Map.Entry item0 : this.parameters.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + } + generator.writeEnd(); + } + + if (this.type != null) { + generator.writeKey("type"); + generator.write(this.type); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ToolItems}. + */ + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + @Nullable + private String name; + @Nullable + private Map parameters; + @Nullable + private String type; + @Nullable + private Map metadata; + + /** + * API name: {@code name} + */ + public final Builder name(@Nullable String value) { + this.name = value; + return this; + } + + /** + * API name: {@code parameters} + * + *

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

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

+ * Adds an entry to parameters. + *

+ */ + public final Builder parameters(String key, JsonData value) { + this.parameters = _mapPut(this.parameters, key, value); + return this; + } + + /** + * API name: {@code type} + */ + public final Builder type(@Nullable String value) { + this.type = value; + return this; + } + + /** + * + *

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

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

+ * Adds an entry to metadata. + *

+ */ + public final Builder metadata(String key, JsonData value) { + this.metadata = _mapPut(this.metadata, key, value); + return this; + } + + /** + * Builds a {@link ToolItems}. + * + * @throws NullPointerException if some of the required fields are null. + */ + public ToolItems build() { + _checkSingleUse(); + + return new ToolItems(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ToolItems} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, + ToolItems::setupToolItemsDeserializer + ); + + protected static void setupToolItemsDeserializer(ObjectDeserializer op) { + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters"); + op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type"); + op.setUnknownFieldHandler((builder, name, parser, mapper) -> { + if (builder.metadata == null) { + builder.metadata = new HashMap<>(); + } + builder.metadata.put(name, JsonData._DESERIALIZER.deserialize(parser, mapper)); + }); + } +} diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelNode.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelNode.java index 6ba10b82ca..18b66b4dc3 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelNode.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelNode.java @@ -119,6 +119,7 @@ public UndeployModelNode build() { return new UndeployModelNode(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelResponse.java index f7cdfea593..83128a460a 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UndeployModelResponse.java @@ -121,6 +121,7 @@ public UndeployModelResponse build() { return new UndeployModelResponse(this); } } + // --------------------------------------------------------------------------------------------- /** diff --git a/java-codegen/opensearch-openapi.yaml b/java-codegen/opensearch-openapi.yaml index 889bedbbdf..e9e4e42740 100644 --- a/java-codegen/opensearch-openapi.yaml +++ b/java-codegen/opensearch-openapi.yaml @@ -1501,34 +1501,6 @@ paths: responses: '200': $ref: '#/components/responses/nodes.hot_threads@200' - /_cluster/nodes/{node_id}/hotthreads: - get: - operationId: nodes.hot_threads.3 - x-operation-group: nodes.hot_threads - x-ignorable: true - deprecated: true - x-deprecation-message: The hot threads API accepts `hotthreads` but only `hot_threads` is documented - x-version-added: '1.0' - x-version-deprecated: '1.0' - description: Returns information about hot threads on each node in the cluster. - externalDocs: - url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ - parameters: - - $ref: '#/components/parameters/nodes.hot_threads::path.node_id' - - $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads' - - $ref: '#/components/parameters/nodes.hot_threads::query.interval' - - $ref: '#/components/parameters/nodes.hot_threads::query.snapshots' - - $ref: '#/components/parameters/nodes.hot_threads::query.threads' - - $ref: '#/components/parameters/nodes.hot_threads::query.timeout' - - $ref: '#/components/parameters/nodes.hot_threads::query.type' - - $ref: '#/components/parameters/_global::query.pretty' - - $ref: '#/components/parameters/_global::query.human' - - $ref: '#/components/parameters/_global::query.error_trace' - - $ref: '#/components/parameters/_global::query.source' - - $ref: '#/components/parameters/_global::query.filter_path' - responses: - '200': - $ref: '#/components/responses/nodes.hot_threads@200' /_cluster/nodes/hot_threads: get: operationId: nodes.hot_threads.0 @@ -1556,33 +1528,6 @@ paths: responses: '200': $ref: '#/components/responses/nodes.hot_threads@200' - /_cluster/nodes/hotthreads: - get: - operationId: nodes.hot_threads.1 - x-operation-group: nodes.hot_threads - x-ignorable: true - deprecated: true - x-deprecation-message: The hot threads API accepts `hotthreads` but only `hot_threads` is documented - x-version-added: '1.0' - x-version-deprecated: '1.0' - description: Returns information about hot threads on each node in the cluster. - externalDocs: - url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ - parameters: - - $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads' - - $ref: '#/components/parameters/nodes.hot_threads::query.interval' - - $ref: '#/components/parameters/nodes.hot_threads::query.snapshots' - - $ref: '#/components/parameters/nodes.hot_threads::query.threads' - - $ref: '#/components/parameters/nodes.hot_threads::query.timeout' - - $ref: '#/components/parameters/nodes.hot_threads::query.type' - - $ref: '#/components/parameters/_global::query.pretty' - - $ref: '#/components/parameters/_global::query.human' - - $ref: '#/components/parameters/_global::query.error_trace' - - $ref: '#/components/parameters/_global::query.source' - - $ref: '#/components/parameters/_global::query.filter_path' - responses: - '200': - $ref: '#/components/responses/nodes.hot_threads@200' /_cluster/pending_tasks: get: operationId: cluster.pending_tasks.0 @@ -1663,6 +1608,8 @@ paths: - $ref: '#/components/parameters/_global::query.error_trace' - $ref: '#/components/parameters/_global::query.source' - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/cluster.put_weighted_routing' responses: '200': $ref: '#/components/responses/cluster.put_weighted_routing@200' @@ -1674,6 +1621,8 @@ paths: description: Delete weighted shard routing weights. externalDocs: url: https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-awareness/#example-deleting-weights + requestBody: + $ref: '#/components/requestBodies/cluster.delete_weighted_routing' responses: '200': $ref: '#/components/responses/cluster.delete_weighted_routing@200' @@ -3101,34 +3050,6 @@ paths: responses: '200': $ref: '#/components/responses/nodes.hot_threads@200' - /_nodes/{node_id}/hotthreads: - get: - operationId: nodes.hot_threads.7 - x-operation-group: nodes.hot_threads - x-ignorable: true - deprecated: true - x-deprecation-message: The hot threads API accepts `hotthreads` but only `hot_threads` is documented - x-version-added: '1.0' - x-version-deprecated: '1.0' - description: Returns information about hot threads on each node in the cluster. - externalDocs: - url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ - parameters: - - $ref: '#/components/parameters/nodes.hot_threads::path.node_id' - - $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads' - - $ref: '#/components/parameters/nodes.hot_threads::query.interval' - - $ref: '#/components/parameters/nodes.hot_threads::query.snapshots' - - $ref: '#/components/parameters/nodes.hot_threads::query.threads' - - $ref: '#/components/parameters/nodes.hot_threads::query.timeout' - - $ref: '#/components/parameters/nodes.hot_threads::query.type' - - $ref: '#/components/parameters/_global::query.pretty' - - $ref: '#/components/parameters/_global::query.human' - - $ref: '#/components/parameters/_global::query.error_trace' - - $ref: '#/components/parameters/_global::query.source' - - $ref: '#/components/parameters/_global::query.filter_path' - responses: - '200': - $ref: '#/components/responses/nodes.hot_threads@200' /_nodes/{node_id}/reload_secure_settings: post: operationId: nodes.reload_secure_settings.1 @@ -3293,33 +3214,6 @@ paths: responses: '200': $ref: '#/components/responses/nodes.hot_threads@200' - /_nodes/hotthreads: - get: - operationId: nodes.hot_threads.5 - x-operation-group: nodes.hot_threads - x-ignorable: true - deprecated: true - x-deprecation-message: The hot threads API accepts `hotthreads` but only `hot_threads` is documented - x-version-added: '1.0' - x-version-deprecated: '1.0' - description: Returns information about hot threads on each node in the cluster. - externalDocs: - url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ - parameters: - - $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads' - - $ref: '#/components/parameters/nodes.hot_threads::query.interval' - - $ref: '#/components/parameters/nodes.hot_threads::query.snapshots' - - $ref: '#/components/parameters/nodes.hot_threads::query.threads' - - $ref: '#/components/parameters/nodes.hot_threads::query.timeout' - - $ref: '#/components/parameters/nodes.hot_threads::query.type' - - $ref: '#/components/parameters/_global::query.pretty' - - $ref: '#/components/parameters/_global::query.human' - - $ref: '#/components/parameters/_global::query.error_trace' - - $ref: '#/components/parameters/_global::query.source' - - $ref: '#/components/parameters/_global::query.filter_path' - responses: - '200': - $ref: '#/components/responses/nodes.hot_threads@200' /_nodes/reload_secure_settings: post: operationId: nodes.reload_secure_settings.0 @@ -3473,6 +3367,709 @@ paths: $ref: '#/components/responses/security.get_sslinfo@200' '500': $ref: '#/components/responses/security.get_sslinfo@500' + /_plugins/_asynchronous_search: + post: + operationId: asynchronous_search.search.0 + x-operation-group: asynchronous_search.search + x-version-added: '1.0' + description: Perform an asynchronous search. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/async/index/#rest-api + parameters: + - $ref: '#/components/parameters/asynchronous_search.search::query.index' + - $ref: '#/components/parameters/asynchronous_search.search::query.keep_alive' + - $ref: '#/components/parameters/asynchronous_search.search::query.keep_on_completion' + - $ref: '#/components/parameters/asynchronous_search.search::query.wait_for_completion_timeout' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/asynchronous_search.search' + responses: + '200': + $ref: '#/components/responses/asynchronous_search.search@200' + /_plugins/_asynchronous_search/{id}: + delete: + operationId: asynchronous_search.delete.0 + x-operation-group: asynchronous_search.delete + x-version-added: '1.0' + description: Delete asynchronous search. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/async/index/#delete-searches-and-results + parameters: + - $ref: '#/components/parameters/asynchronous_search.delete::path.id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/asynchronous_search.delete@200' + get: + operationId: asynchronous_search.get.0 + x-operation-group: asynchronous_search.get + x-version-added: '1.0' + description: Get partial responses from asynchronous search. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/async/index/#get-partial-results + parameters: + - $ref: '#/components/parameters/asynchronous_search.get::path.id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/asynchronous_search.get@200' + /_plugins/_asynchronous_search/stats: + get: + operationId: asynchronous_search.stats.0 + x-operation-group: asynchronous_search.stats + x-version-added: '1.0' + description: Monitoring of asynchronous searches that are running, completed, and/or persisted. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/async/index/#monitor-stats + responses: + '200': + $ref: '#/components/responses/asynchronous_search.stats@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + /_plugins/_flow_framework/workflow: + post: + operationId: flow_framework.create.0 + x-operation-group: flow_framework.create + x-version-added: '2.12' + description: Create a workflow. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/create-workflow/ + parameters: + - $ref: '#/components/parameters/flow_framework.create::query.provision' + - $ref: '#/components/parameters/flow_framework.create::query.reprovision' + - $ref: '#/components/parameters/flow_framework.create::query.update_fields' + - $ref: '#/components/parameters/flow_framework.create::query.use_case' + - $ref: '#/components/parameters/flow_framework.create::query.validation' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/flow_framework.create' + responses: + '201': + $ref: '#/components/responses/flow_framework.create@201' + '400': + $ref: '#/components/responses/flow_framework.create@400' + '403': + $ref: '#/components/responses/flow_framework.create@403' + /_plugins/_flow_framework/workflow/_search: + get: + operationId: flow_framework.search.1 + x-operation-group: flow_framework.search + x-version-added: '2.12' + description: Search for workflows by using a query matching a field. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/provision-workflow/ + requestBody: + $ref: '#/components/requestBodies/flow_framework.search' + responses: + '200': + $ref: '#/components/responses/flow_framework.search@200' + '400': + $ref: '#/components/responses/flow_framework.search@400' + '403': + $ref: '#/components/responses/flow_framework.search@403' + '408': + $ref: '#/components/responses/flow_framework.search@408' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + post: + operationId: flow_framework.search.0 + x-operation-group: flow_framework.search + x-version-added: '2.12' + description: Search for workflows by using a query matching a field. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/provision-workflow/ + requestBody: + $ref: '#/components/requestBodies/flow_framework.search' + responses: + '200': + $ref: '#/components/responses/flow_framework.search@200' + '400': + $ref: '#/components/responses/flow_framework.search@400' + '403': + $ref: '#/components/responses/flow_framework.search@403' + '408': + $ref: '#/components/responses/flow_framework.search@408' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + /_plugins/_flow_framework/workflow/_steps: + get: + operationId: flow_framework.get_steps.0 + x-operation-group: flow_framework.get_steps + x-version-added: '2.12' + description: Get a list of workflow steps. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/get-workflow-steps/ + parameters: + - $ref: '#/components/parameters/flow_framework.get_steps::query.workflow_step' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/flow_framework.get_steps@200' + '400': + $ref: '#/components/responses/flow_framework.get_steps@400' + '403': + $ref: '#/components/responses/flow_framework.get_steps@403' + /_plugins/_flow_framework/workflow/{workflow_id}: + delete: + operationId: flow_framework.delete.0 + x-operation-group: flow_framework.delete + x-version-added: '2.12' + description: Delete a workflow. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/delete-workflow/ + parameters: + - $ref: '#/components/parameters/flow_framework.delete::path.workflow_id' + - $ref: '#/components/parameters/flow_framework.delete::query.clear_status' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/flow_framework.delete@200' + '400': + $ref: '#/components/responses/flow_framework.delete@400' + '403': + $ref: '#/components/responses/flow_framework.delete@403' + get: + operationId: flow_framework.get.0 + x-operation-group: flow_framework.get + x-version-added: '2.12' + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/get-workflow/ + description: Get a workflow. + parameters: + - $ref: '#/components/parameters/flow_framework.get::path.workflow_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/flow_framework.get@200' + '404': + $ref: '#/components/responses/flow_framework.get@404' + put: + operationId: flow_framework.update.0 + x-operation-group: flow_framework.update + x-version-added: '2.12' + description: Update a workflow. You can only update a complete workflow if it has not yet been provisioned. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/create-workflow/ + parameters: + - $ref: '#/components/parameters/flow_framework.update::path.workflow_id' + - $ref: '#/components/parameters/flow_framework.update::query.provision' + - $ref: '#/components/parameters/flow_framework.update::query.reprovision' + - $ref: '#/components/parameters/flow_framework.update::query.update_fields' + - $ref: '#/components/parameters/flow_framework.update::query.use_case' + - $ref: '#/components/parameters/flow_framework.update::query.validation' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/flow_framework.update' + responses: + '201': + $ref: '#/components/responses/flow_framework.update@201' + description: It returns the workflow_id + '400': + $ref: '#/components/responses/flow_framework.update@400' + '404': + $ref: '#/components/responses/flow_framework.update@404' + /_plugins/_flow_framework/workflow/{workflow_id}/_deprovision: + post: + operationId: flow_framework.deprovision.0 + x-operation-group: flow_framework.deprovision + x-version-added: '2.12' + description: Deprovision workflow's resources when you no longer need it. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/deprovision-workflow/ + parameters: + - $ref: '#/components/parameters/flow_framework.deprovision::path.workflow_id' + - $ref: '#/components/parameters/flow_framework.deprovision::query.allow_delete' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/flow_framework.deprovision@200' + '202': + $ref: '#/components/responses/flow_framework.deprovision@202' + '403': + $ref: '#/components/responses/flow_framework.deprovision@403' + '404': + $ref: '#/components/responses/flow_framework.deprovision@404' + /_plugins/_flow_framework/workflow/{workflow_id}/_provision: + post: + operationId: flow_framework.provision.0 + x-operation-group: flow_framework.provision + x-version-added: '2.12' + description: Provisioning a workflow. This API is also executed when the Create or Update Workflow API is called with the provision parameter set to true. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/provision-workflow/ + parameters: + - $ref: '#/components/parameters/flow_framework.provision::path.workflow_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + description: |- + Pass dynamic substitution expressions as key-value pairs, either as query parameters or in the request body. + For example, if you specified a credential field in the template as `openai_key: '$'`, + you can pass `openai_key` as a query parameter or in the request body. + $ref: '#/components/requestBodies/flow_framework.provision' + responses: + '200': + $ref: '#/components/responses/flow_framework.provision@200' + '400': + $ref: '#/components/responses/flow_framework.provision@400' + '403': + $ref: '#/components/responses/flow_framework.provision@403' + /_plugins/_flow_framework/workflow/{workflow_id}/_status: + get: + operationId: flow_framework.get_status.0 + x-operation-group: flow_framework.get_status + x-version-added: '2.12' + description: Get the provisioning deployment status until it is complete. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/get-workflow-status/ + parameters: + - $ref: '#/components/parameters/flow_framework.get_status::path.workflow_id' + - $ref: '#/components/parameters/flow_framework.get_status::query.all' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/flow_framework.get_status@200' + '403': + $ref: '#/components/responses/flow_framework.get_status@403' + '404': + $ref: '#/components/responses/flow_framework.get_status@404' + /_plugins/_flow_framework/workflow/state/_search: + get: + operationId: flow_framework.search_state.1 + x-operation-group: flow_framework.search_state + x-version-added: '2.12' + description: Search for workflows by using a query matching a field. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/search-workflow-state/ + requestBody: + $ref: '#/components/requestBodies/flow_framework.search_state' + responses: + '200': + $ref: '#/components/responses/flow_framework.search_state@200' + '400': + $ref: '#/components/responses/flow_framework.search_state@400' + '403': + $ref: '#/components/responses/flow_framework.search_state@403' + '408': + $ref: '#/components/responses/flow_framework.search_state@408' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + post: + operationId: flow_framework.search_state.0 + x-operation-group: flow_framework.search_state + x-version-added: '2.12' + description: Search for workflows by using a query matching a field. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/api/search-workflow-state/ + requestBody: + $ref: '#/components/requestBodies/flow_framework.search_state' + responses: + '200': + $ref: '#/components/responses/flow_framework.search_state@200' + '400': + $ref: '#/components/responses/flow_framework.search_state@400' + '403': + $ref: '#/components/responses/flow_framework.search_state@403' + '408': + $ref: '#/components/responses/flow_framework.search_state@408' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + /_plugins/_ism/add: + post: + operationId: ism.add_policy.0 + x-operation-group: ism.add_policy + description: Adds a policy to an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#add-policy + parameters: + - $ref: '#/components/parameters/ism.add_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.add_policy' + responses: + '200': + $ref: '#/components/responses/ism.add_policy@200' + /_plugins/_ism/add/{index}: + post: + operationId: ism.add_policy.1 + x-operation-group: ism.add_policy + description: Adds a policy to an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#add-policy + parameters: + - $ref: '#/components/parameters/ism.add_policy::path.index' + - $ref: '#/components/parameters/ism.add_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.add_policy' + responses: + '200': + $ref: '#/components/responses/ism.add_policy@200' + /_plugins/_ism/change_policy: + post: + operationId: ism.change_policy.0 + x-operation-group: ism.change_policy + description: Updates the managed index policy to a new policy. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#update-managed-index-policy + parameters: + - $ref: '#/components/parameters/ism.change_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.change_policy' + responses: + '200': + $ref: '#/components/responses/ism.change_policy@200' + /_plugins/_ism/change_policy/{index}: + post: + operationId: ism.change_policy.1 + x-operation-group: ism.change_policy + description: Updates the managed index policy to a new policy. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#update-managed-index-policy + parameters: + - $ref: '#/components/parameters/ism.change_policy::path.index' + - $ref: '#/components/parameters/ism.change_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.change_policy' + responses: + '200': + $ref: '#/components/responses/ism.change_policy@200' + /_plugins/_ism/explain: + get: + operationId: ism.explain_policy.0 + x-operation-group: ism.explain_policy + description: Gets the currently applied policy on indices. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + requestBody: + $ref: '#/components/requestBodies/ism.explain_policy' + responses: + '200': + $ref: '#/components/responses/ism.explain_policy@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + post: + operationId: ism.explain_policy.0 + x-operation-group: ism.explain_policy + description: Gets the currently applied policy on indices. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + requestBody: + $ref: '#/components/requestBodies/ism.explain_policy' + responses: + '200': + $ref: '#/components/responses/ism.explain_policy@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + /_plugins/_ism/explain/{index}: + get: + operationId: ism.explain_policy.1 + x-operation-group: ism.explain_policy + description: Gets the currently applied policy on indices. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + parameters: + - $ref: '#/components/parameters/ism.explain_policy::path.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.explain_policy' + responses: + '200': + $ref: '#/components/responses/ism.explain_policy@200' + post: + operationId: ism.explain_policy.1 + x-operation-group: ism.explain_policy + description: Gets the currently applied policy on indices. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + parameters: + - $ref: '#/components/parameters/ism.explain_policy::path.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.explain_policy' + responses: + '200': + $ref: '#/components/responses/ism.explain_policy@200' + /_plugins/_ism/policies: + get: + operationId: ism.get_policies.0 + x-operation-group: ism.get_policies + description: Gets the policies. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy + responses: + '200': + $ref: '#/components/responses/ism.get_policies@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + put: + operationId: ism.put_policies.0 + x-operation-group: ism.put_policies + description: Gets the policies. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy + requestBody: + $ref: '#/components/requestBodies/ism.put_policies' + parameters: + - $ref: '#/components/parameters/ism.put_policies::query.if_primary_term' + - $ref: '#/components/parameters/ism.put_policies::query.if_seq_no' + - $ref: '#/components/parameters/ism.put_policies::query.policyID' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.put_policies@200' + /_plugins/_ism/policies/{policy_id}: + delete: + operationId: ism.delete_policy.0 + x-operation-group: ism.delete_policy + description: Deletes a policy. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#delete-policy + parameters: + - $ref: '#/components/parameters/ism.delete_policy::path.policy_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.delete_policy@200' + get: + operationId: ism.get_policy.0 + x-operation-group: ism.get_policy + description: Gets a policy. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#put-policy + parameters: + - $ref: '#/components/parameters/ism.get_policy::path.policy_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.get_policy@200' + head: + operationId: ism.exists_policy.0 + x-operation-group: ism.exists_policy + description: Checks whether the policy exists. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy + parameters: + - $ref: '#/components/parameters/ism.exists_policy::path.policy_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.exists_policy@200' + '404': + $ref: '#/components/responses/ism.exists_policy@404' + put: + operationId: ism.put_policy.0 + x-operation-group: ism.put_policy + description: Creates or updates a policy. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy + parameters: + - $ref: '#/components/parameters/ism.put_policy::path.policy_id' + - $ref: '#/components/parameters/ism.put_policy::query.if_primary_term' + - $ref: '#/components/parameters/ism.put_policy::query.if_seq_no' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.put_policy' + responses: + '200': + $ref: '#/components/responses/ism.put_policy@200' + '201': + $ref: '#/components/responses/ism.put_policy@201' + /_plugins/_ism/remove: + post: + operationId: ism.remove_policy.0 + x-operation-group: ism.remove_policy + description: Removes a policy from an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#remove-policy + parameters: + - $ref: '#/components/parameters/ism.remove_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.remove_policy@200' + /_plugins/_ism/remove/{index}: + post: + operationId: ism.remove_policy.1 + x-operation-group: ism.remove_policy + description: Removes a policy from an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#remove-policy + parameters: + - $ref: '#/components/parameters/ism.remove_policy::path.index' + - $ref: '#/components/parameters/ism.remove_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.remove_policy@200' + /_plugins/_ism/retry: + post: + operationId: ism.retry_index.0 + x-operation-group: ism.retry_index + description: Retry the failed action for an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#retry-failed-index + parameters: + - $ref: '#/components/parameters/ism.retry_index::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.retry_index' + responses: + '200': + $ref: '#/components/responses/ism.retry_index@200' + /_plugins/_ism/retry/{index}: + post: + operationId: ism.retry_index.1 + x-operation-group: ism.retry_index + description: Retry the failed action for an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#retry-failed-index + parameters: + - $ref: '#/components/parameters/ism.retry_index::path.index' + - $ref: '#/components/parameters/ism.retry_index::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.retry_index' + responses: + '200': + $ref: '#/components/responses/ism.retry_index@200' /_plugins/_knn/{node_id}/stats: get: operationId: knn.stats.2 @@ -3764,6 +4361,68 @@ paths: responses: '200': $ref: '#/components/responses/knn.warmup@200' + /_plugins/_ml/agents/_register: + post: + operationId: ml.register_agents.0 + x-operation-group: ml.register_agents + description: Register an agent. + requestBody: + $ref: '#/components/requestBodies/ml.register_agents' + responses: + '200': + $ref: '#/components/responses/ml.register_agents@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + /_plugins/_ml/agents/{agent_id}: + delete: + operationId: ml.delete_agent.0 + x-operation-group: ml.delete_agent + description: Delete an agent. + parameters: + - $ref: '#/components/parameters/ml.delete_agent::path.agent_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ml.delete_agent@200' + /_plugins/_ml/connectors/_create: + post: + operationId: ml.create_connector.0 + x-operation-group: ml.create_connector + description: Creates a standalone connector. + requestBody: + $ref: '#/components/requestBodies/ml.create_connector' + responses: + '200': + $ref: '#/components/responses/ml.create_connector@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + /_plugins/_ml/connectors/{connector_id}: + delete: + operationId: ml.delete_connector.0 + x-operation-group: ml.delete_connector + description: Deletes a standalone connector. + parameters: + - $ref: '#/components/parameters/ml.delete_connector::path.connector_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ml.delete_connector@200' /_plugins/_ml/model_groups/_register: post: operationId: ml.register_model_group.0 @@ -4435,6 +5094,23 @@ paths: responses: '200': $ref: '#/components/responses/sql.settings@200' + /_plugins/_refresh_search_analyzers/{index}: + post: + operationId: ism.refresh_search_analyzers.0 + x-operation-group: ism.refresh_search_analyzers + description: Refresh search analyzers in real time. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/refresh-analyzer/ + parameters: + - $ref: '#/components/parameters/ism.refresh_search_analyzers::path.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.refresh_search_analyzers@200' /_plugins/_rollup/jobs/{id}: delete: operationId: rollups.delete.0 @@ -6446,13 +7122,15 @@ paths: '200': $ref: '#/components/responses/transforms.search@200' /_plugins/_transform/_preview: - get: + post: operationId: transforms.preview.0 x-operation-group: transforms.preview x-version-added: '1.0' description: Returns a preview of what a transformed index would look like. externalDocs: url: https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#preview-a-transform-jobs-results + requestBody: + $ref: '#/components/requestBodies/transforms.preview' responses: '200': $ref: '#/components/responses/transforms.preview@200' @@ -6941,6 +7619,7 @@ paths: parameters: - $ref: '#/components/parameters/put_script::path.id' - $ref: '#/components/parameters/put_script::query.cluster_manager_timeout' + - $ref: '#/components/parameters/put_script::query.context' - $ref: '#/components/parameters/put_script::query.master_timeout' - $ref: '#/components/parameters/put_script::query.timeout' - $ref: '#/components/parameters/_global::query.pretty' @@ -6963,6 +7642,7 @@ paths: parameters: - $ref: '#/components/parameters/put_script::path.id' - $ref: '#/components/parameters/put_script::query.cluster_manager_timeout' + - $ref: '#/components/parameters/put_script::query.context' - $ref: '#/components/parameters/put_script::query.master_timeout' - $ref: '#/components/parameters/put_script::query.timeout' - $ref: '#/components/parameters/_global::query.pretty' @@ -6987,6 +7667,7 @@ paths: - $ref: '#/components/parameters/put_script::path.context' - $ref: '#/components/parameters/put_script::path.id' - $ref: '#/components/parameters/put_script::query.cluster_manager_timeout' + - $ref: '#/components/parameters/put_script::query.context' - $ref: '#/components/parameters/put_script::query.master_timeout' - $ref: '#/components/parameters/put_script::query.timeout' - $ref: '#/components/parameters/_global::query.pretty' @@ -7010,6 +7691,7 @@ paths: - $ref: '#/components/parameters/put_script::path.context' - $ref: '#/components/parameters/put_script::path.id' - $ref: '#/components/parameters/put_script::query.cluster_manager_timeout' + - $ref: '#/components/parameters/put_script::query.context' - $ref: '#/components/parameters/put_script::query.master_timeout' - $ref: '#/components/parameters/put_script::query.timeout' - $ref: '#/components/parameters/_global::query.pretty' @@ -11006,6 +11688,458 @@ paths: responses: '200': $ref: '#/components/responses/indices.validate_query@200' + /_opendistro/_asynchronous_search: + post: + operationId: asynchronous_search.search.0_superseded + x-operation-group: asynchronous_search.search + x-version-added: '1.0' + description: Perform an asynchronous search. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/async/index/#rest-api + parameters: + - $ref: '#/components/parameters/asynchronous_search.search::query.index' + - $ref: '#/components/parameters/asynchronous_search.search::query.keep_alive' + - $ref: '#/components/parameters/asynchronous_search.search::query.keep_on_completion' + - $ref: '#/components/parameters/asynchronous_search.search::query.wait_for_completion_timeout' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/asynchronous_search.search' + responses: + '200': + $ref: '#/components/responses/asynchronous_search.search@200' + deprecated: true + x-ignorable: true + /_opendistro/_asynchronous_search/stats: + get: + operationId: asynchronous_search.stats.0_superseded + x-operation-group: asynchronous_search.stats + x-version-added: '1.0' + description: Monitoring of asynchronous searches that are running, completed, and/or persisted. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/async/index/#monitor-stats + responses: + '200': + $ref: '#/components/responses/asynchronous_search.stats@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + deprecated: true + x-ignorable: true + /_opendistro/_asynchronous_search/{id}: + get: + operationId: asynchronous_search.get.0_superseded + x-operation-group: asynchronous_search.get + x-version-added: '1.0' + description: Get partial responses from asynchronous search. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/async/index/#get-partial-results + parameters: + - $ref: '#/components/parameters/asynchronous_search.get::path.id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/asynchronous_search.get@200' + deprecated: true + x-ignorable: true + delete: + operationId: asynchronous_search.delete.0_superseded + x-operation-group: asynchronous_search.delete + x-version-added: '1.0' + description: Delete asynchronous search. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/async/index/#delete-searches-and-results + parameters: + - $ref: '#/components/parameters/asynchronous_search.delete::path.id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/asynchronous_search.delete@200' + deprecated: true + x-ignorable: true + /_opendistro/_ism/add: + post: + operationId: ism.add_policy.0_superseded + x-operation-group: ism.add_policy + description: Adds a policy to an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#add-policy + parameters: + - $ref: '#/components/parameters/ism.add_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.add_policy' + responses: + '200': + $ref: '#/components/responses/ism.add_policy@200' + deprecated: true + x-ignorable: true + /_opendistro/_ism/add/{index}: + post: + operationId: ism.add_policy.1_superseded + x-operation-group: ism.add_policy + description: Adds a policy to an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#add-policy + parameters: + - $ref: '#/components/parameters/ism.add_policy::path.index' + - $ref: '#/components/parameters/ism.add_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.add_policy' + responses: + '200': + $ref: '#/components/responses/ism.add_policy@200' + deprecated: true + x-ignorable: true + /_opendistro/_ism/change_policy: + post: + operationId: ism.change_policy.0_superseded + x-operation-group: ism.change_policy + description: Updates the managed index policy to a new policy. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#update-managed-index-policy + parameters: + - $ref: '#/components/parameters/ism.change_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.change_policy' + responses: + '200': + $ref: '#/components/responses/ism.change_policy@200' + deprecated: true + x-ignorable: true + /_opendistro/_ism/change_policy/{index}: + post: + operationId: ism.change_policy.1_superseded + x-operation-group: ism.change_policy + description: Updates the managed index policy to a new policy. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#update-managed-index-policy + parameters: + - $ref: '#/components/parameters/ism.change_policy::path.index' + - $ref: '#/components/parameters/ism.change_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.change_policy' + responses: + '200': + $ref: '#/components/responses/ism.change_policy@200' + deprecated: true + x-ignorable: true + /_opendistro/_ism/explain: + get: + operationId: ism.explain_policy.0_superseded + x-operation-group: ism.explain_policy + description: Gets the currently applied policy on indices. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + requestBody: + $ref: '#/components/requestBodies/ism.explain_policy' + responses: + '200': + $ref: '#/components/responses/ism.explain_policy@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + deprecated: true + x-ignorable: true + post: + operationId: ism.explain_policy.0_superseded + x-operation-group: ism.explain_policy + description: Gets the currently applied policy on indices. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + requestBody: + $ref: '#/components/requestBodies/ism.explain_policy' + responses: + '200': + $ref: '#/components/responses/ism.explain_policy@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + deprecated: true + x-ignorable: true + /_opendistro/_ism/explain/{index}: + get: + operationId: ism.explain_policy.1_superseded + x-operation-group: ism.explain_policy + description: Gets the currently applied policy on indices. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + parameters: + - $ref: '#/components/parameters/ism.explain_policy::path.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.explain_policy' + responses: + '200': + $ref: '#/components/responses/ism.explain_policy@200' + deprecated: true + x-ignorable: true + post: + operationId: ism.explain_policy.1_superseded + x-operation-group: ism.explain_policy + description: Gets the currently applied policy on indices. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index + parameters: + - $ref: '#/components/parameters/ism.explain_policy::path.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.explain_policy' + responses: + '200': + $ref: '#/components/responses/ism.explain_policy@200' + deprecated: true + x-ignorable: true + /_opendistro/_ism/policies: + get: + operationId: ism.get_policies.0_superseded + x-operation-group: ism.get_policies + description: Gets the policies. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy + responses: + '200': + $ref: '#/components/responses/ism.get_policies@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + deprecated: true + x-ignorable: true + put: + operationId: ism.put_policies.0_superseded + x-operation-group: ism.put_policies + description: Gets the policies. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy + requestBody: + $ref: '#/components/requestBodies/ism.put_policies' + parameters: + - $ref: '#/components/parameters/ism.put_policies::query.if_primary_term' + - $ref: '#/components/parameters/ism.put_policies::query.if_seq_no' + - $ref: '#/components/parameters/ism.put_policies::query.policyID' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.put_policies@200' + deprecated: true + x-ignorable: true + /_opendistro/_ism/policies/{policyID}: + get: + operationId: ism.get_policy.0_superseded + x-operation-group: ism.get_policy + description: Gets a policy. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#put-policy + parameters: + - $ref: '#/components/parameters/ism.get_policy::path.policy_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.get_policy@200' + deprecated: true + x-ignorable: true + head: + operationId: ism.exists_policy.0_superseded + x-operation-group: ism.exists_policy + description: Checks whether the policy exists. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy + parameters: + - $ref: '#/components/parameters/ism.exists_policy::path.policy_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.exists_policy@200' + '404': + $ref: '#/components/responses/ism.exists_policy@404' + deprecated: true + x-ignorable: true + put: + operationId: ism.put_policy.0_superseded + x-operation-group: ism.put_policy + description: Creates or updates a policy. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy + parameters: + - $ref: '#/components/parameters/ism.put_policy::path.policy_id' + - $ref: '#/components/parameters/ism.put_policy::query.if_primary_term' + - $ref: '#/components/parameters/ism.put_policy::query.if_seq_no' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.put_policy' + responses: + '200': + $ref: '#/components/responses/ism.put_policy@200' + '201': + $ref: '#/components/responses/ism.put_policy@201' + deprecated: true + x-ignorable: true + delete: + operationId: ism.delete_policy.0_superseded + x-operation-group: ism.delete_policy + description: Deletes a policy. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#delete-policy + parameters: + - $ref: '#/components/parameters/ism.delete_policy::path.policy_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.delete_policy@200' + deprecated: true + x-ignorable: true + /_opendistro/_ism/remove: + post: + operationId: ism.remove_policy.0_superseded + x-operation-group: ism.remove_policy + description: Removes a policy from an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#remove-policy + parameters: + - $ref: '#/components/parameters/ism.remove_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.remove_policy@200' + deprecated: true + x-ignorable: true + /_opendistro/_ism/remove/{index}: + post: + operationId: ism.remove_policy.1_superseded + x-operation-group: ism.remove_policy + description: Removes a policy from an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#remove-policy + parameters: + - $ref: '#/components/parameters/ism.remove_policy::path.index' + - $ref: '#/components/parameters/ism.remove_policy::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.remove_policy@200' + deprecated: true + x-ignorable: true + /_opendistro/_ism/retry: + post: + operationId: ism.retry_index.0_superseded + x-operation-group: ism.retry_index + description: Retry the failed action for an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#retry-failed-index + parameters: + - $ref: '#/components/parameters/ism.retry_index::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.retry_index' + responses: + '200': + $ref: '#/components/responses/ism.retry_index@200' + deprecated: true + x-ignorable: true + /_opendistro/_ism/retry/{index}: + post: + operationId: ism.retry_index.1_superseded + x-operation-group: ism.retry_index + description: Retry the failed action for an index. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#retry-failed-index + parameters: + - $ref: '#/components/parameters/ism.retry_index::path.index' + - $ref: '#/components/parameters/ism.retry_index::query.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ism.retry_index' + responses: + '200': + $ref: '#/components/responses/ism.retry_index@200' + deprecated: true + x-ignorable: true /_opendistro/_knn/stats/{stat}: get: operationId: knn.stats.1_superseded @@ -11158,6 +12292,25 @@ paths: $ref: '#/components/responses/ppl.post_stats@200' deprecated: true x-ignorable: true + /_opendistro/_refresh_search_analyzers/{index}: + post: + operationId: ism.refresh_search_analyzers.0_superseded + x-operation-group: ism.refresh_search_analyzers + description: Refresh search analyzers in real time. + externalDocs: + url: https://opensearch.org/docs/latest/im-plugin/refresh-analyzer/ + parameters: + - $ref: '#/components/parameters/ism.refresh_search_analyzers::path.index' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ism.refresh_search_analyzers@200' + deprecated: true + x-ignorable: true /_opendistro/_rollup/jobs/{rollupID}: get: operationId: rollups.get.0_superseded @@ -12876,6 +14029,112 @@ paths: $ref: '#/components/responses/sql.post_stats@200' deprecated: true x-ignorable: true + /_cluster/nodes/hotthreads: + get: + operationId: nodes.hot_threads.0_superseded + x-operation-group: nodes.hot_threads + x-ignorable: true + deprecated: true + x-deprecation-message: The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons + x-version-added: '1.0' + x-version-deprecated: '1.0' + description: Returns information about hot threads on each node in the cluster. + externalDocs: + url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ + parameters: + - $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads' + - $ref: '#/components/parameters/nodes.hot_threads::query.interval' + - $ref: '#/components/parameters/nodes.hot_threads::query.snapshots' + - $ref: '#/components/parameters/nodes.hot_threads::query.threads' + - $ref: '#/components/parameters/nodes.hot_threads::query.timeout' + - $ref: '#/components/parameters/nodes.hot_threads::query.type' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/nodes.hot_threads@200' + /_cluster/nodes/{node_id}/hotthreads: + get: + operationId: nodes.hot_threads.2_superseded + x-operation-group: nodes.hot_threads + x-ignorable: true + deprecated: true + x-deprecation-message: The hot accepts /_cluster/nodes as prefix for backwards compatibility reasons + x-version-added: '1.0' + x-version-deprecated: '1.0' + description: Returns information about hot threads on each node in the cluster. + externalDocs: + url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ + parameters: + - $ref: '#/components/parameters/nodes.hot_threads::path.node_id' + - $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads' + - $ref: '#/components/parameters/nodes.hot_threads::query.interval' + - $ref: '#/components/parameters/nodes.hot_threads::query.snapshots' + - $ref: '#/components/parameters/nodes.hot_threads::query.threads' + - $ref: '#/components/parameters/nodes.hot_threads::query.timeout' + - $ref: '#/components/parameters/nodes.hot_threads::query.type' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/nodes.hot_threads@200' + /_nodes/{node_id}/hotthreads: + get: + operationId: nodes.hot_threads.6_superseded + x-operation-group: nodes.hot_threads + x-version-added: '1.0' + description: Returns information about hot threads on each node in the cluster. + externalDocs: + url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ + parameters: + - $ref: '#/components/parameters/nodes.hot_threads::path.node_id' + - $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads' + - $ref: '#/components/parameters/nodes.hot_threads::query.interval' + - $ref: '#/components/parameters/nodes.hot_threads::query.snapshots' + - $ref: '#/components/parameters/nodes.hot_threads::query.threads' + - $ref: '#/components/parameters/nodes.hot_threads::query.timeout' + - $ref: '#/components/parameters/nodes.hot_threads::query.type' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/nodes.hot_threads@200' + deprecated: true + x-ignorable: true + /_nodes/hotthreads: + get: + operationId: nodes.hot_threads.4_superseded + x-operation-group: nodes.hot_threads + x-version-added: '1.0' + description: Returns information about hot threads on each node in the cluster. + externalDocs: + url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ + parameters: + - $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads' + - $ref: '#/components/parameters/nodes.hot_threads::query.interval' + - $ref: '#/components/parameters/nodes.hot_threads::query.snapshots' + - $ref: '#/components/parameters/nodes.hot_threads::query.threads' + - $ref: '#/components/parameters/nodes.hot_threads::query.timeout' + - $ref: '#/components/parameters/nodes.hot_threads::query.type' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/nodes.hot_threads@200' + deprecated: true + x-ignorable: true components: parameters: _global::query.pretty: @@ -12912,7 +14171,7 @@ components: _global::query.filter_path: name: filter_path in: query - description: Comma-separated list of filters used to reduce the response. + description: Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". schema: oneOf: - type: string @@ -12920,6 +14179,40 @@ components: items: type: string x-global: true + asynchronous_search.delete::path.id: + name: id + in: path + schema: + type: string + asynchronous_search.get::path.id: + name: id + in: path + schema: + type: string + asynchronous_search.search::query.index: + name: index + in: query + description: The name of the index to be searched. + schema: + type: string + asynchronous_search.search::query.keep_alive: + name: keep_alive + in: query + description: The amount of time that the result is saved in the cluster. + schema: + type: string + asynchronous_search.search::query.keep_on_completion: + name: keep_on_completion + in: query + description: Whether you want to save the results in the cluster after the search is complete. + schema: + type: boolean + asynchronous_search.search::query.wait_for_completion_timeout: + name: wait_for_completion_timeout + in: query + description: The amount of time that you plan to wait for the results. + schema: + type: string bulk::path.index: in: path name: index @@ -13080,7 +14373,7 @@ components: in: query description: The unit in which to display byte values. schema: - $ref: '#/components/schemas/_common:Bytes' + $ref: '#/components/schemas/_common:ByteUnit' cat.all_pit_segments::query.format: name: format in: query @@ -13139,7 +14432,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '#/components/schemas/_common:Bytes' + $ref: '#/components/schemas/_common:ByteUnit' style: form cat.allocation::query.cluster_manager_timeout: name: cluster_manager_timeout @@ -13188,7 +14481,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.allocation::query.s: @@ -13257,7 +14550,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.cluster_manager::query.s: @@ -13349,7 +14642,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '#/components/schemas/_common:Bytes' + $ref: '#/components/schemas/_common:ByteUnit' style: form cat.fielddata::query.fields: in: query @@ -13478,7 +14771,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '#/components/schemas/_common:Bytes' + $ref: '#/components/schemas/_common:ByteUnit' style: form cat.indices::query.cluster_manager_timeout: name: cluster_manager_timeout @@ -13549,7 +14842,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.indices::query.pri: @@ -13633,7 +14926,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.master::query.s: @@ -13702,7 +14995,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.nodeattrs::query.s: @@ -13729,7 +15022,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '#/components/schemas/_common:Bytes' + $ref: '#/components/schemas/_common:ByteUnit' style: form cat.nodes::query.cluster_manager_timeout: name: cluster_manager_timeout @@ -13791,7 +15084,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.nodes::query.s: @@ -13866,7 +15159,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.pending_tasks::query.s: @@ -13899,7 +15192,7 @@ components: in: query description: The unit in which to display byte values. schema: - $ref: '#/components/schemas/_common:Bytes' + $ref: '#/components/schemas/_common:ByteUnit' cat.pit_segments::query.format: name: format in: query @@ -13992,7 +15285,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.plugins::query.s: @@ -14037,7 +15330,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '#/components/schemas/_common:Bytes' + $ref: '#/components/schemas/_common:ByteUnit' style: form cat.recovery::query.detailed: in: query @@ -14156,7 +15449,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.repositories::query.s: @@ -14208,7 +15501,7 @@ components: in: query description: The unit in which to display byte values. schema: - $ref: '#/components/schemas/_common:Bytes' + $ref: '#/components/schemas/_common:ByteUnit' cat.segment_replication::query.completed_only: name: completed_only in: query @@ -14340,7 +15633,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '#/components/schemas/_common:Bytes' + $ref: '#/components/schemas/_common:ByteUnit' style: form cat.segments::query.cluster_manager_timeout: name: cluster_manager_timeout @@ -14381,7 +15674,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.segments::query.s: @@ -14419,7 +15712,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '#/components/schemas/_common:Bytes' + $ref: '#/components/schemas/_common:ByteUnit' style: form cat.shards::query.cluster_manager_timeout: name: cluster_manager_timeout @@ -14468,7 +15761,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.shards::query.s: @@ -14555,7 +15848,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.snapshots::query.s: @@ -14726,7 +16019,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.templates::query.s: @@ -14805,7 +16098,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true cat.thread_pool::query.s: @@ -14889,7 +16182,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. cluster.delete_component_template::query.timeout: in: query @@ -14952,7 +16245,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. cluster.get_component_template::path.name: in: path @@ -14991,7 +16284,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. cluster.get_decommission_awareness::path.awareness_attribute_name: name: awareness_attribute_name @@ -15034,7 +16327,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. cluster.get_settings::query.timeout: in: query @@ -15105,7 +16398,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. cluster.health::query.timeout: in: query @@ -15185,7 +16478,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. cluster.post_voting_config_exclusions::query.node_ids: in: query @@ -15254,7 +16547,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. cluster.put_component_template::query.timeout: name: timeout @@ -15301,7 +16594,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. cluster.put_settings::query.timeout: in: query @@ -15347,14 +16640,18 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. cluster.reroute::query.metric: in: query name: metric description: Limits the information returned to the specified metrics. schema: - $ref: '#/components/schemas/_common:Metrics' + oneOf: + - $ref: '#/components/schemas/cluster.reroute:Metric' + - type: array + items: + $ref: '#/components/schemas/cluster.reroute:Metric' style: form cluster.reroute::query.retry_failed: in: query @@ -15440,7 +16737,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. cluster.state::query.wait_for_metadata_version: in: query @@ -15654,10 +16951,7 @@ components: description: Comma-separated list of specific routing values. style: form schema: - type: array - items: - type: string - description: Comma-separated list of specific routing values. + $ref: '#/components/schemas/_common:Routing' explode: true create::path.id: in: path @@ -15768,7 +17062,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. dangling_indices.delete_dangling_index::query.timeout: in: query @@ -15808,7 +17102,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. dangling_indices.import_dangling_index::query.timeout: in: query @@ -16150,7 +17444,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. delete_script::query.timeout: in: query @@ -16578,6 +17872,125 @@ components: type: boolean default: false style: form + flow_framework.create::query.provision: + in: query + name: provision + schema: + $ref: '#/components/schemas/flow_framework.common:Provision' + flow_framework.create::query.reprovision: + x-version-added: '2.17' + in: query + name: reprovision + schema: + $ref: '#/components/schemas/flow_framework.common:Reprovision' + flow_framework.create::query.update_fields: + in: query + name: update_fields + schema: + $ref: '#/components/schemas/flow_framework.common:UpdateFields' + flow_framework.create::query.use_case: + description: To use a workflow template, specify it in the use_case query parameter when creating a workflow. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/workflow-templates/#supported-workflow-templates + in: query + name: use_case + schema: + $ref: '#/components/schemas/flow_framework.common:UseCase' + flow_framework.create::query.validation: + in: query + name: validation + schema: + $ref: '#/components/schemas/flow_framework.common:Validation' + flow_framework.delete::path.workflow_id: + name: workflow_id + in: path + required: true + schema: + $ref: '#/components/schemas/flow_framework.common:WorkflowID' + flow_framework.delete::query.clear_status: + in: query + name: clear_status + schema: + description: Delete the workflow state (without deprovisioning resources) after deleting the template. OpenSearch deletes the workflow state only if the provisioning status is not IN_PROGRESS. Default is false. + type: boolean + default: false + flow_framework.deprovision::path.workflow_id: + name: workflow_id + in: path + required: true + schema: + $ref: '#/components/schemas/flow_framework.common:WorkflowID' + flow_framework.deprovision::query.allow_delete: + in: query + name: allow_delete + schema: + $ref: '#/components/schemas/flow_framework.common:AllowDelete' + flow_framework.get_status::path.workflow_id: + name: workflow_id + in: path + required: true + schema: + $ref: '#/components/schemas/flow_framework.common:WorkflowID' + flow_framework.get_status::query.all: + description: The all parameter specifies whether the response should return all fields. + in: query + name: all + schema: + $ref: '#/components/schemas/flow_framework.common:All' + flow_framework.get_steps::query.workflow_step: + in: query + name: workflow_step + required: false + schema: + description: The name of the step to retrieve. + $ref: '#/components/schemas/flow_framework.common:WorkflowStepName' + flow_framework.get::path.workflow_id: + name: workflow_id + in: path + required: true + schema: + $ref: '#/components/schemas/flow_framework.common:WorkflowID' + flow_framework.provision::path.workflow_id: + name: workflow_id + in: path + required: true + schema: + $ref: '#/components/schemas/flow_framework.common:WorkflowID' + flow_framework.update::path.workflow_id: + name: workflow_id + in: path + required: true + schema: + $ref: '#/components/schemas/flow_framework.common:WorkflowID' + flow_framework.update::query.provision: + in: query + name: provision + schema: + $ref: '#/components/schemas/flow_framework.common:Provision' + flow_framework.update::query.reprovision: + x-version-added: '2.17' + in: query + name: reprovision + schema: + $ref: '#/components/schemas/flow_framework.common:Reprovision' + flow_framework.update::query.update_fields: + in: query + name: update_fields + schema: + $ref: '#/components/schemas/flow_framework.common:UpdateFields' + flow_framework.update::query.use_case: + description: To use a workflow template, specify it in the use_case query parameter when creating a workflow. + externalDocs: + url: https://opensearch.org/docs/latest/automating-configurations/workflow-templates/#supported-workflow-templates + in: query + name: use_case + schema: + $ref: '#/components/schemas/flow_framework.common:UseCase' + flow_framework.update::query.validation: + in: query + name: validation + schema: + $ref: '#/components/schemas/flow_framework.common:Validation' get_script::path.id: in: path name: id @@ -16601,7 +18014,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. get_source::path.id: in: path @@ -16935,7 +18348,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.add_block::query.timeout: in: query @@ -17083,7 +18496,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.clone::query.task_execution_timeout: name: task_execution_timeout @@ -17170,7 +18583,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.close::query.timeout: in: query @@ -17229,7 +18642,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.create::query.timeout: in: query @@ -17297,7 +18710,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.delete_alias::query.timeout: in: query @@ -17339,7 +18752,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.delete_index_template::query.timeout: in: query @@ -17375,7 +18788,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.delete_template::query.timeout: in: query @@ -17444,7 +18857,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.delete::query.timeout: in: query @@ -17547,7 +18960,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.exists_template::path.name: in: path @@ -17588,7 +19001,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.exists::path.index: in: path @@ -17952,7 +19365,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.get_mapping::path.index: in: path @@ -18027,7 +19440,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.get_settings::path.index: in: path @@ -18121,7 +19534,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.get_template::path.name: in: path @@ -18167,7 +19580,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.get_upgrade::path.index: name: index @@ -18277,7 +19690,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.open::path.index: in: path @@ -18336,7 +19749,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.open::query.task_execution_timeout: name: task_execution_timeout @@ -18410,7 +19823,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.put_alias::query.timeout: in: query @@ -18458,7 +19871,7 @@ components: description: Operation timeout for connection to master node. schema: $ref: '#/components/schemas/_common:Duration' - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. deprecated: true indices.put_mapping::path.index: @@ -18513,7 +19926,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.put_mapping::query.timeout: in: query @@ -18599,7 +20012,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.put_settings::query.preserve_existing: in: query @@ -18651,7 +20064,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.put_template::query.order: in: query @@ -18795,7 +20208,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.rollover::query.timeout: in: query @@ -18901,10 +20314,10 @@ components: description: List of shard health statuses used to limit the request. schema: oneOf: - - $ref: '#/components/schemas/indices.shard_stores:ShardStoreStatus' + - $ref: '#/components/schemas/indices.shard_stores:Status' - type: array items: - $ref: '#/components/schemas/indices.shard_stores:ShardStoreStatus' + $ref: '#/components/schemas/indices.shard_stores:Status' style: form indices.shrink::path.index: in: path @@ -18947,7 +20360,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.shrink::query.task_execution_timeout: name: task_execution_timeout @@ -19028,7 +20441,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.simulate_template::path.name: in: path @@ -19071,7 +20484,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.split::path.index: in: path @@ -19114,7 +20527,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.split::query.task_execution_timeout: name: task_execution_timeout @@ -19163,7 +20576,11 @@ components: description: Limit the information returned the specific metrics. required: true schema: - $ref: '#/components/schemas/_common:Metrics' + oneOf: + - $ref: '#/components/schemas/indices.stats:Metric' + - type: array + items: + $ref: '#/components/schemas/indices.stats:Metric' style: simple indices.stats::query.completion_fields: in: query @@ -19255,7 +20672,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. indices.update_aliases::query.timeout: in: query @@ -19445,7 +20862,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. ingest.delete_pipeline::query.timeout: in: query @@ -19484,7 +20901,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. ingest.put_pipeline::path.id: in: path @@ -19509,7 +20926,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. ingest.put_pipeline::query.timeout: in: query @@ -19536,6 +20953,161 @@ components: type: boolean default: false style: form + ism.add_policy::path.index: + name: index + in: path + description: |- + Comma-separated list of data streams, indices, and aliases. + Supports wildcards (`*`). + required: true + schema: + $ref: '#/components/schemas/_common:IndexName' + style: simple + ism.add_policy::query.index: + name: index + in: query + description: |- + Comma-separated list of data streams, indices, and aliases. + Supports wildcards (`*`). + required: true + schema: + $ref: '#/components/schemas/_common:IndexName' + ism.change_policy::path.index: + name: index + in: path + description: |- + Comma-separated list of data streams, indices, and aliases. + Supports wildcards (`*`). + required: true + schema: + $ref: '#/components/schemas/_common:IndexName' + style: simple + ism.change_policy::query.index: + name: index + in: query + description: |- + Comma-separated list of data streams, indices, and aliases. + Supports wildcards (`*`). + required: true + schema: + $ref: '#/components/schemas/_common:IndexName' + ism.delete_policy::path.policy_id: + name: policy_id + in: path + required: true + schema: + type: string + ism.exists_policy::path.policy_id: + name: policy_id + in: path + required: true + schema: + type: string + ism.explain_policy::path.index: + name: index + in: path + description: |- + Comma-separated list of data streams, indices, and aliases. + Supports wildcards (`*`). + required: true + schema: + $ref: '#/components/schemas/_common:IndexName' + style: simple + ism.get_policy::path.policy_id: + name: policy_id + in: path + required: true + schema: + type: string + ism.put_policies::query.if_primary_term: + name: if_primary_term + in: query + description: Only perform the operation if the document has this primary term. + schema: + type: number + style: form + ism.put_policies::query.if_seq_no: + name: if_seq_no + in: query + description: Only perform the operation if the document has this sequence number. + schema: + $ref: '#/components/schemas/_common:SequenceNumber' + style: form + ism.put_policies::query.policyID: + name: policyID + in: query + required: true + schema: + type: string + style: form + ism.put_policy::path.policy_id: + name: policy_id + in: path + required: true + schema: + type: string + ism.put_policy::query.if_primary_term: + name: if_primary_term + in: query + description: Only perform the operation if the document has this primary term. + schema: + type: number + style: form + ism.put_policy::query.if_seq_no: + name: if_seq_no + in: query + description: Only perform the operation if the document has this sequence number. + schema: + $ref: '#/components/schemas/_common:SequenceNumber' + style: form + ism.refresh_search_analyzers::path.index: + name: index + in: path + description: |- + Comma-separated list of data streams, indices, and aliases. + Supports wildcards (`*`). + required: true + schema: + $ref: '#/components/schemas/_common:IndexName' + style: simple + ism.remove_policy::path.index: + name: index + in: path + description: |- + Comma-separated list of data streams, indices, and aliases. + Supports wildcards (`*`). + required: true + schema: + $ref: '#/components/schemas/_common:IndexName' + style: simple + ism.remove_policy::query.index: + name: index + in: query + description: |- + Comma-separated list of data streams, indices, and aliases. + Supports wildcards (`*`). + required: true + schema: + $ref: '#/components/schemas/_common:IndexName' + ism.retry_index::path.index: + name: index + in: path + description: |- + Comma-separated list of data streams, indices, and aliases. + Supports wildcards (`*`). + required: true + schema: + $ref: '#/components/schemas/_common:IndexName' + style: simple + ism.retry_index::query.index: + name: index + in: query + description: |- + Comma-separated list of data streams, indices, and aliases. + Supports wildcards (`*`). + required: true + schema: + $ref: '#/components/schemas/_common:IndexName' knn.delete_model::path.model_id: name: model_id in: path @@ -19752,10 +21324,7 @@ components: description: Comma-separated list of specific routing values. style: form schema: - type: array - items: - type: string - description: Comma-separated list of specific routing values. + $ref: '#/components/schemas/_common:Routing' explode: true knn.search_models::query.scroll: name: scroll @@ -20038,6 +21607,18 @@ components: schema: $ref: '#/components/schemas/_common:Fields' style: form + ml.delete_agent::path.agent_id: + name: agent_id + in: path + required: true + schema: + type: string + ml.delete_connector::path.connector_id: + name: connector_id + in: path + required: true + schema: + type: string ml.delete_model_group::path.model_group_id: name: model_group_id in: path @@ -20885,6 +22466,14 @@ components: schema: $ref: '#/components/schemas/_common:Duration' x-version-added: '2.0' + put_script::query.context: + name: context + in: query + description: |- + Context in which the script or search template should run. + To prevent errors, the API immediately compiles the script or template in this context. + schema: + type: string put_script::query.master_timeout: in: query name: master_timeout @@ -20895,7 +22484,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. put_script::query.timeout: in: query @@ -20956,7 +22545,7 @@ components: name: search_type description: Search operation type schema: - type: string + $ref: '#/components/schemas/_common:SearchType' style: form reindex_rethrottle::path.task_id: in: path @@ -22135,7 +23724,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. snapshot.cleanup_repository::query.timeout: in: query @@ -22183,7 +23772,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. snapshot.create_repository::path.repository: in: path @@ -22208,7 +23797,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. snapshot.create_repository::query.timeout: in: query @@ -22255,7 +23844,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. snapshot.create::query.wait_for_completion: in: query @@ -22288,7 +23877,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. snapshot.delete_repository::query.timeout: in: query @@ -22328,7 +23917,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. snapshot.get_repository::path.repository: in: path @@ -22361,7 +23950,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. snapshot.get::path.repository: in: path @@ -22405,7 +23994,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. snapshot.get::query.verbose: in: query @@ -22445,7 +24034,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. snapshot.restore::query.wait_for_completion: in: query @@ -22494,7 +24083,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. snapshot.verify_repository::path.repository: in: path @@ -22519,7 +24108,7 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager_timeout' instead. snapshot.verify_repository::query.timeout: in: query @@ -23363,6 +24952,11 @@ components: style: form x-default: '1' requestBodies: + asynchronous_search.search: + content: + application/json: + schema: + $ref: '#/components/schemas/asynchronous_search._common:Search' bulk: content: application/x-ndjson: @@ -23414,6 +25008,11 @@ components: description: Specifies the ID of the shard that you would like an explanation for. type: number description: The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' + cluster.delete_weighted_routing: + content: + application/json: + schema: + $ref: '#/components/schemas/cluster.weighted_routing:WeightsBase' cluster.put_component_template: content: application/json: @@ -23451,6 +25050,11 @@ components: additionalProperties: {} description: The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). required: true + cluster.put_weighted_routing: + content: + application/json: + schema: + $ref: '#/components/schemas/cluster.weighted_routing:Weights' cluster.reroute: content: application/json: @@ -23529,6 +25133,34 @@ components: runtime_mappings: $ref: '#/components/schemas/_common.mapping:RuntimeFields' description: An index filter specified with the Query DSL + flow_framework.create: + content: + application/json: + schema: + $ref: '#/components/schemas/flow_framework.common:FlowFrameworkCreate' + flow_framework.provision: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/flow_framework.common:UserProvidedSubstitutionExpressions' + flow_framework.search: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/flow_framework.common:SearchWorkflowRequest' + flow_framework.search_state: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/flow_framework.common:SearchWorkflowRequest' + flow_framework.update: + content: + application/json: + schema: + $ref: '#/components/schemas/flow_framework.common:FlowFrameworkUpdate' index: content: application/json: @@ -23941,6 +25573,35 @@ components: $ref: '#/components/schemas/ingest._common:Pipeline' description: The simulate definition required: true + ism.add_policy: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:AddPolicyRequest' + ism.change_policy: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:ChangePolicyRequest' + ism.explain_policy: + content: + application/json: + schema: {} + ism.put_policies: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:PutPolicyRequest' + ism.put_policy: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:PutPolicyRequest' + ism.retry_index: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:RetryIndexRequest' knn.search_models: content: application/json: @@ -23990,6 +25651,16 @@ components: $ref: '#/components/schemas/_common:Ids' description: Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL. required: true + ml.create_connector: + content: + application/json: + schema: + $ref: '#/components/schemas/ml._common:CreateConnectorRequest' + ml.register_agents: + content: + application/json: + schema: + $ref: '#/components/schemas/ml._common:RegisterAgentsRequest' ml.register_model: content: application/json: @@ -24341,13 +26012,6 @@ components: type: array items: $ref: '#/components/schemas/_common.query_dsl:FieldAndFormat' - knn: - description: Defines the approximate kNN search to run. - oneOf: - - $ref: '#/components/schemas/_common:KnnQuery' - - type: array - items: - $ref: '#/components/schemas/_common:KnnQuery' rank: $ref: '#/components/schemas/_common:RankContainer' min_score: @@ -24809,6 +26473,16 @@ components: additionalProperties: type: string description: Define parameters and or supply a document to get termvectors for. See documentation. + transforms.preview: + content: + application/json: + schema: + type: object + properties: + transform: + $ref: '#/components/schemas/transforms._common:Transform' + required: + - transform transforms.put: content: application/json: @@ -24864,6 +26538,29 @@ components: $ref: '#/components/schemas/_common:Conflicts' description: The search definition using the Query DSL responses: + asynchronous_search.delete@200: + content: + application/json: + schema: + type: object + properties: + acknowledged: + type: boolean + asynchronous_search.get@200: + content: + application/json: + schema: + $ref: '#/components/schemas/asynchronous_search._common:ResponseBody' + asynchronous_search.search@200: + content: + application/json: + schema: + $ref: '#/components/schemas/asynchronous_search._common:ResponseBody' + asynchronous_search.stats@200: + content: + application/json: + schema: + $ref: '#/components/schemas/asynchronous_search._common:StatsResponse' bulk@200: content: application/json: @@ -25215,11 +26912,19 @@ components: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' - cluster.delete_decommission_awareness@200: {} + cluster.delete_decommission_awareness@200: + content: + application/json: + schema: + $ref: '#/components/schemas/_common:AcknowledgedResponseBase' cluster.delete_voting_config_exclusions@200: content: application/json: {} - cluster.delete_weighted_routing@200: {} + cluster.delete_weighted_routing@200: + content: + application/json: + schema: + $ref: '#/components/schemas/_common:AcknowledgedResponseBase' cluster.exists_component_template@200: content: application/json: {} @@ -25235,7 +26940,11 @@ components: $ref: '#/components/schemas/cluster._common:ComponentTemplate' required: - component_templates - cluster.get_decommission_awareness@200: {} + cluster.get_decommission_awareness@200: + content: + application/json: + schema: + $ref: '#/components/schemas/cluster.decommission_awareness:DecommissionStatusResponse' cluster.get_settings@200: content: application/json: @@ -25244,20 +26953,21 @@ components: properties: persistent: type: object - additionalProperties: - type: object + additionalProperties: true transient: type: object - additionalProperties: - type: object + additionalProperties: true defaults: type: object - additionalProperties: - type: object + additionalProperties: true required: - persistent - transient - cluster.get_weighted_routing@200: {} + cluster.get_weighted_routing@200: + content: + application/json: + schema: + $ref: '#/components/schemas/cluster.weighted_routing:WeightsResponse' cluster.health@200: content: application/json: @@ -25283,7 +26993,11 @@ components: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' - cluster.put_decommission_awareness@200: {} + cluster.put_decommission_awareness@200: + content: + application/json: + schema: + $ref: '#/components/schemas/_common:AcknowledgedResponseBase' cluster.put_settings@200: content: application/json: @@ -25302,7 +27016,11 @@ components: - acknowledged - persistent - transient - cluster.put_weighted_routing@200: {} + cluster.put_weighted_routing@200: + content: + application/json: + schema: + type: object cluster.remote_info@200: content: application/json: @@ -25346,6 +27064,8 @@ components: schema: type: object properties: + terminated_early: + type: boolean count: type: number _shards: @@ -25416,42 +27136,12 @@ components: content: application/json: schema: - type: object - properties: - batches: - type: number - deleted: - type: number - failures: - type: array - items: - $ref: '#/components/schemas/_common:BulkIndexByScrollFailure' - noops: - type: number - requests_per_second: - type: number - retries: - $ref: '#/components/schemas/_common:Retries' - slice_id: - type: number - task: - $ref: '#/components/schemas/_common:TaskId' - throttled: - $ref: '#/components/schemas/_common:Duration' - throttled_millis: - $ref: '#/components/schemas/_common:DurationValueUnitMillis' - throttled_until: - $ref: '#/components/schemas/_common:Duration' - throttled_until_millis: - $ref: '#/components/schemas/_common:DurationValueUnitMillis' - timed_out: - type: boolean - took: - $ref: '#/components/schemas/_common:DurationValueUnitMillis' - total: - type: number - version_conflicts: - type: number + oneOf: + - $ref: '#/components/schemas/_common:BulkByScrollResponseBase' + - type: object + properties: + task: + $ref: '#/components/schemas/_common:TaskId' delete_pit@200: content: application/json: @@ -25515,6 +27205,182 @@ components: required: - fields - indices + flow_framework.create@201: + content: + application/json: + schema: + type: object + properties: + workflow_id: + type: string + description: The ID of the workflow to be updated. Required for the PUT method. + required: + - workflow_id + flow_framework.create@400: + description: Bad Request - Multiple possible reasons + content: + application/json: + oneOf: + - $ref: '#/components/schemas/flow_framework.errors:InvalidParameterError' + - $ref: '#/components/schemas/flow_framework.errors:ConflictError' + - $ref: '#/components/schemas/flow_framework.errors:MissingParameterError' + - $ref: '#/components/schemas/flow_framework.errors:ParameterConflictError' + - $ref: '#/components/schemas/flow_framework.errors:MaxWorkflowsLimitError' + - $ref: '#/components/schemas/flow_framework.errors:WorkflowSaveError' + - $ref: '#/components/schemas/flow_framework.errors:WorkflowParsingError' + - $ref: '#/components/schemas/flow_framework.errors:UnsupportedFieldUpdateError' + - $ref: '#/components/schemas/flow_framework.errors:InvalidTemplateVersionError' + - $ref: '#/components/schemas/flow_framework.errors:TemplateNameRequiredError' + flow_framework.create@403: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:FlowFrameworkAPIDisabledError' + flow_framework.delete@200: + content: + application/json: + $ref: '#/components/schemas/flow_framework.common:FlowFrameworkDeleteResponse' + flow_framework.delete@400: + description: Work Flow Id Null Error + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:WorkFlowIdNullError' + flow_framework.delete@403: + description: Flow Framework API Disabled Error + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:FlowFrameworkAPIDisabledError' + flow_framework.deprovision@200: + content: + application/json: + $ref: '#/components/schemas/flow_framework.common:WorkflowID' + flow_framework.deprovision@202: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:DeprovisioningError' + flow_framework.deprovision@403: + content: + application/json: + oneOf: + - $ref: '#/components/schemas/flow_framework.errors:FlowFrameworkAPIDisabledError' + - $ref: '#/components/schemas/flow_framework.errors:DeprovisioningForbiddenError' + flow_framework.deprovision@404: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:TemplateNotFoundError' + flow_framework.get_status@200: + content: + application/json: + oneOf: + - $ref: '#/components/schemas/flow_framework.common:WorkFlowStatusFullResponse' + - $ref: '#/components/schemas/flow_framework.common:WorkFlowStatusDefaultResponse' + flow_framework.get_status@403: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:FlowFrameworkAPIDisabledError' + flow_framework.get_status@404: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:TemplateNotFoundError' + flow_framework.get_steps@200: + content: + application/json: + $ref: '#/components/schemas/flow_framework.common:WorkflowStep' + flow_framework.get_steps@400: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:WorkflowStepsRetrieveError' + flow_framework.get_steps@403: + description: Flow Framework API Disabled Error + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:FlowFrameworkAPIDisabledError' + flow_framework.get@200: + content: + application/json: + $ref: '#/components/schemas/flow_framework.common:FlowFrameworkGetResponse' + flow_framework.get@404: + description: Template Not Found Error + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:TemplateNotFoundError' + flow_framework.provision@200: + content: + application/json: + $ref: '#/components/schemas/flow_framework.common:WorkflowID' + flow_framework.provision@400: + content: + application/json: + oneOf: + - $ref: '#/components/schemas/flow_framework.errors:WorkFlowIdNullError' + - $ref: '#/components/schemas/flow_framework.errors:RequestBodyParsingFailedError' + - $ref: '#/components/schemas/flow_framework.errors:InvalidRequestBodyFieldError' + - $ref: '#/components/schemas/flow_framework.errors:DuplicateKeyError' + flow_framework.provision@403: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:FlowFrameworkAPIDisabledError' + flow_framework.search_state@200: + content: + application/json: + $ref: '#/components/schemas/flow_framework.common:WorkflowSearchStateResponse' + flow_framework.search_state@400: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:BadRequestError' + flow_framework.search_state@403: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:FlowFrameworkAPIDisabledError' + flow_framework.search_state@408: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:RequestTimeoutError' + flow_framework.search@200: + content: + application/json: + $ref: '#/components/schemas/flow_framework.common:WorkflowSearchResponse' + flow_framework.search@400: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:BadRequestError' + flow_framework.search@403: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:FlowFrameworkAPIDisabledError' + flow_framework.search@408: + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:RequestTimeoutError' + flow_framework.update@201: + content: + application/json: + schema: + type: object + properties: + workflow_id: + type: string + description: The ID of the workflow to be updated. Required for the PUT method. + required: + - workflow_id + flow_framework.update@400: + description: Bad Request - Multiple possible reasons + content: + application/json: + oneOf: + - $ref: '#/components/schemas/flow_framework.errors:InvalidParameterError' + - $ref: '#/components/schemas/flow_framework.errors:ConflictError' + - $ref: '#/components/schemas/flow_framework.errors:MissingParameterError' + - $ref: '#/components/schemas/flow_framework.errors:ParameterConflictError' + - $ref: '#/components/schemas/flow_framework.errors:MaxWorkflowsLimitError' + - $ref: '#/components/schemas/flow_framework.errors:WorkflowSaveError' + - $ref: '#/components/schemas/flow_framework.errors:InvalidTemplateVersionError' + - $ref: '#/components/schemas/flow_framework.errors:UnsupportedFieldUpdateError' + - $ref: '#/components/schemas/flow_framework.errors:WorkflowParsingError' + flow_framework.update@404: + description: Template Not Found Error + content: + application/json: + $ref: '#/components/schemas/flow_framework.errors:TemplateNotFoundError' get_all_pits@200: content: application/json: @@ -25699,10 +27565,10 @@ components: items: $ref: '#/components/schemas/indices.data_streams_stats:DataStreamsStatsItem' total_store_sizes: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_store_size_bytes: description: Total size, in bytes, of all shards for the selected data streams. - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - _shards - backing_indices @@ -26131,6 +27997,74 @@ components: $ref: '#/components/schemas/ingest.simulate:PipelineSimulation' required: - docs + ism.add_policy@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:AddPolicyResponse' + ism.change_policy@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:ChangePolicyResponse' + ism.delete_policy@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:DeletePolicyResponse' + ism.exists_policy@200: + content: + application/json: + schema: {} + ism.exists_policy@404: + content: + application/json: + schema: {} + ism.explain_policy@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:ExplainIndexResponse' + ism.get_policies@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:GetPoliciesResponse' + ism.get_policy@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:GetPolicyResponse' + ism.put_policies@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:PutPolicyResponse' + ism.put_policy@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:PutPolicyResponse' + ism.put_policy@201: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:PutPolicyResponse' + ism.refresh_search_analyzers@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:RefreshSearchAnalyzersResponse' + ism.remove_policy@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:RemovePolicyResponse' + ism.retry_index@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ism._common:RetryIndexResponse' knn.delete_model@200: {} knn.get_model@200: {} knn.search_models@200: {} @@ -26149,6 +28083,24 @@ components: $ref: '#/components/schemas/_core.mget:ResponseItem' required: - docs + ml.create_connector@200: + content: + application/json: + schema: + type: object + properties: + connector_id: + type: string + ml.delete_agent@200: + content: + application/json: + schema: + $ref: '#/components/schemas/_common:WriteResponseBase' + ml.delete_connector@200: + content: + application/json: + schema: + $ref: '#/components/schemas/_common:WriteResponseBase' ml.delete_model_group@200: content: application/json: @@ -26189,6 +28141,14 @@ components: application/json: schema: $ref: '#/components/schemas/ml._common:Task' + ml.register_agents@200: + content: + application/json: + schema: + type: object + properties: + agent_id: + type: string ml.register_model_group@200: content: application/json: @@ -26239,7 +28199,9 @@ components: $ref: '#/components/schemas/_core.mtermvectors:TermVectorsResult' required: - docs - nodes.hot_threads@200: {} + nodes.hot_threads@200: + content: + text/plain: {} nodes.info@200: content: application/json: @@ -26541,42 +28503,12 @@ components: content: application/json: schema: - type: object - properties: - batches: - type: number - created: - type: number - deleted: - type: number - failures: - type: array - items: - $ref: '#/components/schemas/_common:BulkIndexByScrollFailure' - noops: - type: number - retries: - $ref: '#/components/schemas/_common:Retries' - requests_per_second: - type: number - slice_id: - type: number - task: - $ref: '#/components/schemas/_common:TaskId' - throttled_millis: - $ref: '#/components/schemas/_common:EpochTimeUnitMillis' - throttled_until_millis: - $ref: '#/components/schemas/_common:EpochTimeUnitMillis' - timed_out: - type: boolean - took: - $ref: '#/components/schemas/_common:DurationValueUnitMillis' - total: - type: number - updated: - type: number - version_conflicts: - type: number + oneOf: + - $ref: '#/components/schemas/_common:BulkByScrollResponseBase' + - type: object + properties: + task: + $ref: '#/components/schemas/_common:TaskId' remote_store.restore@200: content: application/json: @@ -27541,7 +29473,7 @@ components: task: $ref: '#/components/schemas/tasks._common:TaskInfo' response: - type: object + $ref: '#/components/schemas/tasks._common:TaskResponse' error: $ref: '#/components/schemas/_common:ErrorCause' required: @@ -27630,42 +29562,12 @@ components: content: application/json: schema: - type: object - properties: - batches: - type: number - failures: - type: array - items: - $ref: '#/components/schemas/_common:BulkIndexByScrollFailure' - noops: - type: number - deleted: - type: number - requests_per_second: - type: number - retries: - $ref: '#/components/schemas/_common:Retries' - task: - $ref: '#/components/schemas/_common:TaskId' - timed_out: - type: boolean - took: - $ref: '#/components/schemas/_common:DurationValueUnitMillis' - total: - type: number - updated: - type: number - version_conflicts: - type: number - throttled: - $ref: '#/components/schemas/_common:Duration' - throttled_millis: - $ref: '#/components/schemas/_common:DurationValueUnitMillis' - throttled_until: - $ref: '#/components/schemas/_common:Duration' - throttled_until_millis: - $ref: '#/components/schemas/_common:DurationValueUnitMillis' + oneOf: + - $ref: '#/components/schemas/_common:BulkByScrollResponseBase' + - type: object + properties: + task: + $ref: '#/components/schemas/_common:TaskId' update@200: content: application/json: @@ -27705,12 +29607,100 @@ components: transport_address: $ref: '#/components/schemas/_common:TransportAddress' required: - - attributes - - host - - ip - name - - transport_address - _common:BulkIndexByScrollFailure: + _common:BulkByScrollFailure: + anyOf: + - $ref: '#/components/schemas/_common:BulkItemResponseFailure' + - $ref: '#/components/schemas/_common:ScrollableHitSourceSearchFailure' + _common:BulkByScrollResponseBase: + allOf: + - $ref: '#/components/schemas/_common:BulkByScrollTaskStatus' + - type: object + properties: + took: + type: integer + format: int64 + timed_out: + type: boolean + failures: + type: array + items: + $ref: '#/components/schemas/_common:BulkByScrollFailure' + required: + - failures + - timed_out + - took + _common:BulkByScrollTaskStatus: + type: object + properties: + slice_id: + type: integer + format: int32 + total: + description: The number of documents that were successfully processed. + type: integer + format: int64 + updated: + description: The number of documents that were successfully updated, for example, a document with same ID already existed prior to reindex updating it. + type: integer + format: int64 + created: + description: The number of documents that were successfully created. + type: integer + format: int64 + deleted: + description: The number of documents that were successfully deleted. + type: integer + format: int64 + batches: + description: The number of scroll responses pulled back by the reindex. + type: integer + format: int32 + version_conflicts: + description: The number of version conflicts that reindex hits. + type: integer + format: int64 + noops: + description: The number of documents that were ignored. + type: integer + format: int64 + retries: + $ref: '#/components/schemas/_common:Retries' + throttled_millis: + $ref: '#/components/schemas/_common:DurationValueUnitMillis' + throttled: + $ref: '#/components/schemas/_common:Duration' + requests_per_second: + description: The number of requests per second effectively executed during the reindex. + type: number + format: float + canceled: + type: string + throttled_until_millis: + $ref: '#/components/schemas/_common:DurationValueUnitMillis' + throttled_until: + $ref: '#/components/schemas/_common:Duration' + slices: + type: array + items: + $ref: '#/components/schemas/_common:BulkByScrollTaskStatusOrException' + required: + - batches + - deleted + - noops + - requests_per_second + - retries + - throttled_millis + - throttled_until_millis + - total + - version_conflicts + _common:BulkByScrollTaskStatusOrException: + oneOf: + - title: status + $ref: '#/components/schemas/_common:BulkByScrollTaskStatus' + - title: exception + $ref: '#/components/schemas/_common:ErrorCause' + _common:BulkItemResponseFailure: type: object properties: cause: @@ -27720,18 +29710,18 @@ components: index: $ref: '#/components/schemas/_common:IndexName' status: - type: number - type: - type: string + type: integer + format: int32 required: - cause - - id - index - status - - type _common:byte: type: number - _common:Bytes: + _common:ByteCount: + type: integer + format: int64 + _common:ByteUnit: type: string enum: - b @@ -27745,10 +29735,6 @@ components: - pb - t - tb - _common:ByteSize: - oneOf: - - type: number - - type: string _common:ClusterDetails: type: object properties: @@ -27809,9 +29795,9 @@ components: properties: size_in_bytes: description: Total amount, in bytes, of memory used for completion across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' fields: type: object additionalProperties: @@ -28008,9 +29994,9 @@ components: evictions: type: number memory_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' memory_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' fields: type: object additionalProperties: @@ -28021,9 +30007,9 @@ components: type: object properties: memory_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' memory_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - memory_size_in_bytes _common:Fields: @@ -28036,9 +30022,9 @@ components: type: object properties: size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - size_in_bytes _common:FieldValue: @@ -28049,6 +30035,10 @@ components: - number - object - string + _common:FieldWithOrder: + type: object + additionalProperties: + $ref: '#/components/schemas/_common:ScoreSort' _common:FlushStats: type: object properties: @@ -28162,7 +30152,7 @@ components: properties: total: type: number - time: + getTime: $ref: '#/components/schemas/_common:Duration' time_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' @@ -28224,6 +30214,9 @@ components: - type: array items: type: string + _common:HumanReadableByteCount: + type: string + pattern: \d+(\.\d+)?(b|kb|k|mb|m|gb|g|tb|t|pb|p) _common:IBDistribution: type: string enum: @@ -28363,38 +30356,34 @@ components: - source _common:Ip: type: string - _common:KnnQuery: + _common:KnnField: type: object properties: - field: - $ref: '#/components/schemas/_common:Field' - query_vector: + vector: $ref: '#/components/schemas/_common:QueryVector' - query_vector_builder: - $ref: '#/components/schemas/_common:QueryVectorBuilder' k: - description: The final number of nearest neighbors to return as top hits + description: The final number of nearest neighbors to return as top hits. type: number - num_candidates: - description: The number of nearest neighbor candidates to consider per shard + min_score: + description: The minimum similarity score for a neighbor to be considered a hit. type: number - boost: - description: Boost value to apply to kNN scores + x-version-added: '2.14' + max_distance: + description: The maximum physical distance in vector space for a neighbor to be considered a hit. type: number + x-version-added: '2.14' filter: - description: Filters for the kNN search query + description: Filters for the kNN search query. oneOf: - $ref: '#/components/schemas/_common.query_dsl:QueryContainer' - type: array items: $ref: '#/components/schemas/_common.query_dsl:QueryContainer' - similarity: - description: The minimum similarity for a vector to be considered a match + boost: + description: Boost value to apply to kNN scores type: number required: - - field - - k - - num_candidates + - vector _common:LatLonGeoLocation: type: object properties: @@ -28421,21 +30410,21 @@ components: current_docs: type: number current_size: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' current_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' total: type: number total_auto_throttle: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_auto_throttle_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' total_docs: type: number total_size: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' total_stopped_time: $ref: '#/components/schemas/_common:Duration' total_stopped_time_in_millis: @@ -28464,12 +30453,6 @@ components: _common:Metadata: type: object additionalProperties: true - _common:Metrics: - oneOf: - - type: string - - type: array - items: - type: string _common:MinimumShouldMatch: description: The minimum number of terms that should match as integer, percentage or range. oneOf: @@ -28477,6 +30460,13 @@ components: - type: string _common:MultiTermQueryRewrite: type: string + enum: + - constant_score + - constant_score_boolean + - scoring_boolean + - top_terms_N + - top_terms_blended_freqs_N + - top_terms_boost_N _common:Name: type: string _common:Names: @@ -28534,23 +30524,32 @@ components: _common:NodeName: type: string _common:NodeRole: - type: string - enum: - - client - - cluster_manager - - coordinating_only - - data - - data_cold - - data_content - - data_frozen - - data_hot - - data_warm - - ingest - - master - - ml - - remote_cluster_client - - transform - - voting_only + oneOf: + - type: string + enum: + - client + - coordinating_only + - data + - data_cold + - data_content + - data_frozen + - data_hot + - data_warm + - ingest + - ml + - remote_cluster_client + - transform + - voting_only + - type: string + enum: + - master + deprecated: true + x-version-deprecated: '2.0' + x-deprecation-message: To promote inclusive language, use 'cluster_manager' instead. + - type: string + enum: + - cluster_manager + x-version-added: '2.0' _common:NodeRoles: description: Node roles. type: array @@ -28599,13 +30598,13 @@ components: $ref: '#/components/schemas/_common:ErrorCause' total: description: Total number of nodes selected by the request. - type: number + type: integer successful: description: Number of nodes that responded successfully to the request. - type: number + type: integer failed: description: Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response. - type: number + type: integer required: - failed - successful @@ -28658,10 +30657,11 @@ components: - index _common:Password: type: string - _common:Percentage: - oneOf: - - type: string - - type: number + _common:PercentageNumber: + type: number + _common:PercentageString: + type: string + pattern: \d+(\.\d+)? _common:PhaseTook: type: object properties: @@ -28750,10 +30750,10 @@ components: description: Total count of query cache hits across all shards assigned to selected nodes. type: number memory_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' memory_size_in_bytes: description: Total amount, in bytes, of memory used for the query cache across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' miss_count: description: Total count of query cache misses across all shards assigned to selected nodes. type: number @@ -28772,13 +30772,6 @@ components: type: array items: type: number - _common:QueryVectorBuilder: - type: object - properties: - text_embedding: - $ref: '#/components/schemas/_common:TextEmbedding' - minProperties: 1 - maxProperties: 1 _common:RankBase: type: object _common:RankContainer: @@ -28814,6 +30807,8 @@ components: properties: external_total: type: number + external_total_time: + $ref: '#/components/schemas/_common:Duration' external_total_time_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' listeners: @@ -28846,6 +30841,9 @@ components: total_download_size: description: The total amount of data download from the remote segment store. $ref: '#/components/schemas/_common:RemoteStoreUploadDownloadStats' + total_time_spent: + description: The total duration, spent on downloads from the remote segment store. + $ref: '#/components/schemas/_common:Duration' total_time_spent_in_millis: description: The total duration, in milliseconds, spent on downloads from the remote segment store. $ref: '#/components/schemas/_common:DurationValueUnitMillis' @@ -28885,15 +30883,24 @@ components: type: object description: The total amount of data uploaded to the remote translog store. properties: + failed: + description: The number of bytes that failed to upload to the remote translog store. + $ref: '#/components/schemas/_common:HumanReadableByteCount' failed_bytes: description: The number of bytes that failed to upload to the remote translog store. - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' + started: + description: The number of bytes successfully uploaded to the remote translog store. + $ref: '#/components/schemas/_common:HumanReadableByteCount' started_bytes: description: The number of bytes successfully uploaded to the remote translog store. - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' + succeeded: + description: The number of bytes successfully uploaded to the remote translog store. + $ref: '#/components/schemas/_common:HumanReadableByteCount' succeeded_bytes: description: The number of bytes successfully uploaded to the remote translog store. - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' required: - failed_bytes - started_bytes @@ -28919,15 +30926,24 @@ components: type: object description: The amount of data, in bytes, uploaded or downloaded to/from the remote segment store. properties: + failed: + description: The number of bytes that failed to upload/upload to/from the remote segment store. + $ref: '#/components/schemas/_common:HumanReadableByteCount' failed_bytes: description: The number of bytes that failed to upload/upload to/from the remote segment store. - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' + started: + description: The number of bytes to upload/download to/from the remote segment store after the upload/download has started. + $ref: '#/components/schemas/_common:HumanReadableByteCount' started_bytes: description: The number of bytes to upload/download to/from the remote segment store after the upload/download has started. - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' + succeeded: + description: The number of bytes successfully uploaded/downloaded to/from the remote segment store. + $ref: '#/components/schemas/_common:HumanReadableByteCount' succeeded_bytes: description: The number of bytes successfully uploaded/downloaded to/from the remote segment store. - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' required: - failed_bytes - started_bytes @@ -28945,12 +30961,18 @@ components: type: object description: The amount of lag during upload between the remote segment store and the local store. properties: + max: + description: The maximum amount of lag, in bytes, during the upload refresh between the remote segment store and the local store. + $ref: '#/components/schemas/_common:HumanReadableByteCount' max_bytes: description: The maximum amount of lag, in bytes, during the upload refresh between the remote segment store and the local store. - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' + total: + description: The total number of bytes that lagged during the upload refresh between the remote segment store and the local store. + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_bytes: description: The total number of bytes that lagged during the upload refresh between the remote segment store and the local store. - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' required: - max_bytes - total_bytes @@ -28958,6 +30980,9 @@ components: type: object description: Statistics related to uploads to the remote segment store. properties: + max_refresh_time_lag: + description: The maximum duration that the remote refresh is behind the local refresh. + $ref: '#/components/schemas/_common:Duration' max_refresh_time_lag_in_millis: description: The maximum duration, in milliseconds, that the remote refresh is behind the local refresh. $ref: '#/components/schemas/_common:DurationValueUnitMillis' @@ -28965,6 +30990,9 @@ components: $ref: '#/components/schemas/_common:RemoteStoreUploadPressureStats' refresh_size_lag: $ref: '#/components/schemas/_common:RemoteStoreUploadRefreshSizeLagStats' + total_time_spent: + description: The total amount of time, spent on uploads to the remote segment store. + $ref: '#/components/schemas/_common:Duration' total_time_spent_in_millis: description: The total amount of time, in milliseconds, spent on uploads to the remote segment store. $ref: '#/components/schemas/_common:DurationValueUnitMillis' @@ -28984,9 +31012,9 @@ components: hit_count: type: number memory_size: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' memory_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' miss_count: type: number required: @@ -28997,6 +31025,8 @@ components: _common:RequestStats: type: object properties: + time: + $ref: '#/components/schemas/_common:Duration' time_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' current: @@ -29015,14 +31045,20 @@ components: type: object properties: bulk: - type: number + type: integer + format: int64 search: - type: number + type: integer + format: int64 required: - bulk - search _common:Routing: - type: string + oneOf: + - type: string + - type: array + items: + type: string _common:RrfRank: allOf: - $ref: '#/components/schemas/_common:RankBase' @@ -29094,6 +31130,24 @@ components: - number - string - version + _common:ScrollableHitSourceSearchFailure: + type: object + properties: + index: + $ref: '#/components/schemas/_common:IndexName' + shard: + type: integer + format: int32 + node: + type: string + status: + type: integer + format: int32 + reason: + $ref: '#/components/schemas/_common:ErrorCause' + required: + - reason + - status _common:ScrollId: type: string _common:ScrollIds: @@ -29214,11 +31268,11 @@ components: type: object properties: max_bytes_behind: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' max_replication_lag: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' total_bytes_behind: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' required: - max_bytes_behind - max_replication_lag @@ -29230,10 +31284,10 @@ components: description: Total number of segments across all shards assigned to selected nodes. type: number doc_values_memory: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' doc_values_memory_in_bytes: description: Total amount, in bytes, of memory used for doc values across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' file_sizes: description: |- This object is not populated by the cluster stats API. @@ -29242,55 +31296,62 @@ components: additionalProperties: $ref: '#/components/schemas/indices.stats:ShardFileSizeInfo' fixed_bit_set: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' fixed_bit_set_memory_in_bytes: description: Total amount of memory, in bytes, used by fixed bit sets across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' index_writer_memory: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' index_writer_max_memory_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' index_writer_memory_in_bytes: description: Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' max_unsafe_auto_id_timestamp: description: Unix timestamp, in milliseconds, of the most recently retried indexing request. type: number memory: - $ref: '#/components/schemas/_common:ByteSize' + description: Total amount, of memory used for segments across all shards assigned to selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' memory_in_bytes: description: Total amount, in bytes, of memory used for segments across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' norms_memory: - $ref: '#/components/schemas/_common:ByteSize' + description: Total amount of memory used for normalization factors across all shards assigned to selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' norms_memory_in_bytes: description: Total amount, in bytes, of memory used for normalization factors across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' points_memory: - $ref: '#/components/schemas/_common:ByteSize' + description: Total amount of memory used for points across all shards assigned to selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' points_memory_in_bytes: description: Total amount, in bytes, of memory used for points across all shards assigned to selected nodes. - type: number - stored_memory: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' + stored_fields_memory: + description: Total amount of memory used for stored fields across all shards assigned to selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' stored_fields_memory_in_bytes: description: Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' + terms_memory: + description: Total amount of memory used for terms across all shards assigned to selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' terms_memory_in_bytes: description: Total amount, in bytes, of memory used for terms across all shards assigned to selected nodes. - type: number - terms_memory: - $ref: '#/components/schemas/_common:ByteSize' - term_vectory_memory: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' + term_vectors_memory: + description: Total amount of memory used for term vectors across all shards assigned to selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' term_vectors_memory_in_bytes: description: Total amount, in bytes, of memory used for term vectors across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' version_map_memory: - $ref: '#/components/schemas/_common:ByteSize' + description: Total amount of memory used by all version maps across all shards assigned to selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' version_map_memory_in_bytes: description: Total amount, in bytes, of memory used by all version maps across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' remote_store: $ref: '#/components/schemas/_common:RemoteStoreStats' segment_replication: @@ -29310,7 +31371,7 @@ components: - terms_memory_in_bytes - version_map_memory_in_bytes _common:SequenceNumber: - type: number + type: integer format: int64 _common:ShardFailure: type: object @@ -29322,7 +31383,7 @@ components: reason: $ref: '#/components/schemas/_common:ErrorCause' shard: - type: number + type: integer status: type: string required: @@ -29386,6 +31447,7 @@ components: _common:SortCombinations: oneOf: - $ref: '#/components/schemas/_common:Field' + - $ref: '#/components/schemas/_common:FieldWithOrder' - $ref: '#/components/schemas/_common:SortOptions' _common:SortMode: type: string @@ -29445,15 +31507,15 @@ components: type: object properties: size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' size_in_bytes: description: Total size, in bytes, of all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' reserved: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' reserved_in_bytes: description: A prediction, in bytes, of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities. - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - reserved_in_bytes - size_in_bytes @@ -29517,7 +31579,7 @@ components: type: object properties: task_id: - type: number + type: integer node_id: $ref: '#/components/schemas/_common:NodeId' status: @@ -29533,16 +31595,6 @@ components: oneOf: - type: string - type: number - _common:TextEmbedding: - type: object - properties: - model_id: - type: string - model_text: - type: string - required: - - model_id - - model_text _common:TimeOfDay: description: Time of day, expressed as HH:MM:SS. type: string @@ -29588,15 +31640,15 @@ components: remote_store: $ref: '#/components/schemas/_common:RemoteStoreTranslogStats' size: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' uncommitted_operations: type: number uncommitted_size: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' uncommitted_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - earliest_last_modified_age - operations @@ -29609,16 +31661,17 @@ components: type: string x-version-removed: '2.0' _common:uint: - type: number + type: integer _common:ulong: type: number _common:UnitMillis: description: Time unit for milliseconds. - type: number + type: integer format: int64 _common:UnitNanos: description: Time unit for nanoseconds. - type: number + type: integer + format: int64 _common:UnitSeconds: description: Time unit for seconds. type: number @@ -29627,7 +31680,7 @@ components: _common:Uuid: type: string _common:VersionNumber: - type: number + type: integer format: int64 _common:VersionString: type: string @@ -29697,7 +31750,7 @@ components: _index: $ref: '#/components/schemas/_common:IndexName' _primary_term: - type: number + type: integer format: int64 result: $ref: '#/components/schemas/_common:Result' @@ -29717,6 +31770,32 @@ components: - _shards - _version - result + _common:XyCartesianCoordinates: + x-version-added: '2.4' + type: object + properties: + x: + description: The x coordinate. + type: number + y: + description: The y coordinate. + type: number + required: + - x + - y + _common:XyLocation: + x-version-added: '2.4' + description: |- + A two-dimensional Cartesian point specified by x and y coordinates. It can be represented in various ways: + - as a `{x, y}` object + - as a `[x, y]` array + - as a string in `"x, y"` or WKT point formats. + oneOf: + - $ref: '#/components/schemas/_common:XyCartesianCoordinates' + - type: array + items: + type: number + - type: string _common.aggregations:AdjacencyMatrixAggregate: allOf: - $ref: '#/components/schemas/_common.aggregations:MultiBucketAggregateBaseAdjacencyMatrixBucket' @@ -35561,6 +37640,10 @@ components: $ref: '#/components/schemas/_common.mapping:GeoOrientation' strategy: $ref: '#/components/schemas/_common.mapping:GeoStrategy' + deprecated: true + distance_error_pct: + type: number + deprecated: true type: type: string enum: @@ -35888,23 +37971,6 @@ components: - percolator required: - type - _common.mapping:PointProperty: - allOf: - - $ref: '#/components/schemas/_common.mapping:DocValuesPropertyBase' - - type: object - properties: - ignore_malformed: - type: boolean - ignore_z_value: - type: boolean - null_value: - type: string - type: - type: string - enum: - - point - required: - - type _common.mapping:Property: type: object discriminator: @@ -35940,8 +38006,8 @@ components: - $ref: '#/components/schemas/_common.mapping:TokenCountProperty' - $ref: '#/components/schemas/_common.mapping:GeoPointProperty' - $ref: '#/components/schemas/_common.mapping:GeoShapeProperty' - - $ref: '#/components/schemas/_common.mapping:PointProperty' - - $ref: '#/components/schemas/_common.mapping:ShapeProperty' + - $ref: '#/components/schemas/_common.mapping:XyPointProperty' + - $ref: '#/components/schemas/_common.mapping:XyShapeProperty' - $ref: '#/components/schemas/_common.mapping:ByteNumberProperty' - $ref: '#/components/schemas/_common.mapping:DoubleNumberProperty' - $ref: '#/components/schemas/_common.mapping:FloatNumberProperty' @@ -36109,25 +38175,6 @@ components: - search_as_you_type required: - type - _common.mapping:ShapeProperty: - allOf: - - $ref: '#/components/schemas/_common.mapping:DocValuesPropertyBase' - - type: object - properties: - coerce: - type: boolean - ignore_malformed: - type: boolean - ignore_z_value: - type: boolean - orientation: - $ref: '#/components/schemas/_common.mapping:GeoOrientation' - type: - type: string - enum: - - shape - required: - - type _common.mapping:ShortNumberProperty: allOf: - $ref: '#/components/schemas/_common.mapping:NumberPropertyBase' @@ -36370,6 +38417,44 @@ components: type: string required: - type + _common.mapping:XyPointProperty: + x-version-added: '2.4' + allOf: + - $ref: '#/components/schemas/_common.mapping:DocValuesPropertyBase' + - type: object + properties: + ignore_malformed: + type: boolean + ignore_z_value: + type: boolean + null_value: + $ref: '#/components/schemas/_common:XyLocation' + type: + type: string + enum: + - xy_point + required: + - type + _common.mapping:XyShapeProperty: + x-version-added: '2.4' + allOf: + - $ref: '#/components/schemas/_common.mapping:DocValuesPropertyBase' + - type: object + properties: + coerce: + type: boolean + ignore_malformed: + type: boolean + ignore_z_value: + type: boolean + orientation: + $ref: '#/components/schemas/_common.mapping:GeoOrientation' + type: + type: string + enum: + - xy_shape + required: + - type _common.query_dsl:BoolQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl:QueryBase' @@ -36745,6 +38830,9 @@ components: $ref: '#/components/schemas/_common.query_dsl:GeoValidationMethod' ignore_unmapped: $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' + additionalProperties: + $ref: '#/components/schemas/_common:GeoBounds' + minProperties: 1 _common.query_dsl:GeoDecayFunction: allOf: - $ref: '#/components/schemas/_common.query_dsl:DecayFunctionBase' @@ -36766,11 +38854,11 @@ components: $ref: '#/components/schemas/_common.query_dsl:GeoValidationMethod' ignore_unmapped: $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' - field: - type: object + additionalProperties: + $ref: '#/components/schemas/_common:GeoLocation' + minProperties: 2 required: - distance - - field _common.query_dsl:GeoExecution: type: string enum: @@ -36785,6 +38873,22 @@ components: $ref: '#/components/schemas/_common.query_dsl:GeoValidationMethod' ignore_unmapped: $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' + _common.query_dsl:GeoShape: + type: object + properties: + type: + type: string + coordinates: + type: array + _common.query_dsl:GeoShapeField: + type: object + properties: + shape: + $ref: '#/components/schemas/_common.query_dsl:GeoShape' + relation: + $ref: '#/components/schemas/_common:GeoShapeRelation' + required: + - shape _common.query_dsl:GeoShapeQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl:QueryBase' @@ -36792,6 +38896,9 @@ components: properties: ignore_unmapped: $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' + additionalProperties: + $ref: '#/components/schemas/_common.query_dsl:GeoShapeField' + minProperties: 1 _common.query_dsl:GeoValidationMethod: type: string enum: @@ -37025,6 +39132,12 @@ components: $ref: '#/components/schemas/_common:Field' required: - pattern + _common.query_dsl:KnnQuery: + type: object + additionalProperties: + $ref: '#/components/schemas/_common:KnnField' + minProperties: 1 + maxProperties: 1 _common.query_dsl:Like: description: Text that we want similar documents for or a lookup to a document's field for the text. oneOf: @@ -37055,9 +39168,7 @@ components: version_type: $ref: '#/components/schemas/_common:VersionType' _common.query_dsl:MatchAllQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl:QueryBase' - - type: object + $ref: '#/components/schemas/_common.query_dsl:QueryBase' _common.query_dsl:MatchBoolPrefixQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl:QueryBase' @@ -37566,6 +39677,8 @@ components: $ref: '#/components/schemas/_common.query_dsl:IntervalsQuery' minProperties: 1 maxProperties: 1 + knn: + $ref: '#/components/schemas/_common.query_dsl:KnnQuery' match: description: |- Returns documents that match a provided text, number, date or boolean value. @@ -37652,8 +39765,6 @@ components: $ref: '#/components/schemas/_common.query_dsl:ScriptQuery' script_score: $ref: '#/components/schemas/_common.query_dsl:ScriptScoreQuery' - shape: - $ref: '#/components/schemas/_common.query_dsl:ShapeQuery' simple_query_string: $ref: '#/components/schemas/_common.query_dsl:SimpleQueryStringQuery' span_containing: @@ -37691,7 +39802,8 @@ components: minProperties: 1 maxProperties: 1 terms: - $ref: '#/components/schemas/_common.query_dsl:TermsQuery' + description: Returns documents that contain one or more exact terms in a provided field. + $ref: '#/components/schemas/_common.query_dsl:TermsQueryField' terms_set: description: |- Returns documents that contain a minimum number of exact terms in a provided field. @@ -37708,6 +39820,8 @@ components: $ref: '#/components/schemas/_common.query_dsl:TextExpansionQuery' minProperties: 1 maxProperties: 1 + type: + $ref: '#/components/schemas/_common.query_dsl:TypeQuery' weighted_tokens: description: Supports returning text_expansion query results by sending in precomputed tokens with the query. type: object @@ -37724,8 +39838,8 @@ components: maxProperties: 1 wrapper: $ref: '#/components/schemas/_common.query_dsl:WrapperQuery' - type: - $ref: '#/components/schemas/_common.query_dsl:TypeQuery' + xy_shape: + $ref: '#/components/schemas/_common.query_dsl:XyShapeQuery' minProperties: 1 maxProperties: 1 _common.query_dsl:QueryStringQuery: @@ -37957,13 +40071,6 @@ components: required: - query - script - _common.query_dsl:ShapeQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl:QueryBase' - - type: object - properties: - ignore_unmapped: - $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' _common.query_dsl:SimpleQueryStringFlag: type: string enum: @@ -38204,10 +40311,33 @@ components: type: boolean required: - value - _common.query_dsl:TermsQuery: - allOf: - - $ref: '#/components/schemas/_common.query_dsl:QueryBase' - - type: object + _common.query_dsl:TermsLookupField: + type: object + properties: + index: + $ref: '#/components/schemas/_common:IndexName' + id: + $ref: '#/components/schemas/_common:Id' + path: + $ref: '#/components/schemas/_common:Field' + routing: + $ref: '#/components/schemas/_common:Routing' + _common.query_dsl:TermsQueryField: + type: object + properties: + boost: + description: |- + A floating-point value that specifies the weight of this field toward the relevance score. + Values above 1.0 increase the field’s relevance. Values between 0.0 and 1.0 decrease the field’s relevance. + Default is 1.0. + type: number + format: float + additionalProperties: + oneOf: + - $ref: '#/components/schemas/_common.query_dsl:TermsLookupField' + - type: array + items: + type: string _common.query_dsl:TermsSetQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl:QueryBase' @@ -38218,7 +40348,6 @@ components: minimum_should_match_script: $ref: '#/components/schemas/_common:Script' terms: - description: Array of terms you wish to find in the provided field. type: array items: type: string @@ -38312,6 +40441,31 @@ components: type: string required: - query + _common.query_dsl:XyShape: + type: object + properties: + type: + type: string + coordinates: + type: array + _common.query_dsl:XyShapeField: + type: object + properties: + shape: + $ref: '#/components/schemas/_common.query_dsl:XyShape' + relation: + $ref: '#/components/schemas/_common:GeoShapeRelation' + required: + - shape + _common.query_dsl:XyShapeQuery: + x-version-added: '2.4' + allOf: + - $ref: '#/components/schemas/_common.query_dsl:QueryBase' + - type: object + additionalProperties: + $ref: '#/components/schemas/_common.query_dsl:XyShapeField' + minProperties: 1 + maxProperties: 1 _common.query_dsl:ZeroTermsQuery: type: string enum: @@ -38358,17 +40512,11 @@ components: type: integer format: int32 _core.bulk:CreateOperation: - allOf: - - $ref: '#/components/schemas/_core.bulk:WriteOperation' - - type: object + $ref: '#/components/schemas/_core.bulk:WriteOperation' _core.bulk:DeleteOperation: - allOf: - - $ref: '#/components/schemas/_core.bulk:OperationBase' - - type: object + $ref: '#/components/schemas/_core.bulk:OperationBase' _core.bulk:IndexOperation: - allOf: - - $ref: '#/components/schemas/_core.bulk:WriteOperation' - - type: object + $ref: '#/components/schemas/_core.bulk:WriteOperation' _core.bulk:OperationBase: type: object properties: @@ -38749,10 +40897,10 @@ components: knn: description: Defines the approximate kNN search to run. oneOf: - - $ref: '#/components/schemas/_common:KnnQuery' + - $ref: '#/components/schemas/_common.query_dsl:KnnQuery' - type: array items: - $ref: '#/components/schemas/_common:KnnQuery' + $ref: '#/components/schemas/_common.query_dsl:KnnQuery' from: description: |- Starting document offset. By default, you cannot page through more than 10,000 @@ -40294,6 +42442,186 @@ components: properties: get: $ref: '#/components/schemas/_common:InlineGet' + asynchronous_search._common:AsynchronousSearchStats: + type: object + properties: + submitted: + type: integer + initialized: + type: integer + search_failed: + type: integer + search_completed: + type: integer + rejected: + type: integer + persist_failed: + type: integer + cancelled: + type: integer + running_current: + type: integer + persisted: + type: integer + asynchronous_search._common:NodesStats: + type: object + properties: + asynchronous_search_stats: + $ref: '#/components/schemas/asynchronous_search._common:AsynchronousSearchStats' + asynchronous_search._common:ResponseBody: + type: object + properties: + id: + type: string + state: + type: string + start_time_in_millis: + type: number + expiration_time_in_millis: + type: number + took: + type: number + response: + $ref: '#/components/schemas/_core.search:ResponseBody' + asynchronous_search._common:Search: + type: object + properties: + aggregations: + description: Defines the aggregations that are run as part of the search request. + type: object + additionalProperties: + $ref: '#/components/schemas/_common.aggregations:AggregationContainer' + collapse: + $ref: '#/components/schemas/_core.search:FieldCollapse' + explain: + description: If true, returns detailed information about score computation as part of a hit. + type: boolean + ext: + description: Configuration of search extensions defined by OpenSearch plugins. + type: object + additionalProperties: + type: object + from: + description: |- + Starting document offset. + Needs to be non-negative. + By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters. + To page through more hits, use the `search_after` parameter. + type: number + highlight: + $ref: '#/components/schemas/_core.search:Highlight' + track_total_hits: + $ref: '#/components/schemas/_core.search:TrackHits' + indices_boost: + description: Boosts the _score of documents from specified indices. + type: array + items: + type: object + additionalProperties: + type: number + docvalue_fields: + description: |- + Array of wildcard (`*`) patterns. + The request returns doc values for field names matching these patterns in the `hits.fields` property of the response. + type: array + items: + $ref: '#/components/schemas/_common.query_dsl:FieldAndFormat' + rank: + $ref: '#/components/schemas/_common:RankContainer' + min_score: + description: |- + Minimum `_score` for matching documents. + Documents with a lower `_score` are not included in the search results. + type: number + post_filter: + $ref: '#/components/schemas/_common.query_dsl:QueryContainer' + profile: + description: |- + Set to `true` to return detailed timing information about the execution of individual components in a search request. + NOTE: This is a debugging tool and adds significant overhead to search execution. + type: boolean + query: + $ref: '#/components/schemas/_common.query_dsl:QueryContainer' + script_fields: + description: Retrieve a script evaluation (based on different fields) for each hit. + type: object + additionalProperties: + $ref: '#/components/schemas/_common:ScriptField' + search_after: + $ref: '#/components/schemas/_common:SortResults' + size: + description: |- + The number of hits to return. + By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters. + To page through more hits, use the `search_after` parameter. + type: number + slice: + $ref: '#/components/schemas/_common:SlicedScroll' + sort: + $ref: '#/components/schemas/_common:Sort' + _source: + $ref: '#/components/schemas/_core.search:SourceConfig' + fields: + description: |- + Array of wildcard (`*`) patterns. + The request returns values for field names matching these patterns in the `hits.fields` property of the response. + type: array + items: + $ref: '#/components/schemas/_common.query_dsl:FieldAndFormat' + suggest: + $ref: '#/components/schemas/_core.search:Suggester' + terminate_after: + description: |- + Maximum number of documents to collect for each shard. + If a query reaches this limit, OpenSearch terminates the query early. + OpenSearch collects documents before sorting. + Use with caution. + OpenSearch applies this parameter to each shard handling the request. + When possible, let OpenSearch perform early termination automatically. + Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + If set to `0` (default), the query does not terminate early. + type: number + timeout: + description: |- + Specifies the period of time to wait for a response from each shard. + If no response is received before the timeout expires, the request fails and returns an error. + Defaults to no timeout. + type: string + track_scores: + description: If true, calculate and return document scores, even if the scores are not used for sorting. + type: boolean + version: + description: If true, returns document version as part of a hit. + type: boolean + seq_no_primary_term: + description: If `true`, returns sequence number and primary term of the last modification of each hit. + type: boolean + stored_fields: + $ref: '#/components/schemas/_common:Fields' + pit: + $ref: '#/components/schemas/_core.search:PointInTimeReference' + runtime_mappings: + $ref: '#/components/schemas/_common.mapping:RuntimeFields' + stats: + description: |- + Stats groups to associate with the search. + Each group maintains a statistics aggregation for its associated searches. + You can retrieve these stats using the indices stats API. + type: array + items: + type: string + description: The search definition using the Query DSL. + asynchronous_search._common:StatsResponse: + type: object + properties: + _nodes: + $ref: '#/components/schemas/_common:NodeStatistics' + cluster_name: + type: string + nodes: + type: object + additionalProperties: + $ref: '#/components/schemas/asynchronous_search._common:NodesStats' cat._common:CatPitSegmentsRecord: type: object properties: @@ -40351,11 +42679,11 @@ components: files_fetched: type: string files_percent: - type: string + $ref: '#/components/schemas/_common:PercentageString' bytes_fetched: type: string bytes_percent: - type: string + $ref: '#/components/schemas/_common:PercentageString' start_time: type: string stop_time: @@ -40408,44 +42736,44 @@ components: description: |- Disk space used by the node's shards. Does not include disk space for the translog or unassigned shards. IMPORTANT: This metric double-counts disk space for hard-linked files, such as those created when shrinking, splitting, or cloning an index. - anyOf: - - $ref: '#/components/schemas/_common:ByteSize' - - type: 'null' + type: + - 'null' + - string disk.used: description: |- Total disk space in use. OpenSearch retrieves this metric from the node's operating system (OS). The metric includes disk space for: OpenSearch, including the translog and unassigned shards; the node's operating system; any other applications or files on the node. Unlike `disk.indices`, this metric does not double-count disk space for hard-linked files. - anyOf: - - $ref: '#/components/schemas/_common:ByteSize' - - type: 'null' + type: + - 'null' + - string disk.avail: description: |- Free disk space available to OpenSearch. OpenSearch retrieves this metric from the node's operating system. Disk-based shard allocation uses this metric to assign shards to nodes based on available disk space. - anyOf: - - $ref: '#/components/schemas/_common:ByteSize' - - type: 'null' + type: + - 'null' + - string disk.total: description: Total disk space for the node, including in-use and available space. - anyOf: - - $ref: '#/components/schemas/_common:ByteSize' - - type: 'null' + type: + - 'null' + - string disk.percent: description: Total percentage of disk space in use. Calculated as `disk.used / disk.total`. - anyOf: - - $ref: '#/components/schemas/_common:Percentage' + oneOf: + - $ref: '#/components/schemas/_common:PercentageString' - type: 'null' host: description: Network host for the node. Set using the `network.host` setting. - anyOf: + oneOf: - $ref: '#/components/schemas/_common:Host' - type: 'null' ip: description: IP address and port for the node. - anyOf: + oneOf: - $ref: '#/components/schemas/_common:Ip' - type: 'null' node: @@ -40539,7 +42867,7 @@ components: type: string active_shards_percent: description: active number of shards in percent - type: string + $ref: '#/components/schemas/_common:PercentageString' discovered_cluster_manager: description: cluster manager is discovered or not type: string @@ -40596,352 +42924,640 @@ components: - string completion.size: description: size of completion - type: string + type: + - 'null' + - string pri.completion.size: description: size of completion - type: string + type: + - 'null' + - string fielddata.memory_size: description: used fielddata cache - type: string + type: + - 'null' + - string pri.fielddata.memory_size: description: used fielddata cache - type: string + type: + - 'null' + - string fielddata.evictions: description: fielddata evictions - type: string + type: + - 'null' + - string pri.fielddata.evictions: description: fielddata evictions - type: string + type: + - 'null' + - string query_cache.memory_size: description: used query cache - type: string + type: + - 'null' + - string pri.query_cache.memory_size: description: used query cache - type: string + type: + - 'null' + - string query_cache.evictions: description: query cache evictions - type: string + type: + - 'null' + - string pri.query_cache.evictions: description: query cache evictions - type: string + type: + - 'null' + - string request_cache.memory_size: description: used request cache - type: string + type: + - 'null' + - string pri.request_cache.memory_size: description: used request cache - type: string + type: + - 'null' + - string request_cache.evictions: description: request cache evictions - type: string + type: + - 'null' + - string pri.request_cache.evictions: description: request cache evictions - type: string + type: + - 'null' + - string request_cache.hit_count: description: request cache hit count - type: string + type: + - 'null' + - string pri.request_cache.hit_count: description: request cache hit count - type: string + type: + - 'null' + - string request_cache.miss_count: description: request cache miss count - type: string + type: + - 'null' + - string pri.request_cache.miss_count: description: request cache miss count - type: string + type: + - 'null' + - string flush.total: description: number of flushes - type: string + type: + - 'null' + - string pri.flush.total: description: number of flushes - type: string + type: + - 'null' + - string flush.total_time: description: time spent in flush - type: string + type: + - 'null' + - string pri.flush.total_time: description: time spent in flush - type: string + type: + - 'null' + - string get.current: description: number of current get ops - type: string + type: + - 'null' + - string pri.get.current: description: number of current get ops - type: string + type: + - 'null' + - string get.time: description: time spent in get - type: string + type: + - 'null' + - string pri.get.time: description: time spent in get - type: string + type: + - 'null' + - string get.total: description: number of get ops - type: string + type: + - 'null' + - string pri.get.total: description: number of get ops - type: string + type: + - 'null' + - string get.exists_time: description: time spent in successful gets - type: string + type: + - 'null' + - string pri.get.exists_time: description: time spent in successful gets - type: string + type: + - 'null' + - string get.exists_total: description: number of successful gets - type: string + type: + - 'null' + - string pri.get.exists_total: description: number of successful gets - type: string + type: + - 'null' + - string get.missing_time: description: time spent in failed gets - type: string + type: + - 'null' + - string pri.get.missing_time: description: time spent in failed gets - type: string + type: + - 'null' + - string get.missing_total: description: number of failed gets - type: string + type: + - 'null' + - string pri.get.missing_total: description: number of failed gets - type: string + type: + - 'null' + - string indexing.delete_current: description: number of current deletions - type: string + type: + - 'null' + - string pri.indexing.delete_current: description: number of current deletions - type: string + type: + - 'null' + - string indexing.delete_time: description: time spent in deletions - type: string + type: + - 'null' + - string pri.indexing.delete_time: description: time spent in deletions - type: string + type: + - 'null' + - string indexing.delete_total: description: number of delete ops - type: string + type: + - 'null' + - string pri.indexing.delete_total: description: number of delete ops - type: string + type: + - 'null' + - string indexing.index_current: description: number of current indexing ops - type: string + type: + - 'null' + - string pri.indexing.index_current: description: number of current indexing ops - type: string + type: + - 'null' + - string indexing.index_time: description: time spent in indexing - type: string + type: + - 'null' + - string pri.indexing.index_time: description: time spent in indexing - type: string + type: + - 'null' + - string indexing.index_total: description: number of indexing ops - type: string + type: + - 'null' + - string pri.indexing.index_total: description: number of indexing ops - type: string + type: + - 'null' + - string indexing.index_failed: description: number of failed indexing ops - type: string + type: + - 'null' + - string pri.indexing.index_failed: description: number of failed indexing ops - type: string + type: + - 'null' + - string merges.current: description: number of current merges - type: string + type: + - 'null' + - string pri.merges.current: description: number of current merges - type: string + type: + - 'null' + - string merges.current_docs: description: number of current merging docs - type: string + type: + - 'null' + - string pri.merges.current_docs: description: number of current merging docs - type: string + type: + - 'null' + - string merges.current_size: description: size of current merges - type: string + type: + - 'null' + - string pri.merges.current_size: description: size of current merges - type: string + type: + - 'null' + - string merges.total: description: number of completed merge ops - type: string + type: + - 'null' + - string pri.merges.total: description: number of completed merge ops - type: string + type: + - 'null' + - string merges.total_docs: description: docs merged - type: string + type: + - 'null' + - string pri.merges.total_docs: description: docs merged - type: string + type: + - 'null' + - string merges.total_size: description: size merged - type: string + type: + - 'null' + - string pri.merges.total_size: description: size merged - type: string + type: + - 'null' + - string merges.total_time: description: time spent in merges - type: string + type: + - 'null' + - string pri.merges.total_time: description: time spent in merges - type: string + type: + - 'null' + - string refresh.total: description: total refreshes - type: string + type: + - 'null' + - string pri.refresh.total: description: total refreshes - type: string + type: + - 'null' + - string refresh.time: description: time spent in refreshes - type: string + type: + - 'null' + - string pri.refresh.time: description: time spent in refreshes - type: string + type: + - 'null' + - string refresh.external_total: description: total external refreshes - type: string + type: + - 'null' + - string pri.refresh.external_total: description: total external refreshes - type: string + type: + - 'null' + - string refresh.external_time: description: time spent in external refreshes - type: string + type: + - 'null' + - string pri.refresh.external_time: description: time spent in external refreshes - type: string + type: + - 'null' + - string refresh.listeners: description: number of pending refresh listeners - type: string + type: + - 'null' + - string pri.refresh.listeners: description: number of pending refresh listeners - type: string + type: + - 'null' + - string search.fetch_current: description: current fetch phase ops - type: string + type: + - 'null' + - string pri.search.fetch_current: description: current fetch phase ops - type: string + type: + - 'null' + - string search.fetch_time: description: time spent in fetch phase - type: string + type: + - 'null' + - string pri.search.fetch_time: description: time spent in fetch phase - type: string + type: + - 'null' + - string search.fetch_total: description: total fetch ops - type: string + type: + - 'null' + - string pri.search.fetch_total: description: total fetch ops - type: string + type: + - 'null' + - string search.open_contexts: description: open search contexts - type: string + type: + - 'null' + - string pri.search.open_contexts: description: open search contexts - type: string + type: + - 'null' + - string search.query_current: description: current query phase ops - type: string + type: + - 'null' + - string pri.search.query_current: description: current query phase ops - type: string + type: + - 'null' + - string search.query_time: description: time spent in query phase - type: string + type: + - 'null' + - string pri.search.query_time: description: time spent in query phase - type: string + type: + - 'null' + - string search.query_total: description: total query phase ops - type: string + type: + - 'null' + - string pri.search.query_total: description: total query phase ops - type: string + type: + - 'null' + - string + search.concurrent_query_current: + type: + - 'null' + - string + pri.search.concurrent_query_current: + type: + - 'null' + - string + search.concurrent_query_time: + type: + - 'null' + - string + pri.search.concurrent_query_time: + type: + - 'null' + - string + search.concurrent_query_total: + type: + - 'null' + - string + pri.search.concurrent_query_total: + type: + - 'null' + - string + search.concurrent_avg_slice_count: + type: + - 'null' + - string + pri.search.concurrent_avg_slice_count: + type: + - 'null' + - string search.scroll_current: description: open scroll contexts - type: string + type: + - 'null' + - string pri.search.scroll_current: description: open scroll contexts - type: string + type: + - 'null' + - string search.scroll_time: description: time scroll contexts held open - type: string + type: + - 'null' + - string pri.search.scroll_time: description: time scroll contexts held open - type: string + type: + - 'null' + - string search.scroll_total: description: completed scroll contexts - type: string + type: + - 'null' + - string pri.search.scroll_total: description: completed scroll contexts - type: string + type: + - 'null' + - string + search.point_in_time_current: + type: + - 'null' + - string + pri.search.point_in_time_current: + type: + - 'null' + - string + search.point_in_time_time: + type: + - 'null' + - string + pri.search.point_in_time_time: + type: + - 'null' + - string + search.point_in_time_total: + type: + - 'null' + - string + pri.search.point_in_time_total: + type: + - 'null' + - string segments.count: description: number of segments - type: string + type: + - 'null' + - string pri.segments.count: description: number of segments - type: string + type: + - 'null' + - string segments.memory: description: memory used by segments - type: string + type: + - 'null' + - string pri.segments.memory: description: memory used by segments - type: string + type: + - 'null' + - string segments.index_writer_memory: description: memory used by index writer - type: string + type: + - 'null' + - string pri.segments.index_writer_memory: description: memory used by index writer - type: string + type: + - 'null' + - string segments.version_map_memory: description: memory used by version map - type: string + type: + - 'null' + - string pri.segments.version_map_memory: description: memory used by version map - type: string + type: + - 'null' + - string segments.fixed_bitset_memory: description: memory used by fixed bit sets for nested object field types and export type filters for types referred in _parent fields - type: string + type: + - 'null' + - string pri.segments.fixed_bitset_memory: description: memory used by fixed bit sets for nested object field types and export type filters for types referred in _parent fields - type: string + type: + - 'null' + - string warmer.current: description: current warmer ops - type: string + type: + - 'null' + - string pri.warmer.current: description: current warmer ops - type: string + type: + - 'null' + - string warmer.total: description: total warmer ops - type: string + type: + - 'null' + - string pri.warmer.total: description: total warmer ops - type: string + type: + - 'null' + - string warmer.total_time: description: time spent in warmers - type: string + type: + - 'null' + - string pri.warmer.total_time: description: time spent in warmers - type: string + type: + - 'null' + - string suggest.current: description: number of current suggest ops - type: string + type: + - 'null' + - string pri.suggest.current: description: number of current suggest ops - type: string + type: + - 'null' + - string suggest.time: description: time spend in suggest - type: string + type: + - 'null' + - string pri.suggest.time: description: time spend in suggest - type: string + type: + - 'null' + - string suggest.total: description: number of suggest ops - type: string + type: + - 'null' + - string pri.suggest.total: description: number of suggest ops - type: string + type: + - 'null' + - string memory.total: description: total used memory type: string @@ -40951,36 +43567,6 @@ components: search.throttled: description: indicates if the index is search throttled type: string - bulk.total_operations: - description: number of bulk shard ops - type: string - pri.bulk.total_operations: - description: number of bulk shard ops - type: string - bulk.total_time: - description: time spend in shard bulk - type: string - pri.bulk.total_time: - description: time spend in shard bulk - type: string - bulk.total_size_in_bytes: - description: total size in bytes of shard bulk - type: string - pri.bulk.total_size_in_bytes: - description: total size in bytes of shard bulk - type: string - bulk.avg_time: - description: average time spend in shard bulk - type: string - pri.bulk.avg_time: - description: average time spend in shard bulk - type: string - bulk.avg_size_in_bytes: - description: average size in bytes of shard bulk - type: string - pri.bulk.avg_size_in_bytes: - description: average size in bytes of shard bulk - type: string cat.master:MasterRecord: type: object properties: @@ -41055,18 +43641,18 @@ components: description: The Java version. type: string disk.total: - $ref: '#/components/schemas/_common:ByteSize' + type: string disk.used: - $ref: '#/components/schemas/_common:ByteSize' + type: string disk.avail: - $ref: '#/components/schemas/_common:ByteSize' + type: string disk.used_percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' heap.current: description: The used heap. type: string heap.percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' heap.max: description: The maximum configured heap. type: string @@ -41074,7 +43660,7 @@ components: description: The used machine memory. type: string ram.percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' ram.max: description: The total machine memory. type: string @@ -41082,7 +43668,7 @@ components: description: The used file descriptors. type: string file_desc.percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' file_desc.max: description: The maximum number of file descriptors. type: string @@ -41121,7 +43707,7 @@ components: Indicates whether the node is the elected master node. Returned values include `*`(elected master) and `-`(not elected master). type: string - x-version-deprecated: 2.0.0 + x-version-deprecated: '2.0' x-deprecation-message: To promote inclusive language, use 'cluster_manager' instead. name: $ref: '#/components/schemas/_common:Name' @@ -41272,6 +43858,14 @@ components: search.query_total: description: The total query phase operations. type: string + search.concurrent_query_current: + type: string + search.concurrent_query_time: + type: string + search.concurrent_query_total: + type: string + search.concurrent_avg_slice_count: + type: string search.scroll_current: description: The open scroll contexts. type: string @@ -41281,6 +43875,12 @@ components: search.scroll_total: description: The completed scroll contexts. type: string + search.point_in_time_current: + type: string + search.point_in_time_time: + type: string + search.point_in_time_total: + type: string segments.count: description: The number of segments. type: string @@ -41364,11 +43964,11 @@ components: start_time: $ref: '#/components/schemas/_common:DateTime' start_time_millis: - $ref: '#/components/schemas/_common:EpochTimeUnitMillis' + $ref: '#/components/schemas/_common:StringifiedEpochTimeUnitMillis' stop_time: $ref: '#/components/schemas/_common:DateTime' stop_time_millis: - $ref: '#/components/schemas/_common:EpochTimeUnitMillis' + $ref: '#/components/schemas/_common:StringifiedEpochTimeUnitMillis' time: $ref: '#/components/schemas/_common:Duration' type: @@ -41402,7 +44002,7 @@ components: description: The files recovered. type: string files_percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' files_total: description: The total number of files. type: string @@ -41413,7 +44013,7 @@ components: description: The bytes recovered. type: string bytes_percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' bytes_total: description: The total number of bytes. type: string @@ -41424,7 +44024,7 @@ components: description: The translog operations recovered. type: string translog_ops_percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' cat.repositories:RepositoriesRecord: type: object properties: @@ -41472,9 +44072,9 @@ components: Also, OpenSearch creates extra deleted documents to internally track the recent history of operations on a shard. type: string size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' size.memory: - $ref: '#/components/schemas/_common:ByteSize' + type: string committed: description: |- If `true`, the segment is synced to disk. @@ -41531,7 +44131,9 @@ components: - string id: description: The unique identifier for the node. - type: string + type: + - 'null' + - string node: description: The name of node. type: @@ -41539,7 +44141,9 @@ components: - string sync_id: description: The sync identifier. - type: string + type: + - 'null' + - string unassigned.reason: description: |- The reason for the last change to the state of an unassigned shard. @@ -41562,204 +44166,372 @@ components: `REINITIALIZED`: When a shard moves from started back to initializing. `REPLICA_ADDED`: Unassigned as a result of explicit addition of a replica. `REROUTE_CANCELLED`: Unassigned as a result of explicit cancel reroute command. - type: string + type: + - 'null' + - string unassigned.at: description: The time at which the shard became unassigned in Coordinated Universal Time (UTC). - type: string + type: + - 'null' + - string unassigned.for: description: The time at which the shard was requested to be unassigned in Coordinated Universal Time (UTC). - type: string + type: + - 'null' + - string unassigned.details: description: |- Additional details as to why the shard became unassigned. It does not explain why the shard is not assigned; use the cluster allocation explain API for that information. - type: string + type: + - 'null' + - string recoverysource.type: description: The type of recovery source. - type: string + type: + - 'null' + - string completion.size: description: The size of completion. - type: string + type: + - 'null' + - string fielddata.memory_size: description: The used fielddata cache memory. - type: string + type: + - 'null' + - string fielddata.evictions: description: The fielddata cache evictions. - type: string + type: + - 'null' + - string query_cache.memory_size: description: The used query cache memory. - type: string + type: + - 'null' + - string query_cache.evictions: description: The query cache evictions. - type: string + type: + - 'null' + - string flush.total: description: The number of flushes. - type: string + type: + - 'null' + - string flush.total_time: description: The time spent in flush. - type: string + type: + - 'null' + - string get.current: description: The number of current get operations. - type: string + type: + - 'null' + - string get.time: description: The time spent in get operations. - type: string + type: + - 'null' + - string get.total: description: The number of get operations. - type: string + type: + - 'null' + - string get.exists_time: description: The time spent in successful get operations. - type: string + type: + - 'null' + - string get.exists_total: description: The number of successful get operations. - type: string + type: + - 'null' + - string get.missing_time: description: The time spent in failed get operations. - type: string + type: + - 'null' + - string get.missing_total: description: The number of failed get operations. - type: string + type: + - 'null' + - string indexing.delete_current: description: The number of current deletion operations. - type: string + type: + - 'null' + - string indexing.delete_time: description: The time spent in deletion operations. - type: string + type: + - 'null' + - string indexing.delete_total: description: The number of delete operations. - type: string + type: + - 'null' + - string indexing.index_current: description: The number of current indexing operations. - type: string + type: + - 'null' + - string indexing.index_time: description: The time spent in indexing operations. - type: string + type: + - 'null' + - string indexing.index_total: description: The number of indexing operations. - type: string + type: + - 'null' + - string indexing.index_failed: description: The number of failed indexing operations. - type: string + type: + - 'null' + - string merges.current: description: The number of current merge operations. - type: string + type: + - 'null' + - string merges.current_docs: description: The number of current merging documents. - type: string + type: + - 'null' + - string merges.current_size: description: The size of current merge operations. - type: string + type: + - 'null' + - string merges.total: description: The number of completed merge operations. - type: string + type: + - 'null' + - string merges.total_docs: description: The number of merged documents. - type: string + type: + - 'null' + - string merges.total_size: description: The size of current merges. - type: string + type: + - 'null' + - string merges.total_time: description: The time spent merging documents. - type: string + type: + - 'null' + - string refresh.total: description: The total number of refreshes. - type: string + type: + - 'null' + - string refresh.time: description: The time spent in refreshes. - type: string + type: + - 'null' + - string refresh.external_total: description: The total number of external refreshes. - type: string + type: + - 'null' + - string refresh.external_time: description: The time spent in external refreshes. - type: string + type: + - 'null' + - string refresh.listeners: description: The number of pending refresh listeners. - type: string + type: + - 'null' + - string search.fetch_current: description: The current fetch phase operations. - type: string + type: + - 'null' + - string search.fetch_time: description: The time spent in fetch phase. - type: string + type: + - 'null' + - string search.fetch_total: description: The total number of fetch operations. - type: string + type: + - 'null' + - string search.open_contexts: description: The number of open search contexts. - type: string + type: + - 'null' + - string search.query_current: description: The current query phase operations. - type: string + type: + - 'null' + - string search.query_time: description: The time spent in query phase. - type: string + type: + - 'null' + - string search.query_total: description: The total number of query phase operations. - type: string + type: + - 'null' + - string + search.concurrent_query_current: + type: + - 'null' + - string + search.concurrent_query_time: + type: + - 'null' + - string + search.concurrent_query_total: + type: + - 'null' + - string + search.concurrent_avg_slice_count: + type: + - 'null' + - string search.scroll_current: description: The open scroll contexts. - type: string + type: + - 'null' + - string search.scroll_time: description: The time scroll contexts were held open. - type: string + type: + - 'null' + - string search.scroll_total: description: The number of completed scroll contexts. - type: string + type: + - 'null' + - string + search.point_in_time_current: + type: + - 'null' + - string + search.point_in_time_time: + type: + - 'null' + - string + search.point_in_time_total: + type: + - 'null' + - string + search.search_idle_reactivate_count_total: + type: + - 'null' + - string segments.count: description: The number of segments. - type: string + type: + - 'null' + - string segments.memory: description: The memory used by segments. - type: string + type: + - 'null' + - string segments.index_writer_memory: description: The memory used by the index writer. - type: string + type: + - 'null' + - string segments.version_map_memory: description: The memory used by the version map. - type: string + type: + - 'null' + - string segments.fixed_bitset_memory: description: The memory used by fixed bit sets for nested object field types and export type filters for types referred in `_parent` fields. - type: string + type: + - 'null' + - string seq_no.max: description: The maximum sequence number. - type: string + type: + - 'null' + - string seq_no.local_checkpoint: description: The local checkpoint. - type: string + type: + - 'null' + - string seq_no.global_checkpoint: description: The global checkpoint. - type: string + type: + - 'null' + - string warmer.current: description: The number of current warmer operations. - type: string + type: + - 'null' + - string warmer.total: description: The total number of warmer operations. - type: string + type: + - 'null' + - string warmer.total_time: description: The time spent in warmer operations. - type: string + type: + - 'null' + - string path.data: description: The shard data path. - type: string + type: + - 'null' + - string path.state: description: The shard state path. - type: string + type: + - 'null' + - string bulk.total_operations: description: The number of bulk shard operations. - type: string + type: + - 'null' + - string bulk.total_time: description: The time spent in shard bulk operations. - type: string + type: + - 'null' + - string bulk.total_size_in_bytes: description: The total size in bytes of shard bulk operations. - type: string + type: + - 'null' + - string bulk.avg_time: description: The average time spent in shard bulk operations. - type: string + type: + - 'null' + - string bulk.avg_size_in_bytes: description: The average size in bytes of shard bulk operations. - type: string + type: + - 'null' + - string + docs.deleted: + type: + - 'null' + - string cat.snapshots:SnapshotsRecord: type: object properties: @@ -41922,6 +44694,8 @@ components: completed: description: The number of completed tasks. type: string + total_wait_time: + type: string core: description: The core number of active threads allowed in a scaling thread pool. type: @@ -42012,7 +44786,7 @@ components: in_sync: type: boolean matching_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' matching_sync_id: type: boolean store_exception: @@ -42034,7 +44808,9 @@ components: shard_sizes: type: object additionalProperties: - type: number + oneOf: + - $ref: '#/components/schemas/_common:ByteCount' + - $ref: '#/components/schemas/_common:HumanReadableByteCount' shard_data_set_sizes: type: object additionalProperties: @@ -42089,16 +44865,22 @@ components: properties: path: type: string + total: + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' + used: + $ref: '#/components/schemas/_common:HumanReadableByteCount' used_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' + free: + $ref: '#/components/schemas/_common:HumanReadableByteCount' free_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' free_disk_percent: - type: number + $ref: '#/components/schemas/_common:PercentageNumber' used_disk_percent: - type: number + $ref: '#/components/schemas/_common:PercentageNumber' required: - free_bytes - free_disk_percent @@ -42206,6 +44988,35 @@ components: - REINITIALIZED - REPLICA_ADDED - REROUTE_CANCELLED + cluster.decommission_awareness:DecommissionStatusResponse: + oneOf: + - $ref: '#/components/schemas/cluster.decommission_awareness:ZoneDecommissionStatusResponse' + cluster.decommission_awareness:ZoneDecommissionStatusResponse: + type: object + additionalProperties: + type: string + enum: + - DRAINING + - FAILED + - INIT + - IN_PROGRESS + - SUCCESSFUL + cluster.health:AwarenessAttributeStats: + type: object + x-version-added: '2.5' + properties: + active_shards: + type: number + initializing_shards: + type: number + relocating_shards: + type: number + unassigned_shards: + type: number + data_nodes: + type: number + weight: + type: number cluster.health:HealthResponseBody: type: object properties: @@ -42215,13 +45026,29 @@ components: active_shards: description: The total number of active primary and replica shards. type: number + active_shards_percent: + $ref: '#/components/schemas/_common:PercentageString' active_shards_percent_as_number: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageNumber' + awareness_attributes: + description: Cluster health information for each awareness attribute. + type: object + x-version-added: '2.5' + additionalProperties: + $ref: '#/components/schemas/cluster.health:AwarenessAttributeStats' cluster_name: $ref: '#/components/schemas/_common:Name' delayed_unassigned_shards: description: The number of shards whose allocation has been delayed by the timeout settings. type: number + discovered_master: + description: True if the master node has been discovered. + type: boolean + x-version-deprecated: '2.0' + discovered_cluster_manager: + description: True if the cluster manager node has been discovered. + type: boolean + x-version-added: '2.0' indices: type: object additionalProperties: @@ -42251,7 +45078,7 @@ components: task_max_waiting_in_queue_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' timed_out: - description: If false the response returned within the period of time that is specified by the timeout parameter (30s by default) + description: If false the response returned within the period of time that is specified by the timeout parameter (30s by default). type: boolean unassigned_shards: description: The number of shards that are not allocated. @@ -42502,6 +45329,18 @@ components: - index - shard - to_node + cluster.reroute:Metric: + type: string + enum: + - _all + - blocks + - cluster_manager_node + - master_node + - metadata + - nodes + - routing_nodes + - routing_table + - version cluster.reroute:RerouteDecision: type: object properties: @@ -42617,18 +45456,38 @@ components: cluster.stats:ClusterFileSystem: type: object properties: + available: + description: |- + Total number of bytes available to JVM in file stores across all selected nodes. + Depending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`. + This is the actual amount of free disk space the selected OpenSearch nodes can use. + $ref: '#/components/schemas/_common:HumanReadableByteCount' available_in_bytes: description: |- Total number of bytes available to JVM in file stores across all selected nodes. Depending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`. This is the actual amount of free disk space the selected OpenSearch nodes can use. - type: number + $ref: '#/components/schemas/_common:ByteCount' + free: + description: Total number of unallocated bytes in file stores across all selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' free_in_bytes: description: Total number of unallocated bytes in file stores across all selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' + total: + description: Total size, of all file stores across all selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_in_bytes: description: Total size, in bytes, of all file stores across all selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' + cache_reserved: + description: Total size, of all cache reserved across all selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' + x-version-added: '2.7' + cache_reserved_in_bytes: + description: Total size, in bytes, of all cache reserved across all selected nodes. + $ref: '#/components/schemas/_common:ByteCount' + x-version-added: '2.7' required: - available_in_bytes - free_in_bytes @@ -42715,6 +45574,8 @@ components: cluster.stats:ClusterJvm: type: object properties: + max_uptime: + $ref: '#/components/schemas/_common:Duration' max_uptime_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' mem: @@ -42735,12 +45596,18 @@ components: cluster.stats:ClusterJvmMemory: type: object properties: + heap_max: + description: Maximum amount of memory available for use by the heap across all selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' heap_max_in_bytes: description: Maximum amount of memory, in bytes, available for use by the heap across all selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' + heap_used: + description: Memory currently in use by the heap across all selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' heap_used_in_bytes: description: Memory, in bytes, currently in use by the heap across all selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - heap_max_in_bytes - heap_used_in_bytes @@ -42811,10 +45678,16 @@ components: type: number master: type: number + cluster_manager: + type: number + x-version-added: '2.0' ml: type: number remote_cluster_client: type: number + search: + type: number + x-version-added: '2.4' total: type: number transform: @@ -42824,17 +45697,10 @@ components: required: - coordinating_only - data - - data_cold - - data_content - - data_hot - - data_warm - ingest - master - - ml - remote_cluster_client - total - - transform - - voting_only cluster.stats:ClusterNodes: type: object properties: @@ -42880,7 +45746,6 @@ components: - count - discovery_types - fs - - indexing_pressure - ingest - jvm - network_types @@ -42975,7 +45840,7 @@ components: description: |- Percentage of CPU used across all selected nodes. Returns `-1` if not supported. - type: number + $ref: '#/components/schemas/_common:PercentageNumber' required: - percent cluster.stats:ClusterProcessOpenFileDescriptors: @@ -43081,10 +45946,10 @@ components: description: Total number of fields in all non-system indices, accounting for mapping deduplication. type: number total_deduplicated_mapping_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_deduplicated_mapping_size_in_bytes: description: Total size of all mappings, in bytes, after deduplication and compression. - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - field_types cluster.stats:IndexingPressure: @@ -43100,7 +45965,7 @@ components: current: $ref: '#/components/schemas/cluster.stats:IndexingPressureMemorySummary' limit_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' total: $ref: '#/components/schemas/cluster.stats:IndexingPressureMemorySummary' required: @@ -43111,19 +45976,19 @@ components: type: object properties: all_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' combined_coordinating_and_primary_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' coordinating_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' coordinating_rejections: type: number primary_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' primary_rejections: type: number replica_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' replica_rejections: type: number required: @@ -43140,7 +46005,7 @@ components: primary_shard_count: type: number total_primary_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' version: $ref: '#/components/schemas/_common:VersionString' required: @@ -43162,29 +46027,37 @@ components: type: string required: - count - - flavor - type cluster.stats:OperatingSystemMemoryInfo: type: object properties: adjusted_total_in_bytes: description: Total amount, in bytes, of memory across all selected nodes, but using the value specified using the `es.total_memory_bytes` system property instead of measured total memory for those nodes where that system property was set. - type: number + $ref: '#/components/schemas/_common:ByteCount' + free: + description: Amount, in bytes, of free physical memory across all selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' free_in_bytes: description: Amount, in bytes, of free physical memory across all selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' free_percent: description: Percentage of free physical memory across all selected nodes. - type: number + $ref: '#/components/schemas/_common:PercentageNumber' + total: + description: Total amount of physical memory across all selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_in_bytes: description: Total amount, in bytes, of physical memory across all selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' + used: + description: Amount of physical memory in use across all selected nodes. + $ref: '#/components/schemas/_common:HumanReadableByteCount' used_in_bytes: description: Amount, in bytes, of physical memory in use across all selected nodes. - type: number + $ref: '#/components/schemas/_common:ByteCount' used_percent: description: Percentage of physical memory in use across all selected nodes. - type: number + $ref: '#/components/schemas/_common:PercentageNumber' required: - free_in_bytes - free_percent @@ -43277,6 +46150,25 @@ components: - nodes - status - timestamp + cluster.weighted_routing:Weights: + allOf: + - $ref: '#/components/schemas/cluster.weighted_routing:WeightsBase' + - type: object + properties: + weights: + type: object + cluster.weighted_routing:WeightsBase: + type: object + properties: + _version: + $ref: '#/components/schemas/_common:VersionNumber' + cluster.weighted_routing:WeightsResponse: + allOf: + - $ref: '#/components/schemas/cluster.weighted_routing:Weights' + - type: object + properties: + discovered_cluster_manager: + type: boolean dangling_indices.list_dangling_indices:DanglingIndex: type: object properties: @@ -43295,6 +46187,574 @@ components: - index_name - index_uuid - node_ids + flow_framework.common:All: + description: The all parameter specifies whether the response should return all fields. + type: boolean + default: false + flow_framework.common:AllowDelete: + description: Required when deleting resources involves a high potential for data loss. + type: string + flow_framework.common:FlowFrameworkCreate: + type: object + properties: + name: + type: string + description: The name of the workflow. + description: + type: string + description: A description of the workflow. + use_case: + type: string + description: A use case, which can be used with the Search Workflow API to find related workflows. + version: + $ref: '#/components/schemas/flow_framework.common:version' + workflows: + type: object + description: A map of workflows. Presently, only the provision key is supported. The value for the workflow key is a key-value map that includes fields for user_params and lists of nodes and edges. + required: + - name + flow_framework.common:FlowFrameworkDeleteResponse: + type: object + properties: + _index: + type: string + description: The name of the index where the document was stored. + _id: + type: string + description: The unique identifier of the deleted document. + _version: + type: integer + description: The version of the document after the deletion. + result: + type: string + description: The result of the deletion operation. + enum: + - deleted + - not_found + _shards: + $ref: '#/components/schemas/flow_framework.common:shards' + _seq_no: + type: integer + description: The sequence number assigned to the document after the deletion. + _primary_term: + type: integer + description: The primary term assigned to the document after the deletion. + flow_framework.common:FlowFrameworkGetResponse: + type: object + properties: + name: + type: string + description: + type: string + use_case: + type: string + workflows: + type: object + user: + $ref: '#/components/schemas/flow_framework.common:user' + created_time: + type: integer + last_updated_time: + type: integer + flow_framework.common:FlowFrameworkUpdate: + type: object + properties: + name: + type: string + description: The name of the workflow. + description: + type: string + description: A description of the workflow. + use_case: + type: string + description: A use case, which can be used with the Search Workflow API to find related workflows. + workflows: + type: object + version: + $ref: '#/components/schemas/flow_framework.common:version' + minProperties: 1 + flow_framework.common:hits: + type: object + properties: + total: + $ref: '#/components/schemas/flow_framework.common:total' + max_score: + type: number + format: float + description: The maximum score of the search hits. + hits: + type: array + items: + $ref: '#/components/schemas/flow_framework.common:itemsObject' + flow_framework.common:itemsObject: + type: object + properties: + _index: + type: string + description: The index name where the document resides. + _id: + type: string + description: The document ID. + _version: + type: integer + description: The version of the document. + _seq_no: + type: integer + description: The sequence number of the document. + _primary_term: + type: integer + description: The primary term of the document. + _score: + type: number + format: float + description: The score of the search hit. + _source: + $ref: '#/components/schemas/flow_framework.common:FlowFrameworkGetResponse' + flow_framework.common:Provision: + description: Provision the workflow as part of the request. + type: boolean + default: false + flow_framework.common:query: + type: object + description: The search query to match workflows. Use `match_all` to retrieve all workflows, or `match` to search by specific fields like `use_case`. + properties: + match: + type: object + match_all: + type: object + flow_framework.common:Reprovision: + type: boolean + default: false + flow_framework.common:SearchStateResponse: + type: object + properties: + workflow_id: + type: string + provisioning_progress: + type: string + state: + type: string + user: + $ref: '#/components/schemas/flow_framework.common:user' + flow_framework.common:SearchWorkflowRequest: + type: object + properties: + query: + $ref: '#/components/schemas/flow_framework.common:query' + flow_framework.common:shards: + type: object + properties: + total: + type: integer + description: The total number of shards involved in the deletion. + successful: + type: integer + description: The number of shards where the deletion was successful. + failed: + type: integer + description: The number of shards where the deletion failed. + flow_framework.common:StateHits: + type: object + properties: + total: + $ref: '#/components/schemas/flow_framework.common:total' + max_score: + type: number + format: float + description: The maximum score of the search hits. + hits: + type: array + items: + $ref: '#/components/schemas/flow_framework.common:StateItems' + flow_framework.common:StateItems: + type: object + properties: + _index: + type: string + description: The index name where the document resides. + _id: + type: string + description: The document ID. + _version: + type: integer + description: The version of the document. + _seq_no: + type: integer + description: The sequence number of the document. + _primary_term: + type: integer + description: The primary term of the document. + _score: + type: number + format: float + description: The score of the search hit. + _source: + $ref: '#/components/schemas/flow_framework.common:SearchStateResponse' + flow_framework.common:total: + type: object + properties: + value: + type: integer + description: Total number of matching documents. + relation: + type: string + description: The relation of the total hits. + flow_framework.common:UpdateFields: + description: Update only the fields included in the request body. + type: boolean + default: false + flow_framework.common:UseCase: + type: string + flow_framework.common:user: + type: object + properties: + name: + type: string + backend_roles: + type: array + items: + type: string + roles: + type: array + items: + type: string + custom_attribute_names: + type: array + items: + type: string + user_requested_tenant: + type: string + nullable: true + flow_framework.common:UserProvidedSubstitutionExpressions: + type: object + additionalProperties: + type: string + description: The value for the user-provided key. Keys represent substitution expressions. + flow_framework.common:Validation: + description: Validate the workflow. Valid values are all (validate the template) and none (do not validate the template). Default is all. + type: string + default: all + flow_framework.common:version: + type: object + description: A key-value map with two fields, template, which identifies the template version, and compatibility, which identifies a list of minimum required OpenSearch versions. + properties: + template: + type: string + description: The template version of the workflow. + compatibility: + type: array + items: + type: string + description: A list of minimum required OpenSearch versions. + flow_framework.common:WorkflowID: + type: string + flow_framework.common:WorkflowSearchResponse: + type: object + properties: + took: + type: integer + description: Time in milliseconds that the request took to complete. + timed_out: + type: boolean + description: Indicates if the request timed out. + _shards: + $ref: '#/components/schemas/flow_framework.common:shards' + hits: + $ref: '#/components/schemas/flow_framework.common:hits' + flow_framework.common:WorkflowSearchStateResponse: + type: object + properties: + took: + type: integer + description: Time in milliseconds that the request took to complete. + timed_out: + type: boolean + description: Indicates if the request timed out. + _shards: + $ref: '#/components/schemas/flow_framework.common:shards' + hits: + $ref: '#/components/schemas/flow_framework.common:StateHits' + flow_framework.common:WorkFlowStatusDefaultResponse: + type: object + properties: + workflow_id: + type: string + description: The ID of the workflow + error: + type: string + description: Any error state associated with the workflow + nullable: true + state: + type: string + description: The current state of the workflow + resources_created: + type: array + items: + type: string + description: A list of resources created by the workflow + flow_framework.common:WorkFlowStatusFullResponse: + type: object + properties: + workflow_id: + type: string + description: The ID of the workflow + error: + type: string + description: Any error state associated with the workflow + nullable: true + state: + type: string + description: The current state of the workflow + enum: + - COMPLETED + - FAILED + - NOT_STARTED + - PROVISIONING + resources_created: + type: array + items: + type: string + description: A list of resources created by the workflow + provisioning_progress: + type: string + description: The progress of the provisioning process + nullable: true + provision_start_time: + type: string + format: date-time + description: The start time of the provisioning process + provision_end_time: + type: string + format: date-time + description: The end time of the provisioning process + user: + $ref: '#/components/schemas/flow_framework.common:user' + user_outputs: + type: array + items: + type: string + description: Outputs generated by the user + flow_framework.common:WorkflowStep: + type: object + properties: + inputs: + type: array + items: + type: string + description: The list of required inputs for the workflow step + outputs: + type: array + items: + type: string + description: The list of outputs generated by the workflow step + required_plugins: + type: array + items: + type: string + description: The list of plugins required for the workflow step + flow_framework.common:WorkflowStepName: + type: string + flow_framework.errors:BadRequestError: + type: object + properties: + error: + type: string + description: Error message when the request body or parameters are invalid. + example: Invalid request body or query parameters. + status: + type: integer + description: HTTP status code for the error. + example: 400 + flow_framework.errors:ConflictError: + content: + application/json: + type: object + properties: + error: + type: string + example: You cannot use both the 'provision_workflow' and 'update_workflow_fields' parameters in the same request. + status: + type: integer + flow_framework.errors:DeprovisioningError: + type: object + properties: + error: + type: string + description: Describes the deprovisioning error and identifies resources that were not deprovisioned + example: Failed to deprovision some resources [connector_id Lw7PX4wBfVtHp98y06wV]. + required: + - error + flow_framework.errors:DeprovisioningForbiddenError: + type: object + properties: + error: + type: string + description: Describes the resources that require the allow_delete parameter for deprovisioning + example: These resources require the allow_delete parameter to deprovision [index_name my-index]. + required: + - error + flow_framework.errors:DuplicateKeyError: + type: object + properties: + error: + type: string + description: Error message when a duplicate key is found in the request. + status: + type: integer + description: HTTP status code for the error. + example: 400 + flow_framework.errors:FlowFrameworkAPIDisabledError: + content: + application/json: + type: object + properties: + error: + type: string + example: This API is disabled. To enable it, set [flow_framework.enabled] to true. + status: + type: integer + flow_framework.errors:InvalidParameterError: + content: + application/json: + type: object + properties: + error: + type: string + example: Only the parameters [param1, param2] are permitted unless the provision parameter is set to true. + status: + type: integer + flow_framework.errors:InvalidRequestBodyFieldError: + type: object + properties: + error: + type: string + description: Error message when a request body field is not a string. + status: + type: integer + description: HTTP status code for the error. + flow_framework.errors:InvalidTemplateVersionError: + content: + application/json: + type: object + properties: + error: + type: string + description: Error message when the template version is invalid or missing. + example: Unable to parse field [version] in a version object. + flow_framework.errors:MaxWorkflowsLimitError: + content: + application/json: + type: object + properties: + error: + type: string + example: Maximum workflows limit reached 50 + code: + type: integer + flow_framework.errors:MissingParameterError: + content: + application/json: + type: object + properties: + error: + type: string + example: You cannot use the 'reprovision_workflow' parameter to create a new template. + status: + type: integer + flow_framework.errors:ParameterConflictError: + content: + application/json: + type: object + properties: + error: + type: string + example: You cannot use the 'reprovision_workflow' and 'use_case' parameters in the same request. + status: + type: integer + flow_framework.errors:RequestBodyParsingFailedError: + type: object + properties: + error: + type: string + description: Error message when request body parsing fails. + status: + type: integer + description: HTTP status code for the error. + example: 400 + flow_framework.errors:RequestTimeoutError: + type: object + properties: + error: + type: string + description: Error message when the request times out. + status: + type: integer + description: HTTP status code for the error. + example: 408 + flow_framework.errors:TemplateNameRequiredError: + type: object + properties: + error: + type: string + description: Error message when the template name is missing. + flow_framework.errors:TemplateNotFoundError: + content: + application/json: + type: object + properties: + error: + type: string + example: Failed to retrieve template (12345) from global context. + code: + type: integer + flow_framework.errors:UnsupportedFieldUpdateError: + content: + application/json: + type: object + properties: + error: + type: string + description: Error message when trying to update an unsupported field in a template. + example: You can not update the field [fieldName] without updating the whole template. + flow_framework.errors:WorkFlowIdNullError: + content: + application/json: + type: object + properties: + error: + type: string + example: Workflow ID can not be null + status: + type: integer + flow_framework.errors:WorkflowParsingError: + content: + application/json: + type: object + properties: + error: + type: string + description: Error message when workflow parsing fails. + example: Unable to parse field [workflow] in a template object. + flow_framework.errors:WorkflowSaveError: + content: + application/json: + type: object + properties: + error: + type: string + example: Failed to save workflow state + status: + type: integer + flow_framework.errors:WorkflowStepsRetrieveError: + content: + application/json: + type: object + properties: + error: + type: string + example: Failed to retrieve workflow step json. + code: + type: integer indices._common:Alias: type: object properties: @@ -43444,13 +46904,13 @@ components: max_docs: type: number min_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' max_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' min_primary_shard_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' max_primary_shard_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' min_primary_shard_docs: type: number max_primary_shard_docs: @@ -44284,7 +47744,7 @@ components: durability: $ref: '#/components/schemas/indices._common:TranslogDurability' flush_threshold_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' retention: $ref: '#/components/schemas/indices._common:TranslogRetention' indices._common:TranslogDurability: @@ -44296,7 +47756,7 @@ components: type: object properties: size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' age: $ref: '#/components/schemas/_common:Duration' indices.add_block:IndicesBlockOptions: @@ -44459,10 +47919,10 @@ components: maximum_timestamp: $ref: '#/components/schemas/_common:EpochTimeUnitMillis' store_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' store_size_bytes: description: Total size, in bytes, of all shards for the data stream's backing indices. - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - backing_indices - data_stream @@ -44540,23 +48000,23 @@ components: type: object properties: percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' recovered: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' recovered_in_bytes: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' recovered_from_snapshot: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' recovered_from_snapshot_in_bytes: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' reused: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' reused_in_bytes: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' total: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_in_bytes: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' required: - percent - recovered_in_bytes @@ -44570,7 +48030,7 @@ components: items: $ref: '#/components/schemas/indices.recovery:FileDetails' percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' recovered: type: number reused: @@ -44710,7 +48170,7 @@ components: type: object properties: percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' recovered: type: number total: @@ -44796,21 +48256,21 @@ components: max_docs: type: number max_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' max_size_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' min_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' min_size_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' max_primary_shard_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' max_primary_shard_size_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' min_primary_shard_size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' min_primary_shard_size_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' max_primary_shard_docs: type: number min_primary_shard_docs: @@ -44822,35 +48282,41 @@ components: type: object additionalProperties: oneOf: - - $ref: '#/components/schemas/indices.segments:ShardsSegment' - type: array items: $ref: '#/components/schemas/indices.segments:ShardsSegment' + - $ref: '#/components/schemas/indices.segments:ShardsSegment' required: - shards indices.segments:Segment: type: object properties: - attributes: - type: object - additionalProperties: - type: string + generation: + type: integer + num_docs: + type: integer + deleted_docs: + type: integer + size: + $ref: '#/components/schemas/_common:HumanReadableByteCount' + size_in_bytes: + $ref: '#/components/schemas/_common:ByteCount' + memory: + $ref: '#/components/schemas/_common:HumanReadableByteCount' + memory_in_bytes: + $ref: '#/components/schemas/_common:ByteCount' committed: type: boolean - compound: - type: boolean - deleted_docs: - type: number - generation: - type: number search: type: boolean - size_in_bytes: - type: number - num_docs: - type: number version: $ref: '#/components/schemas/_common:VersionString' + compound: + type: boolean + attributes: + type: object + additionalProperties: + type: string required: - attributes - committed @@ -44928,13 +48394,6 @@ components: required: - reason - type - indices.shard_stores:ShardStoreStatus: - type: string - enum: - - all - - green - - red - - yellow indices.shard_stores:ShardStoreWrapper: type: object properties: @@ -44944,6 +48403,13 @@ components: $ref: '#/components/schemas/indices.shard_stores:ShardStore' required: - stores + indices.shard_stores:Status: + type: string + enum: + - all + - green + - red + - yellow indices.simulate_template:Overlapping: type: object properties: @@ -45054,6 +48520,27 @@ components: - primaries - total - uuid + indices.stats:Metric: + type: string + enum: + - _all + - completion + - docs + - fielddata + - flush + - get + - indexing + - merge + - query_cache + - recovery + - refresh + - request_cache + - search + - segments + - store + - suggest + - translog + - warmer indices.stats:ShardCommit: type: object properties: @@ -45077,14 +48564,16 @@ components: properties: description: type: string + size: + $ref: '#/components/schemas/_common:HumanReadableByteCount' size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' min_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' max_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' average_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' count: type: number required: @@ -46206,6 +49695,420 @@ components: type: string status: $ref: '#/components/schemas/_common:ActionStatusOptions' + ism._common:Action: + type: object + description: An action to perform. + properties: + timeout: + $ref: '#/components/schemas/ism._common:ActionTimeout' + retry: + $ref: '#/components/schemas/ism._common:ActionRetry' + alias: + $ref: '#/components/schemas/ism._common:ActionAlias' + delete: + $ref: '#/components/schemas/ism._common:ActionDelete' + force_merge: + $ref: '#/components/schemas/ism._common:ActionForceMerge' + read_only: + $ref: '#/components/schemas/ism._common:ActionReadOnly' + read_write: + $ref: '#/components/schemas/ism._common:ActionReadWrite' + replica_count: + $ref: '#/components/schemas/ism._common:ActionReplicaCount' + index_priority: + $ref: '#/components/schemas/ism._common:ActionIndexPriority' + close: + $ref: '#/components/schemas/ism._common:ActionClose' + open: + $ref: '#/components/schemas/ism._common:ActionOpen' + snapshot: + $ref: '#/components/schemas/ism._common:ActionSnapshot' + rollover: + $ref: '#/components/schemas/ism._common:ActionRollover' + notification: + $ref: '#/components/schemas/ism._common:ActionNotification' + allocation: + $ref: '#/components/schemas/ism._common:ActionAllocation' + rollup: + $ref: '#/components/schemas/ism._common:ActionRollup' + transform: + $ref: '#/components/schemas/ism._common:ActionTransform' + shrink: + $ref: '#/components/schemas/ism._common:ActionShrink' + custom: + $ref: '#/components/schemas/ism._common:ActionCustom' + ism._common:ActionAlias: + type: object + properties: + actions: + type: object + additionalProperties: true + ism._common:ActionAllocation: + type: object + properties: + require: + type: object + additionalProperties: true + include: + type: object + additionalProperties: true + exclude: + type: object + additionalProperties: true + wait_for: + type: boolean + ism._common:ActionClose: + type: object + ism._common:ActionCustom: + type: object + additionalProperties: true + ism._common:ActionDelete: + type: object + ism._common:ActionForceMerge: + type: object + properties: + max_num_segments: + type: integer + ism._common:ActionIndexPriority: + type: object + properties: + priority: + type: number + ism._common:ActionNotification: + type: object + additionalProperties: true + ism._common:ActionOpen: + type: object + ism._common:ActionReadOnly: + type: object + ism._common:ActionReadWrite: + type: object + ism._common:ActionReplicaCount: + type: object + properties: + number_of_replicas: + type: number + ism._common:ActionRetry: + type: object + properties: + count: + type: integer + backoff: + type: string + delay: + type: string + ism._common:ActionRollover: + type: object + properties: + min_size: + type: number + min_index_age: + type: number + min_doc_count: + type: number + min_primary_shard_size: + type: number + copy_alias: + type: boolean + ism._common:ActionRollup: + type: object + additionalProperties: true + ism._common:ActionShrink: + type: object + additionalProperties: true + ism._common:ActionSnapshot: + type: object + properties: + repository: + type: string + snapshot: + type: string + include_global_state: + type: boolean + ism._common:ActionTimeout: + type: object + properties: + timeout: + type: object + ism._common:ActionTransform: + type: object + additionalProperties: true + ism._common:AddPolicyRequest: + type: object + properties: + policy_id: + type: string + required: + - policy_id + ism._common:AddPolicyResponse: + $ref: '#/components/schemas/ism._common:ChangePolicyResponse' + ism._common:ChangePolicyRequest: + type: object + properties: + policy_id: + type: string + state: + type: string + include: + type: array + items: + $ref: '#/components/schemas/ism._common:IncludeState' + required: + - policy_id + ism._common:ChangePolicyResponse: + $ref: '#/components/schemas/ism._common:ChangeResponse' + ism._common:ChangeResponse: + type: object + properties: + updated_indices: + type: number + failures: + type: boolean + failed_indices: + type: array + items: + $ref: '#/components/schemas/ism._common:FailedIndex' + ism._common:Channel: + type: object + properties: + id: + type: string + ism._common:DeletePolicyResponse: + $ref: '#/components/schemas/_common:WriteResponseBase' + ism._common:ErrorNotification: + type: object + properties: + destination: + $ref: '#/components/schemas/ism._common:ErrorNotificationDestination' + channel: + $ref: '#/components/schemas/ism._common:Channel' + message_template: + type: object + additionalProperties: true + ism._common:ErrorNotificationChime: + type: object + properties: + url: + type: string + ism._common:ErrorNotificationDestination: + type: object + properties: + name: + type: string + last_update_time: + type: integer + additionalProperties: + anyOf: + - $ref: '#/components/schemas/ism._common:ErrorNotificationChime' + - $ref: '#/components/schemas/ism._common:ErrorNotificationSlack' + ism._common:ErrorNotificationSlack: + type: object + properties: + url: + type: string + custom_webhook: + $ref: '#/components/schemas/ism._common:SlackCustomWebhook' + ism._common:ExplainIndexResponse: + type: object + properties: + total_managed_indices: + type: number + additionalProperties: + $ref: '#/components/schemas/ism._common:ExplainPolicy' + ism._common:ExplainPolicy: + type: object + properties: + index.plugins.index_state_management.policy_id: + type: + - 'null' + - string + index.opendistro.index_state_management.policy_id: + type: + - 'null' + - string + enabled: + type: + - boolean + - 'null' + ism._common:FailedIndex: + type: object + properties: + index_name: + type: string + index_uuid: + type: string + reason: + type: string + ism._common:GetPoliciesResponse: + type: object + properties: + total_policies: + type: number + policies: + type: array + items: + $ref: '#/components/schemas/ism._common:PolicyWithMetadata' + ism._common:GetPolicyResponse: + $ref: '#/components/schemas/ism._common:PolicyWithMetadata' + ism._common:IncludeState: + type: object + properties: + state: + type: string + ism._common:IsmTemplate: + type: object + properties: + index_patterns: + type: array + items: + type: string + priority: + type: number + last_updated_time: + type: integer + ism._common:Metadata: + type: object + properties: + _id: + $ref: '#/components/schemas/_common:Id' + _primary_term: + type: number + _seq_no: + $ref: '#/components/schemas/_common:SequenceNumber' + _version: + $ref: '#/components/schemas/_common:VersionNumber' + ism._common:Policy: + type: object + description: A policy defines how an index is managed throughout its lifetime. + properties: + policy_id: + type: string + description: + type: string + last_updated_time: + type: integer + schema_version: + type: number + error_notification: + oneOf: + - $ref: '#/components/schemas/ism._common:ErrorNotification' + - type: 'null' + default_state: + type: string + description: The default state an index is in. + states: + type: array + description: List of states for the index to transition between. + items: + $ref: '#/components/schemas/ism._common:States' + ism_template: + oneOf: + - $ref: '#/components/schemas/ism._common:IsmTemplate' + - type: 'null' + - type: array + items: + $ref: '#/components/schemas/ism._common:IsmTemplate' + ism._common:PolicyEnvelope: + type: object + properties: + policy: + $ref: '#/components/schemas/ism._common:Policy' + ism._common:PolicyWithMetadata: + type: object + allOf: + - $ref: '#/components/schemas/ism._common:Metadata' + - $ref: '#/components/schemas/ism._common:PolicyEnvelope' + ism._common:PutPolicyRequest: + $ref: '#/components/schemas/ism._common:PolicyEnvelope' + ism._common:PutPolicyResponse: + allOf: + - $ref: '#/components/schemas/ism._common:Metadata' + - type: object + properties: + policy: + $ref: '#/components/schemas/ism._common:PolicyEnvelope' + ism._common:RefreshSearchAnalyzersResponse: + type: object + properties: + _shards: + $ref: '#/components/schemas/_common:ShardStatistics' + successful_refresh_details: + type: array + items: + $ref: '#/components/schemas/ism._common:RefreshSearchAnalyzersResponseDetails' + ism._common:RefreshSearchAnalyzersResponseDetails: + type: object + properties: + index: + type: string + refreshed_analyzers: + type: array + items: + type: string + ism._common:RemovePolicyResponse: + $ref: '#/components/schemas/ism._common:ChangePolicyResponse' + ism._common:RetryIndexRequest: + type: object + properties: + state: + type: string + required: + - state + ism._common:RetryIndexResponse: + $ref: '#/components/schemas/ism._common:ChangeResponse' + ism._common:SlackCustomWebhook: + type: object + properties: + url: + type: string + scheme: + type: string + host: + type: string + port: + type: integer + path: + type: string + query_params: + type: object + additionalProperties: true + header_params: + type: object + additionalProperties: true + username: + type: string + password: + type: string + ism._common:States: + type: object + description: |- + A list of actions to perform, and transitions to enter a new state. + Once a managed index enters a state it will sequentially execute the actions + in the same order listed in the policy. Once all actions have been successfully completed + state transitions will be checked until a true condition is eventually met. + If you define multiple transitions in a state, the first one in the list that is true will be used. + properties: + name: + type: string + actions: + type: array + description: A list of actions to perform. + items: + $ref: '#/components/schemas/ism._common:Action' + transitions: + type: array + description: A list of transitions to enter a new state. + items: + $ref: '#/components/schemas/ism._common:Transition' + ism._common:Transition: + type: object + description: A transition into a new state. + properties: + state_name: + type: string + conditions: + type: object + additionalProperties: true knn._common:DefaultOperator: type: string description: The default operator for query string query (AND or OR). @@ -46225,6 +50128,85 @@ components: - always - missing - popular + ml._common:Action: + type: object + properties: + action_type: + type: string + method: + type: string + headers: + $ref: '#/components/schemas/ml._common:Headers' + url: + type: string + request_body: + type: string + pre_process_function: + type: string + post_process_function: + type: string + ml._common:ClientConfig: + type: object + properties: + max_connection: + type: integer + connection_timeout: + type: integer + read_timeout: + type: integer + retry_backoff_policy: + type: string + max_retry_times: + type: integer + retry_backoff_millis: + type: integer + retry_timeout_seconds: + type: integer + ml._common:CreateConnectorRequest: + type: object + properties: + name: + type: string + description: + type: string + version: + type: integer + protocol: + type: string + credential: + $ref: '#/components/schemas/ml._common:Credential' + parameters: + $ref: '#/components/schemas/ml._common:Parameters' + client_config: + $ref: '#/components/schemas/ml._common:ClientConfig' + actions: + type: array + items: + $ref: '#/components/schemas/ml._common:Action' + required: + - actions + - credential + - description + - name + - parameters + - protocol + - version + ml._common:Credential: + type: object + properties: + access_key: + type: string + secret_key: + type: string + session_token: + type: string + additionalProperties: true + ml._common:Headers: + type: object + properties: + content_type: + type: string + additionalProperties: true ml._common:HitsTotal: type: object properties: @@ -46237,6 +50219,18 @@ components: required: - relation - value + ml._common:LLM: + type: object + properties: + model_id: + type: string + parameters: + $ref: '#/components/schemas/ml._common:Parameters' + ml._common:Memory: + type: object + properties: + type: + type: string ml._common:ModelGroup: type: object properties: @@ -46244,7 +50238,7 @@ components: type: string description: The model group name. latest_version: - type: number + type: integer description: The latest version. description: type: string @@ -46275,6 +50269,33 @@ components: required: - model_group_id - status + ml._common:Parameters: + type: object + additionalProperties: true + ml._common:RegisterAgentsRequest: + type: object + properties: + name: + type: string + type: + type: string + description: + type: string + tools: + type: array + items: + $ref: '#/components/schemas/ml._common:ToolItems' + parameters: + $ref: '#/components/schemas/ml._common:Parameters' + app_type: + type: string + memory: + $ref: '#/components/schemas/ml._common:Memory' + llm: + $ref: '#/components/schemas/ml._common:LLM' + required: + - name + - type ml._common:SearchModelsHits: type: object properties: @@ -46361,6 +50382,16 @@ components: type: string required: - state + ml._common:ToolItems: + type: object + properties: + name: + type: string + type: + type: string + parameters: + $ref: '#/components/schemas/ml._common:Parameters' + additionalProperties: true ml._common:UndeployModelNode: type: object properties: @@ -46401,16 +50432,16 @@ components: properties: estimated_size: description: Estimated memory used for the operation. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' estimated_size_in_bytes: description: Estimated memory used, in bytes, for the operation. - type: number + $ref: '#/components/schemas/_common:ByteCount' limit_size: description: Memory limit for the circuit breaker. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' limit_size_in_bytes: description: Memory limit, in bytes, for the circuit breaker. - type: number + $ref: '#/components/schemas/_common:ByteCount' overhead: description: A constant that all estimates for the circuit breaker are multiplied with to calculate a final estimate. type: number @@ -46502,7 +50533,7 @@ components: type: number request_size_bytes: description: Cumulative size in bytes of all requests from this client. - type: number + $ref: '#/components/schemas/_common:ByteCount' x_opaque_id: description: |- Value from the client's `x-opaque-id` HTTP header. @@ -46592,7 +50623,7 @@ components: type: object properties: percent: - type: number + $ref: '#/components/schemas/_common:PercentageNumber' sys: $ref: '#/components/schemas/_common:Duration' sys_in_millis: @@ -46622,34 +50653,38 @@ components: properties: available: description: Total amount of disk space available to this Java virtual machine on this file store. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' available_in_bytes: description: Total number of bytes available to this Java virtual machine on this file store. - type: number + $ref: '#/components/schemas/_common:ByteCount' + cache_reserved: + x-version-added: '2.7' + description: Total number of cache bytes reserved available to this Java virtual machine on this file store. + $ref: '#/components/schemas/_common:HumanReadableByteCount' cache_reserved_in_bytes: x-version-added: '2.7' description: Total number of cache bytes reserved available to this Java virtual machine on this file store. - type: number + $ref: '#/components/schemas/_common:ByteCount' disk_queue: type: string disk_reads: type: number disk_read_size: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' disk_read_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' disk_writes: type: number disk_write_size: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' disk_write_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' free: description: Total amount of unallocated disk space in the file store. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' free_in_bytes: description: Total number of unallocated bytes in the file store. - type: number + $ref: '#/components/schemas/_common:ByteCount' mount: description: 'Mount point of the file store (for example: `/dev/sda2`).' type: string @@ -46658,10 +50693,10 @@ components: type: string total: description: Total size of the file store. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_in_bytes: description: Total size of the file store in bytes. - type: number + $ref: '#/components/schemas/_common:ByteCount' type: description: 'Type of the file store (ex: ext4).' type: string @@ -46694,10 +50729,10 @@ components: properties: free_percent: description: Percentage of free memory. - type: number + $ref: '#/components/schemas/_common:PercentageNumber' used_percent: description: Percentage of used memory. - type: number + $ref: '#/components/schemas/_common:PercentageNumber' nodes._common:FileSystem: type: object properties: @@ -46723,29 +50758,33 @@ components: Total disk space available to this Java virtual machine on all file stores. Depending on OS or process level restrictions, this might appear less than `free`. This is the actual amount of free disk space the OpenSearch node can utilize. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' available_in_bytes: description: |- Total number of bytes available to this Java virtual machine on all file stores. Depending on OS or process level restrictions, this might appear less than `free_in_bytes`. This is the actual amount of free disk space the OpenSearch node can utilize. - type: number + $ref: '#/components/schemas/_common:ByteCount' free: description: Total unallocated disk space in all file stores. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' free_in_bytes: description: Total number of unallocated bytes in all file stores. - type: number + $ref: '#/components/schemas/_common:ByteCount' total: description: Total size of all file stores. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_in_bytes: description: Total size of all file stores in bytes. - type: number + $ref: '#/components/schemas/_common:ByteCount' + cache_reserved: + x-version-added: '2.7' + description: Total size of cache bytes reserved in all file stores. + $ref: '#/components/schemas/_common:HumanReadableByteCount' cache_reserved_in_bytes: x-version-added: '2.7' description: Total size of cache bytes reserved in all file stores. - type: number + $ref: '#/components/schemas/_common:ByteCount' nodes._common:GarbageCollector: type: object properties: @@ -46791,12 +50830,12 @@ components: type: object properties: limit: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' limit_in_bytes: description: |- Configured memory limit, in bytes, for the indexing requests. Replica requests have an automatic limit that is 1.5x this value. - type: number + $ref: '#/components/schemas/_common:ByteCount' current: $ref: '#/components/schemas/nodes._common:PressureMemory' total: @@ -46830,6 +50869,8 @@ components: type: object additionalProperties: $ref: '#/components/schemas/nodes._common:KeyedProcessor' + time: + $ref: '#/components/schemas/_common:Duration' time_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' nodes._common:IoStatDevice: @@ -46915,24 +50956,39 @@ components: nodes._common:JvmMemoryStats: type: object properties: + heap_used: + description: Memory currently in use by the heap. + $ref: '#/components/schemas/_common:HumanReadableByteCount' heap_used_in_bytes: description: Memory, in bytes, currently in use by the heap. - type: number + $ref: '#/components/schemas/_common:ByteCount' heap_used_percent: description: Percentage of memory currently in use by the heap. - type: number + $ref: '#/components/schemas/_common:PercentageNumber' + heap_committed: + description: Amount of memory available for use by the heap. + $ref: '#/components/schemas/_common:HumanReadableByteCount' heap_committed_in_bytes: description: Amount of memory, in bytes, available for use by the heap. - type: number + $ref: '#/components/schemas/_common:ByteCount' + heap_max: + description: Maximum amount of memory available for use by the heap. + $ref: '#/components/schemas/_common:HumanReadableByteCount' heap_max_in_bytes: description: Maximum amount of memory, in bytes, available for use by the heap. - type: number + $ref: '#/components/schemas/_common:ByteCount' + non_heap_used: + description: Non-heap memory used. + $ref: '#/components/schemas/_common:HumanReadableByteCount' non_heap_used_in_bytes: description: Non-heap memory used, in bytes. - type: number + $ref: '#/components/schemas/_common:ByteCount' + non_heap_committed: + description: Amount of non-heap memory available. + $ref: '#/components/schemas/_common:HumanReadableByteCount' non_heap_committed_in_bytes: description: Amount of non-heap memory available, in bytes. - type: number + $ref: '#/components/schemas/_common:ByteCount' pools: description: Contains statistics about heap memory usage for the node. type: object @@ -46957,12 +51013,16 @@ components: nodes._common:LastGcStats: type: object properties: + used: + $ref: '#/components/schemas/_common:HumanReadableByteCount' used_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' + max: + $ref: '#/components/schemas/_common:HumanReadableByteCount' max_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' usage_percent: - type: number + $ref: '#/components/schemas/_common:PercentageNumber' nodes._common:MemoryStats: type: object properties: @@ -46970,28 +51030,37 @@ components: description: |- If the amount of physical memory has been overridden using the `es`.`total_memory_bytes` system property then this reports the overridden value in bytes. Otherwise it reports the same value as `total_in_bytes`. - type: number + $ref: '#/components/schemas/_common:ByteCount' resident: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' resident_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' share: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' share_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' total_virtual: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_virtual_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' + total: + description: Total amount of physical memory. + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_in_bytes: description: Total amount of physical memory in bytes. - type: number + $ref: '#/components/schemas/_common:ByteCount' + free: + description: Amount of free physical memory. + $ref: '#/components/schemas/_common:HumanReadableByteCount' free_in_bytes: description: Amount of free physical memory in bytes. - type: number + $ref: '#/components/schemas/_common:ByteCount' + used: + description: Amount of used physical memory. + $ref: '#/components/schemas/_common:HumanReadableByteCount' used_in_bytes: description: Amount of used physical memory in bytes. - type: number + $ref: '#/components/schemas/_common:ByteCount' nodes._common:NodeBufferPool: type: object properties: @@ -47000,16 +51069,16 @@ components: type: number total_capacity: description: Total capacity of buffer pools. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_capacity_in_bytes: description: Total capacity of buffer pools in bytes. - type: number + $ref: '#/components/schemas/_common:ByteCount' used: description: Size of buffer pools. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' used_in_bytes: description: Size of buffer pools in bytes. - type: number + $ref: '#/components/schemas/_common:ByteCount' nodes._common:NodeReloadError: type: object properties: @@ -47044,18 +51113,30 @@ components: nodes._common:Pool: type: object properties: + used: + description: Memory used by the heap. + $ref: '#/components/schemas/_common:HumanReadableByteCount' used_in_bytes: description: Memory, in bytes, used by the heap. - type: number + $ref: '#/components/schemas/_common:ByteCount' + max: + description: Maximum amount of memory available for use by the heap. + $ref: '#/components/schemas/_common:HumanReadableByteCount' max_in_bytes: description: Maximum amount of memory, in bytes, available for use by the heap. - type: number + $ref: '#/components/schemas/_common:ByteCount' + peak_used: + description: Largest amount of memory historically used by the heap. + $ref: '#/components/schemas/_common:HumanReadableByteCount' peak_used_in_bytes: description: Largest amount of memory, in bytes, historically used by the heap. - type: number + $ref: '#/components/schemas/_common:ByteCount' + peak_max: + description: Largest amount of memory historically used by the heap. + $ref: '#/components/schemas/_common:HumanReadableByteCount' peak_max_in_bytes: description: Largest amount of memory, in bytes, historically used by the heap. - type: number + $ref: '#/components/schemas/_common:ByteCount' last_gc_stats: description: Most recent GC cycle stats for a particular memory pool. $ref: '#/components/schemas/nodes._common:LastGcStats' @@ -47063,32 +51144,32 @@ components: type: object properties: all: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' all_in_bytes: description: Memory consumed, in bytes, by indexing requests in the coordinating, primary, or replica stage. - type: number + $ref: '#/components/schemas/_common:ByteCount' combined_coordinating_and_primary: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' combined_coordinating_and_primary_in_bytes: description: |- Memory consumed, in bytes, by indexing requests in the coordinating or primary stage. This value is not the sum of coordinating and primary as a node can reuse the coordinating memory if the primary stage is executed locally. - type: number + $ref: '#/components/schemas/_common:ByteCount' coordinating: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' coordinating_in_bytes: description: Memory consumed, in bytes, by indexing requests in the coordinating stage. - type: number + $ref: '#/components/schemas/_common:ByteCount' primary: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' primary_in_bytes: description: Memory consumed, in bytes, by indexing requests in the primary stage. - type: number + $ref: '#/components/schemas/_common:ByteCount' replica: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' replica_in_bytes: description: Memory consumed, in bytes, by indexing requests in the replica stage. - type: number + $ref: '#/components/schemas/_common:ByteCount' coordinating_rejections: description: Number of indexing requests rejected in the coordinating stage. type: number @@ -47128,6 +51209,8 @@ components: failed: description: Number of failed operations for the processor. type: number + time: + $ref: '#/components/schemas/_common:Duration' time_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' nodes._common:PublishedClusterStates: @@ -47208,13 +51291,13 @@ components: count: type: number uncompressed_size: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' uncompressed_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' compressed_size: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' compressed_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' nodes._common:ShardAdmissionControlStats: type: object properties: @@ -47229,8 +51312,10 @@ components: nodes._common:ShardCacheStats: type: object properties: + size: + $ref: '#/components/schemas/_common:HumanReadableByteCount' size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' evictions: type: number hit_count: @@ -47278,16 +51363,16 @@ components: timestamp: type: number cpu_utilization_percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' memory_utilization_percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' io_usage_stats: $ref: '#/components/schemas/nodes._common:ShardResourceUsageStatsIoUsageStats' nodes._common:ShardResourceUsageStatsIoUsageStats: type: object properties: max_io_utilization_percent: - $ref: '#/components/schemas/_common:Percentage' + $ref: '#/components/schemas/_common:PercentageString' nodes._common:ShardSearchBackpressureMode: type: string enum: @@ -47311,7 +51396,7 @@ components: cancellation_limit_reached_count: type: number cancelled_task_percentage: - type: number + $ref: '#/components/schemas/_common:PercentageNumber' current_cancellation_eligible_tasks_count: type: number nodes._common:ShardSearchBackpressureTaskResourceTrackerCpuUsageTrackerStats: @@ -47319,8 +51404,12 @@ components: properties: cancellation_count: type: number + current_max: + $ref: '#/components/schemas/_common:Duration' current_max_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' + current_avg: + $ref: '#/components/schemas/_common:Duration' current_avg_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' nodes._common:ShardSearchBackpressureTaskResourceTrackerElapsedTimeTrackerStats: @@ -47328,8 +51417,12 @@ components: properties: cancellation_count: type: number + current_max: + $ref: '#/components/schemas/_common:Duration' current_max_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' + current_avg: + $ref: '#/components/schemas/_common:Duration' current_avg_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' nodes._common:ShardSearchBackpressureTaskResourceTrackerHeapUsageTrackerStats: @@ -47337,12 +51430,18 @@ components: properties: cancellation_count: type: number + current_max: + $ref: '#/components/schemas/_common:HumanReadableByteCount' current_max_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' + current_avg: + $ref: '#/components/schemas/_common:HumanReadableByteCount' current_avg_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' + rolling_avg: + $ref: '#/components/schemas/_common:HumanReadableByteCount' rolling_avg_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' nodes._common:ShardSearchBackpressureTaskResourceTrackerStats: type: object properties: @@ -47376,6 +51475,8 @@ components: properties: count: type: number + time: + $ref: '#/components/schemas/_common:Duration' time_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' current: @@ -47522,6 +51623,11 @@ components: threads: description: Number of threads in the thread pool. type: number + total_wait_time: + description: | + The total amount of time that tasks spend waiting in the thread pool queue. + Currently, only `search`, `search_throttled`, and `index_searcher` thread pools support this metric. + $ref: '#/components/schemas/_common:Duration' total_wait_time_in_nanos: description: | The total amount of time that tasks spend waiting in the thread pool queue. @@ -47554,10 +51660,10 @@ components: type: number rx_size: description: Size of RX packets received by the node during internal cluster communication. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' rx_size_in_bytes: description: Size, in bytes, of RX packets received by the node during internal cluster communication. - type: number + $ref: '#/components/schemas/_common:ByteCount' server_open: description: Current number of inbound TCP connections used for internal communication between nodes. type: number @@ -47566,10 +51672,10 @@ components: type: number tx_size: description: Size of TX packets sent by the node during internal cluster communication. - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' tx_size_in_bytes: description: Size, in bytes, of TX packets sent by the node during internal cluster communication. - type: number + $ref: '#/components/schemas/_common:ByteCount' total_outbound_connections: description: |- The cumulative number of outbound transport connections that this node has opened since it started. @@ -47671,7 +51777,7 @@ components: description: Total heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings. type: number total_indexing_buffer_in_bytes: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:ByteCount' transport: $ref: '#/components/schemas/nodes.info:NodeInfoTransport' transport_address: @@ -47741,9 +51847,9 @@ components: items: type: string max_content_length: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' max_content_length_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' publish_address: type: string required: @@ -47784,25 +51890,25 @@ components: type: object properties: direct_max: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' direct_max_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' heap_init: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' heap_init_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' heap_max: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' heap_max_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' non_heap_init: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' non_heap_init_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' non_heap_max: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' non_heap_max_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - direct_max_in_bytes - heap_init_in_bytes @@ -47813,9 +51919,9 @@ components: type: object properties: total: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' total_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - total - total_in_bytes @@ -47846,9 +51952,9 @@ components: type: object properties: cache_size: - type: string + $ref: '#/components/schemas/_common:HumanReadableByteCount' cache_size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' cores_per_socket: type: number mhz: @@ -50468,7 +54574,7 @@ components: file_count: type: number size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - file_count - size_in_bytes @@ -50478,9 +54584,9 @@ components: shard_count: type: number size: - $ref: '#/components/schemas/_common:ByteSize' + $ref: '#/components/schemas/_common:HumanReadableByteCount' size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' max_segments_per_shard: type: number required: @@ -50584,7 +54690,7 @@ components: file_count: type: number size_in_bytes: - type: number + $ref: '#/components/schemas/_common:ByteCount' required: - file_count - size_in_bytes @@ -50953,32 +55059,43 @@ components: - nodes - none - parents - tasks._common:NodeTasks: + tasks._common:PersistentTaskStatus: type: object properties: - name: - $ref: '#/components/schemas/_common:NodeId' - transport_address: - $ref: '#/components/schemas/_common:TransportAddress' - host: - $ref: '#/components/schemas/_common:Host' - ip: - $ref: '#/components/schemas/_common:Ip' - roles: - type: array - items: - type: string - attributes: - type: object - additionalProperties: - type: string - tasks: - type: object - additionalProperties: - $ref: '#/components/schemas/tasks._common:TaskInfo' + state: + type: string + required: + - state + tasks._common:RawTaskStatus: + type: object + additionalProperties: + title: metadata + tasks._common:ReplicationTaskStatus: + type: object + properties: + phase: + type: string required: - - tasks - tasks._common:ParentTaskInfo: + - phase + tasks._common:Status: + description: Task status information can vary wildly from task to task. + anyOf: + - $ref: '#/components/schemas/tasks._common:ReplicationTaskStatus' + - $ref: '#/components/schemas/_common:BulkByScrollTaskStatus' + - $ref: '#/components/schemas/tasks._common:PersistentTaskStatus' + - $ref: '#/components/schemas/tasks._common:RawTaskStatus' + tasks._common:TaskExecutingNode: + allOf: + - $ref: '#/components/schemas/_common:BaseNode' + - type: object + properties: + tasks: + type: object + additionalProperties: + $ref: '#/components/schemas/tasks._common:TaskInfo' + required: + - tasks + tasks._common:TaskGroup: allOf: - $ref: '#/components/schemas/tasks._common:TaskInfo' - type: object @@ -50986,7 +55103,7 @@ components: children: type: array items: - $ref: '#/components/schemas/tasks._common:TaskInfo' + $ref: '#/components/schemas/tasks._common:TaskGroup' tasks._common:TaskInfo: type: object properties: @@ -51003,7 +55120,8 @@ components: additionalProperties: type: string id: - type: number + type: integer + format: int64 node: $ref: '#/components/schemas/_common:NodeId' running_time: @@ -51013,8 +55131,7 @@ components: start_time_in_millis: $ref: '#/components/schemas/_common:EpochTimeUnitMillis' status: - description: Task status information can vary wildly from task to task. - type: object + $ref: '#/components/schemas/tasks._common:Status' type: type: string parent_task_id: @@ -51030,12 +55147,14 @@ components: - type tasks._common:TaskInfos: oneOf: - - type: array + - title: grouped_by_none + type: array items: $ref: '#/components/schemas/tasks._common:TaskInfo' - - type: object + - title: grouped_by_parents + type: object additionalProperties: - $ref: '#/components/schemas/tasks._common:ParentTaskInfo' + $ref: '#/components/schemas/tasks._common:TaskGroup' tasks._common:TaskListResponseBase: type: object properties: @@ -51051,9 +55170,12 @@ components: description: Task information grouped by node, if `group_by` was set to `node` (the default). type: object additionalProperties: - $ref: '#/components/schemas/tasks._common:NodeTasks' + $ref: '#/components/schemas/tasks._common:TaskExecutingNode' tasks: $ref: '#/components/schemas/tasks._common:TaskInfos' + tasks._common:TaskResponse: + anyOf: + - $ref: '#/components/schemas/_common:BulkByScrollResponseBase' transforms._common:ContinuousStats: type: object properties: diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Namespace.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Namespace.java index 68c6a4feb5..e0e3861bcc 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Namespace.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Namespace.java @@ -13,6 +13,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.TreeMap; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -22,6 +23,8 @@ import org.opensearch.client.codegen.utils.Strings; public class Namespace { + private static final Set PARTIAL_NAMESPACES = Set.of(""); + private final Namespace parent; private final String name; private final Map children = new TreeMap<>(); @@ -82,7 +85,7 @@ public void render(ShapeRenderingContext ctx) throws RenderException { if (operations.isEmpty()) return; - var asBaseClass = "".equals(name); + var asBaseClass = PARTIAL_NAMESPACES.contains(name); new Client(this, false, asBaseClass, operations).render(ctx); new Client(this, true, asBaseClass, operations).render(ctx); @@ -116,12 +119,17 @@ private Client(Namespace parent, boolean async, boolean base, Collection bodyFields = new TreeMap<>(); protected Field additionalPropertiesField; @@ -25,6 +24,7 @@ public ObjectShape(Namespace parent, String className, String typedefName, Strin public void addBodyField(Field field) { bodyFields.put(field.getName(), field); + tryAddReference(ReferenceKind.Field, field.getType()); } public Collection getBodyFields() { @@ -42,24 +42,15 @@ public Collection getFields() { public void setAdditionalPropertiesField(Field field) { additionalPropertiesField = field; + if (field != null) { + tryAddReference(ReferenceKind.Field, field.getType()); + } } public Field getAdditionalPropertiesField() { return additionalPropertiesField; } - public void setExtendsType(Type extendsType) { - this.extendsType = extendsType; - } - - public Type getExtendsType() { - return extendsType; - } - - public boolean extendsOtherShape() { - return extendsType != null; - } - public boolean hasFieldsToSerialize() { return !bodyFields.isEmpty() || additionalPropertiesField != null; } @@ -71,4 +62,8 @@ public Collection getImplementsTypes() { public Collection getAnnotations() { return (hasFieldsToSerialize() || extendsOtherShape()) && !isAbstract() ? List.of(Types.Client.Json.JsonpDeserializable) : null; } + + public static class BuilderModel { + + } } diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/ReferenceKind.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/ReferenceKind.java new file mode 100644 index 0000000000..19a92dd6fb --- /dev/null +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/ReferenceKind.java @@ -0,0 +1,25 @@ +/* + * 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. + */ + +package org.opensearch.client.codegen.model; + +public enum ReferenceKind { + Extends(false), + Field(true), + UnionVariant(true); + + private final boolean isConcreteUsage; + + ReferenceKind(boolean isConcreteUsage) { + this.isConcreteUsage = isConcreteUsage; + } + + public boolean isConcreteUsage() { + return isConcreteUsage; + } +} diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java index 2de1320733..18facfd53e 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java @@ -50,11 +50,6 @@ public String getId() { return operationGroup.getName(); } - @Override - public boolean extendsOtherShape() { - return extendsType != Types.Client.OpenSearch._Types.RequestBase; - } - public String getHttpMethod() { return Streams.sortedBy(httpMethods.stream(), m -> { switch (m) { @@ -144,6 +139,7 @@ public void addBodyField(Field field) { private void addField(Field field) { fields.put(field.getName(), field); + tryAddReference(ReferenceKind.Field, field.getType()); } @Override diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Shape.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Shape.java index 8f6eaa5c04..c44c8d72d9 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Shape.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Shape.java @@ -8,11 +8,17 @@ package org.opensearch.client.codegen.model; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.HashSet; +import java.util.List; +import java.util.Map; import java.util.Set; import java.util.TreeSet; +import java.util.stream.Collectors; +import javax.annotation.Nonnull; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.client.codegen.exceptions.RenderException; @@ -20,11 +26,14 @@ public abstract class Shape { private static final Logger LOGGER = LogManager.getLogger(); + private final Set referencedTypes = new HashSet<>(); + private final Map> incomingReferences = new HashMap<>(); + private final Map> outgoingReferences = new HashMap<>(); protected final Namespace parent; private final String className; - private final Set referencedTypes = new HashSet<>(); private final String typedefName; private final String description; + private Type extendsType; public Shape(Namespace parent, String className, String typedefName, String description) { this.parent = parent; @@ -46,7 +55,12 @@ public JavaClassKind getClassKind() { } public boolean isAbstract() { - return this.className.endsWith("Base") || this.className.startsWith("Base"); + var refKinds = incomingReferences.entrySet() + .stream() + .filter(e -> !e.getValue().isEmpty()) + .map(Map.Entry::getKey) + .collect(Collectors.toSet()); + return !refKinds.isEmpty() && refKinds.stream().noneMatch(ReferenceKind::isConcreteUsage); } public String getTypedefName() { @@ -66,15 +80,38 @@ public TypeParameterDiamond getTypeParameters() { } public Type getExtendsType() { - return null; + return extendsType; + } + + public void setExtendsType(Type extendsType) { + this.extendsType = extendsType; + tryAddReference(ReferenceKind.Extends, extendsType); + } + + public boolean extendsOtherShape() { + return extendsType != null && extendsType.getTargetShape().isPresent(); + } + + public boolean extendedByOtherShape() { + return !incomingReferences.getOrDefault(ReferenceKind.Extends, Collections.emptyList()).isEmpty(); } public Collection getImplementsTypes() { return Collections.emptyList(); } - public Type getType() { - return Type.builder().withPackage(getPackageName()).withName(className).build(); + protected void tryAddReference(ReferenceKind kind, Type to) { + if (to == null) return; + to.getTargetShape().ifPresent(s -> addReference(kind, s)); + } + + private void addReference(ReferenceKind kind, Shape to) { + outgoingReferences.computeIfAbsent(kind, k -> new ArrayList<>()).add(to); + to.incomingReferences.computeIfAbsent(kind, k -> new ArrayList<>()).add(this); + } + + public @Nonnull Type getType() { + return Type.builder().withPackage(getPackageName()).withName(className).withTargetShape(this).build(); } public Namespace getParent() { diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java index fffd8a017f..575a955811 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java @@ -11,6 +11,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -42,7 +43,6 @@ import org.opensearch.client.codegen.openapi.OpenApiSchemaFormat; import org.opensearch.client.codegen.openapi.OpenApiSchemaType; import org.opensearch.client.codegen.openapi.OpenApiSpecification; -import org.opensearch.client.codegen.utils.Lists; import org.opensearch.client.codegen.utils.Versions; public class SpecTransformer { @@ -54,7 +54,7 @@ public class SpecTransformer { @Nonnull private final Namespace root = new Namespace(); @Nonnull - private final Set visitedSchemas = new HashSet<>(); + private final Map visitedSchemas = new ConcurrentHashMap<>(); @Nonnull private final Map schemaToType = new ConcurrentHashMap<>(); @@ -232,57 +232,74 @@ private Field visit(OpenApiParameter parameter) { ); } - private void visit(OpenApiSchema schema) { + private Shape visit(OpenApiSchema schema) { var namespace = schema.getNamespace().orElseThrow(); var name = schema.getName().orElseThrow(); - visit(root.child(namespace), name, namespace + "." + name, schema); + return visit(root.child(namespace), name, namespace + "." + name, schema); } - private void visit(Namespace parent, String className, String typedefName, OpenApiSchema schema) { - if (!visitedSchemas.add(schema)) { - return; + private Shape visit(Namespace parent, String className, String typedefName, OpenApiSchema schema) { + Shape shape = visitedSchemas.get(schema); + + if (shape != null) { + return shape; } LOGGER.info("Visiting Schema: {}", schema); - Shape shape; - var description = schema.getDescription().orElse(null); + var oneOf = schema.getOneOf(); + if (schema.isArray()) { shape = new ArrayShape(parent, className, mapType(schema), typedefName, description); - } else if (schema.determineSingleType().orElse(null) == OpenApiSchemaType.Object) { - var objShape = new ObjectShape(parent, className, typedefName, description); - visitInto(schema, objShape); - shape = objShape; - } else if (schema.isString() && schema.hasEnums()) { - var deprecatedEnums = schema.getDeprecatedEnums().orElseGet(Collections::emptySet); - shape = new EnumShape( - parent, - className, - Lists.map(schema.getEnums().orElseThrow(), v -> new EnumShape.Variant(v, deprecatedEnums.contains(v))), - typedefName, - description - ); - } else if (schema.hasOneOf()) { + visitedSchemas.putIfAbsent(schema, shape); + } else if (schema.isStringEnum() || (oneOf.isPresent() && oneOf.get().stream().allMatch(OpenApiSchema::isStringEnum))) { + var variants = new ArrayList(); + + if (oneOf.isPresent()) { + oneOf.get().forEach(s -> { + var isDeprecated = s.getVersionDeprecated().isPresent(); + s.getEnums().orElseThrow().forEach(v -> variants.add(new EnumShape.Variant(v, isDeprecated))); + }); + } else { + schema.getEnums().orElseThrow().forEach(v -> variants.add(new EnumShape.Variant(v, false))); + } + + variants.sort(Comparator.comparing(EnumShape.Variant::getName)); + + shape = new EnumShape(parent, className, variants, typedefName, description); + visitedSchemas.putIfAbsent(schema, shape); + } else if (oneOf.isPresent()) { var taggedUnion = new TaggedUnionShape(parent, className, typedefName, description); - schema.getOneOf().orElseThrow().forEach(s -> { + shape = taggedUnion; + visitedSchemas.putIfAbsent(schema, shape); + + oneOf.get().forEach(s -> { var title = s.getTitle() .orElseThrow(() -> new IllegalStateException("oneOf variant [" + s.getPointer() + "] is missing a `title` tag")); taggedUnion.addVariant(title, mapType(s)); }); - shape = taggedUnion; + } else if (schema.determineSingleType().orElse(null) == OpenApiSchemaType.Object) { + var objShape = new ObjectShape(parent, className, typedefName, description); + shape = objShape; + visitedSchemas.putIfAbsent(schema, shape); + + visitInto(schema, objShape); } else { throw new NotImplementedException("Unsupported schema: " + schema); } parent.addShape(shape); + + return shape; } private void visitInto(OpenApiSchema schema, ObjectShape shape) { var allOf = schema.getAllOf(); if (allOf.isPresent()) { - shape.setExtendsType(mapType(allOf.get().get(0))); + var baseSchema = allOf.get().get(0); + shape.setExtendsType(mapType(baseSchema)); schema = allOf.get().get(1); } @@ -392,13 +409,9 @@ private Type mapTypeInner(OpenApiSchema schema) { return mapType(schema); } - visit(schema); + var shape = visit(schema); - return Type.builder() - .withPackage(Types.Client.OpenSearch.PACKAGE + "." + schema.getNamespace().orElseThrow()) - .withName(schema.getName().orElseThrow()) - .isEnum(schema.hasEnums()) - .build(); + return shape.getType(); } var oneOf = schema.getOneOf(); @@ -428,6 +441,7 @@ private Type mapTypeInner(OpenApiSchema schema) { case Boolean: return Types.Primitive.Boolean; case Integer: + return mapInteger(schema); case Number: return mapNumber(schema); } @@ -444,7 +458,9 @@ private Type mapOneOf(List oneOf) { if (types.size() == 2 && types.contains(OpenApiSchemaType.String) - && (types.contains(OpenApiSchemaType.Boolean) || types.contains(OpenApiSchemaType.Number))) { + && (types.contains(OpenApiSchemaType.Boolean) + || types.contains(OpenApiSchemaType.Integer) + || types.contains(OpenApiSchemaType.Number))) { return Types.Java.Lang.String; } @@ -469,28 +485,40 @@ private Type mapArray(OpenApiSchema schema) { return Types.Java.Util.List(items); } - private Type mapNumber(OpenApiSchema schema) { + private Type mapInteger(OpenApiSchema schema) { var format = schema.getFormat().orElse(OpenApiSchemaFormat.Int32); switch (format) { case Int32: return Types.Primitive.Int; case Int64: return Types.Primitive.Long; + default: + throw new UnsupportedOperationException( + "Can not get type name for integer [" + schema.getPointer() + "] with format: " + format + ); + } + } + + private Type mapNumber(OpenApiSchema schema) { + var format = schema.getFormat().orElse(OpenApiSchemaFormat.Float); + switch (format) { case Float: return Types.Primitive.Float; case Double: return Types.Primitive.Double; default: - throw new UnsupportedOperationException("Can not get type name for integer/number with format: " + format); + throw new UnsupportedOperationException( + "Can not get type name for number [" + schema.getPointer() + "] with format: " + format + ); } } private boolean shouldKeepRef(OpenApiSchema schema) { - if (schema.isNumber() || schema.isArray()) { + if (schema.isInteger() || schema.isNumber() || schema.isArray()) { return false; } - if (schema.isString() && schema.getEnums().isEmpty()) { - return false; + if (schema.isString()) { + return schema.hasEnums(); } if (schema.isObject() && schema.getProperties().map(Map::isEmpty).orElse(true) @@ -498,7 +526,8 @@ private boolean shouldKeepRef(OpenApiSchema schema) { return false; } if (schema.getOneOf().isPresent()) { - return schema.getOneOf().orElseThrow().stream().allMatch(s -> s.getTitle().isPresent()); + var oneOf = schema.getOneOf().orElseThrow(); + return oneOf.stream().allMatch(s -> s.getTitle().isPresent()) || oneOf.stream().allMatch(OpenApiSchema::isStringEnum); } if (schema.getAllOf().isPresent()) { return schema.determineSingleType().orElse(null) == OpenApiSchemaType.Object; diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/TaggedUnionShape.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/TaggedUnionShape.java index 36dc7e2f2a..cc3d28ff7c 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/TaggedUnionShape.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/TaggedUnionShape.java @@ -22,6 +22,7 @@ public TaggedUnionShape(Namespace parent, String className, String typedefName, public void addVariant(String name, Type type) { variants.add(new Variant(name, type.getBoxed())); + tryAddReference(ReferenceKind.UnionVariant, type); } public Collection getVariants() { diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java index b8e3585151..2e4391b787 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java @@ -12,6 +12,7 @@ import static org.opensearch.client.codegen.model.Types.Java; import com.samskivert.mustache.Mustache; +import java.util.Optional; import java.util.Set; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -43,6 +44,7 @@ public class Type { "Number" ); + @Nonnull public static Builder builder() { return new Builder(); } @@ -53,17 +55,18 @@ public static Builder builder() { private final String name; @Nullable private final Type[] typeParams; - private final boolean isEnum; + private final Shape targetShape; private Type(Builder builder) { this.packageName = builder.packageName; this.name = Strings.requireNonBlank(builder.name, "name must not be blank"); this.typeParams = builder.typeParams; - this.isEnum = builder.isEnum; + this.targetShape = builder.targetShape; } + @Nonnull public Builder toBuilder() { - return new Builder().withPackage(packageName).withName(name).withTypeParameters(typeParams).isEnum(isEnum); + return new Builder().withPackage(packageName).withName(name).withTypeParameters(typeParams).withTargetShape(targetShape); } @Override @@ -105,6 +108,11 @@ public Type getBoxed() { } } + @Nonnull + public Optional getTargetShape() { + return Optional.ofNullable(targetShape); + } + public boolean isMap() { return "Map".equals(name); } @@ -154,7 +162,7 @@ public boolean isNumber() { } public boolean isEnum() { - return isEnum; + return targetShape != null && targetShape instanceof EnumShape; } public boolean isTime() { @@ -205,7 +213,7 @@ public void getRequiredImports(Set imports, String currentPkg) { } } - public Type withTypeParams(Type... typeParams) { + public Type withTypeParameters(Type... typeParams) { return toBuilder().withTypeParameters(typeParams).build(); } @@ -221,7 +229,7 @@ public static final class Builder extends ObjectBuilderBase { private String packageName; private String name; private Type[] typeParams; - private boolean isEnum; + private Shape targetShape; private Builder() {} @@ -250,8 +258,8 @@ public Builder withTypeParameters(@Nullable Type... typeParams) { } @Nonnull - public Builder isEnum(boolean isEnum) { - this.isEnum = isEnum; + public Builder withTargetShape(Shape shape) { + this.targetShape = shape; return this; } } diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java index be82acb55f..8d522a11f1 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Types.java @@ -75,7 +75,10 @@ public static final class Util { public static final Type HashMap = Type.builder().withPackage(PACKAGE).withName("HashMap").build(); public static Type Map(Type keyType, Type valueType) { - return Map.withTypeParams(keyType, valueType); + return Map.toBuilder() + .withTypeParameters(keyType, valueType) + .withTargetShape(valueType.getTargetShape().orElse(null)) + .build(); } public static final Type Map = Type.builder().withPackage(PACKAGE).withName("Map").build(); @@ -85,7 +88,12 @@ public static Type MapEntry(Type keyType, Type valueType) { } public static Type List(Type valueType) { - return Type.builder().withPackage(PACKAGE).withName("List").withTypeParameters(valueType).build(); + return Type.builder() + .withPackage(PACKAGE) + .withName("List") + .withTypeParameters(valueType) + .withTargetShape(valueType.getTargetShape().orElse(null)) + .build(); } public static final class Concurrent { @@ -122,7 +130,7 @@ public static final class Client { public static final String PACKAGE = "org.opensearch.client"; public static Type ApiClient(Type transport, Type client) { - return ApiClient.withTypeParams(transport, client); + return ApiClient.withTypeParameters(transport, client); } public static final Type ApiClient = Type.builder().withPackage(PACKAGE).withName("ApiClient").build(); @@ -161,7 +169,7 @@ public static final class Transport { public static final Type Endpoint = Type.builder().withPackage(PACKAGE).withName("Endpoint").build(); public static Type JsonEndpoint(Type requestType, Type responseType, Type errorType) { - return JsonEndpoint.withTypeParams(requestType, responseType, errorType); + return JsonEndpoint.withTypeParameters(requestType, responseType, errorType); } public static final Type JsonEndpoint = Type.builder().withPackage(PACKAGE).withName("JsonEndpoint").build(); @@ -179,14 +187,14 @@ public static final class Util { public static final Type ApiTypeHelper = Type.builder().withPackage(PACKAGE).withName("ApiTypeHelper").build(); public static Type ObjectBuilder(Type type) { - return ObjectBuilder.withTypeParams(type); + return ObjectBuilder.withTypeParameters(type); } public static final Type ObjectBuilder = Type.builder().withPackage(PACKAGE).withName("ObjectBuilder").build(); public static final Type ObjectBuilderBase = Type.builder().withPackage(PACKAGE).withName("ObjectBuilderBase").build(); public static Type TaggedUnion(Type tagType, Type baseType) { - return TaggedUnion.withTypeParams(tagType, baseType); + return TaggedUnion.withTypeParameters(tagType, baseType); } public static final Type TaggedUnion = Type.builder().withPackage(PACKAGE).withName("TaggedUnion").build(); diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpStatusCode.java b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpStatusCode.java index 11e57a1b7b..36f39bb006 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpStatusCode.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpStatusCode.java @@ -15,10 +15,12 @@ public enum HttpStatusCode { Ok("200"), Created("201"), + Accepted("202"), NoContent("204"), BadRequest("400"), Forbidden("403"), NotFound("404"), + RequestTimeout("408"), InternalServerError("500"), NotImplemented("501"); diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java index 88f5d28779..8a1a3d1d03 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java @@ -11,7 +11,6 @@ import static org.opensearch.client.codegen.utils.Functional.ifNonnull; import io.swagger.v3.oas.models.media.Schema; -import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -55,8 +54,6 @@ public class OpenApiSchema extends OpenApiRefElement { @Nullable private final List enums; @Nullable - private final Set deprecatedEnums; - @Nullable private final OpenApiSchema items; @Nullable private final OpenApiSchema additionalProperties; @@ -70,6 +67,8 @@ public class OpenApiSchema extends OpenApiRefElement { private final String pattern; @Nullable private final Semver versionRemoved; + @Nullable + private final Semver versionDeprecated; private OpenApiSchema(@Nonnull Builder builder) { super(builder.parent, Objects.requireNonNull(builder.pointer, "pointer must not be null"), builder.$ref, OpenApiSchema.class); @@ -82,7 +81,6 @@ private OpenApiSchema(@Nonnull Builder builder) { anyOf = builder.anyOf; oneOf = builder.oneOf; enums = builder.enums; - deprecatedEnums = builder.deprecatedEnums; items = builder.items; additionalProperties = builder.additionalProperties; properties = builder.properties; @@ -90,6 +88,7 @@ private OpenApiSchema(@Nonnull Builder builder) { title = builder.title; pattern = builder.pattern; versionRemoved = builder.versionRemoved; + versionDeprecated = builder.versionDeprecated; } protected OpenApiSchema(@Nullable OpenApiElement parent, @Nonnull JsonPointer pointer, @Nonnull Schema schema) { @@ -139,10 +138,8 @@ protected OpenApiSchema(@Nullable OpenApiElement parent, @Nonnull JsonPointer var extensions = schema.getExtensions(); - // noinspection unchecked - deprecatedEnums = Maps.tryGet(extensions, "x-deprecated-enums").map(e -> (Collection) e).map(HashSet::new).orElse(null); - versionRemoved = Maps.tryGet(extensions, "x-version-removed").map(v -> Versions.coerce((String) v)).orElse(null); + versionDeprecated = Maps.tryGet(extensions, "x-version-deprecated").map(v -> Versions.coerce((String) v)).orElse(null); } @Nonnull @@ -183,6 +180,10 @@ public boolean isBoolean() { return is(OpenApiSchemaType.Boolean); } + public boolean isInteger() { + return is(OpenApiSchemaType.Integer); + } + public boolean isNumber() { return is(OpenApiSchemaType.Number); } @@ -195,6 +196,10 @@ public boolean isString() { return is(OpenApiSchemaType.String); } + public boolean isStringEnum() { + return isString() && hasEnums(); + } + public boolean hasAllOf() { return allOf != null && !allOf.isEmpty(); } @@ -231,11 +236,6 @@ public Optional> getEnums() { return Lists.unmodifiableOpt(enums); } - @Nonnull - public Optional> getDeprecatedEnums() { - return Sets.unmodifiableOpt(deprecatedEnums); - } - @Nonnull public Optional getItems() { return Optional.ofNullable(items); @@ -271,6 +271,11 @@ public Optional getVersionRemoved() { return Optional.ofNullable(versionRemoved); } + @Nonnull + public Optional getVersionDeprecated() { + return Optional.ofNullable(versionDeprecated); + } + public static Set determineTypes(List schemas) { return schemas.stream().map(OpenApiSchema::determineTypes).flatMap(Set::stream).collect(Collectors.toSet()); } @@ -338,8 +343,6 @@ public static class Builder extends ObjectBuilderBase { @Nullable private List enums; @Nullable - private Set deprecatedEnums; - @Nullable private OpenApiSchema items; @Nullable private OpenApiSchema additionalProperties; @@ -353,6 +356,8 @@ public static class Builder extends ObjectBuilderBase { private String pattern; @Nullable private Semver versionRemoved; + @Nullable + private Semver versionDeprecated; private Builder() {} diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchemaFormat.java b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchemaFormat.java index f3bd8fa731..bdd021510e 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchemaFormat.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchemaFormat.java @@ -18,10 +18,21 @@ public enum OpenApiSchemaFormat { Double, Int32, Int64, - Binary; + Binary, + DateTime("date-time"); private static final Map VALUES = Maps.createLookupOf(values(), OpenApiSchemaFormat::toString); + private final String format; + + OpenApiSchemaFormat(String format) { + this.format = format; + } + + OpenApiSchemaFormat() { + this.format = name().toLowerCase(); + } + @Nonnull public static OpenApiSchemaFormat from(@Nonnull String format) { var value = VALUES.get(Strings.requireNonBlank(format, "format must not be blank")); @@ -33,6 +44,6 @@ public static OpenApiSchemaFormat from(@Nonnull String format) { @Override public String toString() { - return name().toLowerCase(); + return format; } } diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Client.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Client.mustache index 8547a4e05e..5160e90ed9 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Client.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Client.mustache @@ -42,10 +42,7 @@ * {{description}} */ public {{#async}}{{TYPES.Java.Util.Concurrent.CompletableFuture}}<{{/async}}{{responseType}}{{#async}}>{{/async}} {{#camelCase}}{{id}}{{/camelCase}}({{type}} request) throws {{TYPES.Java.Io.IOException}}, {{TYPES.Client.OpenSearch._Types.OpenSearchException}} { - @SuppressWarnings("unchecked") - {{jsonEndpointType}} endpoint = ({{jsonEndpointType}}) {{type.name}}._ENDPOINT; - - return this.transport.performRequest{{#async}}Async{{/async}}(request, endpoint, this.transportOptions); + return this.transport.performRequest{{#async}}Async{{/async}}(request, {{type.name}}._ENDPOINT, this.transportOptions); } /** @@ -62,9 +59,9 @@ /** * {{description}} */ - public {{#async}}{{TYPES.Java.Util.Concurrent.CompletableFuture}}<{{/async}}{{responseType}}{{#async}}>{{/async}} {{#camelCase}}{{id}}{{/camelCase}}() + public final {{#async}}{{TYPES.Java.Util.Concurrent.CompletableFuture}}<{{/async}}{{responseType}}{{#async}}>{{/async}} {{#camelCase}}{{id}}{{/camelCase}}() throws IOException, OpenSearchException { - return this.transport.performRequest{{#async}}Async{{/async}}(new {{type.builderType}}().build(), {{type.name}}._ENDPOINT, this.transportOptions); + return {{#camelCase}}{{id}}{{/camelCase}}(new {{type.builderType}}().build()); } {{/hasAnyRequiredFields}} {{/canBeSingleton}} diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder.mustache index 26d308c6a5..b3ab0f1355 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder.mustache @@ -1,108 +1,41 @@ {{^abstract}} /** - * Builder for {@link {{className}}}. - */ - public static class Builder extends -{{#extendsOtherShape}} - {{extendsType}}.AbstractBuilder -{{/extendsOtherShape}} -{{^extendsOtherShape}} - {{TYPES.Client.Util.ObjectBuilderBase}} -{{/extendsOtherShape}} - implements {{TYPES.Client.Util.ObjectBuilder}}<{{className}}> { + * Builder for {@link {{className}}}. + */ {{#extendsOtherShape}} - @Override - protected Builder self() { - return this; - } - {{/extendsOtherShape}} -{{/abstract}} -{{#abstract}} - protected abstract static class AbstractBuilder> extends {{TYPES.Client.Util.ObjectBuilderBase}} { -{{/abstract}} - {{#fields}} - {{^required}}@{{TYPES.Javax.Annotation.Nullable}} {{/required}}private {{type.boxed}} {{name}}; - {{/fields}} - - {{#fields}} - {{#type.isMap}} - {{>ObjectShape/FieldDoc/MapAddAll}} - {{#deprecation}}@Deprecated{{/deprecation}} - public final Builder{{#abstract}}T{{/abstract}} {{name}}({{type}} map) { - this.{{name}} = _mapPutAll(this.{{name}}, map); - return {{^abstract}}this{{/abstract}}{{#abstract}}self(){{/abstract}}; - } - - {{>ObjectShape/FieldDoc/MapAdd}} - {{#deprecation}}@Deprecated{{/deprecation}} - public final Builder{{#abstract}}T{{/abstract}} {{name}}({{type.mapKeyType}} key, {{type.mapValueType}} value) { - this.{{name}} = _mapPut(this.{{name}}, key, value); - return {{^abstract}}this{{/abstract}}{{#abstract}}self(){{/abstract}}; - } - {{#type.mapValueType.hasBuilder}} - - {{>ObjectShape/FieldDoc/MapAddBuilderFn}} - {{#deprecation}}@Deprecated{{/deprecation}} - public final Builder{{#abstract}}T{{/abstract}} {{name}}(String key, {{type.mapValueType.builderFnType}} fn) { - return {{name}}(key, fn.apply(new {{type.mapValueType.builderType}}()).build()); - } - {{/type.mapValueType.hasBuilder}} - {{/type.isMap}} - {{#type.isList}} - {{>ObjectShape/FieldDoc/ListAddAll}} - {{#deprecation}}@Deprecated{{/deprecation}} - public final Builder{{#abstract}}T{{/abstract}} {{name}}({{type}} list) { - this.{{name}} = _listAddAll(this.{{name}}, list); - return {{^abstract}}this{{/abstract}}{{#abstract}}self(){{/abstract}}; - } - - {{>ObjectShape/FieldDoc/ListAdd}} - {{#deprecation}}@Deprecated{{/deprecation}} - public final Builder{{#abstract}}T{{/abstract}} {{name}}({{type.listValueType}} value, {{type.listValueType}}... values) { - this.{{name}} = _listAdd(this.{{name}}, value, values); - return {{^abstract}}this{{/abstract}}{{#abstract}}self(){{/abstract}}; - } - {{#type.listValueType.hasBuilder}} + public static class Builder extends {{extendsType}}.AbstractBuilder + implements {{TYPES.Client.Util.ObjectBuilder}}<{{className}}> { + {{>ObjectShape/Builder/SelfImpl}} - {{>ObjectShape/FieldDoc/ListAddBuilderFn}} - {{#deprecation}}@Deprecated{{/deprecation}} - public final Builder{{#abstract}}T{{/abstract}} {{name}}({{type.listValueType.builderFnType}} fn) { - return {{name}}(fn.apply(new {{type.listValueType.builderType}}()).build()); - } - {{/type.listValueType.hasBuilder}} - {{/type.isList}} - {{^type.isListOrMap}} - {{>ObjectShape/FieldDoc/Basic}} - {{#deprecation}}@Deprecated{{/deprecation}} - public final Builder{{#abstract}}T{{/abstract}} {{name}}({{^required}}@{{TYPES.Javax.Annotation.Nullable}} {{/required}}{{type}} value) { - this.{{name}} = value; - return {{^abstract}}this{{/abstract}}{{#abstract}}self(){{/abstract}}; - } - {{#type.hasBuilder}} + {{>ObjectShape/Builder/Fields}} - {{>ObjectShape/FieldDoc/Basic}} - {{#deprecation}}@Deprecated{{/deprecation}} - public final Builder{{#abstract}}T{{/abstract}} {{name}}({{type.builderFnType}} fn) { - return {{name}}(fn.apply(new {{type.builderType}}()).build()); + {{>ObjectShape/Builder/BuildImpl}} } - {{/type.hasBuilder}} - {{/type.isListOrMap}} - - {{/fields}} - {{^abstract}} - /** - * Builds a {@link {{className}}}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ - public {{className}} build() { - _checkSingleUse(); + {{/extendsOtherShape}} + {{^extendsOtherShape}} + {{#extendedByOtherShape}} + public static class Builder extends {{type}}.AbstractBuilder + implements {{TYPES.Client.Util.ObjectBuilder}}<{{className}}> { + {{>ObjectShape/Builder/SelfImpl}} + + {{>ObjectShape/Builder/BuildImpl}} + } + {{/extendedByOtherShape}} + {{^extendedByOtherShape}} + public static class Builder extends {{TYPES.Client.Util.ObjectBuilderBase}} + implements {{TYPES.Client.Util.ObjectBuilder}}<{{className}}> { + {{>ObjectShape/Builder/Fields}} + + {{>ObjectShape/Builder/BuildImpl}} + } + {{/extendedByOtherShape}} + {{/extendsOtherShape}} +{{/abstract}} +{{#extendedByOtherShape}} + protected abstract static class AbstractBuilder> + extends {{#extendsOtherShape}}{{extendsType}}.AbstractBuilder{{/extendsOtherShape}}{{^extendsOtherShape}}{{TYPES.Client.Util.ObjectBuilderBase}}{{/extendsOtherShape}} { + {{>ObjectShape/Builder/Fields}} - return new {{className}}(this); - } - {{/abstract}} - {{#abstract}} protected abstract BuilderT self(); - {{/abstract}} - } \ No newline at end of file + } +{{/extendedByOtherShape}} \ No newline at end of file diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder/BuildImpl.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder/BuildImpl.mustache new file mode 100644 index 0000000000..882fad9d21 --- /dev/null +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder/BuildImpl.mustache @@ -0,0 +1,10 @@ +/** + * Builds a {@link {{className}}}. + * + * @throws NullPointerException if some of the required fields are null. + */ +public {{className}} build() { + _checkSingleUse(); + + return new {{className}}(this); +} \ No newline at end of file diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder/Fields.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder/Fields.mustache new file mode 100644 index 0000000000..88184a506f --- /dev/null +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder/Fields.mustache @@ -0,0 +1,69 @@ +{{#fields}} + {{^required}}@{{TYPES.Javax.Annotation.Nullable}} {{/required}}private {{type.boxed}} {{name}}; +{{/fields}} + +{{#fields}} + {{#type.isMap}} + {{>ObjectShape/FieldDoc/MapAddAll}} + {{#deprecation}}@Deprecated{{/deprecation}} + public final Builder{{#extendedByOtherShape}}T{{/extendedByOtherShape}} {{name}}({{type}} map) { + this.{{name}} = _mapPutAll(this.{{name}}, map); + return {{^extendedByOtherShape}}this{{/extendedByOtherShape}}{{#extendedByOtherShape}}self(){{/extendedByOtherShape}}; + } + + {{>ObjectShape/FieldDoc/MapAdd}} + {{#deprecation}}@Deprecated{{/deprecation}} + public final Builder{{#extendedByOtherShape}}T{{/extendedByOtherShape}} {{name}}({{type.mapKeyType}} key, {{type.mapValueType}} value) { + this.{{name}} = _mapPut(this.{{name}}, key, value); + return {{^extendedByOtherShape}}this{{/extendedByOtherShape}}{{#extendedByOtherShape}}self(){{/extendedByOtherShape}}; + } + {{#type.mapValueType.hasBuilder}} + + {{>ObjectShape/FieldDoc/MapAddBuilderFn}} + {{#deprecation}}@Deprecated{{/deprecation}} + public final Builder{{#extendedByOtherShape}}T{{/extendedByOtherShape}} {{name}}(String key, {{type.mapValueType.builderFnType}} fn) { + return {{name}}(key, fn.apply(new {{type.mapValueType.builderType}}()).build()); + } + {{/type.mapValueType.hasBuilder}} + {{/type.isMap}} + {{#type.isList}} + {{>ObjectShape/FieldDoc/ListAddAll}} + {{#deprecation}}@Deprecated{{/deprecation}} + public final Builder{{#extendedByOtherShape}}T{{/extendedByOtherShape}} {{name}}({{type}} list) { + this.{{name}} = _listAddAll(this.{{name}}, list); + return {{^extendedByOtherShape}}this{{/extendedByOtherShape}}{{#extendedByOtherShape}}self(){{/extendedByOtherShape}}; + } + + {{>ObjectShape/FieldDoc/ListAdd}} + {{#deprecation}}@Deprecated{{/deprecation}} + public final Builder{{#extendedByOtherShape}}T{{/extendedByOtherShape}} {{name}}({{type.listValueType}} value, {{type.listValueType}}... values) { + this.{{name}} = _listAdd(this.{{name}}, value, values); + return {{^extendedByOtherShape}}this{{/extendedByOtherShape}}{{#extendedByOtherShape}}self(){{/extendedByOtherShape}}; + } + {{#type.listValueType.hasBuilder}} + + {{>ObjectShape/FieldDoc/ListAddBuilderFn}} + {{#deprecation}}@Deprecated{{/deprecation}} + public final Builder{{#extendedByOtherShape}}T{{/extendedByOtherShape}} {{name}}({{type.listValueType.builderFnType}} fn) { + return {{name}}(fn.apply(new {{type.listValueType.builderType}}()).build()); + } + {{/type.listValueType.hasBuilder}} + {{/type.isList}} + {{^type.isListOrMap}} + {{>ObjectShape/FieldDoc/Basic}} + {{#deprecation}}@Deprecated{{/deprecation}} + public final Builder{{#extendedByOtherShape}}T{{/extendedByOtherShape}} {{name}}({{^required}}@{{TYPES.Javax.Annotation.Nullable}} {{/required}}{{type}} value) { + this.{{name}} = value; + return {{^extendedByOtherShape}}this{{/extendedByOtherShape}}{{#extendedByOtherShape}}self(){{/extendedByOtherShape}}; + } + {{#type.hasBuilder}} + + {{>ObjectShape/FieldDoc/Basic}} + {{#deprecation}}@Deprecated{{/deprecation}} + public final Builder{{#extendedByOtherShape}}T{{/extendedByOtherShape}} {{name}}({{type.builderFnType}} fn) { + return {{name}}(fn.apply(new {{type.builderType}}()).build()); + } + {{/type.hasBuilder}} + {{/type.isListOrMap}} + +{{/fields}} \ No newline at end of file diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder/SelfImpl.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder/SelfImpl.mustache new file mode 100644 index 0000000000..7d897fe252 --- /dev/null +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder/SelfImpl.mustache @@ -0,0 +1,4 @@ +@Override +protected Builder self() { + return this; +} \ No newline at end of file diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Constructor.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Constructor.mustache index d526639524..b047e2a099 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Constructor.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Constructor.mustache @@ -1,9 +1,9 @@ -{{^abstract}} +{{^extendedByOtherShape}} private {{className}}(Builder builder) { -{{/abstract}} -{{#abstract}} +{{/extendedByOtherShape}} +{{#extendedByOtherShape}} protected {{className}}(AbstractBuilder builder) { -{{/abstract}} +{{/extendedByOtherShape}} {{#extendsOtherShape}} super(builder); {{/extendsOtherShape}} @@ -28,7 +28,7 @@ } {{^abstract}} - public static {{className}} of({{type.builderFnType}} fn) { + public static {{className}} {{#extendedByOtherShape}}{{#camelCase}}{{className}}{{/camelCase}}Of{{/extendedByOtherShape}}{{^extendedByOtherShape}}of{{/extendedByOtherShape}}({{type.builderFnType}} fn) { return fn.apply(new Builder()).build(); } {{/abstract}} \ No newline at end of file diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Deserialize.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Deserialize.mustache index 366d666744..4496a97a93 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Deserialize.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Deserialize.mustache @@ -4,16 +4,18 @@ */ public static final {{TYPES.Client.Json.JsonpDeserializer}}<{{className}}> _DESERIALIZER = {{TYPES.Client.Json.ObjectBuilderDeserializer}}.lazy(Builder::new, {{className}}::setup{{className}}Deserializer); - protected static void setup{{className}}Deserializer({{TYPES.Client.Json.ObjectDeserializer}}<{{type.builderType}}> op) { {{/abstract}} -{{#abstract}} +{{^extendedByOtherShape}} + protected static void setup{{className}}Deserializer({{TYPES.Client.Json.ObjectDeserializer}}<{{type.builderType}}> op) { +{{/extendedByOtherShape}} +{{#extendedByOtherShape}} protected static > void setup{{className}}Deserializer({{TYPES.Client.Json.ObjectDeserializer}} op) { -{{/abstract}} +{{/extendedByOtherShape}} {{#extendsOtherShape}} {{extendsType}}.setup{{extendsType.name}}Deserializer(op); {{/extendsOtherShape}} {{#bodyFields}} - op.add({{#abstract}}Abstract{{/abstract}}Builder::{{name}}, {{#type}}{{>Type/deserializer}}{{/type}}, {{#quoted}}{{wireName}}{{/quoted}}); + op.add({{#extendedByOtherShape}}Abstract{{/extendedByOtherShape}}Builder::{{name}}, {{#type}}{{>Type/deserializer}}{{/type}}, {{#quoted}}{{wireName}}{{/quoted}}); {{/bodyFields}} {{#additionalPropertiesField}} op.setUnknownFieldHandler((builder, name, parser, mapper) -> { diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache index 65bb3b6360..236daf9abb 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache @@ -35,7 +35,7 @@ switch (_kind) { {{#variants}} case {{#pascalCase}}{{name}}{{/pascalCase}}: - return {{#type.queryParamify}}this.{{name}}(){{/type.queryParamify}}; + return {{#type.queryParamify}}this.{{#camelCase}}{{name}}{{/camelCase}}(){{/type.queryParamify}}; {{/variants}} default: throw new IllegalStateException("Unknown kind " + _kind); @@ -56,7 +56,7 @@ * * @throws IllegalStateException if the current variant is not the {@code {{name}}} kind. */ - public {{type}} {{name}}() { + public {{type}} {{#camelCase}}{{name}}{{/camelCase}}() { return {{TYPES.Client.Util.TaggedUnionUtils}}.get(this, Kind.{{#pascalCase}}{{name}}{{/pascalCase}}); } @@ -84,15 +84,15 @@ private Object _value; {{#variants}} - public {{TYPES.Client.Util.ObjectBuilder}}<{{className}}> {{name}}({{type}} v) { + public {{TYPES.Client.Util.ObjectBuilder}}<{{className}}> {{#camelCase}}{{name}}{{/camelCase}}({{type}} v) { this._kind = Kind.{{#pascalCase}}{{name}}{{/pascalCase}}; this._value = v; return this; } {{#type.hasBuilder}} - public {{TYPES.Client.Util.ObjectBuilder}}<{{className}}> {{name}}({{type.builderFnType}} fn) { - return this.{{name}}(fn.apply(new {{type.builderType}}()).build()); + public {{TYPES.Client.Util.ObjectBuilder}}<{{className}}> {{#camelCase}}{{name}}{{/camelCase}}({{type.builderFnType}} fn) { + return this.{{#camelCase}}{{name}}{{/camelCase}}(fn.apply(new {{type.builderType}}()).build()); } {{/type.hasBuilder}}