diff --git a/CHANGELOG.md b/CHANGELOG.md index 03039ea83..1e03014b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Fixed PHP 8.4 deprecations ### Updated APIs +- Updated opensearch-php APIs to reflect [opensearch-api-specification@2395cb4](https://github.com/opensearch-project/opensearch-api-specification/commit/2395cb472ec5581656aac184f7b20548cd5b06ac) - Updated opensearch-php APIs to reflect [opensearch-api-specification@ebe0f8a](https://github.com/opensearch-project/opensearch-api-specification/commit/ebe0f8a885f7db7e882d160c101055a5aa70a707) - Updated opensearch-php APIs to reflect [opensearch-api-specification@398481e](https://github.com/opensearch-project/opensearch-api-specification/commit/398481e5bd1cc590d947c35379c47096f2114f00) - Updated opensearch-php APIs to reflect [opensearch-api-specification@6bb1fed](https://github.com/opensearch-project/opensearch-api-specification/commit/6bb1fed0a2c7cf094a5ecfdb01f0306a4b9f8eba) diff --git a/src/OpenSearch/Client.php b/src/OpenSearch/Client.php index ae6cbb29a..76d27b34a 100644 --- a/src/OpenSearch/Client.php +++ b/src/OpenSearch/Client.php @@ -21,11 +21,9 @@ namespace OpenSearch; -use OpenSearch\Common\Exceptions\BadMethodCallException; -use OpenSearch\Common\Exceptions\NoNodesAvailableException; use OpenSearch\Endpoints\AbstractEndpoint; -use OpenSearch\Namespaces\NamespaceBuilderInterface; use OpenSearch\Namespaces\BooleanRequestWrapper; +use OpenSearch\Namespaces\NamespaceBuilderInterface; use OpenSearch\Namespaces\AsyncSearchNamespace; use OpenSearch\Namespaces\AsynchronousSearchNamespace; use OpenSearch\Namespaces\CatNamespace; @@ -59,7 +57,6 @@ use OpenSearch\Namespaces\TasksNamespace; use OpenSearch\Namespaces\TransformsNamespace; use OpenSearch\Namespaces\WlmNamespace; -use OpenSearch\Traits\DeprecatedPropertyTrait; /** * Class Client @@ -72,6 +69,8 @@ class Client /** * @var Transport + * + * @deprecated in 2.3.2 and will be removed in 3.0.0. */ public $transport; @@ -265,7 +264,7 @@ class Client /** * Client constructor * - * @param \OpenSearch\TransportInterface|\OpenSearch\Transport $transport + * @param TransportInterface|Transport $transport * @param callable|EndpointFactoryInterface $endpointFactory * @param NamespaceBuilderInterface[] $registeredNamespaces */ @@ -726,7 +725,7 @@ public function exists(array $params = []): bool $endpoint->setId($id); $endpoint->setIndex($index); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return BooleanRequestWrapper::sendRequest($endpoint, $this->httpTransport); } /** @@ -765,7 +764,7 @@ public function existsSource(array $params = []): bool $endpoint->setId($id); $endpoint->setIndex($index); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return BooleanRequestWrapper::sendRequest($endpoint, $this->httpTransport); } /** @@ -1222,7 +1221,7 @@ public function ping(array $params = []): bool $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ping::class); $endpoint->setParams($params); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return BooleanRequestWrapper::sendRequest($endpoint, $this->httpTransport); } /** @@ -1322,7 +1321,7 @@ public function reindex(array $params = []) } /** - * Changes the number of requests per second for a particular Reindex operation. + * Changes the number of requests per second for a particular reindex operation. * * $params['task_id'] = (string) Identifier for the task. (Required) * $params['requests_per_second'] = (number) The throttle for this request in sub-requests per second. @@ -1408,7 +1407,6 @@ public function scriptsPainlessExecute(array $params = []) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * $params['filter_path'] = (any) 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 "-". - * $params['body'] = (array) The scroll ID if not passed by URL or query parameter. * * @param array $params Associative array of parameters * @return array @@ -2040,14 +2038,14 @@ protected function getEndpointFactory(): EndpointFactoryInterface * Catchall for registered namespaces * * @return object - * @throws BadMethodCallException if the namespace cannot be found + * @throws \BadMethodCallException if the namespace cannot be found */ public function __call(string $name, array $arguments) { if (isset($this->registeredNamespaces[$name])) { return $this->registeredNamespaces[$name]; } - throw new BadMethodCallException("Namespace [$name] not found"); + throw new \BadMethodCallException("Namespace [$name] not found"); } /** @@ -2070,9 +2068,9 @@ public function extractArgument(array &$params, string $arg) } /** - * Sends a raw request to the cluster - * @return array|string|null - * @throws \Exception + * Send a raw request to the cluster. + * + * @throws \Psr\Http\Client\ClientExceptionInterface */ public function request(string $method, string $uri, array $attributes = []): array|string|null { @@ -2084,23 +2082,19 @@ public function request(string $method, string $uri, array $attributes = []): ar } /** - * Sends a request for the given endpoint. - * - * @param \OpenSearch\Endpoints\AbstractEndpoint $endpoint + * Send a request for an endpoint. * - * @return array|string|null - * - * @throws \Exception + * @throws \Psr\Http\Client\ClientExceptionInterface */ private function performRequest(AbstractEndpoint $endpoint): array|string|null { - $options = $endpoint->getOptions(); return $this->httpTransport->sendRequest( $endpoint->getMethod(), $endpoint->getURI(), $endpoint->getParams(), $endpoint->getBody(), - $options['headers'] ?? [] + $endpoint->getOptions() ); } + } diff --git a/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php b/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php index 1d3e4372d..c0f8bc1f9 100644 --- a/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php +++ b/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php @@ -49,7 +49,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Bulk.php b/src/OpenSearch/Endpoints/Bulk.php index 65b2c16fe..6f01cb1f2 100644 --- a/src/OpenSearch/Endpoints/Bulk.php +++ b/src/OpenSearch/Endpoints/Bulk.php @@ -70,23 +70,25 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody(string|iterable|null $body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } - if (is_array($body) === true || $body instanceof Traversable) { - foreach ($body as $item) { - $this->body .= $this->serializer->serialize($item) . "\n"; + + if (is_string($body)) { + if (!str_ends_with($body, "\n")) { + $body .= "\n"; } - } elseif (is_string($body)) { $this->body = $body; - if (substr($body, -1) != "\n") { - $this->body .= "\n"; - } - } else { - throw new InvalidArgumentException("Body must be an array, traversable object or string"); + return $this; } + + // Must be an iterable. + foreach ($body as $item) { + $this->body .= $this->serializer->serialize($item) . "\n"; + } + return $this; } diff --git a/src/OpenSearch/Endpoints/BulkStream.php b/src/OpenSearch/Endpoints/BulkStream.php index daa7c7210..4759e2a01 100644 --- a/src/OpenSearch/Endpoints/BulkStream.php +++ b/src/OpenSearch/Endpoints/BulkStream.php @@ -66,23 +66,25 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody(string|iterable|null $body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } - if (is_array($body) === true || $body instanceof Traversable) { - foreach ($body as $item) { - $this->body .= $this->serializer->serialize($item) . "\n"; + + if (is_string($body)) { + if (!str_ends_with($body, "\n")) { + $body .= "\n"; } - } elseif (is_string($body)) { $this->body = $body; - if (substr($body, -1) != "\n") { - $this->body .= "\n"; - } - } else { - throw new InvalidArgumentException("Body must be an array, traversable object or string"); + return $this; } + + // Must be an iterable. + foreach ($body as $item) { + $this->body .= $this->serializer->serialize($item) . "\n"; + } + return $this; } diff --git a/src/OpenSearch/Endpoints/Cat/PitSegments.php b/src/OpenSearch/Endpoints/Cat/PitSegments.php index f8aa23f85..c4646ff01 100644 --- a/src/OpenSearch/Endpoints/Cat/PitSegments.php +++ b/src/OpenSearch/Endpoints/Cat/PitSegments.php @@ -51,7 +51,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Cat/Templates.php b/src/OpenSearch/Endpoints/Cat/Templates.php index 116c05f6f..563f4c494 100644 --- a/src/OpenSearch/Endpoints/Cat/Templates.php +++ b/src/OpenSearch/Endpoints/Cat/Templates.php @@ -65,7 +65,7 @@ public function getMethod(): string public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/ClearScroll.php b/src/OpenSearch/Endpoints/ClearScroll.php index e00ae70ad..93ea6faf0 100644 --- a/src/OpenSearch/Endpoints/ClearScroll.php +++ b/src/OpenSearch/Endpoints/ClearScroll.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php b/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php index 0605f258c..c25d7f885 100644 --- a/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php +++ b/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php @@ -53,7 +53,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php index 09dbd0567..f146f3ab4 100644 --- a/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php b/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php index a91cb5315..e98df5618 100644 --- a/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php +++ b/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php index 84ab41734..a3daa82d7 100644 --- a/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php index 0d4905178..2c2f79b72 100644 --- a/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php @@ -43,6 +43,7 @@ public function getParamWhitelist(): array { return [ 'cluster_manager_timeout', + 'flat_settings', 'local', 'master_timeout', 'pretty', diff --git a/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php b/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php index 4b0569b28..487c46624 100644 --- a/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php +++ b/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setAwarenessAttributeName($awareness_attribute_name): static { - if (isset($awareness_attribute_name) !== true) { + if (is_null($awareness_attribute_name)) { return $this; } $this->awareness_attribute_name = $awareness_attribute_name; diff --git a/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php b/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php index dd42bd43c..4252925c8 100644 --- a/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php +++ b/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setAttribute($attribute): static { - if (isset($attribute) !== true) { + if (is_null($attribute)) { return $this; } $this->attribute = $attribute; diff --git a/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php index 86a698162..3a31ac1a8 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php @@ -62,7 +62,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -72,7 +72,7 @@ public function setBody($body): static public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php b/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php index 713856003..763ad48b2 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php +++ b/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setAwarenessAttributeName($awareness_attribute_name): static { - if (isset($awareness_attribute_name) !== true) { + if (is_null($awareness_attribute_name)) { return $this; } $this->awareness_attribute_name = $awareness_attribute_name; @@ -64,7 +64,7 @@ public function setAwarenessAttributeName($awareness_attribute_name): static public function setAwarenessAttributeValue($awareness_attribute_value): static { - if (isset($awareness_attribute_value) !== true) { + if (is_null($awareness_attribute_value)) { return $this; } $this->awareness_attribute_value = $awareness_attribute_value; diff --git a/src/OpenSearch/Endpoints/Cluster/PutSettings.php b/src/OpenSearch/Endpoints/Cluster/PutSettings.php index adc67a564..5d435ad1e 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutSettings.php +++ b/src/OpenSearch/Endpoints/Cluster/PutSettings.php @@ -55,7 +55,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php b/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php index 4c707f665..bdacd829c 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php +++ b/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -62,7 +62,7 @@ public function setBody($body): static public function setAttribute($attribute): static { - if (isset($attribute) !== true) { + if (is_null($attribute)) { return $this; } $this->attribute = $attribute; diff --git a/src/OpenSearch/Endpoints/Cluster/Reroute.php b/src/OpenSearch/Endpoints/Cluster/Reroute.php index 522469177..ef6bcd283 100644 --- a/src/OpenSearch/Endpoints/Cluster/Reroute.php +++ b/src/OpenSearch/Endpoints/Cluster/Reroute.php @@ -58,7 +58,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Count.php b/src/OpenSearch/Endpoints/Count.php index b83201db1..b26c4bfe1 100644 --- a/src/OpenSearch/Endpoints/Count.php +++ b/src/OpenSearch/Endpoints/Count.php @@ -69,7 +69,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Create.php b/src/OpenSearch/Endpoints/Create.php index 28dac6add..ad920fcd1 100644 --- a/src/OpenSearch/Endpoints/Create.php +++ b/src/OpenSearch/Endpoints/Create.php @@ -71,7 +71,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php b/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php index 7e9a82c7d..36823fd29 100644 --- a/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php +++ b/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php @@ -62,7 +62,7 @@ public function getMethod(): string public function setIndexUuid($index_uuid): static { - if (isset($index_uuid) !== true) { + if (is_null($index_uuid)) { return $this; } $this->index_uuid = $index_uuid; diff --git a/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php b/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php index 595507962..245526638 100644 --- a/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php +++ b/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php @@ -62,7 +62,7 @@ public function getMethod(): string public function setIndexUuid($index_uuid): static { - if (isset($index_uuid) !== true) { + if (is_null($index_uuid)) { return $this; } $this->index_uuid = $index_uuid; diff --git a/src/OpenSearch/Endpoints/DeleteByQuery.php b/src/OpenSearch/Endpoints/DeleteByQuery.php index f01f07cf7..d97e1d427 100644 --- a/src/OpenSearch/Endpoints/DeleteByQuery.php +++ b/src/OpenSearch/Endpoints/DeleteByQuery.php @@ -91,7 +91,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php b/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php index 05a53021b..c2f597941 100644 --- a/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php +++ b/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setTaskId($task_id): static { - if (isset($task_id) !== true) { + if (is_null($task_id)) { return $this; } $this->task_id = $task_id; diff --git a/src/OpenSearch/Endpoints/DeletePit.php b/src/OpenSearch/Endpoints/DeletePit.php index eca440196..5c629554f 100644 --- a/src/OpenSearch/Endpoints/DeletePit.php +++ b/src/OpenSearch/Endpoints/DeletePit.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Explain.php b/src/OpenSearch/Endpoints/Explain.php index 9241ef835..a19f18ce4 100644 --- a/src/OpenSearch/Endpoints/Explain.php +++ b/src/OpenSearch/Endpoints/Explain.php @@ -76,7 +76,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/FieldCaps.php b/src/OpenSearch/Endpoints/FieldCaps.php index d6f22027a..92d830ee0 100644 --- a/src/OpenSearch/Endpoints/FieldCaps.php +++ b/src/OpenSearch/Endpoints/FieldCaps.php @@ -60,7 +60,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Create.php b/src/OpenSearch/Endpoints/FlowFramework/Create.php index 60fbac848..f4f037ea4 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Create.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Create.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Delete.php b/src/OpenSearch/Endpoints/FlowFramework/Delete.php index c1a75384e..4dd4d0c3e 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Delete.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Delete.php @@ -53,7 +53,7 @@ public function getMethod(): string public function setWorkflowId($workflow_id): static { - if (isset($workflow_id) !== true) { + if (is_null($workflow_id)) { return $this; } $this->workflow_id = $workflow_id; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php b/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php index c9ef2db18..f8acb704e 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php @@ -53,7 +53,7 @@ public function getMethod(): string public function setWorkflowId($workflow_id): static { - if (isset($workflow_id) !== true) { + if (is_null($workflow_id)) { return $this; } $this->workflow_id = $workflow_id; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Get.php b/src/OpenSearch/Endpoints/FlowFramework/Get.php index 09226a2fa..96d43622e 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Get.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Get.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setWorkflowId($workflow_id): static { - if (isset($workflow_id) !== true) { + if (is_null($workflow_id)) { return $this; } $this->workflow_id = $workflow_id; diff --git a/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php b/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php index 9576306f7..6d17ab7d0 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php +++ b/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php @@ -53,7 +53,7 @@ public function getMethod(): string public function setWorkflowId($workflow_id): static { - if (isset($workflow_id) !== true) { + if (is_null($workflow_id)) { return $this; } $this->workflow_id = $workflow_id; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Provision.php b/src/OpenSearch/Endpoints/FlowFramework/Provision.php index 9ee121c8f..27c851386 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Provision.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Provision.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -62,7 +62,7 @@ public function setBody($body): static public function setWorkflowId($workflow_id): static { - if (isset($workflow_id) !== true) { + if (is_null($workflow_id)) { return $this; } $this->workflow_id = $workflow_id; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Search.php b/src/OpenSearch/Endpoints/FlowFramework/Search.php index 353287d89..b4f6b998c 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Search.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Search.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/FlowFramework/SearchState.php b/src/OpenSearch/Endpoints/FlowFramework/SearchState.php index d1ee9c7e3..e6d0b813d 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/SearchState.php +++ b/src/OpenSearch/Endpoints/FlowFramework/SearchState.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Update.php b/src/OpenSearch/Endpoints/FlowFramework/Update.php index 73fa0e123..16233f8bf 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Update.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Update.php @@ -57,7 +57,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -67,7 +67,7 @@ public function setBody($body): static public function setWorkflowId($workflow_id): static { - if (isset($workflow_id) !== true) { + if (is_null($workflow_id)) { return $this; } $this->workflow_id = $workflow_id; diff --git a/src/OpenSearch/Endpoints/Index.php b/src/OpenSearch/Endpoints/Index.php index 48ad123c7..fd2d9cf40 100644 --- a/src/OpenSearch/Endpoints/Index.php +++ b/src/OpenSearch/Endpoints/Index.php @@ -73,7 +73,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Indices/AddBlock.php b/src/OpenSearch/Endpoints/Indices/AddBlock.php index 867c07886..e797fd353 100644 --- a/src/OpenSearch/Endpoints/Indices/AddBlock.php +++ b/src/OpenSearch/Endpoints/Indices/AddBlock.php @@ -65,7 +65,7 @@ public function getMethod(): string public function setBlock($block): static { - if (isset($block) !== true) { + if (is_null($block)) { return $this; } $this->block = $block; diff --git a/src/OpenSearch/Endpoints/Indices/Analyze.php b/src/OpenSearch/Endpoints/Indices/Analyze.php index 63f6612a4..1325039c6 100644 --- a/src/OpenSearch/Endpoints/Indices/Analyze.php +++ b/src/OpenSearch/Endpoints/Indices/Analyze.php @@ -56,7 +56,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Indices/CloneIndices.php b/src/OpenSearch/Endpoints/Indices/CloneIndices.php index dd92e5344..8717637f9 100644 --- a/src/OpenSearch/Endpoints/Indices/CloneIndices.php +++ b/src/OpenSearch/Endpoints/Indices/CloneIndices.php @@ -65,7 +65,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -75,7 +75,7 @@ public function setBody($body): static public function setTarget($target): static { - if (isset($target) !== true) { + if (is_null($target)) { return $this; } $this->target = $target; diff --git a/src/OpenSearch/Endpoints/Indices/Create.php b/src/OpenSearch/Endpoints/Indices/Create.php index e0336b805..3bcdafd53 100644 --- a/src/OpenSearch/Endpoints/Indices/Create.php +++ b/src/OpenSearch/Endpoints/Indices/Create.php @@ -60,7 +60,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Indices/CreateDataStream.php b/src/OpenSearch/Endpoints/Indices/CreateDataStream.php index 97a98880a..3440922ce 100644 --- a/src/OpenSearch/Endpoints/Indices/CreateDataStream.php +++ b/src/OpenSearch/Endpoints/Indices/CreateDataStream.php @@ -58,7 +58,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -68,7 +68,7 @@ public function setBody($body): static public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php index a4013a1e1..7f3c0ccc8 100644 --- a/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php b/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php index f1137aa0a..9f322665b 100644 --- a/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php index e2a57d272..43b26f255 100644 --- a/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php @@ -62,7 +62,7 @@ public function getMethod(): string public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Indices/PutAlias.php b/src/OpenSearch/Endpoints/Indices/PutAlias.php index eeb8bd5c7..c50586f3e 100644 --- a/src/OpenSearch/Endpoints/Indices/PutAlias.php +++ b/src/OpenSearch/Endpoints/Indices/PutAlias.php @@ -67,7 +67,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -77,7 +77,7 @@ public function setBody($body): static public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php index f263c7f7f..ed18f13a2 100644 --- a/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php @@ -62,7 +62,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -72,7 +72,7 @@ public function setBody($body): static public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Indices/PutMapping.php b/src/OpenSearch/Endpoints/Indices/PutMapping.php index b3f636260..0a107bdeb 100644 --- a/src/OpenSearch/Endpoints/Indices/PutMapping.php +++ b/src/OpenSearch/Endpoints/Indices/PutMapping.php @@ -63,7 +63,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Indices/PutSettings.php b/src/OpenSearch/Endpoints/Indices/PutSettings.php index 0f66696c0..c927c63fe 100644 --- a/src/OpenSearch/Endpoints/Indices/PutSettings.php +++ b/src/OpenSearch/Endpoints/Indices/PutSettings.php @@ -63,7 +63,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Indices/PutTemplate.php b/src/OpenSearch/Endpoints/Indices/PutTemplate.php index 666d67b38..e3253583f 100644 --- a/src/OpenSearch/Endpoints/Indices/PutTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/PutTemplate.php @@ -62,7 +62,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -72,7 +72,7 @@ public function setBody($body): static public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Indices/Rollover.php b/src/OpenSearch/Endpoints/Indices/Rollover.php index 18c1519b6..cb23f4fa2 100644 --- a/src/OpenSearch/Endpoints/Indices/Rollover.php +++ b/src/OpenSearch/Endpoints/Indices/Rollover.php @@ -70,7 +70,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -80,7 +80,7 @@ public function setBody($body): static public function setAlias($alias): static { - if (isset($alias) !== true) { + if (is_null($alias)) { return $this; } $this->alias = $alias; @@ -90,7 +90,7 @@ public function setAlias($alias): static public function setNewIndex($new_index): static { - if (isset($new_index) !== true) { + if (is_null($new_index)) { return $this; } $this->new_index = $new_index; diff --git a/src/OpenSearch/Endpoints/Indices/Shrink.php b/src/OpenSearch/Endpoints/Indices/Shrink.php index c271712bf..f1607bb6d 100644 --- a/src/OpenSearch/Endpoints/Indices/Shrink.php +++ b/src/OpenSearch/Endpoints/Indices/Shrink.php @@ -66,7 +66,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -76,7 +76,7 @@ public function setBody($body): static public function setTarget($target): static { - if (isset($target) !== true) { + if (is_null($target)) { return $this; } $this->target = $target; diff --git a/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php index fcbff55a9..1b5a7af76 100644 --- a/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -70,7 +70,7 @@ public function setBody($body): static public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php b/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php index 16ec3a9da..578e388fa 100644 --- a/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -71,7 +71,7 @@ public function setBody($body): static public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Indices/Split.php b/src/OpenSearch/Endpoints/Indices/Split.php index 3fff81d37..366a68071 100644 --- a/src/OpenSearch/Endpoints/Indices/Split.php +++ b/src/OpenSearch/Endpoints/Indices/Split.php @@ -66,7 +66,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -76,7 +76,7 @@ public function setBody($body): static public function setTarget($target): static { - if (isset($target) !== true) { + if (is_null($target)) { return $this; } $this->target = $target; diff --git a/src/OpenSearch/Endpoints/Indices/UpdateAliases.php b/src/OpenSearch/Endpoints/Indices/UpdateAliases.php index d7dcbb9f8..dc20cc23b 100644 --- a/src/OpenSearch/Endpoints/Indices/UpdateAliases.php +++ b/src/OpenSearch/Endpoints/Indices/UpdateAliases.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Indices/Upgrade.php b/src/OpenSearch/Endpoints/Indices/Upgrade.php index 239c1e4bf..3d6ae2898 100644 --- a/src/OpenSearch/Endpoints/Indices/Upgrade.php +++ b/src/OpenSearch/Endpoints/Indices/Upgrade.php @@ -57,14 +57,4 @@ public function getMethod(): string { return 'POST'; } - - public function setBody($body): static - { - if (isset($body) !== true) { - return $this; - } - $this->body = $body; - - return $this; - } } diff --git a/src/OpenSearch/Endpoints/Indices/ValidateQuery.php b/src/OpenSearch/Endpoints/Indices/ValidateQuery.php index 008bebfe5..ad3e643fb 100644 --- a/src/OpenSearch/Endpoints/Indices/ValidateQuery.php +++ b/src/OpenSearch/Endpoints/Indices/ValidateQuery.php @@ -67,7 +67,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ingest/PutPipeline.php b/src/OpenSearch/Endpoints/Ingest/PutPipeline.php index 1a4cef432..f3fa18adb 100644 --- a/src/OpenSearch/Endpoints/Ingest/PutPipeline.php +++ b/src/OpenSearch/Endpoints/Ingest/PutPipeline.php @@ -59,7 +59,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ingest/Simulate.php b/src/OpenSearch/Endpoints/Ingest/Simulate.php index 44e3ba9d2..9a774025a 100644 --- a/src/OpenSearch/Endpoints/Ingest/Simulate.php +++ b/src/OpenSearch/Endpoints/Ingest/Simulate.php @@ -56,7 +56,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ism/AddPolicy.php b/src/OpenSearch/Endpoints/Ism/AddPolicy.php index 045768abe..b31e06b6a 100644 --- a/src/OpenSearch/Endpoints/Ism/AddPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/AddPolicy.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ism/ChangePolicy.php b/src/OpenSearch/Endpoints/Ism/ChangePolicy.php index 49dbb9d23..5424573bc 100644 --- a/src/OpenSearch/Endpoints/Ism/ChangePolicy.php +++ b/src/OpenSearch/Endpoints/Ism/ChangePolicy.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ism/DeletePolicy.php b/src/OpenSearch/Endpoints/Ism/DeletePolicy.php index a30b2a258..a12e44a35 100644 --- a/src/OpenSearch/Endpoints/Ism/DeletePolicy.php +++ b/src/OpenSearch/Endpoints/Ism/DeletePolicy.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setPolicyId($policy_id): static { - if (isset($policy_id) !== true) { + if (is_null($policy_id)) { return $this; } $this->policy_id = $policy_id; diff --git a/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php b/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php index 55ea59b58..1f56fea13 100644 --- a/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setPolicyId($policy_id): static { - if (isset($policy_id) !== true) { + if (is_null($policy_id)) { return $this; } $this->policy_id = $policy_id; diff --git a/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php b/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php index 35236df6b..bc9680773 100644 --- a/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php @@ -49,7 +49,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ism/GetPolicy.php b/src/OpenSearch/Endpoints/Ism/GetPolicy.php index 469dc7758..06e3066c4 100644 --- a/src/OpenSearch/Endpoints/Ism/GetPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/GetPolicy.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setPolicyId($policy_id): static { - if (isset($policy_id) !== true) { + if (is_null($policy_id)) { return $this; } $this->policy_id = $policy_id; diff --git a/src/OpenSearch/Endpoints/Ism/PutPolicies.php b/src/OpenSearch/Endpoints/Ism/PutPolicies.php index 5148d8811..09ec3cd92 100644 --- a/src/OpenSearch/Endpoints/Ism/PutPolicies.php +++ b/src/OpenSearch/Endpoints/Ism/PutPolicies.php @@ -48,7 +48,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ism/PutPolicy.php b/src/OpenSearch/Endpoints/Ism/PutPolicy.php index e93b289b3..39c81b32e 100644 --- a/src/OpenSearch/Endpoints/Ism/PutPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/PutPolicy.php @@ -56,7 +56,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -66,7 +66,7 @@ public function setBody($body): static public function setPolicyId($policy_id): static { - if (isset($policy_id) !== true) { + if (is_null($policy_id)) { return $this; } $this->policy_id = $policy_id; diff --git a/src/OpenSearch/Endpoints/Ism/RetryIndex.php b/src/OpenSearch/Endpoints/Ism/RetryIndex.php index 1056aab5e..8744420a4 100644 --- a/src/OpenSearch/Endpoints/Ism/RetryIndex.php +++ b/src/OpenSearch/Endpoints/Ism/RetryIndex.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Knn/DeleteModel.php b/src/OpenSearch/Endpoints/Knn/DeleteModel.php index f650a5751..81069be46 100644 --- a/src/OpenSearch/Endpoints/Knn/DeleteModel.php +++ b/src/OpenSearch/Endpoints/Knn/DeleteModel.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setModelId($model_id): static { - if (isset($model_id) !== true) { + if (is_null($model_id)) { return $this; } $this->model_id = $model_id; diff --git a/src/OpenSearch/Endpoints/Knn/GetModel.php b/src/OpenSearch/Endpoints/Knn/GetModel.php index 410d884b1..1ea80d2d8 100644 --- a/src/OpenSearch/Endpoints/Knn/GetModel.php +++ b/src/OpenSearch/Endpoints/Knn/GetModel.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setModelId($model_id): static { - if (isset($model_id) !== true) { + if (is_null($model_id)) { return $this; } $this->model_id = $model_id; diff --git a/src/OpenSearch/Endpoints/Knn/SearchModels.php b/src/OpenSearch/Endpoints/Knn/SearchModels.php index cd25afc58..a190a8294 100644 --- a/src/OpenSearch/Endpoints/Knn/SearchModels.php +++ b/src/OpenSearch/Endpoints/Knn/SearchModels.php @@ -87,7 +87,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Knn/TrainModel.php b/src/OpenSearch/Endpoints/Knn/TrainModel.php index cf4cbc3b1..95908b1de 100644 --- a/src/OpenSearch/Endpoints/Knn/TrainModel.php +++ b/src/OpenSearch/Endpoints/Knn/TrainModel.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -62,7 +62,7 @@ public function setBody($body): static public function setModelId($model_id): static { - if (isset($model_id) !== true) { + if (is_null($model_id)) { return $this; } $this->model_id = $model_id; diff --git a/src/OpenSearch/Endpoints/MTermVectors.php b/src/OpenSearch/Endpoints/MTermVectors.php index f76e08807..79190b17a 100644 --- a/src/OpenSearch/Endpoints/MTermVectors.php +++ b/src/OpenSearch/Endpoints/MTermVectors.php @@ -67,7 +67,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Mget.php b/src/OpenSearch/Endpoints/Mget.php index edd7682f9..652bba7cc 100644 --- a/src/OpenSearch/Endpoints/Mget.php +++ b/src/OpenSearch/Endpoints/Mget.php @@ -63,7 +63,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ml/CreateConnector.php b/src/OpenSearch/Endpoints/Ml/CreateConnector.php index 887bf9872..b7b8a46f2 100644 --- a/src/OpenSearch/Endpoints/Ml/CreateConnector.php +++ b/src/OpenSearch/Endpoints/Ml/CreateConnector.php @@ -43,7 +43,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ml/CreateMemory.php b/src/OpenSearch/Endpoints/Ml/CreateMemory.php new file mode 100644 index 000000000..8f1086662 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/CreateMemory.php @@ -0,0 +1,55 @@ +body = $body; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/CreateMessage.php b/src/OpenSearch/Endpoints/Ml/CreateMessage.php new file mode 100644 index 000000000..11d9dd6fc --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/CreateMessage.php @@ -0,0 +1,72 @@ +memory_id ?? null; + if (isset($memory_id)) { + return "/_plugins/_ml/memory/$memory_id/messages"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.create_message'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setMemoryId($memory_id): static + { + if (is_null($memory_id)) { + return $this; + } + $this->memory_id = $memory_id; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/DeleteAgent.php b/src/OpenSearch/Endpoints/Ml/DeleteAgent.php index fb8c46560..12a832141 100644 --- a/src/OpenSearch/Endpoints/Ml/DeleteAgent.php +++ b/src/OpenSearch/Endpoints/Ml/DeleteAgent.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setAgentId($agent_id): static { - if (isset($agent_id) !== true) { + if (is_null($agent_id)) { return $this; } $this->agent_id = $agent_id; diff --git a/src/OpenSearch/Endpoints/Ml/DeleteConnector.php b/src/OpenSearch/Endpoints/Ml/DeleteConnector.php index 6c28dd276..500060937 100644 --- a/src/OpenSearch/Endpoints/Ml/DeleteConnector.php +++ b/src/OpenSearch/Endpoints/Ml/DeleteConnector.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setConnectorId($connector_id): static { - if (isset($connector_id) !== true) { + if (is_null($connector_id)) { return $this; } $this->connector_id = $connector_id; diff --git a/src/OpenSearch/Endpoints/Ml/DeleteMemory.php b/src/OpenSearch/Endpoints/Ml/DeleteMemory.php new file mode 100644 index 000000000..5ff1ff133 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/DeleteMemory.php @@ -0,0 +1,62 @@ +memory_id ?? null; + if (isset($memory_id)) { + return "/_plugins/_ml/memory/$memory_id"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.delete_memory'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setMemoryId($memory_id): static + { + if (is_null($memory_id)) { + return $this; + } + $this->memory_id = $memory_id; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/DeleteTask.php b/src/OpenSearch/Endpoints/Ml/DeleteTask.php index cbff3d87a..3d71256cf 100644 --- a/src/OpenSearch/Endpoints/Ml/DeleteTask.php +++ b/src/OpenSearch/Endpoints/Ml/DeleteTask.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setTaskId($task_id): static { - if (isset($task_id) !== true) { + if (is_null($task_id)) { return $this; } $this->task_id = $task_id; diff --git a/src/OpenSearch/Endpoints/Ml/DeployModel.php b/src/OpenSearch/Endpoints/Ml/DeployModel.php index e69da6946..51fc67acd 100644 --- a/src/OpenSearch/Endpoints/Ml/DeployModel.php +++ b/src/OpenSearch/Endpoints/Ml/DeployModel.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setModelId($model_id): static { - if (isset($model_id) !== true) { + if (is_null($model_id)) { return $this; } $this->model_id = $model_id; diff --git a/src/OpenSearch/Endpoints/Ml/GetConnector.php b/src/OpenSearch/Endpoints/Ml/GetConnector.php index 9a612a639..ac9d1aba0 100644 --- a/src/OpenSearch/Endpoints/Ml/GetConnector.php +++ b/src/OpenSearch/Endpoints/Ml/GetConnector.php @@ -16,36 +16,45 @@ use OpenSearch\Common\Exceptions\RuntimeException; use OpenSearch\Endpoints\AbstractEndpoint; +/** + * NOTE: This file is autogenerated using util/GenerateEndpoints.php + */ class GetConnector extends AbstractEndpoint { - /** - * @return string[] - */ - public function getParamWhitelist(): array - { - return []; - } + protected $connector_id; - /** - * @return string - */ public function getURI(): string { - if ($this->id) { - return "/_plugins/_ml/connectors/$this->id"; + $connector_id = $this->connector_id ?? null; + if (isset($connector_id)) { + return "/_plugins/_ml/connectors/$connector_id"; } + throw new RuntimeException('Missing parameter for the endpoint ml.get_connector'); + } - throw new RuntimeException( - 'id is required for get' - ); - + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; } - /** - * @return string - */ public function getMethod(): string { return 'GET'; } + + public function setConnectorId($connector_id): static + { + if (is_null($connector_id)) { + return $this; + } + $this->connector_id = $connector_id; + + return $this; + } } diff --git a/src/OpenSearch/Endpoints/Ml/GetMemory.php b/src/OpenSearch/Endpoints/Ml/GetMemory.php new file mode 100644 index 000000000..7fe40ef8a --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/GetMemory.php @@ -0,0 +1,71 @@ +memory_id ?? null; + if (isset($memory_id)) { + return "/_plugins/_ml/memory/$memory_id"; + } + return "/_plugins/_ml/memory"; + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setMemoryId($memory_id): static + { + if (is_null($memory_id)) { + return $this; + } + $this->memory_id = $memory_id; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/GetMessage.php b/src/OpenSearch/Endpoints/Ml/GetMessage.php new file mode 100644 index 000000000..d3b2a4ff5 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/GetMessage.php @@ -0,0 +1,77 @@ +memory_id ?? null; + $message_id = $this->message_id ?? null; + if (isset($memory_id)) { + return "/_plugins/_ml/memory/$memory_id/messages"; + } + if (isset($message_id)) { + return "/_plugins/_ml/memory/message/$message_id"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.get_message'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setMemoryId($memory_id): static + { + if (is_null($memory_id)) { + return $this; + } + $this->memory_id = $memory_id; + + return $this; + } + + public function setMessageId($message_id): static + { + if (is_null($message_id)) { + return $this; + } + $this->message_id = $message_id; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/GetMessageTraces.php b/src/OpenSearch/Endpoints/Ml/GetMessageTraces.php new file mode 100644 index 000000000..5698cb473 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/GetMessageTraces.php @@ -0,0 +1,62 @@ +message_id ?? null; + if (isset($message_id)) { + return "/_plugins/_ml/memory/message/$message_id/traces"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.get_message_traces'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setMessageId($message_id): static + { + if (is_null($message_id)) { + return $this; + } + $this->message_id = $message_id; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/GetModelGroup.php b/src/OpenSearch/Endpoints/Ml/GetModelGroup.php index 989f9ae23..9a0ddbec2 100644 --- a/src/OpenSearch/Endpoints/Ml/GetModelGroup.php +++ b/src/OpenSearch/Endpoints/Ml/GetModelGroup.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setModelGroupId($model_group_id): static { - if (isset($model_group_id) !== true) { + if (is_null($model_group_id)) { return $this; } $this->model_group_id = $model_group_id; diff --git a/src/OpenSearch/Endpoints/Ml/Predict.php b/src/OpenSearch/Endpoints/Ml/Predict.php index 034905f52..b9ce4e0b1 100644 --- a/src/OpenSearch/Endpoints/Ml/Predict.php +++ b/src/OpenSearch/Endpoints/Ml/Predict.php @@ -16,36 +16,67 @@ use OpenSearch\Common\Exceptions\RuntimeException; use OpenSearch\Endpoints\AbstractEndpoint; +/** + * NOTE: This file is autogenerated using util/GenerateEndpoints.php + */ class Predict extends AbstractEndpoint { - /** - * @return string[] - */ + protected $algorithm_name; + protected $model_id; + + public function getURI(): string + { + $algorithm_name = $this->algorithm_name ?? null; + $model_id = $this->model_id ?? null; + if (isset($algorithm_name) && isset($model_id)) { + return "/_plugins/_ml/_predict/$algorithm_name/$model_id"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.predict'); + } + public function getParamWhitelist(): array { - return []; + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; } - /** - * @return string - */ - public function getURI(): string + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): static { - if ($this->id) { - return "/_plugins/_ml/models/$this->id/_predict"; + if (is_null($body)) { + return $this; } + $this->body = $body; - throw new RuntimeException( - 'id is required for predict' - ); + return $this; + } + public function setAlgorithmName($algorithm_name): static + { + if (is_null($algorithm_name)) { + return $this; + } + $this->algorithm_name = $algorithm_name; + + return $this; } - /** - * @return string - */ - public function getMethod(): string + public function setModelId($model_id): static { - return 'POST'; + if (is_null($model_id)) { + return $this; + } + $this->model_id = $model_id; + + return $this; } } diff --git a/src/OpenSearch/Endpoints/Ml/RegisterAgents.php b/src/OpenSearch/Endpoints/Ml/RegisterAgents.php index 11051da16..cbfa9087e 100644 --- a/src/OpenSearch/Endpoints/Ml/RegisterAgents.php +++ b/src/OpenSearch/Endpoints/Ml/RegisterAgents.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ml/RegisterModel.php b/src/OpenSearch/Endpoints/Ml/RegisterModel.php index 49824326a..1cb23111d 100644 --- a/src/OpenSearch/Endpoints/Ml/RegisterModel.php +++ b/src/OpenSearch/Endpoints/Ml/RegisterModel.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php b/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php index ff4943eca..6058edecf 100644 --- a/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php +++ b/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ml/SearchConnectors.php b/src/OpenSearch/Endpoints/Ml/SearchConnectors.php new file mode 100644 index 000000000..b03ccf7c3 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/SearchConnectors.php @@ -0,0 +1,55 @@ +body) ? 'POST' : 'GET'; + } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/SearchMemory.php b/src/OpenSearch/Endpoints/Ml/SearchMemory.php new file mode 100644 index 000000000..938b7ed4b --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/SearchMemory.php @@ -0,0 +1,55 @@ +body) ? 'POST' : 'GET'; + } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/SearchMessage.php b/src/OpenSearch/Endpoints/Ml/SearchMessage.php new file mode 100644 index 000000000..101cf4862 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/SearchMessage.php @@ -0,0 +1,72 @@ +memory_id ?? null; + if (isset($memory_id)) { + return "/_plugins/_ml/memory/$memory_id/_search"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.search_message'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setMemoryId($memory_id): static + { + if (is_null($memory_id)) { + return $this; + } + $this->memory_id = $memory_id; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/SearchModelGroup.php b/src/OpenSearch/Endpoints/Ml/SearchModelGroup.php new file mode 100644 index 000000000..68d8feca2 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/SearchModelGroup.php @@ -0,0 +1,55 @@ +body) ? 'POST' : 'GET'; + } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/SearchModels.php b/src/OpenSearch/Endpoints/Ml/SearchModels.php index 84512e7c5..25d7e06b4 100644 --- a/src/OpenSearch/Endpoints/Ml/SearchModels.php +++ b/src/OpenSearch/Endpoints/Ml/SearchModels.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ml/Train.php b/src/OpenSearch/Endpoints/Ml/Train.php new file mode 100644 index 000000000..6273ac4df --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/Train.php @@ -0,0 +1,72 @@ +algorithm_name ?? null; + if (isset($algorithm_name)) { + return "/_plugins/_ml/_train/$algorithm_name"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.train'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setAlgorithmName($algorithm_name): static + { + if (is_null($algorithm_name)) { + return $this; + } + $this->algorithm_name = $algorithm_name; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/TrainPredict.php b/src/OpenSearch/Endpoints/Ml/TrainPredict.php new file mode 100644 index 000000000..6c289bd28 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/TrainPredict.php @@ -0,0 +1,72 @@ +algorithm_name ?? null; + if (isset($algorithm_name)) { + return "/_plugins/_ml/_train_predict/$algorithm_name"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.train_predict'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setAlgorithmName($algorithm_name): static + { + if (is_null($algorithm_name)) { + return $this; + } + $this->algorithm_name = $algorithm_name; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/UndeployModel.php b/src/OpenSearch/Endpoints/Ml/UndeployModel.php index 3aff2bad8..313dba614 100644 --- a/src/OpenSearch/Endpoints/Ml/UndeployModel.php +++ b/src/OpenSearch/Endpoints/Ml/UndeployModel.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setModelId($model_id): static { - if (isset($model_id) !== true) { + if (is_null($model_id)) { return $this; } $this->model_id = $model_id; diff --git a/src/OpenSearch/Endpoints/Ml/UpdateConnector.php b/src/OpenSearch/Endpoints/Ml/UpdateConnector.php new file mode 100644 index 000000000..ee530b8b7 --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/UpdateConnector.php @@ -0,0 +1,72 @@ +connector_id ?? null; + if (isset($connector_id)) { + return "/_plugins/_ml/connectors/$connector_id"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.update_connector'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setConnectorId($connector_id): static + { + if (is_null($connector_id)) { + return $this; + } + $this->connector_id = $connector_id; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/UpdateMemory.php b/src/OpenSearch/Endpoints/Ml/UpdateMemory.php new file mode 100644 index 000000000..a87d0f36f --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/UpdateMemory.php @@ -0,0 +1,72 @@ +memory_id ?? null; + if (isset($memory_id)) { + return "/_plugins/_ml/memory/$memory_id"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.update_memory'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setMemoryId($memory_id): static + { + if (is_null($memory_id)) { + return $this; + } + $this->memory_id = $memory_id; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/UpdateMessage.php b/src/OpenSearch/Endpoints/Ml/UpdateMessage.php new file mode 100644 index 000000000..1cea2b63f --- /dev/null +++ b/src/OpenSearch/Endpoints/Ml/UpdateMessage.php @@ -0,0 +1,72 @@ +message_id ?? null; + if (isset($message_id)) { + return "/_plugins/_ml/memory/message/$message_id"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.update_message'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setMessageId($message_id): static + { + if (is_null($message_id)) { + return $this; + } + $this->message_id = $message_id; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Ml/UpdateModelGroup.php b/src/OpenSearch/Endpoints/Ml/UpdateModelGroup.php index 48d3809c3..9eb0b7597 100644 --- a/src/OpenSearch/Endpoints/Ml/UpdateModelGroup.php +++ b/src/OpenSearch/Endpoints/Ml/UpdateModelGroup.php @@ -16,35 +16,55 @@ use OpenSearch\Common\Exceptions\RuntimeException; use OpenSearch\Endpoints\AbstractEndpoint; +/** + * NOTE: This file is autogenerated using util/GenerateEndpoints.php + */ class UpdateModelGroup extends AbstractEndpoint { - /** - * @return string[] - */ - public function getParamWhitelist(): array - { - return []; - } + protected $model_group_id; - /** - * @return string - */ public function getURI(): string { - if ($this->id) { - return "/_plugins/_ml/model_groups/$this->id"; + $model_group_id = $this->model_group_id ?? null; + if (isset($model_group_id)) { + return "/_plugins/_ml/model_groups/$model_group_id"; } + throw new RuntimeException('Missing parameter for the endpoint ml.update_model_group'); + } - throw new RuntimeException( - 'id is required for update' - ); + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; } - /** - * @return string - */ public function getMethod(): string { return 'PUT'; } + + public function setBody($body): static + { + if (is_null($body)) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setModelGroupId($model_group_id): static + { + if (is_null($model_group_id)) { + return $this; + } + $this->model_group_id = $model_group_id; + + return $this; + } } diff --git a/src/OpenSearch/Endpoints/Msearch.php b/src/OpenSearch/Endpoints/Msearch.php index a7e392857..3994ea291 100644 --- a/src/OpenSearch/Endpoints/Msearch.php +++ b/src/OpenSearch/Endpoints/Msearch.php @@ -68,23 +68,25 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody(string|iterable|null $body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } - if (is_array($body) === true || $body instanceof Traversable) { - foreach ($body as $item) { - $this->body .= $this->serializer->serialize($item) . "\n"; + + if (is_string($body)) { + if (!str_ends_with($body, "\n")) { + $body .= "\n"; } - } elseif (is_string($body)) { $this->body = $body; - if (substr($body, -1) != "\n") { - $this->body .= "\n"; - } - } else { - throw new InvalidArgumentException("Body must be an array, traversable object or string"); + return $this; } + + // Must be an iterable. + foreach ($body as $item) { + $this->body .= $this->serializer->serialize($item) . "\n"; + } + return $this; } diff --git a/src/OpenSearch/Endpoints/MsearchTemplate.php b/src/OpenSearch/Endpoints/MsearchTemplate.php index 247882f7f..8a730b490 100644 --- a/src/OpenSearch/Endpoints/MsearchTemplate.php +++ b/src/OpenSearch/Endpoints/MsearchTemplate.php @@ -66,23 +66,25 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody(string|iterable|null $body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } - if (is_array($body) === true || $body instanceof Traversable) { - foreach ($body as $item) { - $this->body .= $this->serializer->serialize($item) . "\n"; + + if (is_string($body)) { + if (!str_ends_with($body, "\n")) { + $body .= "\n"; } - } elseif (is_string($body)) { $this->body = $body; - if (substr($body, -1) != "\n") { - $this->body .= "\n"; - } - } else { - throw new InvalidArgumentException("Body must be an array, traversable object or string"); + return $this; } + + // Must be an iterable. + foreach ($body as $item) { + $this->body .= $this->serializer->serialize($item) . "\n"; + } + return $this; } diff --git a/src/OpenSearch/Endpoints/Nodes/Info.php b/src/OpenSearch/Endpoints/Nodes/Info.php index da403a7c8..03208412c 100644 --- a/src/OpenSearch/Endpoints/Nodes/Info.php +++ b/src/OpenSearch/Endpoints/Nodes/Info.php @@ -72,7 +72,7 @@ public function getMethod(): string public function setNodeIdOrMetric($node_id_or_metric): static { - if (isset($node_id_or_metric) !== true) { + if (is_null($node_id_or_metric)) { return $this; } $this->node_id_or_metric = $node_id_or_metric; diff --git a/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php b/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php index 6b3a6a140..1f74c3fbe 100644 --- a/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php +++ b/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php @@ -58,7 +58,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Notifications/CreateConfig.php b/src/OpenSearch/Endpoints/Notifications/CreateConfig.php index a21b3c4ce..d1a8797c7 100644 --- a/src/OpenSearch/Endpoints/Notifications/CreateConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/CreateConfig.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php b/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php index 6bab9ea4f..d4bf129ef 100644 --- a/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setConfigId($config_id): static { - if (isset($config_id) !== true) { + if (is_null($config_id)) { return $this; } $this->config_id = $config_id; diff --git a/src/OpenSearch/Endpoints/Notifications/GetConfig.php b/src/OpenSearch/Endpoints/Notifications/GetConfig.php index 444dfb10c..7e67117f7 100644 --- a/src/OpenSearch/Endpoints/Notifications/GetConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/GetConfig.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setConfigId($config_id): static { - if (isset($config_id) !== true) { + if (is_null($config_id)) { return $this; } $this->config_id = $config_id; diff --git a/src/OpenSearch/Endpoints/Notifications/GetConfigs.php b/src/OpenSearch/Endpoints/Notifications/GetConfigs.php index 22d250e16..5c02105fe 100644 --- a/src/OpenSearch/Endpoints/Notifications/GetConfigs.php +++ b/src/OpenSearch/Endpoints/Notifications/GetConfigs.php @@ -85,7 +85,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Notifications/SendTest.php b/src/OpenSearch/Endpoints/Notifications/SendTest.php index 2ff691812..c9f237b1a 100644 --- a/src/OpenSearch/Endpoints/Notifications/SendTest.php +++ b/src/OpenSearch/Endpoints/Notifications/SendTest.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setConfigId($config_id): static { - if (isset($config_id) !== true) { + if (is_null($config_id)) { return $this; } $this->config_id = $config_id; diff --git a/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php b/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php index 55fa55758..e8b551d78 100644 --- a/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -62,7 +62,7 @@ public function setBody($body): static public function setConfigId($config_id): static { - if (isset($config_id) !== true) { + if (is_null($config_id)) { return $this; } $this->config_id = $config_id; diff --git a/src/OpenSearch/Endpoints/Observability/CreateObject.php b/src/OpenSearch/Endpoints/Observability/CreateObject.php index a88377e5c..7002addcb 100644 --- a/src/OpenSearch/Endpoints/Observability/CreateObject.php +++ b/src/OpenSearch/Endpoints/Observability/CreateObject.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Observability/DeleteObject.php b/src/OpenSearch/Endpoints/Observability/DeleteObject.php index 308d4da41..bbc38c27a 100644 --- a/src/OpenSearch/Endpoints/Observability/DeleteObject.php +++ b/src/OpenSearch/Endpoints/Observability/DeleteObject.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setObjectId($object_id): static { - if (isset($object_id) !== true) { + if (is_null($object_id)) { return $this; } $this->object_id = $object_id; diff --git a/src/OpenSearch/Endpoints/Observability/GetObject.php b/src/OpenSearch/Endpoints/Observability/GetObject.php index ed967f9bc..94c65fd89 100644 --- a/src/OpenSearch/Endpoints/Observability/GetObject.php +++ b/src/OpenSearch/Endpoints/Observability/GetObject.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setObjectId($object_id): static { - if (isset($object_id) !== true) { + if (is_null($object_id)) { return $this; } $this->object_id = $object_id; diff --git a/src/OpenSearch/Endpoints/Observability/UpdateObject.php b/src/OpenSearch/Endpoints/Observability/UpdateObject.php index 69d44e46f..a4567f213 100644 --- a/src/OpenSearch/Endpoints/Observability/UpdateObject.php +++ b/src/OpenSearch/Endpoints/Observability/UpdateObject.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -62,7 +62,7 @@ public function setBody($body): static public function setObjectId($object_id): static { - if (isset($object_id) !== true) { + if (is_null($object_id)) { return $this; } $this->object_id = $object_id; diff --git a/src/OpenSearch/Endpoints/Ppl/Explain.php b/src/OpenSearch/Endpoints/Ppl/Explain.php index 4e1c04683..b49f52e1f 100644 --- a/src/OpenSearch/Endpoints/Ppl/Explain.php +++ b/src/OpenSearch/Endpoints/Ppl/Explain.php @@ -47,7 +47,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ppl/PostStats.php b/src/OpenSearch/Endpoints/Ppl/PostStats.php index e7763bdce..0178628df 100644 --- a/src/OpenSearch/Endpoints/Ppl/PostStats.php +++ b/src/OpenSearch/Endpoints/Ppl/PostStats.php @@ -47,7 +47,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Ppl/Query.php b/src/OpenSearch/Endpoints/Ppl/Query.php index 47c31e35e..f67cd566e 100644 --- a/src/OpenSearch/Endpoints/Ppl/Query.php +++ b/src/OpenSearch/Endpoints/Ppl/Query.php @@ -47,7 +47,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/PutScript.php b/src/OpenSearch/Endpoints/PutScript.php index 43323828b..4074423fa 100644 --- a/src/OpenSearch/Endpoints/PutScript.php +++ b/src/OpenSearch/Endpoints/PutScript.php @@ -68,7 +68,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -78,7 +78,7 @@ public function setBody($body): static public function setContext($context): static { - if (isset($context) !== true) { + if (is_null($context)) { return $this; } $this->context = $context; diff --git a/src/OpenSearch/Endpoints/Query/DatasourceDelete.php b/src/OpenSearch/Endpoints/Query/DatasourceDelete.php index 717019ba4..ccb0b1560 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourceDelete.php +++ b/src/OpenSearch/Endpoints/Query/DatasourceDelete.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setDatasourceName($datasource_name): static { - if (isset($datasource_name) !== true) { + if (is_null($datasource_name)) { return $this; } $this->datasource_name = $datasource_name; diff --git a/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php b/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php index e04725583..f7f54fb0e 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php +++ b/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setDatasourceName($datasource_name): static { - if (isset($datasource_name) !== true) { + if (is_null($datasource_name)) { return $this; } $this->datasource_name = $datasource_name; diff --git a/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php b/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php index 9f1c2d4e2..ba2d457aa 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php +++ b/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php b/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php index 6836d7261..92905dabb 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php +++ b/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/RankEval.php b/src/OpenSearch/Endpoints/RankEval.php index 4b1b23de1..cb794bc6e 100644 --- a/src/OpenSearch/Endpoints/RankEval.php +++ b/src/OpenSearch/Endpoints/RankEval.php @@ -59,7 +59,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Reindex.php b/src/OpenSearch/Endpoints/Reindex.php index 85b19007d..c65560a65 100644 --- a/src/OpenSearch/Endpoints/Reindex.php +++ b/src/OpenSearch/Endpoints/Reindex.php @@ -59,7 +59,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/ReindexRethrottle.php b/src/OpenSearch/Endpoints/ReindexRethrottle.php index fbbdb5290..1b1403d1a 100644 --- a/src/OpenSearch/Endpoints/ReindexRethrottle.php +++ b/src/OpenSearch/Endpoints/ReindexRethrottle.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setTaskId($task_id): static { - if (isset($task_id) !== true) { + if (is_null($task_id)) { return $this; } $this->task_id = $task_id; diff --git a/src/OpenSearch/Endpoints/RemoteStore/Restore.php b/src/OpenSearch/Endpoints/RemoteStore/Restore.php index fb4c6c415..36c240ce2 100644 --- a/src/OpenSearch/Endpoints/RemoteStore/Restore.php +++ b/src/OpenSearch/Endpoints/RemoteStore/Restore.php @@ -47,7 +47,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/RenderSearchTemplate.php b/src/OpenSearch/Endpoints/RenderSearchTemplate.php index 48e320423..8a7a83ab8 100644 --- a/src/OpenSearch/Endpoints/RenderSearchTemplate.php +++ b/src/OpenSearch/Endpoints/RenderSearchTemplate.php @@ -55,7 +55,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Replication/CreateReplicationRule.php b/src/OpenSearch/Endpoints/Replication/CreateReplicationRule.php index 01c2c1002..5048dce00 100644 --- a/src/OpenSearch/Endpoints/Replication/CreateReplicationRule.php +++ b/src/OpenSearch/Endpoints/Replication/CreateReplicationRule.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Replication/DeleteReplicationRule.php b/src/OpenSearch/Endpoints/Replication/DeleteReplicationRule.php index 5a0715afe..29f25078f 100644 --- a/src/OpenSearch/Endpoints/Replication/DeleteReplicationRule.php +++ b/src/OpenSearch/Endpoints/Replication/DeleteReplicationRule.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Replication/Pause.php b/src/OpenSearch/Endpoints/Replication/Pause.php index b31b960da..eb3cc8ad7 100644 --- a/src/OpenSearch/Endpoints/Replication/Pause.php +++ b/src/OpenSearch/Endpoints/Replication/Pause.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Replication/Resume.php b/src/OpenSearch/Endpoints/Replication/Resume.php index b8642f56c..b3a724c3e 100644 --- a/src/OpenSearch/Endpoints/Replication/Resume.php +++ b/src/OpenSearch/Endpoints/Replication/Resume.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Replication/Start.php b/src/OpenSearch/Endpoints/Replication/Start.php index d82c9294d..1a08c7012 100644 --- a/src/OpenSearch/Endpoints/Replication/Start.php +++ b/src/OpenSearch/Endpoints/Replication/Start.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Replication/Stop.php b/src/OpenSearch/Endpoints/Replication/Stop.php index 5e61624b5..6a2790ca7 100644 --- a/src/OpenSearch/Endpoints/Replication/Stop.php +++ b/src/OpenSearch/Endpoints/Replication/Stop.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Replication/UpdateSettings.php b/src/OpenSearch/Endpoints/Replication/UpdateSettings.php index 202e80d65..19fea21c4 100644 --- a/src/OpenSearch/Endpoints/Replication/UpdateSettings.php +++ b/src/OpenSearch/Endpoints/Replication/UpdateSettings.php @@ -50,7 +50,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Rollups/Put.php b/src/OpenSearch/Endpoints/Rollups/Put.php index dc8ec8458..27df199fa 100644 --- a/src/OpenSearch/Endpoints/Rollups/Put.php +++ b/src/OpenSearch/Endpoints/Rollups/Put.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php b/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php index 1e3ecef26..d7b27ec8d 100644 --- a/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php +++ b/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php @@ -51,7 +51,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Scroll.php b/src/OpenSearch/Endpoints/Scroll.php index f4042d833..b2c9ea7bc 100644 --- a/src/OpenSearch/Endpoints/Scroll.php +++ b/src/OpenSearch/Endpoints/Scroll.php @@ -64,7 +64,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -74,7 +74,7 @@ public function setBody($body): static public function setScrollId($scroll_id): static { - if (isset($scroll_id) !== true) { + if (is_null($scroll_id)) { return $this; } $this->scroll_id = $scroll_id; diff --git a/src/OpenSearch/Endpoints/Search.php b/src/OpenSearch/Endpoints/Search.php index 8380e3f5b..8e0e2ba1f 100644 --- a/src/OpenSearch/Endpoints/Search.php +++ b/src/OpenSearch/Endpoints/Search.php @@ -101,7 +101,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/SearchPipeline/Put.php b/src/OpenSearch/Endpoints/SearchPipeline/Put.php index dc0332a52..c73b3b952 100644 --- a/src/OpenSearch/Endpoints/SearchPipeline/Put.php +++ b/src/OpenSearch/Endpoints/SearchPipeline/Put.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/SearchShards.php b/src/OpenSearch/Endpoints/SearchShards.php index 86fecc60f..f777c44cc 100644 --- a/src/OpenSearch/Endpoints/SearchShards.php +++ b/src/OpenSearch/Endpoints/SearchShards.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/SearchTemplate.php b/src/OpenSearch/Endpoints/SearchTemplate.php index e52369161..d23b0a559 100644 --- a/src/OpenSearch/Endpoints/SearchTemplate.php +++ b/src/OpenSearch/Endpoints/SearchTemplate.php @@ -68,7 +68,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/ChangePassword.php b/src/OpenSearch/Endpoints/Security/ChangePassword.php index 494921f5c..562a17542 100644 --- a/src/OpenSearch/Endpoints/Security/ChangePassword.php +++ b/src/OpenSearch/Endpoints/Security/ChangePassword.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php b/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php index cc68e11fa..d7e1b53a4 100644 --- a/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php +++ b/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/CreateActionGroup.php b/src/OpenSearch/Endpoints/Security/CreateActionGroup.php index dfb844c02..9525f3f80 100644 --- a/src/OpenSearch/Endpoints/Security/CreateActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/CreateActionGroup.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setActionGroup($action_group): static { - if (isset($action_group) !== true) { + if (is_null($action_group)) { return $this; } $this->action_group = $action_group; diff --git a/src/OpenSearch/Endpoints/Security/CreateAllowlist.php b/src/OpenSearch/Endpoints/Security/CreateAllowlist.php index 1cccd618d..c938f1260 100644 --- a/src/OpenSearch/Endpoints/Security/CreateAllowlist.php +++ b/src/OpenSearch/Endpoints/Security/CreateAllowlist.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/CreateRole.php b/src/OpenSearch/Endpoints/Security/CreateRole.php index 5bf8a7b58..8226eb657 100644 --- a/src/OpenSearch/Endpoints/Security/CreateRole.php +++ b/src/OpenSearch/Endpoints/Security/CreateRole.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setRole($role): static { - if (isset($role) !== true) { + if (is_null($role)) { return $this; } $this->role = $role; diff --git a/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php b/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php index 7acbb7925..d271faf1a 100644 --- a/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setRole($role): static { - if (isset($role) !== true) { + if (is_null($role)) { return $this; } $this->role = $role; diff --git a/src/OpenSearch/Endpoints/Security/CreateTenant.php b/src/OpenSearch/Endpoints/Security/CreateTenant.php index 5463d44da..0f63ffa55 100644 --- a/src/OpenSearch/Endpoints/Security/CreateTenant.php +++ b/src/OpenSearch/Endpoints/Security/CreateTenant.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setTenant($tenant): static { - if (isset($tenant) !== true) { + if (is_null($tenant)) { return $this; } $this->tenant = $tenant; diff --git a/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php b/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php index 15574d10c..7989d2b0d 100644 --- a/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php +++ b/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/CreateUser.php b/src/OpenSearch/Endpoints/Security/CreateUser.php index a43677385..538ea90d8 100644 --- a/src/OpenSearch/Endpoints/Security/CreateUser.php +++ b/src/OpenSearch/Endpoints/Security/CreateUser.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setUsername($username): static { - if (isset($username) !== true) { + if (is_null($username)) { return $this; } $this->username = $username; diff --git a/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php b/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php index 4e2bd51fb..42f34f1c4 100644 --- a/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php +++ b/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setUsername($username): static { - if (isset($username) !== true) { + if (is_null($username)) { return $this; } $this->username = $username; diff --git a/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php b/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php index 9645e761d..d707e6a47 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setActionGroup($action_group): static { - if (isset($action_group) !== true) { + if (is_null($action_group)) { return $this; } $this->action_group = $action_group; diff --git a/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php b/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php index f80c7e9c3..98769ed35 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setClusterName($cluster_name): static { - if (isset($cluster_name) !== true) { + if (is_null($cluster_name)) { return $this; } $this->cluster_name = $cluster_name; diff --git a/src/OpenSearch/Endpoints/Security/DeleteRole.php b/src/OpenSearch/Endpoints/Security/DeleteRole.php index aa906d66f..c1f508a3a 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteRole.php +++ b/src/OpenSearch/Endpoints/Security/DeleteRole.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setRole($role): static { - if (isset($role) !== true) { + if (is_null($role)) { return $this; } $this->role = $role; diff --git a/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php b/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php index 67b6d54a4..cd748a24f 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setRole($role): static { - if (isset($role) !== true) { + if (is_null($role)) { return $this; } $this->role = $role; diff --git a/src/OpenSearch/Endpoints/Security/DeleteTenant.php b/src/OpenSearch/Endpoints/Security/DeleteTenant.php index d2e4d89e1..911a06f72 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteTenant.php +++ b/src/OpenSearch/Endpoints/Security/DeleteTenant.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setTenant($tenant): static { - if (isset($tenant) !== true) { + if (is_null($tenant)) { return $this; } $this->tenant = $tenant; diff --git a/src/OpenSearch/Endpoints/Security/DeleteUser.php b/src/OpenSearch/Endpoints/Security/DeleteUser.php index 10c3b5937..cfaa68df8 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteUser.php +++ b/src/OpenSearch/Endpoints/Security/DeleteUser.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setUsername($username): static { - if (isset($username) !== true) { + if (is_null($username)) { return $this; } $this->username = $username; diff --git a/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php b/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php index cdaf73156..88ec441bd 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php +++ b/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setUsername($username): static { - if (isset($username) !== true) { + if (is_null($username)) { return $this; } $this->username = $username; diff --git a/src/OpenSearch/Endpoints/Security/GenerateOboToken.php b/src/OpenSearch/Endpoints/Security/GenerateOboToken.php index 503d30219..187ca2859 100644 --- a/src/OpenSearch/Endpoints/Security/GenerateOboToken.php +++ b/src/OpenSearch/Endpoints/Security/GenerateOboToken.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/GenerateUserToken.php b/src/OpenSearch/Endpoints/Security/GenerateUserToken.php index 16d214569..3b5ceec30 100644 --- a/src/OpenSearch/Endpoints/Security/GenerateUserToken.php +++ b/src/OpenSearch/Endpoints/Security/GenerateUserToken.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setUsername($username): static { - if (isset($username) !== true) { + if (is_null($username)) { return $this; } $this->username = $username; diff --git a/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php b/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php index 4ebdfecdf..ccb2c65e7 100644 --- a/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php +++ b/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setUsername($username): static { - if (isset($username) !== true) { + if (is_null($username)) { return $this; } $this->username = $username; diff --git a/src/OpenSearch/Endpoints/Security/GetActionGroup.php b/src/OpenSearch/Endpoints/Security/GetActionGroup.php index c0c51c547..9c874e49f 100644 --- a/src/OpenSearch/Endpoints/Security/GetActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/GetActionGroup.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setActionGroup($action_group): static { - if (isset($action_group) !== true) { + if (is_null($action_group)) { return $this; } $this->action_group = $action_group; diff --git a/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php b/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php index e7dd3ee05..8bf1266d2 100644 --- a/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php @@ -55,7 +55,7 @@ public function getMethod(): string public function setClusterName($cluster_name): static { - if (isset($cluster_name) !== true) { + if (is_null($cluster_name)) { return $this; } $this->cluster_name = $cluster_name; diff --git a/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php b/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php index a0013349f..2a22e2f83 100644 --- a/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php +++ b/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setNodeId($node_id): static { - if (isset($node_id) !== true) { + if (is_null($node_id)) { return $this; } $this->node_id = $node_id; diff --git a/src/OpenSearch/Endpoints/Security/GetRole.php b/src/OpenSearch/Endpoints/Security/GetRole.php index de9dfc71c..c38ee5025 100644 --- a/src/OpenSearch/Endpoints/Security/GetRole.php +++ b/src/OpenSearch/Endpoints/Security/GetRole.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setRole($role): static { - if (isset($role) !== true) { + if (is_null($role)) { return $this; } $this->role = $role; diff --git a/src/OpenSearch/Endpoints/Security/GetRoleMapping.php b/src/OpenSearch/Endpoints/Security/GetRoleMapping.php index b58d74ecb..58c39146f 100644 --- a/src/OpenSearch/Endpoints/Security/GetRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/GetRoleMapping.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setRole($role): static { - if (isset($role) !== true) { + if (is_null($role)) { return $this; } $this->role = $role; diff --git a/src/OpenSearch/Endpoints/Security/GetTenant.php b/src/OpenSearch/Endpoints/Security/GetTenant.php index dcfd3c002..dbe7248d6 100644 --- a/src/OpenSearch/Endpoints/Security/GetTenant.php +++ b/src/OpenSearch/Endpoints/Security/GetTenant.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setTenant($tenant): static { - if (isset($tenant) !== true) { + if (is_null($tenant)) { return $this; } $this->tenant = $tenant; diff --git a/src/OpenSearch/Endpoints/Security/GetUser.php b/src/OpenSearch/Endpoints/Security/GetUser.php index ec67393ae..5f96c4a81 100644 --- a/src/OpenSearch/Endpoints/Security/GetUser.php +++ b/src/OpenSearch/Endpoints/Security/GetUser.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setUsername($username): static { - if (isset($username) !== true) { + if (is_null($username)) { return $this; } $this->username = $username; diff --git a/src/OpenSearch/Endpoints/Security/GetUserLegacy.php b/src/OpenSearch/Endpoints/Security/GetUserLegacy.php index f58bdf4d1..6207f73ae 100644 --- a/src/OpenSearch/Endpoints/Security/GetUserLegacy.php +++ b/src/OpenSearch/Endpoints/Security/GetUserLegacy.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setUsername($username): static { - if (isset($username) !== true) { + if (is_null($username)) { return $this; } $this->username = $username; diff --git a/src/OpenSearch/Endpoints/Security/PatchActionGroup.php b/src/OpenSearch/Endpoints/Security/PatchActionGroup.php index 35e737aa9..658b19dd8 100644 --- a/src/OpenSearch/Endpoints/Security/PatchActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/PatchActionGroup.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setActionGroup($action_group): static { - if (isset($action_group) !== true) { + if (is_null($action_group)) { return $this; } $this->action_group = $action_group; diff --git a/src/OpenSearch/Endpoints/Security/PatchActionGroups.php b/src/OpenSearch/Endpoints/Security/PatchActionGroups.php index 53e84258c..6bdd042e6 100644 --- a/src/OpenSearch/Endpoints/Security/PatchActionGroups.php +++ b/src/OpenSearch/Endpoints/Security/PatchActionGroups.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/PatchAllowlist.php b/src/OpenSearch/Endpoints/Security/PatchAllowlist.php index bbd76c6fe..0499abac6 100644 --- a/src/OpenSearch/Endpoints/Security/PatchAllowlist.php +++ b/src/OpenSearch/Endpoints/Security/PatchAllowlist.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php b/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php index 3bcd2b91a..804ca2816 100644 --- a/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/PatchConfiguration.php b/src/OpenSearch/Endpoints/Security/PatchConfiguration.php index 7fb935e2f..48c38cc52 100644 --- a/src/OpenSearch/Endpoints/Security/PatchConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/PatchConfiguration.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php b/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php index 419d22cb0..172c4d033 100644 --- a/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setClusterName($cluster_name): static { - if (isset($cluster_name) !== true) { + if (is_null($cluster_name)) { return $this; } $this->cluster_name = $cluster_name; diff --git a/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php b/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php index 280dd322b..3f4de031a 100644 --- a/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php +++ b/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/PatchRole.php b/src/OpenSearch/Endpoints/Security/PatchRole.php index 432817e7b..45794701e 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRole.php +++ b/src/OpenSearch/Endpoints/Security/PatchRole.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setRole($role): static { - if (isset($role) !== true) { + if (is_null($role)) { return $this; } $this->role = $role; diff --git a/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php b/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php index b593f2bc6..824a20a2a 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setRole($role): static { - if (isset($role) !== true) { + if (is_null($role)) { return $this; } $this->role = $role; diff --git a/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php b/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php index 29ef48b5b..33efe6c72 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php +++ b/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/PatchRoles.php b/src/OpenSearch/Endpoints/Security/PatchRoles.php index cb1bb3b46..faedd90df 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRoles.php +++ b/src/OpenSearch/Endpoints/Security/PatchRoles.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/PatchTenant.php b/src/OpenSearch/Endpoints/Security/PatchTenant.php index a3902d56d..95ad22bbb 100644 --- a/src/OpenSearch/Endpoints/Security/PatchTenant.php +++ b/src/OpenSearch/Endpoints/Security/PatchTenant.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setTenant($tenant): static { - if (isset($tenant) !== true) { + if (is_null($tenant)) { return $this; } $this->tenant = $tenant; diff --git a/src/OpenSearch/Endpoints/Security/PatchTenants.php b/src/OpenSearch/Endpoints/Security/PatchTenants.php index 1f6b71a83..05e931a55 100644 --- a/src/OpenSearch/Endpoints/Security/PatchTenants.php +++ b/src/OpenSearch/Endpoints/Security/PatchTenants.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/PatchUser.php b/src/OpenSearch/Endpoints/Security/PatchUser.php index b15e8471e..5b24d87c0 100644 --- a/src/OpenSearch/Endpoints/Security/PatchUser.php +++ b/src/OpenSearch/Endpoints/Security/PatchUser.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setUsername($username): static { - if (isset($username) !== true) { + if (is_null($username)) { return $this; } $this->username = $username; diff --git a/src/OpenSearch/Endpoints/Security/PatchUsers.php b/src/OpenSearch/Endpoints/Security/PatchUsers.php index 8b61f6585..6a5ba80f6 100644 --- a/src/OpenSearch/Endpoints/Security/PatchUsers.php +++ b/src/OpenSearch/Endpoints/Security/PatchUsers.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php b/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php index c5e6824a7..c75d1c4e4 100644 --- a/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php b/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php index b0862fd1b..9b5192d95 100644 --- a/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php b/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php index 25d8f1384..4f56599dd 100644 --- a/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setClusterName($cluster_name): static { - if (isset($cluster_name) !== true) { + if (is_null($cluster_name)) { return $this; } $this->cluster_name = $cluster_name; diff --git a/src/OpenSearch/Endpoints/Sm/CreatePolicy.php b/src/OpenSearch/Endpoints/Sm/CreatePolicy.php index 9d069d83a..47125342a 100644 --- a/src/OpenSearch/Endpoints/Sm/CreatePolicy.php +++ b/src/OpenSearch/Endpoints/Sm/CreatePolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -62,7 +62,7 @@ public function setBody($body): static public function setPolicyName($policy_name): static { - if (isset($policy_name) !== true) { + if (is_null($policy_name)) { return $this; } $this->policy_name = $policy_name; diff --git a/src/OpenSearch/Endpoints/Sm/DeletePolicy.php b/src/OpenSearch/Endpoints/Sm/DeletePolicy.php index b342d8e37..83d3a3384 100644 --- a/src/OpenSearch/Endpoints/Sm/DeletePolicy.php +++ b/src/OpenSearch/Endpoints/Sm/DeletePolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setPolicyName($policy_name): static { - if (isset($policy_name) !== true) { + if (is_null($policy_name)) { return $this; } $this->policy_name = $policy_name; diff --git a/src/OpenSearch/Endpoints/Sm/ExplainPolicy.php b/src/OpenSearch/Endpoints/Sm/ExplainPolicy.php index 2396b3a7c..d48b223b2 100644 --- a/src/OpenSearch/Endpoints/Sm/ExplainPolicy.php +++ b/src/OpenSearch/Endpoints/Sm/ExplainPolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setPolicyName($policy_name): static { - if (isset($policy_name) !== true) { + if (is_null($policy_name)) { return $this; } $this->policy_name = $policy_name; diff --git a/src/OpenSearch/Endpoints/Sm/GetPolicy.php b/src/OpenSearch/Endpoints/Sm/GetPolicy.php index dc59eeaf7..9ed27349b 100644 --- a/src/OpenSearch/Endpoints/Sm/GetPolicy.php +++ b/src/OpenSearch/Endpoints/Sm/GetPolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setPolicyName($policy_name): static { - if (isset($policy_name) !== true) { + if (is_null($policy_name)) { return $this; } $this->policy_name = $policy_name; diff --git a/src/OpenSearch/Endpoints/Sm/StartPolicy.php b/src/OpenSearch/Endpoints/Sm/StartPolicy.php index ece11dad5..10252995f 100644 --- a/src/OpenSearch/Endpoints/Sm/StartPolicy.php +++ b/src/OpenSearch/Endpoints/Sm/StartPolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setPolicyName($policy_name): static { - if (isset($policy_name) !== true) { + if (is_null($policy_name)) { return $this; } $this->policy_name = $policy_name; diff --git a/src/OpenSearch/Endpoints/Sm/StopPolicy.php b/src/OpenSearch/Endpoints/Sm/StopPolicy.php index 35e82af69..f8bdd18a6 100644 --- a/src/OpenSearch/Endpoints/Sm/StopPolicy.php +++ b/src/OpenSearch/Endpoints/Sm/StopPolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setPolicyName($policy_name): static { - if (isset($policy_name) !== true) { + if (is_null($policy_name)) { return $this; } $this->policy_name = $policy_name; diff --git a/src/OpenSearch/Endpoints/Sm/UpdatePolicy.php b/src/OpenSearch/Endpoints/Sm/UpdatePolicy.php index dc0950b65..ad0d39fd3 100644 --- a/src/OpenSearch/Endpoints/Sm/UpdatePolicy.php +++ b/src/OpenSearch/Endpoints/Sm/UpdatePolicy.php @@ -54,7 +54,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -64,7 +64,7 @@ public function setBody($body): static public function setPolicyName($policy_name): static { - if (isset($policy_name) !== true) { + if (is_null($policy_name)) { return $this; } $this->policy_name = $policy_name; diff --git a/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php b/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php index 33800a060..94c9bfea1 100644 --- a/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setRepository($repository): static { - if (isset($repository) !== true) { + if (is_null($repository)) { return $this; } $this->repository = $repository; diff --git a/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php b/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php index 2d4523301..e9b0997c9 100644 --- a/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php +++ b/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php @@ -64,7 +64,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -74,7 +74,7 @@ public function setBody($body): static public function setRepository($repository): static { - if (isset($repository) !== true) { + if (is_null($repository)) { return $this; } $this->repository = $repository; @@ -84,7 +84,7 @@ public function setRepository($repository): static public function setSnapshot($snapshot): static { - if (isset($snapshot) !== true) { + if (is_null($snapshot)) { return $this; } $this->snapshot = $snapshot; @@ -94,7 +94,7 @@ public function setSnapshot($snapshot): static public function setTargetSnapshot($target_snapshot): static { - if (isset($target_snapshot) !== true) { + if (is_null($target_snapshot)) { return $this; } $this->target_snapshot = $target_snapshot; diff --git a/src/OpenSearch/Endpoints/Snapshot/Create.php b/src/OpenSearch/Endpoints/Snapshot/Create.php index 63c5ea70f..f296b2ace 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Create.php +++ b/src/OpenSearch/Endpoints/Snapshot/Create.php @@ -63,7 +63,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -73,7 +73,7 @@ public function setBody($body): static public function setRepository($repository): static { - if (isset($repository) !== true) { + if (is_null($repository)) { return $this; } $this->repository = $repository; @@ -83,7 +83,7 @@ public function setRepository($repository): static public function setSnapshot($snapshot): static { - if (isset($snapshot) !== true) { + if (is_null($snapshot)) { return $this; } $this->snapshot = $snapshot; diff --git a/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php b/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php index 5d5f7ef6e..c1974fa45 100644 --- a/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php @@ -62,7 +62,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -72,7 +72,7 @@ public function setBody($body): static public function setRepository($repository): static { - if (isset($repository) !== true) { + if (is_null($repository)) { return $this; } $this->repository = $repository; diff --git a/src/OpenSearch/Endpoints/Snapshot/Delete.php b/src/OpenSearch/Endpoints/Snapshot/Delete.php index 9dd2492ac..876490e16 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Delete.php +++ b/src/OpenSearch/Endpoints/Snapshot/Delete.php @@ -62,7 +62,7 @@ public function getMethod(): string public function setRepository($repository): static { - if (isset($repository) !== true) { + if (is_null($repository)) { return $this; } $this->repository = $repository; @@ -72,7 +72,7 @@ public function setRepository($repository): static public function setSnapshot($snapshot): static { - if (isset($snapshot) !== true) { + if (is_null($snapshot)) { return $this; } $this->snapshot = $snapshot; diff --git a/src/OpenSearch/Endpoints/Snapshot/Get.php b/src/OpenSearch/Endpoints/Snapshot/Get.php index 6951e15f8..51fc607b2 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Get.php +++ b/src/OpenSearch/Endpoints/Snapshot/Get.php @@ -64,7 +64,7 @@ public function getMethod(): string public function setRepository($repository): static { - if (isset($repository) !== true) { + if (is_null($repository)) { return $this; } $this->repository = $repository; diff --git a/src/OpenSearch/Endpoints/Snapshot/Restore.php b/src/OpenSearch/Endpoints/Snapshot/Restore.php index 9c30e67aa..ca6d614e1 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Restore.php +++ b/src/OpenSearch/Endpoints/Snapshot/Restore.php @@ -63,7 +63,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -73,7 +73,7 @@ public function setBody($body): static public function setRepository($repository): static { - if (isset($repository) !== true) { + if (is_null($repository)) { return $this; } $this->repository = $repository; @@ -83,7 +83,7 @@ public function setRepository($repository): static public function setSnapshot($snapshot): static { - if (isset($snapshot) !== true) { + if (is_null($snapshot)) { return $this; } $this->snapshot = $snapshot; diff --git a/src/OpenSearch/Endpoints/Snapshot/Status.php b/src/OpenSearch/Endpoints/Snapshot/Status.php index d894ce8c4..b73cb8e0f 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Status.php +++ b/src/OpenSearch/Endpoints/Snapshot/Status.php @@ -65,7 +65,7 @@ public function getMethod(): string public function setRepository($repository): static { - if (isset($repository) !== true) { + if (is_null($repository)) { return $this; } $this->repository = $repository; diff --git a/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php b/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php index 4c8b0f871..e3d765ed7 100644 --- a/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setRepository($repository): static { - if (isset($repository) !== true) { + if (is_null($repository)) { return $this; } $this->repository = $repository; diff --git a/src/OpenSearch/Endpoints/Sql/Close.php b/src/OpenSearch/Endpoints/Sql/Close.php index dd9f8d32e..7bf12b557 100644 --- a/src/OpenSearch/Endpoints/Sql/Close.php +++ b/src/OpenSearch/Endpoints/Sql/Close.php @@ -47,7 +47,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Sql/Explain.php b/src/OpenSearch/Endpoints/Sql/Explain.php index c7380165c..82ddc4c7d 100644 --- a/src/OpenSearch/Endpoints/Sql/Explain.php +++ b/src/OpenSearch/Endpoints/Sql/Explain.php @@ -47,7 +47,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Sql/PostStats.php b/src/OpenSearch/Endpoints/Sql/PostStats.php index 4e1073ddc..cf3b297e2 100644 --- a/src/OpenSearch/Endpoints/Sql/PostStats.php +++ b/src/OpenSearch/Endpoints/Sql/PostStats.php @@ -47,7 +47,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Sql/Query.php b/src/OpenSearch/Endpoints/Sql/Query.php index 47d3699e2..e4a362c1a 100644 --- a/src/OpenSearch/Endpoints/Sql/Query.php +++ b/src/OpenSearch/Endpoints/Sql/Query.php @@ -47,7 +47,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Sql/Settings.php b/src/OpenSearch/Endpoints/Sql/Settings.php index 5872d364d..78fc51f58 100644 --- a/src/OpenSearch/Endpoints/Sql/Settings.php +++ b/src/OpenSearch/Endpoints/Sql/Settings.php @@ -46,7 +46,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Tasks/Cancel.php b/src/OpenSearch/Endpoints/Tasks/Cancel.php index 2d578c53b..f5b6f6f1f 100644 --- a/src/OpenSearch/Endpoints/Tasks/Cancel.php +++ b/src/OpenSearch/Endpoints/Tasks/Cancel.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setTaskId($task_id): static { - if (isset($task_id) !== true) { + if (is_null($task_id)) { return $this; } $this->task_id = $task_id; diff --git a/src/OpenSearch/Endpoints/Tasks/Get.php b/src/OpenSearch/Endpoints/Tasks/Get.php index 198941aba..e6166abfc 100644 --- a/src/OpenSearch/Endpoints/Tasks/Get.php +++ b/src/OpenSearch/Endpoints/Tasks/Get.php @@ -60,7 +60,7 @@ public function getMethod(): string public function setTaskId($task_id): static { - if (isset($task_id) !== true) { + if (is_null($task_id)) { return $this; } $this->task_id = $task_id; diff --git a/src/OpenSearch/Endpoints/TermVectors.php b/src/OpenSearch/Endpoints/TermVectors.php index 7a35caf12..1df0753de 100644 --- a/src/OpenSearch/Endpoints/TermVectors.php +++ b/src/OpenSearch/Endpoints/TermVectors.php @@ -73,7 +73,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Transforms/Preview.php b/src/OpenSearch/Endpoints/Transforms/Preview.php index 167422e50..fe27bf909 100644 --- a/src/OpenSearch/Endpoints/Transforms/Preview.php +++ b/src/OpenSearch/Endpoints/Transforms/Preview.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Transforms/Put.php b/src/OpenSearch/Endpoints/Transforms/Put.php index 5230fc884..b5fc4e1e4 100644 --- a/src/OpenSearch/Endpoints/Transforms/Put.php +++ b/src/OpenSearch/Endpoints/Transforms/Put.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Update.php b/src/OpenSearch/Endpoints/Update.php index a45d4ee22..d1caf4aba 100644 --- a/src/OpenSearch/Endpoints/Update.php +++ b/src/OpenSearch/Endpoints/Update.php @@ -76,7 +76,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/UpdateByQuery.php b/src/OpenSearch/Endpoints/UpdateByQuery.php index 627176dd9..e25d32967 100644 --- a/src/OpenSearch/Endpoints/UpdateByQuery.php +++ b/src/OpenSearch/Endpoints/UpdateByQuery.php @@ -92,7 +92,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php b/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php index 1281a1ab7..17173715d 100644 --- a/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php +++ b/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php @@ -61,7 +61,7 @@ public function getMethod(): string public function setTaskId($task_id): static { - if (isset($task_id) !== true) { + if (is_null($task_id)) { return $this; } $this->task_id = $task_id; diff --git a/src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php index 299d98256..bb902b601 100644 --- a/src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php +++ b/src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php @@ -45,7 +45,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; diff --git a/src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php index 8a7cda794..8b63c9539 100644 --- a/src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php +++ b/src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php index 5db7e0319..1c6b7e9cf 100644 --- a/src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php +++ b/src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php @@ -51,7 +51,7 @@ public function getMethod(): string public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php index 2c437c425..49e32ba83 100644 --- a/src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php +++ b/src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php @@ -52,7 +52,7 @@ public function getMethod(): string public function setBody($body): static { - if (isset($body) !== true) { + if (is_null($body)) { return $this; } $this->body = $body; @@ -62,7 +62,7 @@ public function setBody($body): static public function setName($name): static { - if (isset($name) !== true) { + if (is_null($name)) { return $this; } $this->name = $name; diff --git a/src/OpenSearch/Namespaces/AsynchronousSearchNamespace.php b/src/OpenSearch/Namespaces/AsynchronousSearchNamespace.php index 2fc491192..9922a808c 100644 --- a/src/OpenSearch/Namespaces/AsynchronousSearchNamespace.php +++ b/src/OpenSearch/Namespaces/AsynchronousSearchNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class AsynchronousSearchNamespace * diff --git a/src/OpenSearch/Namespaces/CatNamespace.php b/src/OpenSearch/Namespaces/CatNamespace.php index 1911ce8de..f1503a8f7 100644 --- a/src/OpenSearch/Namespaces/CatNamespace.php +++ b/src/OpenSearch/Namespaces/CatNamespace.php @@ -21,8 +21,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class CatNamespace * @@ -31,7 +29,7 @@ class CatNamespace extends AbstractNamespace { /** - * Shows information about currently configured aliases to indexes including filter and routing info. + * Shows information about aliases currently configured to indexes, including filter and routing information. * * $params['name'] = (array) A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. * $params['expand_wildcards'] = (any) Expands wildcard expressions to concrete indexes. Combine multiple values with commas. Supported values are `all`, `open`, `closed`, `hidden`, and `none`. @@ -62,14 +60,14 @@ public function aliases(array $params = []) } /** - * Lists all active point-in-time segments. + * Lists all active CAT point-in-time segments. * - * $params['bytes'] = (enum) The unit in which to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['bytes'] = (any) The units used to display byte values. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -91,7 +89,7 @@ public function allPitSegments(array $params = []) * Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. * * $params['node_id'] = (array) A comma-separated list of node IDs or names used to limit the returned information. - * $params['bytes'] = (enum) The units used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['bytes'] = (any) The units used to display byte values. * $params['cluster_manager_timeout'] = (string) A timeout for connection to the cluster manager node. * $params['format'] = (string) A short version of the HTTP `Accept` header, such as `json` or `yaml`. * $params['h'] = (array) A comma-separated list of column names to display. @@ -127,7 +125,7 @@ public function allocation(array $params = []) * $params['format'] = (string) A short version of the HTTP `Accept` header, such as `json` or `yaml`. * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) * $params['master_timeout'] = (string) A timeout for connection to the cluster manager node. * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) @@ -149,14 +147,14 @@ public function clusterManager(array $params = []) } /** - * Provides quick access to the document count of the entire cluster, or individual indexes. + * Provides quick access to the document count of the entire cluster or of an individual index. * * $params['index'] = (array) Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -180,13 +178,13 @@ public function count(array $params = []) /** * Shows how much heap memory is currently being used by field data on every data node in the cluster. * - * $params['fields'] = (array) Comma-separated list of fields used to limit returned information. To retrieve all fields, omit this parameter. - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['fields'] = (array) A comma-separated list of fields used to limit the amount of returned information. To retrieve all fields, omit this parameter. + * $params['bytes'] = (any) The units used to display byte values. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -210,13 +208,13 @@ public function fielddata(array $params = []) /** * Returns a concise representation of the cluster health. * - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit used to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['ts'] = (boolean) If `true`, returns `HH:MM:SS` and Unix epoch timestamps. (Default = true) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (any) The unit used to display time values. + * $params['ts'] = (boolean) When `true`, returns `HH:MM:SS` and Unix epoch timestamps. (Default = true) + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -255,23 +253,23 @@ public function help(array $params = []) } /** - * Returns information about indexes: number of primaries and replicas, document counts, disk size, ... + * Lists information related to indexes, that is, how much disk space they are using, how many shards they have, their health status, and so on. * - * $params['index'] = (array) Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. + * $params['index'] = (array) A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * $params['bytes'] = (any) The units used to display byte values. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. * $params['expand_wildcards'] = (any) The type of index that wildcard patterns can match. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. - * $params['health'] = (any) The health status used to limit returned indexes. By default, the response includes indexes of any health status. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. + * $params['health'] = (any) Limits indexes based on their health status. Supported values are `green`, `yellow`, and `red`. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['include_unloaded_segments'] = (boolean) If `true`, the response includes information from segments that are not loaded into memory. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['pri'] = (boolean) If `true`, the response only includes information from primary shards. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit used to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['include_unloaded_segments'] = (boolean) Whether to include information from segments not loaded into memory. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['pri'] = (boolean) When `true`, returns information only from the primary shards. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (any) Specifies the time units. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -295,14 +293,14 @@ public function indices(array $params = []) /** * Returns information about the cluster-manager node. * - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -323,14 +321,14 @@ public function master(array $params = []) /** * Returns information about custom node attributes. * - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -349,19 +347,19 @@ public function nodeattrs(array $params = []) } /** - * Returns basic statistics about performance of cluster nodes. + * Returns basic statistics about the performance of cluster nodes. * - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['full_id'] = (any) If `true`, return the full node ID. If `false`, return the shortened node ID. (Default = ) - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['bytes'] = (any) The units used to display byte values. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['full_id'] = (any) When `true`, returns the full node ID. When `false`, returns the shortened node ID. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -380,17 +378,17 @@ public function nodes(array $params = []) } /** - * Returns a concise representation of the cluster pending tasks. + * Returns a concise representation of the cluster's pending tasks. * - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -409,14 +407,14 @@ public function pendingTasks(array $params = []) } /** - * List segments for one or several PITs. + * Lists one or several CAT point-in-time segments. * - * $params['bytes'] = (enum) The unit in which to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['bytes'] = (any) The units used to display byte values. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -438,16 +436,16 @@ public function pitSegments(array $params = []) } /** - * Returns information about installed plugins across nodes node. + * Returns information about the names, components, and versions of the installed plugins. * - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -466,18 +464,18 @@ public function plugins(array $params = []) } /** - * Returns information about index shard recoveries, both on-going completed. + * Returns all completed and ongoing index and shard recoveries. * * $params['index'] = (array) A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. * $params['active_only'] = (boolean) If `true`, the response only includes ongoing shard recoveries. (Default = false) - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['detailed'] = (boolean) If `true`, the response includes detailed information about shard recoveries. (Default = false) - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['bytes'] = (any) The units used to display byte values. + * $params['detailed'] = (boolean) When `true`, includes detailed information about shard recoveries. (Default = false) + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -499,16 +497,16 @@ public function recovery(array $params = []) } /** - * Returns information about snapshot repositories registered in the cluster. + * Returns information about all snapshot repositories for a cluster. * - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -527,25 +525,25 @@ public function repositories(array $params = []) } /** - * Returns information about both on-going and latest completed Segment Replication events. - * - * $params['index'] = (array) Comma-separated list or wildcard expression of index names to limit the returned information. - * $params['active_only'] = (boolean) If `true`, the response only includes ongoing segment replication events. (Default = false) - * $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes `_all` string or when no indexes have been specified). - * $params['bytes'] = (enum) The unit in which to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['completed_only'] = (boolean) If `true`, the response only includes latest completed segment replication events. (Default = false) - * $params['detailed'] = (boolean) If `true`, the response includes detailed information about segment replications. (Default = false) - * $params['expand_wildcards'] = (any) Whether to expand wildcard expression to concrete indexes that are open, closed or both. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * Returns information about active and last-completed segment replication events on each replica shard, including related shard-level metrics. These metrics provide information about how far behind the primary shard the replicas are lagging. + * + * $params['index'] = (array) A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. + * $params['active_only'] = (boolean) When `true`, the response only includes ongoing segment replication events. (Default = false) + * $params['allow_no_indices'] = (boolean) Whether to ignore the index if a wildcard index expression resolves to no concrete indexes. This includes the `_all` string or when no indexes have been specified. + * $params['bytes'] = (any) The units used to display byte values. + * $params['completed_only'] = (boolean) When `true`, the response only includes the last-completed segment replication events. (Default = false) + * $params['detailed'] = (boolean) When `true`, the response includes additional metrics for each stage of a segment replication event. (Default = false) + * $params['expand_wildcards'] = (any) Whether to expand the wildcard expression to include concrete indexes that are open, closed, or both. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded or aliased indexes should be ignored when throttled. - * $params['ignore_unavailable'] = (boolean) Whether specified concrete indexes should be ignored when unavailable (missing or closed). - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['shards'] = (array) Comma-separated list of shards to display. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['timeout'] = (string) Operation timeout. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['ignore_throttled'] = (boolean) Whether specified concrete, expanded, or aliased indexes should be ignored when throttled. + * $params['ignore_unavailable'] = (boolean) Whether the specified concrete indexes should be ignored when missing or closed. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['shards'] = (array) A comma-separated list of shards to display. + * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + * $params['timeout'] = (string) The operation timeout. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -570,14 +568,14 @@ public function segmentReplication(array $params = []) * Provides low-level information about the segments in the shards of an index. * * $params['index'] = (array) A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. - * $params['help'] = (boolean) Return help information. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['bytes'] = (any) The units used to display byte values. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. + * $params['help'] = (boolean) Returns help information. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -599,19 +597,19 @@ public function segments(array $params = []) } /** - * Provides a detailed view of shard allocation on nodes. + * Lists the states of all primary and replica shards and how they are distributed. * * $params['index'] = (array) A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['bytes'] = (any) The units used to display byte values. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -633,18 +631,18 @@ public function shards(array $params = []) } /** - * Returns all snapshots in a specific repository. + * Lists all of the snapshots stored in a specific repository. * * $params['repository'] = (array) A comma-separated list of snapshot repositories used to limit the request. Accepts wildcard expressions. `_all` returns all repositories. If any repository fails during the request, OpenSearch returns an error. - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['ignore_unavailable'] = (boolean) If `true`, the response does not include information from unavailable snapshots. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['ignore_unavailable'] = (boolean) When `true`, the response does not include information from unavailable snapshots. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -666,22 +664,22 @@ public function snapshots(array $params = []) } /** - * Returns information about the tasks currently executing on one or more nodes in the cluster. + * Lists the progress of all tasks currently running on the cluster. * - * $params['actions'] = (array) The task action names, which are used to limit the response. + * $params['actions'] = (array) The task action names used to limit the response. * $params['detailed'] = (boolean) If `true`, the response includes detailed information about shard recoveries. (Default = false) - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['time'] = (any) Specifies the time units, for example, `5d` or `7h`. For more information, see [Supported units](https://opensearch.org/docs/latest/api-reference/units/). + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * $params['filter_path'] = (any) 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 "-". - * $params['node_id'] = (array) Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + * $params['node_id'] = (array) A comma-separated list of node IDs or names used to limit the returned information. Use `_local` to return information from the node to which you're connecting, specify a specific node from which to get information, or keep the parameter empty to get information from all nodes. * $params['parent_task'] = (string) The parent task identifier, which is used to limit the response. * * @param array $params Associative array of parameters @@ -696,17 +694,17 @@ public function tasks(array $params = []) } /** - * Returns information about existing templates. + * Lists the names, patterns, order numbers, and version numbers of index templates. * * $params['name'] = (string) The name of the template to return. Accepts wildcard expressions. If omitted, all templates are returned. - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) @@ -728,18 +726,18 @@ public function templates(array $params = []) } /** - * Returns cluster-wide thread pool statistics per node.By default the active, queue and rejected statistics are returned for all thread pools. + * Returns cluster-wide thread pool statistics per node.By default the active, queued, and rejected statistics are returned for all thread pools. * * $params['thread_pool_patterns'] = (array) A comma-separated list of thread pool names used to limit the request. Accepts wildcard expressions. - * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['format'] = (string) A short version of the Accept header (for example, `json`, `yaml`). - * $params['h'] = (array) Comma-separated list of column names to display. + * $params['cluster_manager_timeout'] = (string) A timeout for connection to the cluster manager node. + * $params['format'] = (string) A short version of the `Accept` header, such as `json` or `yaml`. + * $params['h'] = (array) A comma-separated list of column names to display. * $params['help'] = (boolean) Return help information. (Default = false) - * $params['local'] = (boolean) Return local information, do not retrieve the state from cluster-manager node. (Default = false) - * $params['master_timeout'] = (string) Operation timeout for connection to cluster-manager node. - * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. + * $params['local'] = (boolean) Returns local information but does not retrieve the state from the cluster manager node. (Default = false) + * $params['master_timeout'] = (string) The amount of time allowed to establish a connection to the cluster manager node. + * $params['s'] = (array) A comma-separated list of column names or column aliases to sort by. * $params['size'] = (integer) The multiplier in which to display values. - * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) + * $params['v'] = (boolean) Enables verbose mode, which displays column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) diff --git a/src/OpenSearch/Namespaces/ClusterNamespace.php b/src/OpenSearch/Namespaces/ClusterNamespace.php index 3ebcd0f86..dd9b5135a 100644 --- a/src/OpenSearch/Namespaces/ClusterNamespace.php +++ b/src/OpenSearch/Namespaces/ClusterNamespace.php @@ -21,8 +21,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class ClusterNamespace * @@ -182,6 +180,7 @@ public function existsComponentTemplate(array $params = []): bool * * $params['name'] = (array) Name of the component template to retrieve. Wildcard (`*`) expressions are supported. * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. + * $params['flat_settings'] = (boolean) If `true`, returns settings in flat format. (Default = false) * $params['local'] = (boolean) If `true`, the request retrieves information from the local node only.If `false`, information is retrieved from the cluster-manager node. (Default = false) * $params['master_timeout'] = (string) Period to wait for a connection to the cluster-manager node.If no response is received before the timeout expires, the request fails and returns an error. * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) diff --git a/src/OpenSearch/Namespaces/DanglingIndicesNamespace.php b/src/OpenSearch/Namespaces/DanglingIndicesNamespace.php index 14fd9accd..fcc9c0f6b 100644 --- a/src/OpenSearch/Namespaces/DanglingIndicesNamespace.php +++ b/src/OpenSearch/Namespaces/DanglingIndicesNamespace.php @@ -21,8 +21,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class DanglingIndicesNamespace * diff --git a/src/OpenSearch/Namespaces/FlowFrameworkNamespace.php b/src/OpenSearch/Namespaces/FlowFrameworkNamespace.php index d758ad9e1..1a926267a 100644 --- a/src/OpenSearch/Namespaces/FlowFrameworkNamespace.php +++ b/src/OpenSearch/Namespaces/FlowFrameworkNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class FlowFrameworkNamespace * diff --git a/src/OpenSearch/Namespaces/IndicesNamespace.php b/src/OpenSearch/Namespaces/IndicesNamespace.php index cd7b64b03..ffa64981f 100644 --- a/src/OpenSearch/Namespaces/IndicesNamespace.php +++ b/src/OpenSearch/Namespaces/IndicesNamespace.php @@ -21,8 +21,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class IndicesNamespace * @@ -440,7 +438,7 @@ public function exists(array $params = []): bool $endpoint->setParams($params); $endpoint->setIndex($index); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return BooleanRequestWrapper::sendRequest($endpoint, $this->httpTransport); } /** @@ -474,7 +472,7 @@ public function existsAlias(array $params = []): bool $endpoint->setName($name); $endpoint->setIndex($index); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return BooleanRequestWrapper::sendRequest($endpoint, $this->httpTransport); } /** @@ -505,7 +503,7 @@ public function existsIndexTemplate(array $params = []): bool $endpoint->setParams($params); $endpoint->setName($name); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return BooleanRequestWrapper::sendRequest($endpoint, $this->httpTransport); } /** @@ -536,7 +534,7 @@ public function existsTemplate(array $params = []): bool $endpoint->setParams($params); $endpoint->setName($name); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return BooleanRequestWrapper::sendRequest($endpoint, $this->httpTransport); } /** @@ -576,7 +574,7 @@ public function flush(array $params = []) * $params['expand_wildcards'] = (any) Whether to expand wildcard expression to concrete indexes that are open, closed or both. * $params['flush'] = (boolean) Specify whether the index should be flushed after performing the operation. (Default = true) * $params['ignore_unavailable'] = (boolean) Whether specified concrete indexes should be ignored when unavailable (missing or closed) - * $params['max_num_segments'] = (number) The number of larger segments into which smaller segments are merged.Set this parameter to 1 to merge all segments into one segment.The default behavior is to perform the merge as necessary. + * $params['max_num_segments'] = (integer) The number of larger segments into which smaller segments are merged.Set this parameter to 1 to merge all segments into one segment.The default behavior is to perform the merge as necessary. * $params['only_expunge_deletes'] = (boolean) Specify whether the operation should only expunge deleted documents * $params['primary_only'] = (boolean) Specify whether the operation should only perform on primary shards. Defaults to false. (Default = false) * $params['wait_for_completion'] = (boolean) Should the request wait until the force merge is completed. (Default = true) @@ -1449,12 +1447,10 @@ public function updateAliases(array $params = []) public function upgrade(array $params = []) { $index = $this->extractArgument($params, 'index'); - $body = $this->extractArgument($params, 'body'); $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Indices\Upgrade::class); $endpoint->setParams($params); $endpoint->setIndex($index); - $endpoint->setBody($body); return $this->performRequest($endpoint); } diff --git a/src/OpenSearch/Namespaces/IngestNamespace.php b/src/OpenSearch/Namespaces/IngestNamespace.php index b0ef37235..23e184826 100644 --- a/src/OpenSearch/Namespaces/IngestNamespace.php +++ b/src/OpenSearch/Namespaces/IngestNamespace.php @@ -21,8 +21,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class IngestNamespace * diff --git a/src/OpenSearch/Namespaces/InsightsNamespace.php b/src/OpenSearch/Namespaces/InsightsNamespace.php index 8017024ff..7edb4fdcb 100644 --- a/src/OpenSearch/Namespaces/InsightsNamespace.php +++ b/src/OpenSearch/Namespaces/InsightsNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class InsightsNamespace * diff --git a/src/OpenSearch/Namespaces/IsmNamespace.php b/src/OpenSearch/Namespaces/IsmNamespace.php index bebc39111..9aca519f3 100644 --- a/src/OpenSearch/Namespaces/IsmNamespace.php +++ b/src/OpenSearch/Namespaces/IsmNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class IsmNamespace * @@ -124,7 +122,7 @@ public function existsPolicy(array $params = []): bool $endpoint->setParams($params); $endpoint->setPolicyId($policy_id); - return BooleanRequestWrapper::performRequest($endpoint, $this->transport); + return BooleanRequestWrapper::sendRequest($endpoint, $this->httpTransport); } /** diff --git a/src/OpenSearch/Namespaces/KnnNamespace.php b/src/OpenSearch/Namespaces/KnnNamespace.php index 0fb72f78e..d33805db9 100644 --- a/src/OpenSearch/Namespaces/KnnNamespace.php +++ b/src/OpenSearch/Namespaces/KnnNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class KnnNamespace * diff --git a/src/OpenSearch/Namespaces/ListNamespace.php b/src/OpenSearch/Namespaces/ListNamespace.php index f6e97043c..de0aac1fb 100644 --- a/src/OpenSearch/Namespaces/ListNamespace.php +++ b/src/OpenSearch/Namespaces/ListNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class ListNamespace * @@ -48,7 +46,7 @@ public function help(array $params = []) * Returns paginated information about indexes including number of primaries and replicas, document counts, disk size. * * $params['index'] = (array) Comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['bytes'] = (any) The unit used to display byte values. * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. * $params['expand_wildcards'] = (any) The type of index that wildcard patterns can match. * $params['format'] = (string) A short version of the Accept header, such as `JSON`, `YAML`. @@ -63,7 +61,7 @@ public function help(array $params = []) * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. * $params['size'] = (integer) Maximum number of indexes to be displayed in a page. * $params['sort'] = (enum) Defines order in which indexes will be displayed. Accepted values are `asc` and `desc`. If `desc`, most recently created indexes would be displayed first. (Options = asc,desc) - * $params['time'] = (enum) The unit used to display time values. (Options = d,h,m,micros,ms,nanos,s) + * $params['time'] = (any) The unit used to display time values. * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) @@ -89,7 +87,7 @@ public function indices(array $params = []) * Returns paginated details of shard allocation on nodes. * * $params['index'] = (array) A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`. - * $params['bytes'] = (enum) The unit used to display byte values. (Options = b,g,gb,k,kb,m,mb,p,pb,t,tb) + * $params['bytes'] = (any) The unit used to display byte values. * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. * $params['format'] = (string) A short version of the Accept header, such as `JSON`, `YAML`. * $params['h'] = (array) Comma-separated list of column names to display. @@ -100,7 +98,7 @@ public function indices(array $params = []) * $params['s'] = (array) Comma-separated list of column names or column aliases to sort by. * $params['size'] = (integer) Maximum number of shards to be displayed in a page. * $params['sort'] = (enum) Defines order in which shards will be displayed. Accepted values are `asc` and `desc`. If `desc`, most recently created shards would be displayed first. (Options = asc,desc) - * $params['time'] = (enum) The unit in which to display time values. (Options = d,h,m,micros,ms,nanos,s) + * $params['time'] = (any) The unit in which to display time values. * $params['v'] = (boolean) Verbose mode. Display column headers. (Default = false) * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) diff --git a/src/OpenSearch/Namespaces/MlNamespace.php b/src/OpenSearch/Namespaces/MlNamespace.php index 473a754f6..90bbc40d7 100644 --- a/src/OpenSearch/Namespaces/MlNamespace.php +++ b/src/OpenSearch/Namespaces/MlNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class MlNamespace * @@ -24,6 +22,55 @@ */ class MlNamespace extends AbstractNamespace { + /** + * Create a memory. + * + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function createMemory(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\CreateMemory::class); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Create a message. + * + * $params['memory_id'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function createMessage(array $params = []) + { + $memory_id = $this->extractArgument($params, 'memory_id'); + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\CreateMessage::class); + $endpoint->setParams($params); + $endpoint->setMemoryId($memory_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** * Delete an agent. * @@ -48,6 +95,30 @@ public function deleteAgent(array $params = []) return $this->performRequest($endpoint); } + /** + * Delete a memory. + * + * $params['memory_id'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function deleteMemory(array $params = []) + { + $memory_id = $this->extractArgument($params, 'memory_id'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\DeleteMemory::class); + $endpoint->setParams($params); + $endpoint->setMemoryId($memory_id); + + return $this->performRequest($endpoint); + } + /** * Deletes a model. * @@ -120,6 +191,83 @@ public function deleteTask(array $params = []) return $this->performRequest($endpoint); } + /** + * Get a memory. + * + * $params['memory_id'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function getMemory(array $params = []) + { + $memory_id = $this->extractArgument($params, 'memory_id'); + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\GetMemory::class); + $endpoint->setParams($params); + $endpoint->setMemoryId($memory_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Get a message. + * + * $params['memory_id'] = (string) + * $params['message_id'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function getMessage(array $params = []) + { + $memory_id = $this->extractArgument($params, 'memory_id'); + $message_id = $this->extractArgument($params, 'message_id'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\GetMessage::class); + $endpoint->setParams($params); + $endpoint->setMemoryId($memory_id); + $endpoint->setMessageId($message_id); + + return $this->performRequest($endpoint); + } + + /** + * Get a message traces. + * + * $params['message_id'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function getMessageTraces(array $params = []) + { + $message_id = $this->extractArgument($params, 'message_id'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\GetMessageTraces::class); + $endpoint->setParams($params); + $endpoint->setMessageId($message_id); + + return $this->performRequest($endpoint); + } + /** * Retrieves a model group. * @@ -237,6 +385,101 @@ public function registerModelGroup(array $params = []) return $this->performRequest($endpoint); } + /** + * Searches for standalone connectors. + * + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function searchConnectors(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\SearchConnectors::class); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Search memory. + * + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function searchMemory(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\SearchMemory::class); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Search messages. + * + * $params['memory_id'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function searchMessage(array $params = []) + { + $memory_id = $this->extractArgument($params, 'memory_id'); + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\SearchMessage::class); + $endpoint->setParams($params); + $endpoint->setMemoryId($memory_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Searches for model groups. + * + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function searchModelGroup(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\SearchModelGroup::class); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** * Searches for models. * @@ -260,6 +503,136 @@ public function searchModels(array $params = []) return $this->performRequest($endpoint); } + /** + * Trains a model synchronously. + * + * $params['algorithm_name'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function train(array $params = []) + { + $algorithm_name = $this->extractArgument($params, 'algorithm_name'); + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\Train::class); + $endpoint->setParams($params); + $endpoint->setAlgorithmName($algorithm_name); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Trains a model and predicts against the same training dataset. + * + * $params['algorithm_name'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function trainPredict(array $params = []) + { + $algorithm_name = $this->extractArgument($params, 'algorithm_name'); + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\TrainPredict::class); + $endpoint->setParams($params); + $endpoint->setAlgorithmName($algorithm_name); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Updates a standalone connector. + * + * $params['connector_id'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function updateConnector(array $params = []) + { + $connector_id = $this->extractArgument($params, 'connector_id'); + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\UpdateConnector::class); + $endpoint->setParams($params); + $endpoint->setConnectorId($connector_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Update a memory. + * + * $params['memory_id'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function updateMemory(array $params = []) + { + $memory_id = $this->extractArgument($params, 'memory_id'); + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\UpdateMemory::class); + $endpoint->setParams($params); + $endpoint->setMemoryId($memory_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + + /** + * Update a message. + * + * $params['message_id'] = (string) + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) + * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) + * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. + * $params['filter_path'] = (any) 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 "-". + * + * @param array $params Associative array of parameters + * @return array + */ + public function updateMessage(array $params = []) + { + $message_id = $this->extractArgument($params, 'message_id'); + $body = $this->extractArgument($params, 'body'); + + $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Ml\UpdateMessage::class); + $endpoint->setParams($params); + $endpoint->setMessageId($message_id); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** * $params['body'] = (string) The body of the request (Required) * diff --git a/src/OpenSearch/Namespaces/NodesNamespace.php b/src/OpenSearch/Namespaces/NodesNamespace.php index d5029067b..32dfc08e3 100644 --- a/src/OpenSearch/Namespaces/NodesNamespace.php +++ b/src/OpenSearch/Namespaces/NodesNamespace.php @@ -21,8 +21,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class NodesNamespace * diff --git a/src/OpenSearch/Namespaces/NotificationsNamespace.php b/src/OpenSearch/Namespaces/NotificationsNamespace.php index cf4df692d..997e5bac0 100644 --- a/src/OpenSearch/Namespaces/NotificationsNamespace.php +++ b/src/OpenSearch/Namespaces/NotificationsNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class NotificationsNamespace * diff --git a/src/OpenSearch/Namespaces/ObservabilityNamespace.php b/src/OpenSearch/Namespaces/ObservabilityNamespace.php index 167efc0ad..3bc1486e7 100644 --- a/src/OpenSearch/Namespaces/ObservabilityNamespace.php +++ b/src/OpenSearch/Namespaces/ObservabilityNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class ObservabilityNamespace * diff --git a/src/OpenSearch/Namespaces/PplNamespace.php b/src/OpenSearch/Namespaces/PplNamespace.php index aa08509af..fa2149c18 100644 --- a/src/OpenSearch/Namespaces/PplNamespace.php +++ b/src/OpenSearch/Namespaces/PplNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class PplNamespace * diff --git a/src/OpenSearch/Namespaces/QueryNamespace.php b/src/OpenSearch/Namespaces/QueryNamespace.php index 15ebf3f24..a9f3893e9 100644 --- a/src/OpenSearch/Namespaces/QueryNamespace.php +++ b/src/OpenSearch/Namespaces/QueryNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class QueryNamespace * diff --git a/src/OpenSearch/Namespaces/RemoteStoreNamespace.php b/src/OpenSearch/Namespaces/RemoteStoreNamespace.php index a910f508a..1884900d1 100644 --- a/src/OpenSearch/Namespaces/RemoteStoreNamespace.php +++ b/src/OpenSearch/Namespaces/RemoteStoreNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class RemoteStoreNamespace * diff --git a/src/OpenSearch/Namespaces/ReplicationNamespace.php b/src/OpenSearch/Namespaces/ReplicationNamespace.php index e90c397da..bc9f709ad 100644 --- a/src/OpenSearch/Namespaces/ReplicationNamespace.php +++ b/src/OpenSearch/Namespaces/ReplicationNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class ReplicationNamespace * diff --git a/src/OpenSearch/Namespaces/RollupsNamespace.php b/src/OpenSearch/Namespaces/RollupsNamespace.php index 4a5a00d28..57adaea21 100644 --- a/src/OpenSearch/Namespaces/RollupsNamespace.php +++ b/src/OpenSearch/Namespaces/RollupsNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class RollupsNamespace * diff --git a/src/OpenSearch/Namespaces/SearchPipelineNamespace.php b/src/OpenSearch/Namespaces/SearchPipelineNamespace.php index c9f294db9..fea10cfb0 100644 --- a/src/OpenSearch/Namespaces/SearchPipelineNamespace.php +++ b/src/OpenSearch/Namespaces/SearchPipelineNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class SearchPipelineNamespace * diff --git a/src/OpenSearch/Namespaces/SecurityNamespace.php b/src/OpenSearch/Namespaces/SecurityNamespace.php index 7930ef900..17dd7fefe 100644 --- a/src/OpenSearch/Namespaces/SecurityNamespace.php +++ b/src/OpenSearch/Namespaces/SecurityNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class SecurityNamespace * diff --git a/src/OpenSearch/Namespaces/SmNamespace.php b/src/OpenSearch/Namespaces/SmNamespace.php index 950420a03..3837edbe1 100644 --- a/src/OpenSearch/Namespaces/SmNamespace.php +++ b/src/OpenSearch/Namespaces/SmNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class SmNamespace * diff --git a/src/OpenSearch/Namespaces/SnapshotNamespace.php b/src/OpenSearch/Namespaces/SnapshotNamespace.php index b93cb40d1..8f00b42c4 100644 --- a/src/OpenSearch/Namespaces/SnapshotNamespace.php +++ b/src/OpenSearch/Namespaces/SnapshotNamespace.php @@ -21,8 +21,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class SnapshotNamespace * diff --git a/src/OpenSearch/Namespaces/SqlNamespace.php b/src/OpenSearch/Namespaces/SqlNamespace.php index 783668c25..5a9fe9cf7 100644 --- a/src/OpenSearch/Namespaces/SqlNamespace.php +++ b/src/OpenSearch/Namespaces/SqlNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class SqlNamespace * diff --git a/src/OpenSearch/Namespaces/TasksNamespace.php b/src/OpenSearch/Namespaces/TasksNamespace.php index 9c46d1117..99fdf5373 100644 --- a/src/OpenSearch/Namespaces/TasksNamespace.php +++ b/src/OpenSearch/Namespaces/TasksNamespace.php @@ -21,8 +21,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class TasksNamespace * diff --git a/src/OpenSearch/Namespaces/TransformsNamespace.php b/src/OpenSearch/Namespaces/TransformsNamespace.php index e4599d227..794c48f3a 100644 --- a/src/OpenSearch/Namespaces/TransformsNamespace.php +++ b/src/OpenSearch/Namespaces/TransformsNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class TransformsNamespace * diff --git a/src/OpenSearch/Namespaces/WlmNamespace.php b/src/OpenSearch/Namespaces/WlmNamespace.php index 53670a61d..c520e8ea8 100644 --- a/src/OpenSearch/Namespaces/WlmNamespace.php +++ b/src/OpenSearch/Namespaces/WlmNamespace.php @@ -15,8 +15,6 @@ namespace OpenSearch\Namespaces; -use OpenSearch\Namespaces\AbstractNamespace; - /** * Class WlmNamespace *