From 7d2da2c36c141265418fcb681e15517445272abf Mon Sep 17 00:00:00 2001 From: Kim Pepper Date: Sat, 2 Nov 2024 13:31:45 +1100 Subject: [PATCH 1/3] Return static from fluid setters Signed-off-by: Kim Pepper --- CHANGELOG.md | 1 + src/OpenSearch/Client.php | 14 ++ .../Endpoints/AsynchronousSearch/Search.php | 2 +- src/OpenSearch/Endpoints/Bulk.php | 3 +- src/OpenSearch/Endpoints/BulkStream.php | 3 +- src/OpenSearch/Endpoints/Cat/Aliases.php | 2 +- src/OpenSearch/Endpoints/Cat/Allocation.php | 2 +- src/OpenSearch/Endpoints/Cat/Fielddata.php | 2 +- src/OpenSearch/Endpoints/Cat/PitSegments.php | 2 +- src/OpenSearch/Endpoints/Cat/Snapshots.php | 2 +- src/OpenSearch/Endpoints/Cat/Templates.php | 2 +- src/OpenSearch/Endpoints/Cat/ThreadPool.php | 2 +- src/OpenSearch/Endpoints/ClearScroll.php | 4 +- .../Endpoints/Cluster/AllocationExplain.php | 2 +- .../Cluster/DeleteComponentTemplate.php | 2 +- .../Cluster/DeleteWeightedRouting.php | 2 +- .../Cluster/ExistsComponentTemplate.php | 2 +- .../Cluster/GetComponentTemplate.php | 2 +- .../Cluster/GetDecommissionAwareness.php | 2 +- .../Endpoints/Cluster/GetWeightedRouting.php | 2 +- .../Cluster/PutComponentTemplate.php | 4 +- .../Cluster/PutDecommissionAwareness.php | 4 +- .../Endpoints/Cluster/PutSettings.php | 2 +- .../Endpoints/Cluster/PutWeightedRouting.php | 4 +- src/OpenSearch/Endpoints/Cluster/Reroute.php | 2 +- src/OpenSearch/Endpoints/Cluster/State.php | 2 +- src/OpenSearch/Endpoints/Cluster/Stats.php | 2 +- src/OpenSearch/Endpoints/Count.php | 2 +- src/OpenSearch/Endpoints/Create.php | 2 +- .../DanglingIndices/DeleteDanglingIndex.php | 2 +- .../DanglingIndices/ImportDanglingIndex.php | 2 +- src/OpenSearch/Endpoints/DeleteByQuery.php | 2 +- .../Endpoints/DeleteByQueryRethrottle.php | 2 +- src/OpenSearch/Endpoints/DeletePit.php | 2 +- src/OpenSearch/Endpoints/Explain.php | 2 +- src/OpenSearch/Endpoints/FieldCaps.php | 2 +- .../Endpoints/FlowFramework/Create.php | 2 +- .../Endpoints/FlowFramework/Delete.php | 2 +- .../Endpoints/FlowFramework/Deprovision.php | 2 +- .../Endpoints/FlowFramework/Get.php | 2 +- .../Endpoints/FlowFramework/GetStatus.php | 2 +- .../Endpoints/FlowFramework/Provision.php | 4 +- .../Endpoints/FlowFramework/Search.php | 2 +- .../Endpoints/FlowFramework/SearchState.php | 2 +- .../Endpoints/FlowFramework/Update.php | 4 +- src/OpenSearch/Endpoints/Index.php | 2 +- src/OpenSearch/Endpoints/Indices/AddBlock.php | 2 +- src/OpenSearch/Endpoints/Indices/Analyze.php | 2 +- .../Endpoints/Indices/CloneIndices.php | 4 +- src/OpenSearch/Endpoints/Indices/Create.php | 2 +- .../Endpoints/Indices/CreateDataStream.php | 4 +- .../Endpoints/Indices/DataStreamsStats.php | 2 +- .../Endpoints/Indices/DeleteAlias.php | 2 +- .../Endpoints/Indices/DeleteDataStream.php | 2 +- .../Endpoints/Indices/DeleteIndexTemplate.php | 2 +- .../Endpoints/Indices/DeleteTemplate.php | 2 +- .../Endpoints/Indices/ExistsAlias.php | 2 +- .../Endpoints/Indices/ExistsIndexTemplate.php | 2 +- .../Endpoints/Indices/ExistsTemplate.php | 2 +- src/OpenSearch/Endpoints/Indices/GetAlias.php | 2 +- .../Endpoints/Indices/GetDataStream.php | 2 +- .../Endpoints/Indices/GetFieldMapping.php | 2 +- .../Endpoints/Indices/GetIndexTemplate.php | 2 +- .../Endpoints/Indices/GetSettings.php | 2 +- .../Endpoints/Indices/GetTemplate.php | 2 +- src/OpenSearch/Endpoints/Indices/PutAlias.php | 4 +- .../Endpoints/Indices/PutIndexTemplate.php | 4 +- .../Endpoints/Indices/PutMapping.php | 2 +- .../Endpoints/Indices/PutSettings.php | 2 +- .../Endpoints/Indices/PutTemplate.php | 4 +- .../Endpoints/Indices/ResolveIndex.php | 2 +- src/OpenSearch/Endpoints/Indices/Rollover.php | 6 +- src/OpenSearch/Endpoints/Indices/Shrink.php | 4 +- .../Indices/SimulateIndexTemplate.php | 4 +- .../Endpoints/Indices/SimulateTemplate.php | 4 +- src/OpenSearch/Endpoints/Indices/Split.php | 4 +- src/OpenSearch/Endpoints/Indices/Stats.php | 2 +- .../Endpoints/Indices/UpdateAliases.php | 2 +- .../Endpoints/Indices/ValidateQuery.php | 2 +- .../Endpoints/Ingest/PutPipeline.php | 2 +- src/OpenSearch/Endpoints/Ingest/Simulate.php | 2 +- src/OpenSearch/Endpoints/Ism/AddPolicy.php | 2 +- src/OpenSearch/Endpoints/Ism/ChangePolicy.php | 2 +- src/OpenSearch/Endpoints/Ism/DeletePolicy.php | 2 +- src/OpenSearch/Endpoints/Ism/ExistsPolicy.php | 2 +- .../Endpoints/Ism/ExplainPolicy.php | 2 +- src/OpenSearch/Endpoints/Ism/GetPolicy.php | 2 +- src/OpenSearch/Endpoints/Ism/PutPolicies.php | 2 +- src/OpenSearch/Endpoints/Ism/PutPolicy.php | 4 +- src/OpenSearch/Endpoints/Ism/RetryIndex.php | 2 +- src/OpenSearch/Endpoints/Knn/DeleteModel.php | 2 +- src/OpenSearch/Endpoints/Knn/GetModel.php | 2 +- src/OpenSearch/Endpoints/Knn/SearchModels.php | 2 +- src/OpenSearch/Endpoints/Knn/Stats.php | 4 +- src/OpenSearch/Endpoints/Knn/TrainModel.php | 4 +- src/OpenSearch/Endpoints/MTermVectors.php | 2 +- src/OpenSearch/Endpoints/Mget.php | 2 +- .../Endpoints/Ml/CreateConnector.php | 2 +- src/OpenSearch/Endpoints/Ml/DeleteAgent.php | 2 +- .../Endpoints/Ml/DeleteConnector.php | 2 +- src/OpenSearch/Endpoints/Ml/DeleteTask.php | 2 +- src/OpenSearch/Endpoints/Ml/DeployModel.php | 2 +- src/OpenSearch/Endpoints/Ml/GetModelGroup.php | 2 +- .../Endpoints/Ml/RegisterAgents.php | 2 +- src/OpenSearch/Endpoints/Ml/RegisterModel.php | 2 +- .../Endpoints/Ml/RegisterModelGroup.php | 2 +- src/OpenSearch/Endpoints/Ml/SearchModels.php | 2 +- src/OpenSearch/Endpoints/Ml/UndeployModel.php | 2 +- src/OpenSearch/Endpoints/Msearch.php | 3 +- src/OpenSearch/Endpoints/MsearchTemplate.php | 3 +- src/OpenSearch/Endpoints/Nodes/HotThreads.php | 2 +- src/OpenSearch/Endpoints/Nodes/Info.php | 6 +- .../Endpoints/Nodes/ReloadSecureSettings.php | 4 +- src/OpenSearch/Endpoints/Nodes/Stats.php | 6 +- src/OpenSearch/Endpoints/Nodes/Usage.php | 4 +- .../Endpoints/Notifications/CreateConfig.php | 2 +- .../Endpoints/Notifications/DeleteConfig.php | 2 +- .../Endpoints/Notifications/GetConfig.php | 2 +- .../Endpoints/Notifications/GetConfigs.php | 2 +- .../Endpoints/Notifications/SendTest.php | 2 +- .../Endpoints/Notifications/UpdateConfig.php | 4 +- .../Endpoints/Observability/CreateObject.php | 2 +- .../Endpoints/Observability/DeleteObject.php | 2 +- .../Endpoints/Observability/GetObject.php | 2 +- .../Endpoints/Observability/UpdateObject.php | 4 +- src/OpenSearch/Endpoints/Ppl/Explain.php | 2 +- src/OpenSearch/Endpoints/Ppl/PostStats.php | 2 +- src/OpenSearch/Endpoints/Ppl/Query.php | 2 +- src/OpenSearch/Endpoints/PutScript.php | 4 +- .../Endpoints/Query/DatasourceDelete.php | 2 +- .../Endpoints/Query/DatasourceRetrieve.php | 2 +- .../Endpoints/Query/DatasourcesCreate.php | 2 +- .../Endpoints/Query/DatasourcesUpdate.php | 2 +- src/OpenSearch/Endpoints/RankEval.php | 2 +- src/OpenSearch/Endpoints/Reindex.php | 2 +- .../Endpoints/ReindexRethrottle.php | 2 +- .../Endpoints/RemoteStore/Restore.php | 2 +- .../Endpoints/RenderSearchTemplate.php | 2 +- src/OpenSearch/Endpoints/Rollups/Put.php | 2 +- .../Endpoints/ScriptsPainlessExecute.php | 2 +- src/OpenSearch/Endpoints/Scroll.php | 4 +- src/OpenSearch/Endpoints/Search.php | 2 +- .../Endpoints/SearchPipeline/Put.php | 2 +- src/OpenSearch/Endpoints/SearchTemplate.php | 2 +- .../Endpoints/Security/ChangePassword.php | 2 +- .../Security/ConfigUpgradePerform.php | 2 +- .../Endpoints/Security/CreateActionGroup.php | 4 +- .../Endpoints/Security/CreateAllowlist.php | 2 +- .../Endpoints/Security/CreateRole.php | 4 +- .../Endpoints/Security/CreateRoleMapping.php | 4 +- .../Endpoints/Security/CreateTenant.php | 4 +- .../Security/CreateUpdateTenancyConfig.php | 2 +- .../Endpoints/Security/CreateUser.php | 4 +- .../Endpoints/Security/CreateUserLegacy.php | 4 +- .../Endpoints/Security/DeleteActionGroup.php | 2 +- .../Security/DeleteDistinguishedName.php | 2 +- .../Endpoints/Security/DeleteRole.php | 2 +- .../Endpoints/Security/DeleteRoleMapping.php | 2 +- .../Endpoints/Security/DeleteTenant.php | 2 +- .../Endpoints/Security/DeleteUser.php | 2 +- .../Endpoints/Security/DeleteUserLegacy.php | 2 +- .../Endpoints/Security/GenerateOboToken.php | 2 +- .../Endpoints/Security/GenerateUserToken.php | 2 +- .../Security/GenerateUserTokenLegacy.php | 2 +- .../Endpoints/Security/GetActionGroup.php | 2 +- .../Security/GetDistinguishedName.php | 2 +- .../Security/GetNodeCertificates.php | 2 +- src/OpenSearch/Endpoints/Security/GetRole.php | 2 +- .../Endpoints/Security/GetRoleMapping.php | 2 +- .../Endpoints/Security/GetTenant.php | 2 +- src/OpenSearch/Endpoints/Security/GetUser.php | 2 +- .../Endpoints/Security/GetUserLegacy.php | 2 +- .../Endpoints/Security/PatchActionGroup.php | 4 +- .../Endpoints/Security/PatchActionGroups.php | 2 +- .../Endpoints/Security/PatchAllowlist.php | 2 +- .../Security/PatchAuditConfiguration.php | 2 +- .../Endpoints/Security/PatchConfiguration.php | 2 +- .../Security/PatchDistinguishedName.php | 4 +- .../Security/PatchDistinguishedNames.php | 2 +- .../Endpoints/Security/PatchRole.php | 4 +- .../Endpoints/Security/PatchRoleMapping.php | 4 +- .../Endpoints/Security/PatchRoleMappings.php | 2 +- .../Endpoints/Security/PatchRoles.php | 2 +- .../Endpoints/Security/PatchTenant.php | 4 +- .../Endpoints/Security/PatchTenants.php | 2 +- .../Endpoints/Security/PatchUser.php | 4 +- .../Endpoints/Security/PatchUsers.php | 2 +- .../Security/UpdateAuditConfiguration.php | 2 +- .../Security/UpdateConfiguration.php | 2 +- .../Security/UpdateDistinguishedName.php | 4 +- .../Endpoints/Snapshot/CleanupRepository.php | 2 +- .../Endpoints/Snapshot/CloneSnapshot.php | 8 +- src/OpenSearch/Endpoints/Snapshot/Create.php | 6 +- .../Endpoints/Snapshot/CreateRepository.php | 4 +- src/OpenSearch/Endpoints/Snapshot/Delete.php | 4 +- .../Endpoints/Snapshot/DeleteRepository.php | 2 +- src/OpenSearch/Endpoints/Snapshot/Get.php | 4 +- .../Endpoints/Snapshot/GetRepository.php | 2 +- src/OpenSearch/Endpoints/Snapshot/Restore.php | 6 +- src/OpenSearch/Endpoints/Snapshot/Status.php | 4 +- .../Endpoints/Snapshot/VerifyRepository.php | 2 +- src/OpenSearch/Endpoints/Sql/Close.php | 2 +- src/OpenSearch/Endpoints/Sql/Explain.php | 2 +- src/OpenSearch/Endpoints/Sql/PostStats.php | 2 +- src/OpenSearch/Endpoints/Sql/Query.php | 2 +- src/OpenSearch/Endpoints/Sql/Settings.php | 2 +- src/OpenSearch/Endpoints/Tasks/Cancel.php | 2 +- src/OpenSearch/Endpoints/Tasks/Get.php | 2 +- src/OpenSearch/Endpoints/TermVectors.php | 2 +- .../Endpoints/Transforms/Preview.php | 2 +- src/OpenSearch/Endpoints/Transforms/Put.php | 2 +- src/OpenSearch/Endpoints/Update.php | 2 +- src/OpenSearch/Endpoints/UpdateByQuery.php | 2 +- .../Endpoints/UpdateByQueryRethrottle.php | 2 +- .../Endpoints/Wlm/CreateQueryGroup.php | 55 ++++++++ .../Endpoints/Wlm/DeleteQueryGroup.php | 62 +++++++++ .../Endpoints/Wlm/GetQueryGroup.php | 61 +++++++++ .../Endpoints/Wlm/UpdateQueryGroup.php | 72 ++++++++++ src/OpenSearch/Namespaces/WlmNamespace.php | 124 ++++++++++++++++++ util/template/set-bulk-body | 4 +- util/template/set-part | 2 +- util/template/set-part-list | 2 +- 222 files changed, 663 insertions(+), 270 deletions(-) create mode 100644 src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php create mode 100644 src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php create mode 100644 src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php create mode 100644 src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php create mode 100644 src/OpenSearch/Namespaces/WlmNamespace.php diff --git a/CHANGELOG.md b/CHANGELOG.md index d09907259..f425e5106 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,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@07e329e](https://github.com/opensearch-project/opensearch-api-specification/commit/07e329e8d01fd0576de6a0a3c35412fd5a9163db) - Updated opensearch-php APIs to reflect [opensearch-api-specification@1db1840](https://github.com/opensearch-project/opensearch-api-specification/commit/1db184063a463c5180a2cc824b1efc1aeebfd5eb) - Updated opensearch-php APIs to reflect [opensearch-api-specification@cb320b5](https://github.com/opensearch-project/opensearch-api-specification/commit/cb320b5482551c4f28afa26ff0d1653332699722) ### Security diff --git a/src/OpenSearch/Client.php b/src/OpenSearch/Client.php index 9c0746364..411ea8f5a 100644 --- a/src/OpenSearch/Client.php +++ b/src/OpenSearch/Client.php @@ -55,6 +55,7 @@ use OpenSearch\Namespaces\SslNamespace; use OpenSearch\Namespaces\TasksNamespace; use OpenSearch\Namespaces\TransformsNamespace; +use OpenSearch\Namespaces\WlmNamespace; /** * Class Client @@ -230,6 +231,11 @@ class Client */ protected $transforms; + /** + * @var WlmNamespace + */ + protected $wlm; + /** * Client constructor @@ -271,6 +277,7 @@ public function __construct(Transport $transport, callable $endpoint, array $reg $this->ssl = new SslNamespace($transport, $endpoint); $this->tasks = new TasksNamespace($transport, $endpoint); $this->transforms = new TransformsNamespace($transport, $endpoint); + $this->wlm = new WlmNamespace($transport, $endpoint); $this->registeredNamespaces = $registeredNamespaces; } @@ -1942,6 +1949,13 @@ public function transforms(): TransformsNamespace { return $this->transforms; } + /** + * Returns the wlm namespace + */ + public function wlm(): WlmNamespace + { + return $this->wlm; + } /** * Catchall for registered namespaces diff --git a/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php b/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php index 1bdd1757a..1d3e4372d 100644 --- a/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php +++ b/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php @@ -47,7 +47,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Search + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Bulk.php b/src/OpenSearch/Endpoints/Bulk.php index 6376a6fb6..65b2c16fe 100644 --- a/src/OpenSearch/Endpoints/Bulk.php +++ b/src/OpenSearch/Endpoints/Bulk.php @@ -70,7 +70,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Bulk + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -89,4 +89,5 @@ public function setBody($body): Bulk } return $this; } + } diff --git a/src/OpenSearch/Endpoints/BulkStream.php b/src/OpenSearch/Endpoints/BulkStream.php index 64925b661..daa7c7210 100644 --- a/src/OpenSearch/Endpoints/BulkStream.php +++ b/src/OpenSearch/Endpoints/BulkStream.php @@ -66,7 +66,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): BulkStream + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -85,4 +85,5 @@ public function setBody($body): BulkStream } return $this; } + } diff --git a/src/OpenSearch/Endpoints/Cat/Aliases.php b/src/OpenSearch/Endpoints/Cat/Aliases.php index cee786be3..087899d4e 100644 --- a/src/OpenSearch/Endpoints/Cat/Aliases.php +++ b/src/OpenSearch/Endpoints/Cat/Aliases.php @@ -62,7 +62,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): Aliases + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/Allocation.php b/src/OpenSearch/Endpoints/Cat/Allocation.php index 909470026..b84717d86 100644 --- a/src/OpenSearch/Endpoints/Cat/Allocation.php +++ b/src/OpenSearch/Endpoints/Cat/Allocation.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): Allocation + public function setNodeId($node_id): static { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/Fielddata.php b/src/OpenSearch/Endpoints/Cat/Fielddata.php index dd48d1562..3028f3570 100644 --- a/src/OpenSearch/Endpoints/Cat/Fielddata.php +++ b/src/OpenSearch/Endpoints/Cat/Fielddata.php @@ -62,7 +62,7 @@ public function getMethod(): string return 'GET'; } - public function setFields($fields): Fielddata + public function setFields($fields): static { if (isset($fields) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/PitSegments.php b/src/OpenSearch/Endpoints/Cat/PitSegments.php index af9981b2d..f8aa23f85 100644 --- a/src/OpenSearch/Endpoints/Cat/PitSegments.php +++ b/src/OpenSearch/Endpoints/Cat/PitSegments.php @@ -49,7 +49,7 @@ public function getMethod(): string return 'GET'; } - public function setBody($body): PitSegments + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/Snapshots.php b/src/OpenSearch/Endpoints/Cat/Snapshots.php index 03f0ae527..213bb0f4c 100644 --- a/src/OpenSearch/Endpoints/Cat/Snapshots.php +++ b/src/OpenSearch/Endpoints/Cat/Snapshots.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'GET'; } - public function setRepository($repository): Snapshots + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/Templates.php b/src/OpenSearch/Endpoints/Cat/Templates.php index 8bf42aa9a..116c05f6f 100644 --- a/src/OpenSearch/Endpoints/Cat/Templates.php +++ b/src/OpenSearch/Endpoints/Cat/Templates.php @@ -63,7 +63,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): Templates + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/ThreadPool.php b/src/OpenSearch/Endpoints/Cat/ThreadPool.php index fcd168c97..1338b7579 100644 --- a/src/OpenSearch/Endpoints/Cat/ThreadPool.php +++ b/src/OpenSearch/Endpoints/Cat/ThreadPool.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'GET'; } - public function setThreadPoolPatterns($thread_pool_patterns): ThreadPool + public function setThreadPoolPatterns($thread_pool_patterns): static { if (isset($thread_pool_patterns) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/ClearScroll.php b/src/OpenSearch/Endpoints/ClearScroll.php index 190e9be52..e00ae70ad 100644 --- a/src/OpenSearch/Endpoints/ClearScroll.php +++ b/src/OpenSearch/Endpoints/ClearScroll.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'DELETE'; } - public function setBody($body): ClearScroll + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -69,7 +69,7 @@ public function setBody($body): ClearScroll return $this; } - public function setScrollId($scroll_id): ClearScroll + public function setScrollId($scroll_id): static { if (isset($scroll_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php b/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php index 0c0c89939..0605f258c 100644 --- a/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php +++ b/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php @@ -51,7 +51,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): AllocationExplain + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php index e8b16bdcd..09dbd0567 100644 --- a/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'DELETE'; } - public function setName($name): DeleteComponentTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php b/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php index ab253fcf8..a91cb5315 100644 --- a/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php +++ b/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'DELETE'; } - public function setBody($body): DeleteWeightedRouting + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php index 3146fcc06..84ab41734 100644 --- a/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'HEAD'; } - public function setName($name): ExistsComponentTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php index 5d495710e..0d4905178 100644 --- a/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php @@ -58,7 +58,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): GetComponentTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php b/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php index 66c250c5d..4b0569b28 100644 --- a/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php +++ b/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setAwarenessAttributeName($awareness_attribute_name): GetDecommissionAwareness + public function setAwarenessAttributeName($awareness_attribute_name): static { if (isset($awareness_attribute_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php b/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php index 0890735b6..dd42bd43c 100644 --- a/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php +++ b/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setAttribute($attribute): GetWeightedRouting + public function setAttribute($attribute): static { if (isset($attribute) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php index c79a3db9a..86a698162 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutComponentTemplate + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -70,7 +70,7 @@ public function setBody($body): PutComponentTemplate return $this; } - public function setName($name): PutComponentTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php b/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php index c80fed513..713856003 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php +++ b/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setAwarenessAttributeName($awareness_attribute_name): PutDecommissionAwareness + public function setAwarenessAttributeName($awareness_attribute_name): static { if (isset($awareness_attribute_name) !== true) { return $this; @@ -62,7 +62,7 @@ public function setAwarenessAttributeName($awareness_attribute_name): PutDecommi return $this; } - public function setAwarenessAttributeValue($awareness_attribute_value): PutDecommissionAwareness + public function setAwarenessAttributeValue($awareness_attribute_value): static { if (isset($awareness_attribute_value) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/PutSettings.php b/src/OpenSearch/Endpoints/Cluster/PutSettings.php index 2a78a059e..adc67a564 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutSettings.php +++ b/src/OpenSearch/Endpoints/Cluster/PutSettings.php @@ -53,7 +53,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutSettings + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php b/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php index 2cb8eb3c6..4c707f665 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php +++ b/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutWeightedRouting + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -60,7 +60,7 @@ public function setBody($body): PutWeightedRouting return $this; } - public function setAttribute($attribute): PutWeightedRouting + public function setAttribute($attribute): static { if (isset($attribute) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/Reroute.php b/src/OpenSearch/Endpoints/Cluster/Reroute.php index 235e55154..522469177 100644 --- a/src/OpenSearch/Endpoints/Cluster/Reroute.php +++ b/src/OpenSearch/Endpoints/Cluster/Reroute.php @@ -56,7 +56,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Reroute + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/State.php b/src/OpenSearch/Endpoints/Cluster/State.php index a8b7f2ebc..61cf3ba69 100644 --- a/src/OpenSearch/Endpoints/Cluster/State.php +++ b/src/OpenSearch/Endpoints/Cluster/State.php @@ -68,7 +68,7 @@ public function getMethod(): string return 'GET'; } - public function setMetric($metric): State + public function setMetric($metric): static { if (isset($metric) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/Stats.php b/src/OpenSearch/Endpoints/Cluster/Stats.php index 4236808ae..8967dd08d 100644 --- a/src/OpenSearch/Endpoints/Cluster/Stats.php +++ b/src/OpenSearch/Endpoints/Cluster/Stats.php @@ -57,7 +57,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): Stats + public function setNodeId($node_id): static { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Count.php b/src/OpenSearch/Endpoints/Count.php index 43abf6b74..b83201db1 100644 --- a/src/OpenSearch/Endpoints/Count.php +++ b/src/OpenSearch/Endpoints/Count.php @@ -67,7 +67,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): Count + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Create.php b/src/OpenSearch/Endpoints/Create.php index 9fd7b60b9..28dac6add 100644 --- a/src/OpenSearch/Endpoints/Create.php +++ b/src/OpenSearch/Endpoints/Create.php @@ -69,7 +69,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): Create + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php b/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php index bc1e1d8ad..7e9a82c7d 100644 --- a/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php +++ b/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'DELETE'; } - public function setIndexUuid($index_uuid): DeleteDanglingIndex + public function setIndexUuid($index_uuid): static { if (isset($index_uuid) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php b/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php index ca86f44d6..595507962 100644 --- a/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php +++ b/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'POST'; } - public function setIndexUuid($index_uuid): ImportDanglingIndex + public function setIndexUuid($index_uuid): static { if (isset($index_uuid) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/DeleteByQuery.php b/src/OpenSearch/Endpoints/DeleteByQuery.php index cbcf95eb4..f01f07cf7 100644 --- a/src/OpenSearch/Endpoints/DeleteByQuery.php +++ b/src/OpenSearch/Endpoints/DeleteByQuery.php @@ -89,7 +89,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): DeleteByQuery + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php b/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php index a8cab68c9..05a53021b 100644 --- a/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php +++ b/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setTaskId($task_id): DeleteByQueryRethrottle + public function setTaskId($task_id): static { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/DeletePit.php b/src/OpenSearch/Endpoints/DeletePit.php index df9768d35..eca440196 100644 --- a/src/OpenSearch/Endpoints/DeletePit.php +++ b/src/OpenSearch/Endpoints/DeletePit.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'DELETE'; } - public function setBody($body): DeletePit + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Explain.php b/src/OpenSearch/Endpoints/Explain.php index cf5a6f1c2..9241ef835 100644 --- a/src/OpenSearch/Endpoints/Explain.php +++ b/src/OpenSearch/Endpoints/Explain.php @@ -74,7 +74,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): Explain + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FieldCaps.php b/src/OpenSearch/Endpoints/FieldCaps.php index 93cd37492..d6f22027a 100644 --- a/src/OpenSearch/Endpoints/FieldCaps.php +++ b/src/OpenSearch/Endpoints/FieldCaps.php @@ -58,7 +58,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): FieldCaps + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Create.php b/src/OpenSearch/Endpoints/FlowFramework/Create.php index 38084e8b0..60fbac848 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Create.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Create.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Create + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Delete.php b/src/OpenSearch/Endpoints/FlowFramework/Delete.php index 2dd15cb76..c1a75384e 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Delete.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Delete.php @@ -51,7 +51,7 @@ public function getMethod(): string return 'DELETE'; } - public function setWorkflowId($workflow_id): Delete + public function setWorkflowId($workflow_id): static { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php b/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php index d9429096a..c9ef2db18 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php @@ -51,7 +51,7 @@ public function getMethod(): string return 'POST'; } - public function setWorkflowId($workflow_id): Deprovision + public function setWorkflowId($workflow_id): static { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Get.php b/src/OpenSearch/Endpoints/FlowFramework/Get.php index f9c6fc9b1..09226a2fa 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Get.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Get.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setWorkflowId($workflow_id): Get + public function setWorkflowId($workflow_id): static { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php b/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php index e00e918e5..9576306f7 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php +++ b/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php @@ -51,7 +51,7 @@ public function getMethod(): string return 'GET'; } - public function setWorkflowId($workflow_id): GetStatus + public function setWorkflowId($workflow_id): static { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Provision.php b/src/OpenSearch/Endpoints/FlowFramework/Provision.php index 97479db37..9ee121c8f 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Provision.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Provision.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Provision + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -60,7 +60,7 @@ public function setBody($body): Provision return $this; } - public function setWorkflowId($workflow_id): Provision + public function setWorkflowId($workflow_id): static { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Search.php b/src/OpenSearch/Endpoints/FlowFramework/Search.php index 7c584a920..353287d89 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Search.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Search.php @@ -43,7 +43,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): Search + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/SearchState.php b/src/OpenSearch/Endpoints/FlowFramework/SearchState.php index 493339c99..d1ee9c7e3 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/SearchState.php +++ b/src/OpenSearch/Endpoints/FlowFramework/SearchState.php @@ -43,7 +43,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): SearchState + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Update.php b/src/OpenSearch/Endpoints/FlowFramework/Update.php index 3b3479f9d..73fa0e123 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Update.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Update.php @@ -55,7 +55,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): Update + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -65,7 +65,7 @@ public function setBody($body): Update return $this; } - public function setWorkflowId($workflow_id): Update + public function setWorkflowId($workflow_id): static { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Index.php b/src/OpenSearch/Endpoints/Index.php index abeecc314..48ad123c7 100644 --- a/src/OpenSearch/Endpoints/Index.php +++ b/src/OpenSearch/Endpoints/Index.php @@ -71,7 +71,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Index + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/AddBlock.php b/src/OpenSearch/Endpoints/Indices/AddBlock.php index 5c878c890..867c07886 100644 --- a/src/OpenSearch/Endpoints/Indices/AddBlock.php +++ b/src/OpenSearch/Endpoints/Indices/AddBlock.php @@ -63,7 +63,7 @@ public function getMethod(): string return 'PUT'; } - public function setBlock($block): AddBlock + public function setBlock($block): static { if (isset($block) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Analyze.php b/src/OpenSearch/Endpoints/Indices/Analyze.php index 845502ca7..63f6612a4 100644 --- a/src/OpenSearch/Endpoints/Indices/Analyze.php +++ b/src/OpenSearch/Endpoints/Indices/Analyze.php @@ -54,7 +54,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): Analyze + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/CloneIndices.php b/src/OpenSearch/Endpoints/Indices/CloneIndices.php index ca94ac967..dd92e5344 100644 --- a/src/OpenSearch/Endpoints/Indices/CloneIndices.php +++ b/src/OpenSearch/Endpoints/Indices/CloneIndices.php @@ -63,7 +63,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CloneIndices + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -73,7 +73,7 @@ public function setBody($body): CloneIndices return $this; } - public function setTarget($target): CloneIndices + public function setTarget($target): static { if (isset($target) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Create.php b/src/OpenSearch/Endpoints/Indices/Create.php index bf9e3d564..e0336b805 100644 --- a/src/OpenSearch/Endpoints/Indices/Create.php +++ b/src/OpenSearch/Endpoints/Indices/Create.php @@ -58,7 +58,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): Create + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/CreateDataStream.php b/src/OpenSearch/Endpoints/Indices/CreateDataStream.php index 0c74c24d0..97a98880a 100644 --- a/src/OpenSearch/Endpoints/Indices/CreateDataStream.php +++ b/src/OpenSearch/Endpoints/Indices/CreateDataStream.php @@ -56,7 +56,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CreateDataStream + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -66,7 +66,7 @@ public function setBody($body): CreateDataStream return $this; } - public function setName($name): CreateDataStream + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/DataStreamsStats.php b/src/OpenSearch/Endpoints/Indices/DataStreamsStats.php index fc3ee0399..49619f240 100644 --- a/src/OpenSearch/Endpoints/Indices/DataStreamsStats.php +++ b/src/OpenSearch/Endpoints/Indices/DataStreamsStats.php @@ -55,7 +55,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): DataStreamsStats + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/DeleteAlias.php b/src/OpenSearch/Endpoints/Indices/DeleteAlias.php index edce99b36..7829f215b 100644 --- a/src/OpenSearch/Endpoints/Indices/DeleteAlias.php +++ b/src/OpenSearch/Endpoints/Indices/DeleteAlias.php @@ -67,7 +67,7 @@ public function getMethod(): string return 'DELETE'; } - public function setName($name): DeleteAlias + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/DeleteDataStream.php b/src/OpenSearch/Endpoints/Indices/DeleteDataStream.php index f266b1d81..be9fe5f00 100644 --- a/src/OpenSearch/Endpoints/Indices/DeleteDataStream.php +++ b/src/OpenSearch/Endpoints/Indices/DeleteDataStream.php @@ -56,7 +56,7 @@ public function getMethod(): string return 'DELETE'; } - public function setName($name): DeleteDataStream + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php index 41f340d19..a4013a1e1 100644 --- a/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'DELETE'; } - public function setName($name): DeleteIndexTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php b/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php index 40f3c92ea..f1137aa0a 100644 --- a/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'DELETE'; } - public function setName($name): DeleteTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/ExistsAlias.php b/src/OpenSearch/Endpoints/Indices/ExistsAlias.php index 5b391dd17..e8a7fe6e3 100644 --- a/src/OpenSearch/Endpoints/Indices/ExistsAlias.php +++ b/src/OpenSearch/Endpoints/Indices/ExistsAlias.php @@ -66,7 +66,7 @@ public function getMethod(): string return 'HEAD'; } - public function setName($name): ExistsAlias + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php index 437baf77b..e2a57d272 100644 --- a/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'HEAD'; } - public function setName($name): ExistsIndexTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/ExistsTemplate.php b/src/OpenSearch/Endpoints/Indices/ExistsTemplate.php index 023903145..16cedd185 100644 --- a/src/OpenSearch/Endpoints/Indices/ExistsTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/ExistsTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'HEAD'; } - public function setName($name): ExistsTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetAlias.php b/src/OpenSearch/Endpoints/Indices/GetAlias.php index 1a2cdc76e..ef22815f2 100644 --- a/src/OpenSearch/Endpoints/Indices/GetAlias.php +++ b/src/OpenSearch/Endpoints/Indices/GetAlias.php @@ -66,7 +66,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): GetAlias + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetDataStream.php b/src/OpenSearch/Endpoints/Indices/GetDataStream.php index 0b34c6570..60888c85b 100644 --- a/src/OpenSearch/Endpoints/Indices/GetDataStream.php +++ b/src/OpenSearch/Endpoints/Indices/GetDataStream.php @@ -55,7 +55,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): GetDataStream + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetFieldMapping.php b/src/OpenSearch/Endpoints/Indices/GetFieldMapping.php index aa2db2de4..fe2575a8a 100644 --- a/src/OpenSearch/Endpoints/Indices/GetFieldMapping.php +++ b/src/OpenSearch/Endpoints/Indices/GetFieldMapping.php @@ -67,7 +67,7 @@ public function getMethod(): string return 'GET'; } - public function setFields($fields): GetFieldMapping + public function setFields($fields): static { if (isset($fields) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/GetIndexTemplate.php index 84915edd1..aad6765bc 100644 --- a/src/OpenSearch/Endpoints/Indices/GetIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/GetIndexTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): GetIndexTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetSettings.php b/src/OpenSearch/Endpoints/Indices/GetSettings.php index 6f0aa1b50..16b1930ea 100644 --- a/src/OpenSearch/Endpoints/Indices/GetSettings.php +++ b/src/OpenSearch/Endpoints/Indices/GetSettings.php @@ -70,7 +70,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): GetSettings + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetTemplate.php b/src/OpenSearch/Endpoints/Indices/GetTemplate.php index 83568eb6b..e9876dcee 100644 --- a/src/OpenSearch/Endpoints/Indices/GetTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/GetTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): GetTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/PutAlias.php b/src/OpenSearch/Endpoints/Indices/PutAlias.php index 62599f4c6..eeb8bd5c7 100644 --- a/src/OpenSearch/Endpoints/Indices/PutAlias.php +++ b/src/OpenSearch/Endpoints/Indices/PutAlias.php @@ -65,7 +65,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutAlias + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -75,7 +75,7 @@ public function setBody($body): PutAlias return $this; } - public function setName($name): PutAlias + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php index 527130297..f263c7f7f 100644 --- a/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutIndexTemplate + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -70,7 +70,7 @@ public function setBody($body): PutIndexTemplate return $this; } - public function setName($name): PutIndexTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/PutMapping.php b/src/OpenSearch/Endpoints/Indices/PutMapping.php index fd10a8885..b3f636260 100644 --- a/src/OpenSearch/Endpoints/Indices/PutMapping.php +++ b/src/OpenSearch/Endpoints/Indices/PutMapping.php @@ -61,7 +61,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutMapping + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/PutSettings.php b/src/OpenSearch/Endpoints/Indices/PutSettings.php index 332b2286e..0f66696c0 100644 --- a/src/OpenSearch/Endpoints/Indices/PutSettings.php +++ b/src/OpenSearch/Endpoints/Indices/PutSettings.php @@ -61,7 +61,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutSettings + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/PutTemplate.php b/src/OpenSearch/Endpoints/Indices/PutTemplate.php index 90c581a39..666d67b38 100644 --- a/src/OpenSearch/Endpoints/Indices/PutTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/PutTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutTemplate + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -70,7 +70,7 @@ public function setBody($body): PutTemplate return $this; } - public function setName($name): PutTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/ResolveIndex.php b/src/OpenSearch/Endpoints/Indices/ResolveIndex.php index c6d2fec0b..95604069b 100644 --- a/src/OpenSearch/Endpoints/Indices/ResolveIndex.php +++ b/src/OpenSearch/Endpoints/Indices/ResolveIndex.php @@ -57,7 +57,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): ResolveIndex + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Rollover.php b/src/OpenSearch/Endpoints/Indices/Rollover.php index 0f4ec259e..18c1519b6 100644 --- a/src/OpenSearch/Endpoints/Indices/Rollover.php +++ b/src/OpenSearch/Endpoints/Indices/Rollover.php @@ -68,7 +68,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Rollover + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -78,7 +78,7 @@ public function setBody($body): Rollover return $this; } - public function setAlias($alias): Rollover + public function setAlias($alias): static { if (isset($alias) !== true) { return $this; @@ -88,7 +88,7 @@ public function setAlias($alias): Rollover return $this; } - public function setNewIndex($new_index): Rollover + public function setNewIndex($new_index): static { if (isset($new_index) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Shrink.php b/src/OpenSearch/Endpoints/Indices/Shrink.php index 8806b7e60..c271712bf 100644 --- a/src/OpenSearch/Endpoints/Indices/Shrink.php +++ b/src/OpenSearch/Endpoints/Indices/Shrink.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): Shrink + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -74,7 +74,7 @@ public function setBody($body): Shrink return $this; } - public function setTarget($target): Shrink + public function setTarget($target): static { if (isset($target) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php index cc987ae2f..977da3855 100644 --- a/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): SimulateIndexTemplate + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -70,7 +70,7 @@ public function setBody($body): SimulateIndexTemplate return $this; } - public function setName($name): SimulateIndexTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php b/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php index 8aa2c0ffa..16ec3a9da 100644 --- a/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): SimulateTemplate + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -69,7 +69,7 @@ public function setBody($body): SimulateTemplate return $this; } - public function setName($name): SimulateTemplate + public function setName($name): static { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Split.php b/src/OpenSearch/Endpoints/Indices/Split.php index 6559b8818..3fff81d37 100644 --- a/src/OpenSearch/Endpoints/Indices/Split.php +++ b/src/OpenSearch/Endpoints/Indices/Split.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): Split + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -74,7 +74,7 @@ public function setBody($body): Split return $this; } - public function setTarget($target): Split + public function setTarget($target): static { if (isset($target) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Stats.php b/src/OpenSearch/Endpoints/Indices/Stats.php index 86195e165..a1f51f4d8 100644 --- a/src/OpenSearch/Endpoints/Indices/Stats.php +++ b/src/OpenSearch/Endpoints/Indices/Stats.php @@ -71,7 +71,7 @@ public function getMethod(): string return 'GET'; } - public function setMetric($metric): Stats + public function setMetric($metric): static { if (isset($metric) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/UpdateAliases.php b/src/OpenSearch/Endpoints/Indices/UpdateAliases.php index fea7b223f..d7dcbb9f8 100644 --- a/src/OpenSearch/Endpoints/Indices/UpdateAliases.php +++ b/src/OpenSearch/Endpoints/Indices/UpdateAliases.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): UpdateAliases + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/ValidateQuery.php b/src/OpenSearch/Endpoints/Indices/ValidateQuery.php index b6d6bda7d..008bebfe5 100644 --- a/src/OpenSearch/Endpoints/Indices/ValidateQuery.php +++ b/src/OpenSearch/Endpoints/Indices/ValidateQuery.php @@ -65,7 +65,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): ValidateQuery + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ingest/PutPipeline.php b/src/OpenSearch/Endpoints/Ingest/PutPipeline.php index 9205cbc42..1a4cef432 100644 --- a/src/OpenSearch/Endpoints/Ingest/PutPipeline.php +++ b/src/OpenSearch/Endpoints/Ingest/PutPipeline.php @@ -57,7 +57,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutPipeline + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ingest/Simulate.php b/src/OpenSearch/Endpoints/Ingest/Simulate.php index afc876231..44e3ba9d2 100644 --- a/src/OpenSearch/Endpoints/Ingest/Simulate.php +++ b/src/OpenSearch/Endpoints/Ingest/Simulate.php @@ -54,7 +54,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): Simulate + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/AddPolicy.php b/src/OpenSearch/Endpoints/Ism/AddPolicy.php index f87d83b68..045768abe 100644 --- a/src/OpenSearch/Endpoints/Ism/AddPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/AddPolicy.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): AddPolicy + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/ChangePolicy.php b/src/OpenSearch/Endpoints/Ism/ChangePolicy.php index 8815ec48a..49dbb9d23 100644 --- a/src/OpenSearch/Endpoints/Ism/ChangePolicy.php +++ b/src/OpenSearch/Endpoints/Ism/ChangePolicy.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): ChangePolicy + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/DeletePolicy.php b/src/OpenSearch/Endpoints/Ism/DeletePolicy.php index 00e92dbd3..a30b2a258 100644 --- a/src/OpenSearch/Endpoints/Ism/DeletePolicy.php +++ b/src/OpenSearch/Endpoints/Ism/DeletePolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setPolicyId($policy_id): DeletePolicy + public function setPolicyId($policy_id): static { if (isset($policy_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php b/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php index c7187f999..55ea59b58 100644 --- a/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'HEAD'; } - public function setPolicyId($policy_id): ExistsPolicy + public function setPolicyId($policy_id): static { if (isset($policy_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php b/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php index 80b2bb9a4..35236df6b 100644 --- a/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php @@ -47,7 +47,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): ExplainPolicy + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/GetPolicy.php b/src/OpenSearch/Endpoints/Ism/GetPolicy.php index 6138c890d..469dc7758 100644 --- a/src/OpenSearch/Endpoints/Ism/GetPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/GetPolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setPolicyId($policy_id): GetPolicy + public function setPolicyId($policy_id): static { if (isset($policy_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/PutPolicies.php b/src/OpenSearch/Endpoints/Ism/PutPolicies.php index 8b80ed8e8..5148d8811 100644 --- a/src/OpenSearch/Endpoints/Ism/PutPolicies.php +++ b/src/OpenSearch/Endpoints/Ism/PutPolicies.php @@ -46,7 +46,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutPolicies + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/PutPolicy.php b/src/OpenSearch/Endpoints/Ism/PutPolicy.php index 253b4d554..e93b289b3 100644 --- a/src/OpenSearch/Endpoints/Ism/PutPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/PutPolicy.php @@ -54,7 +54,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutPolicy + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -64,7 +64,7 @@ public function setBody($body): PutPolicy return $this; } - public function setPolicyId($policy_id): PutPolicy + public function setPolicyId($policy_id): static { if (isset($policy_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/RetryIndex.php b/src/OpenSearch/Endpoints/Ism/RetryIndex.php index d263e8502..1056aab5e 100644 --- a/src/OpenSearch/Endpoints/Ism/RetryIndex.php +++ b/src/OpenSearch/Endpoints/Ism/RetryIndex.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): RetryIndex + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Knn/DeleteModel.php b/src/OpenSearch/Endpoints/Knn/DeleteModel.php index e4afbc057..f650a5751 100644 --- a/src/OpenSearch/Endpoints/Knn/DeleteModel.php +++ b/src/OpenSearch/Endpoints/Knn/DeleteModel.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setModelId($model_id): DeleteModel + public function setModelId($model_id): static { if (isset($model_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Knn/GetModel.php b/src/OpenSearch/Endpoints/Knn/GetModel.php index c8d2e927b..410d884b1 100644 --- a/src/OpenSearch/Endpoints/Knn/GetModel.php +++ b/src/OpenSearch/Endpoints/Knn/GetModel.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setModelId($model_id): GetModel + public function setModelId($model_id): static { if (isset($model_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Knn/SearchModels.php b/src/OpenSearch/Endpoints/Knn/SearchModels.php index 23e988cd4..cd25afc58 100644 --- a/src/OpenSearch/Endpoints/Knn/SearchModels.php +++ b/src/OpenSearch/Endpoints/Knn/SearchModels.php @@ -85,7 +85,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): SearchModels + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Knn/Stats.php b/src/OpenSearch/Endpoints/Knn/Stats.php index a5fac1964..a8d17d78a 100644 --- a/src/OpenSearch/Endpoints/Knn/Stats.php +++ b/src/OpenSearch/Endpoints/Knn/Stats.php @@ -58,7 +58,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): Stats + public function setNodeId($node_id): static { if (isset($node_id) !== true) { return $this; @@ -71,7 +71,7 @@ public function setNodeId($node_id): Stats return $this; } - public function setStat($stat): Stats + public function setStat($stat): static { if (isset($stat) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Knn/TrainModel.php b/src/OpenSearch/Endpoints/Knn/TrainModel.php index 19b8d8074..cf4cbc3b1 100644 --- a/src/OpenSearch/Endpoints/Knn/TrainModel.php +++ b/src/OpenSearch/Endpoints/Knn/TrainModel.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): TrainModel + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -60,7 +60,7 @@ public function setBody($body): TrainModel return $this; } - public function setModelId($model_id): TrainModel + public function setModelId($model_id): static { if (isset($model_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/MTermVectors.php b/src/OpenSearch/Endpoints/MTermVectors.php index 11afa11e9..f76e08807 100644 --- a/src/OpenSearch/Endpoints/MTermVectors.php +++ b/src/OpenSearch/Endpoints/MTermVectors.php @@ -65,7 +65,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): MTermVectors + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Mget.php b/src/OpenSearch/Endpoints/Mget.php index e1a57615b..edd7682f9 100644 --- a/src/OpenSearch/Endpoints/Mget.php +++ b/src/OpenSearch/Endpoints/Mget.php @@ -61,7 +61,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): Mget + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/CreateConnector.php b/src/OpenSearch/Endpoints/Ml/CreateConnector.php index 6a62bbcb9..887bf9872 100644 --- a/src/OpenSearch/Endpoints/Ml/CreateConnector.php +++ b/src/OpenSearch/Endpoints/Ml/CreateConnector.php @@ -41,7 +41,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): CreateConnector + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/DeleteAgent.php b/src/OpenSearch/Endpoints/Ml/DeleteAgent.php index 759c5a54b..fb8c46560 100644 --- a/src/OpenSearch/Endpoints/Ml/DeleteAgent.php +++ b/src/OpenSearch/Endpoints/Ml/DeleteAgent.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setAgentId($agent_id): DeleteAgent + public function setAgentId($agent_id): static { if (isset($agent_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/DeleteConnector.php b/src/OpenSearch/Endpoints/Ml/DeleteConnector.php index f457358cf..6c28dd276 100644 --- a/src/OpenSearch/Endpoints/Ml/DeleteConnector.php +++ b/src/OpenSearch/Endpoints/Ml/DeleteConnector.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'DELETE'; } - public function setConnectorId($connector_id): DeleteConnector + public function setConnectorId($connector_id): static { if (isset($connector_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/DeleteTask.php b/src/OpenSearch/Endpoints/Ml/DeleteTask.php index 6a2a3036c..cbff3d87a 100644 --- a/src/OpenSearch/Endpoints/Ml/DeleteTask.php +++ b/src/OpenSearch/Endpoints/Ml/DeleteTask.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setTaskId($task_id): DeleteTask + public function setTaskId($task_id): static { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/DeployModel.php b/src/OpenSearch/Endpoints/Ml/DeployModel.php index 0d9cf4cb7..e69da6946 100644 --- a/src/OpenSearch/Endpoints/Ml/DeployModel.php +++ b/src/OpenSearch/Endpoints/Ml/DeployModel.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setModelId($model_id): DeployModel + public function setModelId($model_id): static { if (isset($model_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/GetModelGroup.php b/src/OpenSearch/Endpoints/Ml/GetModelGroup.php index f061ea6c6..989f9ae23 100644 --- a/src/OpenSearch/Endpoints/Ml/GetModelGroup.php +++ b/src/OpenSearch/Endpoints/Ml/GetModelGroup.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setModelGroupId($model_group_id): GetModelGroup + public function setModelGroupId($model_group_id): static { if (isset($model_group_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/RegisterAgents.php b/src/OpenSearch/Endpoints/Ml/RegisterAgents.php index 7c14d852b..11051da16 100644 --- a/src/OpenSearch/Endpoints/Ml/RegisterAgents.php +++ b/src/OpenSearch/Endpoints/Ml/RegisterAgents.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): RegisterAgents + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/RegisterModel.php b/src/OpenSearch/Endpoints/Ml/RegisterModel.php index 698659c96..49824326a 100644 --- a/src/OpenSearch/Endpoints/Ml/RegisterModel.php +++ b/src/OpenSearch/Endpoints/Ml/RegisterModel.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): RegisterModel + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php b/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php index 046581e8c..ff4943eca 100644 --- a/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php +++ b/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): RegisterModelGroup + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/SearchModels.php b/src/OpenSearch/Endpoints/Ml/SearchModels.php index a6874ac1f..84512e7c5 100644 --- a/src/OpenSearch/Endpoints/Ml/SearchModels.php +++ b/src/OpenSearch/Endpoints/Ml/SearchModels.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'GET'; } - public function setBody($body): SearchModels + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/UndeployModel.php b/src/OpenSearch/Endpoints/Ml/UndeployModel.php index 2dd63058f..3aff2bad8 100644 --- a/src/OpenSearch/Endpoints/Ml/UndeployModel.php +++ b/src/OpenSearch/Endpoints/Ml/UndeployModel.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setModelId($model_id): UndeployModel + public function setModelId($model_id): static { if (isset($model_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Msearch.php b/src/OpenSearch/Endpoints/Msearch.php index e2a5fb6e1..a7e392857 100644 --- a/src/OpenSearch/Endpoints/Msearch.php +++ b/src/OpenSearch/Endpoints/Msearch.php @@ -68,7 +68,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): Msearch + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -87,4 +87,5 @@ public function setBody($body): Msearch } return $this; } + } diff --git a/src/OpenSearch/Endpoints/MsearchTemplate.php b/src/OpenSearch/Endpoints/MsearchTemplate.php index 560c62d8f..247882f7f 100644 --- a/src/OpenSearch/Endpoints/MsearchTemplate.php +++ b/src/OpenSearch/Endpoints/MsearchTemplate.php @@ -66,7 +66,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): MsearchTemplate + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -85,4 +85,5 @@ public function setBody($body): MsearchTemplate } return $this; } + } diff --git a/src/OpenSearch/Endpoints/Nodes/HotThreads.php b/src/OpenSearch/Endpoints/Nodes/HotThreads.php index ab4e0a976..a4854a600 100644 --- a/src/OpenSearch/Endpoints/Nodes/HotThreads.php +++ b/src/OpenSearch/Endpoints/Nodes/HotThreads.php @@ -61,7 +61,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): HotThreads + public function setNodeId($node_id): static { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Nodes/Info.php b/src/OpenSearch/Endpoints/Nodes/Info.php index b02a894a3..da403a7c8 100644 --- a/src/OpenSearch/Endpoints/Nodes/Info.php +++ b/src/OpenSearch/Endpoints/Nodes/Info.php @@ -70,7 +70,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeIdOrMetric($node_id_or_metric): Info + public function setNodeIdOrMetric($node_id_or_metric): static { if (isset($node_id_or_metric) !== true) { return $this; @@ -80,7 +80,7 @@ public function setNodeIdOrMetric($node_id_or_metric): Info return $this; } - public function setMetric($metric): Info + public function setMetric($metric): static { if (isset($metric) !== true) { return $this; @@ -93,7 +93,7 @@ public function setMetric($metric): Info return $this; } - public function setNodeId($node_id): Info + public function setNodeId($node_id): static { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php b/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php index f858252db..6b3a6a140 100644 --- a/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php +++ b/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php @@ -56,7 +56,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): ReloadSecureSettings + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -66,7 +66,7 @@ public function setBody($body): ReloadSecureSettings return $this; } - public function setNodeId($node_id): ReloadSecureSettings + public function setNodeId($node_id): static { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Nodes/Stats.php b/src/OpenSearch/Endpoints/Nodes/Stats.php index 1758d29f8..b3d84d198 100644 --- a/src/OpenSearch/Endpoints/Nodes/Stats.php +++ b/src/OpenSearch/Endpoints/Nodes/Stats.php @@ -79,7 +79,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): Stats + public function setNodeId($node_id): static { if (isset($node_id) !== true) { return $this; @@ -92,7 +92,7 @@ public function setNodeId($node_id): Stats return $this; } - public function setMetric($metric): Stats + public function setMetric($metric): static { if (isset($metric) !== true) { return $this; @@ -105,7 +105,7 @@ public function setMetric($metric): Stats return $this; } - public function setIndexMetric($index_metric): Stats + public function setIndexMetric($index_metric): static { if (isset($index_metric) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Nodes/Usage.php b/src/OpenSearch/Endpoints/Nodes/Usage.php index 3693c5918..18098ada5 100644 --- a/src/OpenSearch/Endpoints/Nodes/Usage.php +++ b/src/OpenSearch/Endpoints/Nodes/Usage.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): Usage + public function setNodeId($node_id): static { if (isset($node_id) !== true) { return $this; @@ -77,7 +77,7 @@ public function setNodeId($node_id): Usage return $this; } - public function setMetric($metric): Usage + public function setMetric($metric): static { if (isset($metric) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/CreateConfig.php b/src/OpenSearch/Endpoints/Notifications/CreateConfig.php index 72ddf5931..a21b3c4ce 100644 --- a/src/OpenSearch/Endpoints/Notifications/CreateConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/CreateConfig.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): CreateConfig + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php b/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php index afe39ff2e..6bab9ea4f 100644 --- a/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setConfigId($config_id): DeleteConfig + public function setConfigId($config_id): static { if (isset($config_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/GetConfig.php b/src/OpenSearch/Endpoints/Notifications/GetConfig.php index ded17c039..444dfb10c 100644 --- a/src/OpenSearch/Endpoints/Notifications/GetConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/GetConfig.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setConfigId($config_id): GetConfig + public function setConfigId($config_id): static { if (isset($config_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/GetConfigs.php b/src/OpenSearch/Endpoints/Notifications/GetConfigs.php index 95bdfbde1..22d250e16 100644 --- a/src/OpenSearch/Endpoints/Notifications/GetConfigs.php +++ b/src/OpenSearch/Endpoints/Notifications/GetConfigs.php @@ -83,7 +83,7 @@ public function getMethod(): string return 'GET'; } - public function setBody($body): GetConfigs + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/SendTest.php b/src/OpenSearch/Endpoints/Notifications/SendTest.php index 2066781c1..2ff691812 100644 --- a/src/OpenSearch/Endpoints/Notifications/SendTest.php +++ b/src/OpenSearch/Endpoints/Notifications/SendTest.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setConfigId($config_id): SendTest + public function setConfigId($config_id): static { if (isset($config_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php b/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php index d493a5c78..55fa55758 100644 --- a/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): UpdateConfig + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -60,7 +60,7 @@ public function setBody($body): UpdateConfig return $this; } - public function setConfigId($config_id): UpdateConfig + public function setConfigId($config_id): static { if (isset($config_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Observability/CreateObject.php b/src/OpenSearch/Endpoints/Observability/CreateObject.php index 47494884c..a88377e5c 100644 --- a/src/OpenSearch/Endpoints/Observability/CreateObject.php +++ b/src/OpenSearch/Endpoints/Observability/CreateObject.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): CreateObject + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Observability/DeleteObject.php b/src/OpenSearch/Endpoints/Observability/DeleteObject.php index cc600211f..308d4da41 100644 --- a/src/OpenSearch/Endpoints/Observability/DeleteObject.php +++ b/src/OpenSearch/Endpoints/Observability/DeleteObject.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setObjectId($object_id): DeleteObject + public function setObjectId($object_id): static { if (isset($object_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Observability/GetObject.php b/src/OpenSearch/Endpoints/Observability/GetObject.php index e2cea7a87..ed967f9bc 100644 --- a/src/OpenSearch/Endpoints/Observability/GetObject.php +++ b/src/OpenSearch/Endpoints/Observability/GetObject.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setObjectId($object_id): GetObject + public function setObjectId($object_id): static { if (isset($object_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Observability/UpdateObject.php b/src/OpenSearch/Endpoints/Observability/UpdateObject.php index a1c07f46d..69d44e46f 100644 --- a/src/OpenSearch/Endpoints/Observability/UpdateObject.php +++ b/src/OpenSearch/Endpoints/Observability/UpdateObject.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): UpdateObject + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -60,7 +60,7 @@ public function setBody($body): UpdateObject return $this; } - public function setObjectId($object_id): UpdateObject + public function setObjectId($object_id): static { if (isset($object_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ppl/Explain.php b/src/OpenSearch/Endpoints/Ppl/Explain.php index 708526b7d..4e1c04683 100644 --- a/src/OpenSearch/Endpoints/Ppl/Explain.php +++ b/src/OpenSearch/Endpoints/Ppl/Explain.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Explain + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ppl/PostStats.php b/src/OpenSearch/Endpoints/Ppl/PostStats.php index 5efac6f39..e7763bdce 100644 --- a/src/OpenSearch/Endpoints/Ppl/PostStats.php +++ b/src/OpenSearch/Endpoints/Ppl/PostStats.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): PostStats + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ppl/Query.php b/src/OpenSearch/Endpoints/Ppl/Query.php index bb544c862..47c31e35e 100644 --- a/src/OpenSearch/Endpoints/Ppl/Query.php +++ b/src/OpenSearch/Endpoints/Ppl/Query.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Query + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/PutScript.php b/src/OpenSearch/Endpoints/PutScript.php index 5615c7806..43323828b 100644 --- a/src/OpenSearch/Endpoints/PutScript.php +++ b/src/OpenSearch/Endpoints/PutScript.php @@ -66,7 +66,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): PutScript + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -76,7 +76,7 @@ public function setBody($body): PutScript return $this; } - public function setContext($context): PutScript + public function setContext($context): static { if (isset($context) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Query/DatasourceDelete.php b/src/OpenSearch/Endpoints/Query/DatasourceDelete.php index fac161964..717019ba4 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourceDelete.php +++ b/src/OpenSearch/Endpoints/Query/DatasourceDelete.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setDatasourceName($datasource_name): DatasourceDelete + public function setDatasourceName($datasource_name): static { if (isset($datasource_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php b/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php index f45d1adb9..e04725583 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php +++ b/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setDatasourceName($datasource_name): DatasourceRetrieve + public function setDatasourceName($datasource_name): static { if (isset($datasource_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php b/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php index b2a478816..9f1c2d4e2 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php +++ b/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): DatasourcesCreate + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php b/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php index 4da38b367..6836d7261 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php +++ b/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): DatasourcesUpdate + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/RankEval.php b/src/OpenSearch/Endpoints/RankEval.php index ee92c79f0..4b1b23de1 100644 --- a/src/OpenSearch/Endpoints/RankEval.php +++ b/src/OpenSearch/Endpoints/RankEval.php @@ -57,7 +57,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): RankEval + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Reindex.php b/src/OpenSearch/Endpoints/Reindex.php index 8aacbcda6..85b19007d 100644 --- a/src/OpenSearch/Endpoints/Reindex.php +++ b/src/OpenSearch/Endpoints/Reindex.php @@ -57,7 +57,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Reindex + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/ReindexRethrottle.php b/src/OpenSearch/Endpoints/ReindexRethrottle.php index 50d7bc457..fbbdb5290 100644 --- a/src/OpenSearch/Endpoints/ReindexRethrottle.php +++ b/src/OpenSearch/Endpoints/ReindexRethrottle.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setTaskId($task_id): ReindexRethrottle + public function setTaskId($task_id): static { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/RemoteStore/Restore.php b/src/OpenSearch/Endpoints/RemoteStore/Restore.php index d1c4630fc..fb4c6c415 100644 --- a/src/OpenSearch/Endpoints/RemoteStore/Restore.php +++ b/src/OpenSearch/Endpoints/RemoteStore/Restore.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Restore + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/RenderSearchTemplate.php b/src/OpenSearch/Endpoints/RenderSearchTemplate.php index 80bea800e..48e320423 100644 --- a/src/OpenSearch/Endpoints/RenderSearchTemplate.php +++ b/src/OpenSearch/Endpoints/RenderSearchTemplate.php @@ -53,7 +53,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): RenderSearchTemplate + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Rollups/Put.php b/src/OpenSearch/Endpoints/Rollups/Put.php index 6aa63aaf8..dc8ec8458 100644 --- a/src/OpenSearch/Endpoints/Rollups/Put.php +++ b/src/OpenSearch/Endpoints/Rollups/Put.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): Put + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php b/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php index 5a6b8b71d..1e3ecef26 100644 --- a/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php +++ b/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php @@ -49,7 +49,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): ScriptsPainlessExecute + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Scroll.php b/src/OpenSearch/Endpoints/Scroll.php index 907a555dc..f4042d833 100644 --- a/src/OpenSearch/Endpoints/Scroll.php +++ b/src/OpenSearch/Endpoints/Scroll.php @@ -62,7 +62,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): Scroll + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -72,7 +72,7 @@ public function setBody($body): Scroll return $this; } - public function setScrollId($scroll_id): Scroll + public function setScrollId($scroll_id): static { if (isset($scroll_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Search.php b/src/OpenSearch/Endpoints/Search.php index 0bbdf51cf..8380e3f5b 100644 --- a/src/OpenSearch/Endpoints/Search.php +++ b/src/OpenSearch/Endpoints/Search.php @@ -99,7 +99,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): Search + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/SearchPipeline/Put.php b/src/OpenSearch/Endpoints/SearchPipeline/Put.php index c194a59d4..dc0332a52 100644 --- a/src/OpenSearch/Endpoints/SearchPipeline/Put.php +++ b/src/OpenSearch/Endpoints/SearchPipeline/Put.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): Put + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/SearchTemplate.php b/src/OpenSearch/Endpoints/SearchTemplate.php index f297b183c..e52369161 100644 --- a/src/OpenSearch/Endpoints/SearchTemplate.php +++ b/src/OpenSearch/Endpoints/SearchTemplate.php @@ -66,7 +66,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): SearchTemplate + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/ChangePassword.php b/src/OpenSearch/Endpoints/Security/ChangePassword.php index 12d2f7df4..494921f5c 100644 --- a/src/OpenSearch/Endpoints/Security/ChangePassword.php +++ b/src/OpenSearch/Endpoints/Security/ChangePassword.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): ChangePassword + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php b/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php index ad049f472..cc68e11fa 100644 --- a/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php +++ b/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): ConfigUpgradePerform + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateActionGroup.php b/src/OpenSearch/Endpoints/Security/CreateActionGroup.php index 22424f366..dfb844c02 100644 --- a/src/OpenSearch/Endpoints/Security/CreateActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/CreateActionGroup.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CreateActionGroup + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): CreateActionGroup return $this; } - public function setActionGroup($action_group): CreateActionGroup + public function setActionGroup($action_group): static { if (isset($action_group) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateAllowlist.php b/src/OpenSearch/Endpoints/Security/CreateAllowlist.php index 7562eb98d..1cccd618d 100644 --- a/src/OpenSearch/Endpoints/Security/CreateAllowlist.php +++ b/src/OpenSearch/Endpoints/Security/CreateAllowlist.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CreateAllowlist + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateRole.php b/src/OpenSearch/Endpoints/Security/CreateRole.php index 7402b3e95..5bf8a7b58 100644 --- a/src/OpenSearch/Endpoints/Security/CreateRole.php +++ b/src/OpenSearch/Endpoints/Security/CreateRole.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CreateRole + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): CreateRole return $this; } - public function setRole($role): CreateRole + public function setRole($role): static { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php b/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php index 6fcd61b92..7acbb7925 100644 --- a/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CreateRoleMapping + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): CreateRoleMapping return $this; } - public function setRole($role): CreateRoleMapping + public function setRole($role): static { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateTenant.php b/src/OpenSearch/Endpoints/Security/CreateTenant.php index 54ce0ee09..5463d44da 100644 --- a/src/OpenSearch/Endpoints/Security/CreateTenant.php +++ b/src/OpenSearch/Endpoints/Security/CreateTenant.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CreateTenant + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): CreateTenant return $this; } - public function setTenant($tenant): CreateTenant + public function setTenant($tenant): static { if (isset($tenant) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php b/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php index 3d60632f4..15574d10c 100644 --- a/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php +++ b/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CreateUpdateTenancyConfig + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateUser.php b/src/OpenSearch/Endpoints/Security/CreateUser.php index b69347047..a43677385 100644 --- a/src/OpenSearch/Endpoints/Security/CreateUser.php +++ b/src/OpenSearch/Endpoints/Security/CreateUser.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CreateUser + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): CreateUser return $this; } - public function setUsername($username): CreateUser + public function setUsername($username): static { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php b/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php index e3f5ea21e..4e2bd51fb 100644 --- a/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php +++ b/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CreateUserLegacy + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): CreateUserLegacy return $this; } - public function setUsername($username): CreateUserLegacy + public function setUsername($username): static { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php b/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php index 4257f964c..9645e761d 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setActionGroup($action_group): DeleteActionGroup + public function setActionGroup($action_group): static { if (isset($action_group) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php b/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php index 8e8920729..f80c7e9c3 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setClusterName($cluster_name): DeleteDistinguishedName + public function setClusterName($cluster_name): static { if (isset($cluster_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteRole.php b/src/OpenSearch/Endpoints/Security/DeleteRole.php index cea84504d..aa906d66f 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteRole.php +++ b/src/OpenSearch/Endpoints/Security/DeleteRole.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setRole($role): DeleteRole + public function setRole($role): static { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php b/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php index d1ec1f134..67b6d54a4 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setRole($role): DeleteRoleMapping + public function setRole($role): static { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteTenant.php b/src/OpenSearch/Endpoints/Security/DeleteTenant.php index be3a5d840..d2e4d89e1 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteTenant.php +++ b/src/OpenSearch/Endpoints/Security/DeleteTenant.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setTenant($tenant): DeleteTenant + public function setTenant($tenant): static { if (isset($tenant) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteUser.php b/src/OpenSearch/Endpoints/Security/DeleteUser.php index 639dc4a99..10c3b5937 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteUser.php +++ b/src/OpenSearch/Endpoints/Security/DeleteUser.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setUsername($username): DeleteUser + public function setUsername($username): static { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php b/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php index 590494f46..cdaf73156 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php +++ b/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setUsername($username): DeleteUserLegacy + public function setUsername($username): static { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GenerateOboToken.php b/src/OpenSearch/Endpoints/Security/GenerateOboToken.php index d9855ae2b..503d30219 100644 --- a/src/OpenSearch/Endpoints/Security/GenerateOboToken.php +++ b/src/OpenSearch/Endpoints/Security/GenerateOboToken.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): GenerateOboToken + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GenerateUserToken.php b/src/OpenSearch/Endpoints/Security/GenerateUserToken.php index 476d259df..16d214569 100644 --- a/src/OpenSearch/Endpoints/Security/GenerateUserToken.php +++ b/src/OpenSearch/Endpoints/Security/GenerateUserToken.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'POST'; } - public function setUsername($username): GenerateUserToken + public function setUsername($username): static { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php b/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php index b62ecc6e8..4ebdfecdf 100644 --- a/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php +++ b/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'POST'; } - public function setUsername($username): GenerateUserTokenLegacy + public function setUsername($username): static { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetActionGroup.php b/src/OpenSearch/Endpoints/Security/GetActionGroup.php index 2e117de73..c0c51c547 100644 --- a/src/OpenSearch/Endpoints/Security/GetActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/GetActionGroup.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setActionGroup($action_group): GetActionGroup + public function setActionGroup($action_group): static { if (isset($action_group) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php b/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php index 29ebf9fac..e7dd3ee05 100644 --- a/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php @@ -53,7 +53,7 @@ public function getMethod(): string return 'GET'; } - public function setClusterName($cluster_name): GetDistinguishedName + public function setClusterName($cluster_name): static { if (isset($cluster_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php b/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php index 7d66df31e..a0013349f 100644 --- a/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php +++ b/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): GetNodeCertificates + public function setNodeId($node_id): static { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetRole.php b/src/OpenSearch/Endpoints/Security/GetRole.php index 21db28ce8..de9dfc71c 100644 --- a/src/OpenSearch/Endpoints/Security/GetRole.php +++ b/src/OpenSearch/Endpoints/Security/GetRole.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setRole($role): GetRole + public function setRole($role): static { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetRoleMapping.php b/src/OpenSearch/Endpoints/Security/GetRoleMapping.php index 34656ac79..b58d74ecb 100644 --- a/src/OpenSearch/Endpoints/Security/GetRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/GetRoleMapping.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setRole($role): GetRoleMapping + public function setRole($role): static { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetTenant.php b/src/OpenSearch/Endpoints/Security/GetTenant.php index bbb46f22c..dcfd3c002 100644 --- a/src/OpenSearch/Endpoints/Security/GetTenant.php +++ b/src/OpenSearch/Endpoints/Security/GetTenant.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setTenant($tenant): GetTenant + public function setTenant($tenant): static { if (isset($tenant) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetUser.php b/src/OpenSearch/Endpoints/Security/GetUser.php index 71616462f..ec67393ae 100644 --- a/src/OpenSearch/Endpoints/Security/GetUser.php +++ b/src/OpenSearch/Endpoints/Security/GetUser.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setUsername($username): GetUser + public function setUsername($username): static { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetUserLegacy.php b/src/OpenSearch/Endpoints/Security/GetUserLegacy.php index 285bb3535..f58bdf4d1 100644 --- a/src/OpenSearch/Endpoints/Security/GetUserLegacy.php +++ b/src/OpenSearch/Endpoints/Security/GetUserLegacy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setUsername($username): GetUserLegacy + public function setUsername($username): static { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchActionGroup.php b/src/OpenSearch/Endpoints/Security/PatchActionGroup.php index 23a7ae15d..35e737aa9 100644 --- a/src/OpenSearch/Endpoints/Security/PatchActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/PatchActionGroup.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchActionGroup + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): PatchActionGroup return $this; } - public function setActionGroup($action_group): PatchActionGroup + public function setActionGroup($action_group): static { if (isset($action_group) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchActionGroups.php b/src/OpenSearch/Endpoints/Security/PatchActionGroups.php index 1934ff7bb..53e84258c 100644 --- a/src/OpenSearch/Endpoints/Security/PatchActionGroups.php +++ b/src/OpenSearch/Endpoints/Security/PatchActionGroups.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchActionGroups + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchAllowlist.php b/src/OpenSearch/Endpoints/Security/PatchAllowlist.php index 1bf9c04fb..bbd76c6fe 100644 --- a/src/OpenSearch/Endpoints/Security/PatchAllowlist.php +++ b/src/OpenSearch/Endpoints/Security/PatchAllowlist.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchAllowlist + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php b/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php index b20b9d438..3bcd2b91a 100644 --- a/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchAuditConfiguration + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchConfiguration.php b/src/OpenSearch/Endpoints/Security/PatchConfiguration.php index a1ab9a697..7fb935e2f 100644 --- a/src/OpenSearch/Endpoints/Security/PatchConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/PatchConfiguration.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchConfiguration + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php b/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php index 2a25baab0..419d22cb0 100644 --- a/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchDistinguishedName + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): PatchDistinguishedName return $this; } - public function setClusterName($cluster_name): PatchDistinguishedName + public function setClusterName($cluster_name): static { if (isset($cluster_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php b/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php index 26e488a3c..280dd322b 100644 --- a/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php +++ b/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchDistinguishedNames + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchRole.php b/src/OpenSearch/Endpoints/Security/PatchRole.php index 5d285ec3a..432817e7b 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRole.php +++ b/src/OpenSearch/Endpoints/Security/PatchRole.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchRole + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): PatchRole return $this; } - public function setRole($role): PatchRole + public function setRole($role): static { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php b/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php index f1e9bf4f5..b593f2bc6 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchRoleMapping + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): PatchRoleMapping return $this; } - public function setRole($role): PatchRoleMapping + public function setRole($role): static { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php b/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php index 0282e9135..29ef48b5b 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php +++ b/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchRoleMappings + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchRoles.php b/src/OpenSearch/Endpoints/Security/PatchRoles.php index 66c129624..cb1bb3b46 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRoles.php +++ b/src/OpenSearch/Endpoints/Security/PatchRoles.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchRoles + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchTenant.php b/src/OpenSearch/Endpoints/Security/PatchTenant.php index b7efa65d6..a3902d56d 100644 --- a/src/OpenSearch/Endpoints/Security/PatchTenant.php +++ b/src/OpenSearch/Endpoints/Security/PatchTenant.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchTenant + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): PatchTenant return $this; } - public function setTenant($tenant): PatchTenant + public function setTenant($tenant): static { if (isset($tenant) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchTenants.php b/src/OpenSearch/Endpoints/Security/PatchTenants.php index 41a3dbc2b..1f6b71a83 100644 --- a/src/OpenSearch/Endpoints/Security/PatchTenants.php +++ b/src/OpenSearch/Endpoints/Security/PatchTenants.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchTenants + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchUser.php b/src/OpenSearch/Endpoints/Security/PatchUser.php index 147384652..b15e8471e 100644 --- a/src/OpenSearch/Endpoints/Security/PatchUser.php +++ b/src/OpenSearch/Endpoints/Security/PatchUser.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchUser + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): PatchUser return $this; } - public function setUsername($username): PatchUser + public function setUsername($username): static { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchUsers.php b/src/OpenSearch/Endpoints/Security/PatchUsers.php index dafff0a40..8b61f6585 100644 --- a/src/OpenSearch/Endpoints/Security/PatchUsers.php +++ b/src/OpenSearch/Endpoints/Security/PatchUsers.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): PatchUsers + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php b/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php index 00ff896f8..c5e6824a7 100644 --- a/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): UpdateAuditConfiguration + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php b/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php index b805d6d57..b0862fd1b 100644 --- a/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): UpdateConfiguration + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php b/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php index b78551c65..25d8f1384 100644 --- a/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): UpdateDistinguishedName + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): UpdateDistinguishedName return $this; } - public function setClusterName($cluster_name): UpdateDistinguishedName + public function setClusterName($cluster_name): static { if (isset($cluster_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php b/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php index 4f7b5d723..33800a060 100644 --- a/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setRepository($repository): CleanupRepository + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php b/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php index 9808f55ca..2d4523301 100644 --- a/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php +++ b/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php @@ -62,7 +62,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CloneSnapshot + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -72,7 +72,7 @@ public function setBody($body): CloneSnapshot return $this; } - public function setRepository($repository): CloneSnapshot + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; @@ -82,7 +82,7 @@ public function setRepository($repository): CloneSnapshot return $this; } - public function setSnapshot($snapshot): CloneSnapshot + public function setSnapshot($snapshot): static { if (isset($snapshot) !== true) { return $this; @@ -92,7 +92,7 @@ public function setSnapshot($snapshot): CloneSnapshot return $this; } - public function setTargetSnapshot($target_snapshot): CloneSnapshot + public function setTargetSnapshot($target_snapshot): static { if (isset($target_snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/Create.php b/src/OpenSearch/Endpoints/Snapshot/Create.php index e46cbd481..63c5ea70f 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Create.php +++ b/src/OpenSearch/Endpoints/Snapshot/Create.php @@ -61,7 +61,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): Create + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -71,7 +71,7 @@ public function setBody($body): Create return $this; } - public function setRepository($repository): Create + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; @@ -81,7 +81,7 @@ public function setRepository($repository): Create return $this; } - public function setSnapshot($snapshot): Create + public function setSnapshot($snapshot): static { if (isset($snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php b/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php index 1fef0bed0..5d5f7ef6e 100644 --- a/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): CreateRepository + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -70,7 +70,7 @@ public function setBody($body): CreateRepository return $this; } - public function setRepository($repository): CreateRepository + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/Delete.php b/src/OpenSearch/Endpoints/Snapshot/Delete.php index f543d1a6c..9dd2492ac 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Delete.php +++ b/src/OpenSearch/Endpoints/Snapshot/Delete.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'DELETE'; } - public function setRepository($repository): Delete + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; @@ -70,7 +70,7 @@ public function setRepository($repository): Delete return $this; } - public function setSnapshot($snapshot): Delete + public function setSnapshot($snapshot): static { if (isset($snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/DeleteRepository.php b/src/OpenSearch/Endpoints/Snapshot/DeleteRepository.php index b4f7bd36a..8e84c4888 100644 --- a/src/OpenSearch/Endpoints/Snapshot/DeleteRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/DeleteRepository.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'DELETE'; } - public function setRepository($repository): DeleteRepository + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/Get.php b/src/OpenSearch/Endpoints/Snapshot/Get.php index 77facdeed..6951e15f8 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Get.php +++ b/src/OpenSearch/Endpoints/Snapshot/Get.php @@ -62,7 +62,7 @@ public function getMethod(): string return 'GET'; } - public function setRepository($repository): Get + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; @@ -72,7 +72,7 @@ public function setRepository($repository): Get return $this; } - public function setSnapshot($snapshot): Get + public function setSnapshot($snapshot): static { if (isset($snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/GetRepository.php b/src/OpenSearch/Endpoints/Snapshot/GetRepository.php index d9b3442f1..c4603a28e 100644 --- a/src/OpenSearch/Endpoints/Snapshot/GetRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/GetRepository.php @@ -58,7 +58,7 @@ public function getMethod(): string return 'GET'; } - public function setRepository($repository): GetRepository + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/Restore.php b/src/OpenSearch/Endpoints/Snapshot/Restore.php index 575cc3430..9c30e67aa 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Restore.php +++ b/src/OpenSearch/Endpoints/Snapshot/Restore.php @@ -61,7 +61,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Restore + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -71,7 +71,7 @@ public function setBody($body): Restore return $this; } - public function setRepository($repository): Restore + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; @@ -81,7 +81,7 @@ public function setRepository($repository): Restore return $this; } - public function setSnapshot($snapshot): Restore + public function setSnapshot($snapshot): static { if (isset($snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/Status.php b/src/OpenSearch/Endpoints/Snapshot/Status.php index 183272cb6..d894ce8c4 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Status.php +++ b/src/OpenSearch/Endpoints/Snapshot/Status.php @@ -63,7 +63,7 @@ public function getMethod(): string return 'GET'; } - public function setRepository($repository): Status + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; @@ -73,7 +73,7 @@ public function setRepository($repository): Status return $this; } - public function setSnapshot($snapshot): Status + public function setSnapshot($snapshot): static { if (isset($snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php b/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php index 6203bc299..4c8b0f871 100644 --- a/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setRepository($repository): VerifyRepository + public function setRepository($repository): static { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Sql/Close.php b/src/OpenSearch/Endpoints/Sql/Close.php index 2ef15e00e..dd9f8d32e 100644 --- a/src/OpenSearch/Endpoints/Sql/Close.php +++ b/src/OpenSearch/Endpoints/Sql/Close.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Close + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Sql/Explain.php b/src/OpenSearch/Endpoints/Sql/Explain.php index 6291c3b39..c7380165c 100644 --- a/src/OpenSearch/Endpoints/Sql/Explain.php +++ b/src/OpenSearch/Endpoints/Sql/Explain.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Explain + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Sql/PostStats.php b/src/OpenSearch/Endpoints/Sql/PostStats.php index 744ae997b..4e1073ddc 100644 --- a/src/OpenSearch/Endpoints/Sql/PostStats.php +++ b/src/OpenSearch/Endpoints/Sql/PostStats.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): PostStats + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Sql/Query.php b/src/OpenSearch/Endpoints/Sql/Query.php index c92970e0c..47d3699e2 100644 --- a/src/OpenSearch/Endpoints/Sql/Query.php +++ b/src/OpenSearch/Endpoints/Sql/Query.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Query + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Sql/Settings.php b/src/OpenSearch/Endpoints/Sql/Settings.php index 782898267..5872d364d 100644 --- a/src/OpenSearch/Endpoints/Sql/Settings.php +++ b/src/OpenSearch/Endpoints/Sql/Settings.php @@ -44,7 +44,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): Settings + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Tasks/Cancel.php b/src/OpenSearch/Endpoints/Tasks/Cancel.php index 83deffe9f..2d578c53b 100644 --- a/src/OpenSearch/Endpoints/Tasks/Cancel.php +++ b/src/OpenSearch/Endpoints/Tasks/Cancel.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setTaskId($task_id): Cancel + public function setTaskId($task_id): static { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Tasks/Get.php b/src/OpenSearch/Endpoints/Tasks/Get.php index df8e113df..198941aba 100644 --- a/src/OpenSearch/Endpoints/Tasks/Get.php +++ b/src/OpenSearch/Endpoints/Tasks/Get.php @@ -58,7 +58,7 @@ public function getMethod(): string return 'GET'; } - public function setTaskId($task_id): Get + public function setTaskId($task_id): static { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/TermVectors.php b/src/OpenSearch/Endpoints/TermVectors.php index c06aefdbe..7a35caf12 100644 --- a/src/OpenSearch/Endpoints/TermVectors.php +++ b/src/OpenSearch/Endpoints/TermVectors.php @@ -71,7 +71,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): TermVectors + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Transforms/Preview.php b/src/OpenSearch/Endpoints/Transforms/Preview.php index ad9dc44ae..167422e50 100644 --- a/src/OpenSearch/Endpoints/Transforms/Preview.php +++ b/src/OpenSearch/Endpoints/Transforms/Preview.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Preview + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Transforms/Put.php b/src/OpenSearch/Endpoints/Transforms/Put.php index 68c371910..5230fc884 100644 --- a/src/OpenSearch/Endpoints/Transforms/Put.php +++ b/src/OpenSearch/Endpoints/Transforms/Put.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): Put + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Update.php b/src/OpenSearch/Endpoints/Update.php index eedb30196..a45d4ee22 100644 --- a/src/OpenSearch/Endpoints/Update.php +++ b/src/OpenSearch/Endpoints/Update.php @@ -74,7 +74,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): Update + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/UpdateByQuery.php b/src/OpenSearch/Endpoints/UpdateByQuery.php index f08a450ee..627176dd9 100644 --- a/src/OpenSearch/Endpoints/UpdateByQuery.php +++ b/src/OpenSearch/Endpoints/UpdateByQuery.php @@ -90,7 +90,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): UpdateByQuery + public function setBody($body): static { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php b/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php index 37d8f7ff9..1281a1ab7 100644 --- a/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php +++ b/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setTaskId($task_id): UpdateByQueryRethrottle + public function setTaskId($task_id): static { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php new file mode 100644 index 000000000..299d98256 --- /dev/null +++ b/src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php @@ -0,0 +1,55 @@ +body = $body; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php new file mode 100644 index 000000000..8a7cda794 --- /dev/null +++ b/src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php @@ -0,0 +1,62 @@ +name ?? null; + if (isset($name)) { + return "/_wlm/query_group/$name"; + } + throw new RuntimeException('Missing parameter for the endpoint wlm.delete_query_group'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setName($name): static + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php new file mode 100644 index 000000000..5db7e0319 --- /dev/null +++ b/src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php @@ -0,0 +1,61 @@ +name ?? null; + if (isset($name)) { + return "/_wlm/query_group/$name"; + } + return "/_wlm/query_group"; + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setName($name): static + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php new file mode 100644 index 000000000..2c437c425 --- /dev/null +++ b/src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php @@ -0,0 +1,72 @@ +name ?? null; + if (isset($name)) { + return "/_wlm/query_group/$name"; + } + throw new RuntimeException('Missing parameter for the endpoint wlm.update_query_group'); + } + + public function getParamWhitelist(): array + { + return [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ]; + } + + public function getMethod(): string + { + return 'PUT'; + } + + public function setBody($body): static + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setName($name): static + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/src/OpenSearch/Namespaces/WlmNamespace.php b/src/OpenSearch/Namespaces/WlmNamespace.php new file mode 100644 index 000000000..220fe0262 --- /dev/null +++ b/src/OpenSearch/Namespaces/WlmNamespace.php @@ -0,0 +1,124 @@ +extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Wlm\CreateQueryGroup'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Deletes the specified QueryGroup. + * + * $params['name'] = (string) QueryGroup name. + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. + * $params['human'] = (boolean) Whether to return human readable values for statistics. + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. + * $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 deleteQueryGroup(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Wlm\DeleteQueryGroup'); + $endpoint->setParams($params); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * Gets the specified QueryGroup or get all if no name is provided. + * + * $params['name'] = (string) QueryGroup name. + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. + * $params['human'] = (boolean) Whether to return human readable values for statistics. + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. + * $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 getQueryGroup(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Wlm\GetQueryGroup'); + $endpoint->setParams($params); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * Updates the specified query group. + * + * $params['name'] = (string) QueryGroup name. + * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. + * $params['human'] = (boolean) Whether to return human readable values for statistics. + * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. + * $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 updateQueryGroup(array $params = []) + { + $name = $this->extractArgument($params, 'name'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Wlm\UpdateQueryGroup'); + $endpoint->setParams($params); + $endpoint->setName($name); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } +} diff --git a/util/template/set-bulk-body b/util/template/set-bulk-body index bebb6700c..ece8963fc 100644 --- a/util/template/set-bulk-body +++ b/util/template/set-bulk-body @@ -1,5 +1,5 @@ - public function setBody($body): :endpoint + public function setBody($body): static { if (isset($body) !== true) { return $this; @@ -17,4 +17,4 @@ throw new InvalidArgumentException("Body must be an array, traversable object or string"); } return $this; - } \ No newline at end of file + } diff --git a/util/template/set-part b/util/template/set-part index 5397fed50..e84cc82ee 100644 --- a/util/template/set-part +++ b/util/template/set-part @@ -1,5 +1,5 @@ - public function set:Part($:part): :endpoint + public function set:Part($:part): static { if (isset($:part) !== true) { return $this; diff --git a/util/template/set-part-list b/util/template/set-part-list index 21fa13610..6f786de9a 100644 --- a/util/template/set-part-list +++ b/util/template/set-part-list @@ -1,5 +1,5 @@ - public function set:Part($:part): :endpoint + public function set:Part($:part): static { if (isset($:part) !== true) { return $this; From 02b4295f1d029dd8b5f9c7ed70b3d0ec5e0e5f7a Mon Sep 17 00:00:00 2001 From: Kim Pepper Date: Tue, 5 Nov 2024 09:29:02 +1100 Subject: [PATCH 2/3] Revert generated code Signed-off-by: Kim Pepper --- CHANGELOG.md | 1 - src/OpenSearch/Client.php | 14 -- .../Endpoints/AsynchronousSearch/Search.php | 2 +- src/OpenSearch/Endpoints/Bulk.php | 3 +- src/OpenSearch/Endpoints/BulkStream.php | 3 +- src/OpenSearch/Endpoints/Cat/Aliases.php | 2 +- src/OpenSearch/Endpoints/Cat/Allocation.php | 2 +- src/OpenSearch/Endpoints/Cat/Fielddata.php | 2 +- src/OpenSearch/Endpoints/Cat/PitSegments.php | 2 +- src/OpenSearch/Endpoints/Cat/Snapshots.php | 2 +- src/OpenSearch/Endpoints/Cat/Templates.php | 2 +- src/OpenSearch/Endpoints/Cat/ThreadPool.php | 2 +- src/OpenSearch/Endpoints/ClearScroll.php | 4 +- .../Endpoints/Cluster/AllocationExplain.php | 2 +- .../Cluster/DeleteComponentTemplate.php | 2 +- .../Cluster/DeleteWeightedRouting.php | 2 +- .../Cluster/ExistsComponentTemplate.php | 2 +- .../Cluster/GetComponentTemplate.php | 2 +- .../Cluster/GetDecommissionAwareness.php | 2 +- .../Endpoints/Cluster/GetWeightedRouting.php | 2 +- .../Cluster/PutComponentTemplate.php | 4 +- .../Cluster/PutDecommissionAwareness.php | 4 +- .../Endpoints/Cluster/PutSettings.php | 2 +- .../Endpoints/Cluster/PutWeightedRouting.php | 4 +- src/OpenSearch/Endpoints/Cluster/Reroute.php | 2 +- src/OpenSearch/Endpoints/Cluster/State.php | 2 +- src/OpenSearch/Endpoints/Cluster/Stats.php | 2 +- src/OpenSearch/Endpoints/Count.php | 2 +- src/OpenSearch/Endpoints/Create.php | 2 +- .../DanglingIndices/DeleteDanglingIndex.php | 2 +- .../DanglingIndices/ImportDanglingIndex.php | 2 +- src/OpenSearch/Endpoints/DeleteByQuery.php | 2 +- .../Endpoints/DeleteByQueryRethrottle.php | 2 +- src/OpenSearch/Endpoints/DeletePit.php | 2 +- src/OpenSearch/Endpoints/Explain.php | 2 +- src/OpenSearch/Endpoints/FieldCaps.php | 2 +- .../Endpoints/FlowFramework/Create.php | 2 +- .../Endpoints/FlowFramework/Delete.php | 2 +- .../Endpoints/FlowFramework/Deprovision.php | 2 +- .../Endpoints/FlowFramework/Get.php | 2 +- .../Endpoints/FlowFramework/GetStatus.php | 2 +- .../Endpoints/FlowFramework/Provision.php | 4 +- .../Endpoints/FlowFramework/Search.php | 2 +- .../Endpoints/FlowFramework/SearchState.php | 2 +- .../Endpoints/FlowFramework/Update.php | 4 +- src/OpenSearch/Endpoints/Index.php | 2 +- src/OpenSearch/Endpoints/Indices/AddBlock.php | 2 +- src/OpenSearch/Endpoints/Indices/Analyze.php | 2 +- .../Endpoints/Indices/CloneIndices.php | 4 +- src/OpenSearch/Endpoints/Indices/Create.php | 2 +- .../Endpoints/Indices/CreateDataStream.php | 4 +- .../Endpoints/Indices/DataStreamsStats.php | 2 +- .../Endpoints/Indices/DeleteAlias.php | 2 +- .../Endpoints/Indices/DeleteDataStream.php | 2 +- .../Endpoints/Indices/DeleteIndexTemplate.php | 2 +- .../Endpoints/Indices/DeleteTemplate.php | 2 +- .../Endpoints/Indices/ExistsAlias.php | 2 +- .../Endpoints/Indices/ExistsIndexTemplate.php | 2 +- .../Endpoints/Indices/ExistsTemplate.php | 2 +- src/OpenSearch/Endpoints/Indices/GetAlias.php | 2 +- .../Endpoints/Indices/GetDataStream.php | 2 +- .../Endpoints/Indices/GetFieldMapping.php | 2 +- .../Endpoints/Indices/GetIndexTemplate.php | 2 +- .../Endpoints/Indices/GetSettings.php | 2 +- .../Endpoints/Indices/GetTemplate.php | 2 +- src/OpenSearch/Endpoints/Indices/PutAlias.php | 4 +- .../Endpoints/Indices/PutIndexTemplate.php | 4 +- .../Endpoints/Indices/PutMapping.php | 2 +- .../Endpoints/Indices/PutSettings.php | 2 +- .../Endpoints/Indices/PutTemplate.php | 4 +- .../Endpoints/Indices/ResolveIndex.php | 2 +- src/OpenSearch/Endpoints/Indices/Rollover.php | 6 +- src/OpenSearch/Endpoints/Indices/Shrink.php | 4 +- .../Indices/SimulateIndexTemplate.php | 4 +- .../Endpoints/Indices/SimulateTemplate.php | 4 +- src/OpenSearch/Endpoints/Indices/Split.php | 4 +- src/OpenSearch/Endpoints/Indices/Stats.php | 2 +- .../Endpoints/Indices/UpdateAliases.php | 2 +- .../Endpoints/Indices/ValidateQuery.php | 2 +- .../Endpoints/Ingest/PutPipeline.php | 2 +- src/OpenSearch/Endpoints/Ingest/Simulate.php | 2 +- src/OpenSearch/Endpoints/Ism/AddPolicy.php | 2 +- src/OpenSearch/Endpoints/Ism/ChangePolicy.php | 2 +- src/OpenSearch/Endpoints/Ism/DeletePolicy.php | 2 +- src/OpenSearch/Endpoints/Ism/ExistsPolicy.php | 2 +- .../Endpoints/Ism/ExplainPolicy.php | 2 +- src/OpenSearch/Endpoints/Ism/GetPolicy.php | 2 +- src/OpenSearch/Endpoints/Ism/PutPolicies.php | 2 +- src/OpenSearch/Endpoints/Ism/PutPolicy.php | 4 +- src/OpenSearch/Endpoints/Ism/RetryIndex.php | 2 +- src/OpenSearch/Endpoints/Knn/DeleteModel.php | 2 +- src/OpenSearch/Endpoints/Knn/GetModel.php | 2 +- src/OpenSearch/Endpoints/Knn/SearchModels.php | 2 +- src/OpenSearch/Endpoints/Knn/Stats.php | 4 +- src/OpenSearch/Endpoints/Knn/TrainModel.php | 4 +- src/OpenSearch/Endpoints/MTermVectors.php | 2 +- src/OpenSearch/Endpoints/Mget.php | 2 +- .../Endpoints/Ml/CreateConnector.php | 2 +- src/OpenSearch/Endpoints/Ml/DeleteAgent.php | 2 +- .../Endpoints/Ml/DeleteConnector.php | 2 +- src/OpenSearch/Endpoints/Ml/DeleteTask.php | 2 +- src/OpenSearch/Endpoints/Ml/DeployModel.php | 2 +- src/OpenSearch/Endpoints/Ml/GetModelGroup.php | 2 +- .../Endpoints/Ml/RegisterAgents.php | 2 +- src/OpenSearch/Endpoints/Ml/RegisterModel.php | 2 +- .../Endpoints/Ml/RegisterModelGroup.php | 2 +- src/OpenSearch/Endpoints/Ml/SearchModels.php | 2 +- src/OpenSearch/Endpoints/Ml/UndeployModel.php | 2 +- src/OpenSearch/Endpoints/Msearch.php | 3 +- src/OpenSearch/Endpoints/MsearchTemplate.php | 3 +- src/OpenSearch/Endpoints/Nodes/HotThreads.php | 2 +- src/OpenSearch/Endpoints/Nodes/Info.php | 6 +- .../Endpoints/Nodes/ReloadSecureSettings.php | 4 +- src/OpenSearch/Endpoints/Nodes/Stats.php | 6 +- src/OpenSearch/Endpoints/Nodes/Usage.php | 4 +- .../Endpoints/Notifications/CreateConfig.php | 2 +- .../Endpoints/Notifications/DeleteConfig.php | 2 +- .../Endpoints/Notifications/GetConfig.php | 2 +- .../Endpoints/Notifications/GetConfigs.php | 2 +- .../Endpoints/Notifications/SendTest.php | 2 +- .../Endpoints/Notifications/UpdateConfig.php | 4 +- .../Endpoints/Observability/CreateObject.php | 2 +- .../Endpoints/Observability/DeleteObject.php | 2 +- .../Endpoints/Observability/GetObject.php | 2 +- .../Endpoints/Observability/UpdateObject.php | 4 +- src/OpenSearch/Endpoints/Ppl/Explain.php | 2 +- src/OpenSearch/Endpoints/Ppl/PostStats.php | 2 +- src/OpenSearch/Endpoints/Ppl/Query.php | 2 +- src/OpenSearch/Endpoints/PutScript.php | 4 +- .../Endpoints/Query/DatasourceDelete.php | 2 +- .../Endpoints/Query/DatasourceRetrieve.php | 2 +- .../Endpoints/Query/DatasourcesCreate.php | 2 +- .../Endpoints/Query/DatasourcesUpdate.php | 2 +- src/OpenSearch/Endpoints/RankEval.php | 2 +- src/OpenSearch/Endpoints/Reindex.php | 2 +- .../Endpoints/ReindexRethrottle.php | 2 +- .../Endpoints/RemoteStore/Restore.php | 2 +- .../Endpoints/RenderSearchTemplate.php | 2 +- src/OpenSearch/Endpoints/Rollups/Put.php | 2 +- .../Endpoints/ScriptsPainlessExecute.php | 2 +- src/OpenSearch/Endpoints/Scroll.php | 4 +- src/OpenSearch/Endpoints/Search.php | 2 +- .../Endpoints/SearchPipeline/Put.php | 2 +- src/OpenSearch/Endpoints/SearchTemplate.php | 2 +- .../Endpoints/Security/ChangePassword.php | 2 +- .../Security/ConfigUpgradePerform.php | 2 +- .../Endpoints/Security/CreateActionGroup.php | 4 +- .../Endpoints/Security/CreateAllowlist.php | 2 +- .../Endpoints/Security/CreateRole.php | 4 +- .../Endpoints/Security/CreateRoleMapping.php | 4 +- .../Endpoints/Security/CreateTenant.php | 4 +- .../Security/CreateUpdateTenancyConfig.php | 2 +- .../Endpoints/Security/CreateUser.php | 4 +- .../Endpoints/Security/CreateUserLegacy.php | 4 +- .../Endpoints/Security/DeleteActionGroup.php | 2 +- .../Security/DeleteDistinguishedName.php | 2 +- .../Endpoints/Security/DeleteRole.php | 2 +- .../Endpoints/Security/DeleteRoleMapping.php | 2 +- .../Endpoints/Security/DeleteTenant.php | 2 +- .../Endpoints/Security/DeleteUser.php | 2 +- .../Endpoints/Security/DeleteUserLegacy.php | 2 +- .../Endpoints/Security/GenerateOboToken.php | 2 +- .../Endpoints/Security/GenerateUserToken.php | 2 +- .../Security/GenerateUserTokenLegacy.php | 2 +- .../Endpoints/Security/GetActionGroup.php | 2 +- .../Security/GetDistinguishedName.php | 2 +- .../Security/GetNodeCertificates.php | 2 +- src/OpenSearch/Endpoints/Security/GetRole.php | 2 +- .../Endpoints/Security/GetRoleMapping.php | 2 +- .../Endpoints/Security/GetTenant.php | 2 +- src/OpenSearch/Endpoints/Security/GetUser.php | 2 +- .../Endpoints/Security/GetUserLegacy.php | 2 +- .../Endpoints/Security/PatchActionGroup.php | 4 +- .../Endpoints/Security/PatchActionGroups.php | 2 +- .../Endpoints/Security/PatchAllowlist.php | 2 +- .../Security/PatchAuditConfiguration.php | 2 +- .../Endpoints/Security/PatchConfiguration.php | 2 +- .../Security/PatchDistinguishedName.php | 4 +- .../Security/PatchDistinguishedNames.php | 2 +- .../Endpoints/Security/PatchRole.php | 4 +- .../Endpoints/Security/PatchRoleMapping.php | 4 +- .../Endpoints/Security/PatchRoleMappings.php | 2 +- .../Endpoints/Security/PatchRoles.php | 2 +- .../Endpoints/Security/PatchTenant.php | 4 +- .../Endpoints/Security/PatchTenants.php | 2 +- .../Endpoints/Security/PatchUser.php | 4 +- .../Endpoints/Security/PatchUsers.php | 2 +- .../Security/UpdateAuditConfiguration.php | 2 +- .../Security/UpdateConfiguration.php | 2 +- .../Security/UpdateDistinguishedName.php | 4 +- .../Endpoints/Snapshot/CleanupRepository.php | 2 +- .../Endpoints/Snapshot/CloneSnapshot.php | 8 +- src/OpenSearch/Endpoints/Snapshot/Create.php | 6 +- .../Endpoints/Snapshot/CreateRepository.php | 4 +- src/OpenSearch/Endpoints/Snapshot/Delete.php | 4 +- .../Endpoints/Snapshot/DeleteRepository.php | 2 +- src/OpenSearch/Endpoints/Snapshot/Get.php | 4 +- .../Endpoints/Snapshot/GetRepository.php | 2 +- src/OpenSearch/Endpoints/Snapshot/Restore.php | 6 +- src/OpenSearch/Endpoints/Snapshot/Status.php | 4 +- .../Endpoints/Snapshot/VerifyRepository.php | 2 +- src/OpenSearch/Endpoints/Sql/Close.php | 2 +- src/OpenSearch/Endpoints/Sql/Explain.php | 2 +- src/OpenSearch/Endpoints/Sql/PostStats.php | 2 +- src/OpenSearch/Endpoints/Sql/Query.php | 2 +- src/OpenSearch/Endpoints/Sql/Settings.php | 2 +- src/OpenSearch/Endpoints/Tasks/Cancel.php | 2 +- src/OpenSearch/Endpoints/Tasks/Get.php | 2 +- src/OpenSearch/Endpoints/TermVectors.php | 2 +- .../Endpoints/Transforms/Preview.php | 2 +- src/OpenSearch/Endpoints/Transforms/Put.php | 2 +- src/OpenSearch/Endpoints/Update.php | 2 +- src/OpenSearch/Endpoints/UpdateByQuery.php | 2 +- .../Endpoints/UpdateByQueryRethrottle.php | 2 +- .../Endpoints/Wlm/CreateQueryGroup.php | 55 -------- .../Endpoints/Wlm/DeleteQueryGroup.php | 62 --------- .../Endpoints/Wlm/GetQueryGroup.php | 61 --------- .../Endpoints/Wlm/UpdateQueryGroup.php | 72 ---------- src/OpenSearch/Namespaces/WlmNamespace.php | 124 ------------------ 219 files changed, 266 insertions(+), 659 deletions(-) delete mode 100644 src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php delete mode 100644 src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php delete mode 100644 src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php delete mode 100644 src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php delete mode 100644 src/OpenSearch/Namespaces/WlmNamespace.php diff --git a/CHANGELOG.md b/CHANGELOG.md index f425e5106..d09907259 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,6 @@ 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@07e329e](https://github.com/opensearch-project/opensearch-api-specification/commit/07e329e8d01fd0576de6a0a3c35412fd5a9163db) - Updated opensearch-php APIs to reflect [opensearch-api-specification@1db1840](https://github.com/opensearch-project/opensearch-api-specification/commit/1db184063a463c5180a2cc824b1efc1aeebfd5eb) - Updated opensearch-php APIs to reflect [opensearch-api-specification@cb320b5](https://github.com/opensearch-project/opensearch-api-specification/commit/cb320b5482551c4f28afa26ff0d1653332699722) ### Security diff --git a/src/OpenSearch/Client.php b/src/OpenSearch/Client.php index 411ea8f5a..9c0746364 100644 --- a/src/OpenSearch/Client.php +++ b/src/OpenSearch/Client.php @@ -55,7 +55,6 @@ use OpenSearch\Namespaces\SslNamespace; use OpenSearch\Namespaces\TasksNamespace; use OpenSearch\Namespaces\TransformsNamespace; -use OpenSearch\Namespaces\WlmNamespace; /** * Class Client @@ -231,11 +230,6 @@ class Client */ protected $transforms; - /** - * @var WlmNamespace - */ - protected $wlm; - /** * Client constructor @@ -277,7 +271,6 @@ public function __construct(Transport $transport, callable $endpoint, array $reg $this->ssl = new SslNamespace($transport, $endpoint); $this->tasks = new TasksNamespace($transport, $endpoint); $this->transforms = new TransformsNamespace($transport, $endpoint); - $this->wlm = new WlmNamespace($transport, $endpoint); $this->registeredNamespaces = $registeredNamespaces; } @@ -1949,13 +1942,6 @@ public function transforms(): TransformsNamespace { return $this->transforms; } - /** - * Returns the wlm namespace - */ - public function wlm(): WlmNamespace - { - return $this->wlm; - } /** * Catchall for registered namespaces diff --git a/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php b/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php index 1d3e4372d..1bdd1757a 100644 --- a/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php +++ b/src/OpenSearch/Endpoints/AsynchronousSearch/Search.php @@ -47,7 +47,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Search { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Bulk.php b/src/OpenSearch/Endpoints/Bulk.php index 65b2c16fe..6376a6fb6 100644 --- a/src/OpenSearch/Endpoints/Bulk.php +++ b/src/OpenSearch/Endpoints/Bulk.php @@ -70,7 +70,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Bulk { if (isset($body) !== true) { return $this; @@ -89,5 +89,4 @@ public function setBody($body): static } return $this; } - } diff --git a/src/OpenSearch/Endpoints/BulkStream.php b/src/OpenSearch/Endpoints/BulkStream.php index daa7c7210..64925b661 100644 --- a/src/OpenSearch/Endpoints/BulkStream.php +++ b/src/OpenSearch/Endpoints/BulkStream.php @@ -66,7 +66,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): BulkStream { if (isset($body) !== true) { return $this; @@ -85,5 +85,4 @@ public function setBody($body): static } return $this; } - } diff --git a/src/OpenSearch/Endpoints/Cat/Aliases.php b/src/OpenSearch/Endpoints/Cat/Aliases.php index 087899d4e..cee786be3 100644 --- a/src/OpenSearch/Endpoints/Cat/Aliases.php +++ b/src/OpenSearch/Endpoints/Cat/Aliases.php @@ -62,7 +62,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): static + public function setName($name): Aliases { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/Allocation.php b/src/OpenSearch/Endpoints/Cat/Allocation.php index b84717d86..909470026 100644 --- a/src/OpenSearch/Endpoints/Cat/Allocation.php +++ b/src/OpenSearch/Endpoints/Cat/Allocation.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): static + public function setNodeId($node_id): Allocation { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/Fielddata.php b/src/OpenSearch/Endpoints/Cat/Fielddata.php index 3028f3570..dd48d1562 100644 --- a/src/OpenSearch/Endpoints/Cat/Fielddata.php +++ b/src/OpenSearch/Endpoints/Cat/Fielddata.php @@ -62,7 +62,7 @@ public function getMethod(): string return 'GET'; } - public function setFields($fields): static + public function setFields($fields): Fielddata { if (isset($fields) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/PitSegments.php b/src/OpenSearch/Endpoints/Cat/PitSegments.php index f8aa23f85..af9981b2d 100644 --- a/src/OpenSearch/Endpoints/Cat/PitSegments.php +++ b/src/OpenSearch/Endpoints/Cat/PitSegments.php @@ -49,7 +49,7 @@ public function getMethod(): string return 'GET'; } - public function setBody($body): static + public function setBody($body): PitSegments { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/Snapshots.php b/src/OpenSearch/Endpoints/Cat/Snapshots.php index 213bb0f4c..03f0ae527 100644 --- a/src/OpenSearch/Endpoints/Cat/Snapshots.php +++ b/src/OpenSearch/Endpoints/Cat/Snapshots.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'GET'; } - public function setRepository($repository): static + public function setRepository($repository): Snapshots { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/Templates.php b/src/OpenSearch/Endpoints/Cat/Templates.php index 116c05f6f..8bf42aa9a 100644 --- a/src/OpenSearch/Endpoints/Cat/Templates.php +++ b/src/OpenSearch/Endpoints/Cat/Templates.php @@ -63,7 +63,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): static + public function setName($name): Templates { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cat/ThreadPool.php b/src/OpenSearch/Endpoints/Cat/ThreadPool.php index 1338b7579..fcd168c97 100644 --- a/src/OpenSearch/Endpoints/Cat/ThreadPool.php +++ b/src/OpenSearch/Endpoints/Cat/ThreadPool.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'GET'; } - public function setThreadPoolPatterns($thread_pool_patterns): static + public function setThreadPoolPatterns($thread_pool_patterns): ThreadPool { if (isset($thread_pool_patterns) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/ClearScroll.php b/src/OpenSearch/Endpoints/ClearScroll.php index e00ae70ad..190e9be52 100644 --- a/src/OpenSearch/Endpoints/ClearScroll.php +++ b/src/OpenSearch/Endpoints/ClearScroll.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'DELETE'; } - public function setBody($body): static + public function setBody($body): ClearScroll { if (isset($body) !== true) { return $this; @@ -69,7 +69,7 @@ public function setBody($body): static return $this; } - public function setScrollId($scroll_id): static + public function setScrollId($scroll_id): ClearScroll { if (isset($scroll_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php b/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php index 0605f258c..0c0c89939 100644 --- a/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php +++ b/src/OpenSearch/Endpoints/Cluster/AllocationExplain.php @@ -51,7 +51,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): AllocationExplain { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php index 09dbd0567..e8b16bdcd 100644 --- a/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/DeleteComponentTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'DELETE'; } - public function setName($name): static + public function setName($name): DeleteComponentTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php b/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php index a91cb5315..ab253fcf8 100644 --- a/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php +++ b/src/OpenSearch/Endpoints/Cluster/DeleteWeightedRouting.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'DELETE'; } - public function setBody($body): static + public function setBody($body): DeleteWeightedRouting { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php index 84ab41734..3146fcc06 100644 --- a/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/ExistsComponentTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'HEAD'; } - public function setName($name): static + public function setName($name): ExistsComponentTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php index 0d4905178..5d495710e 100644 --- a/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/GetComponentTemplate.php @@ -58,7 +58,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): static + public function setName($name): GetComponentTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php b/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php index 4b0569b28..66c250c5d 100644 --- a/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php +++ b/src/OpenSearch/Endpoints/Cluster/GetDecommissionAwareness.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setAwarenessAttributeName($awareness_attribute_name): static + public function setAwarenessAttributeName($awareness_attribute_name): GetDecommissionAwareness { if (isset($awareness_attribute_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php b/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php index dd42bd43c..0890735b6 100644 --- a/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php +++ b/src/OpenSearch/Endpoints/Cluster/GetWeightedRouting.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setAttribute($attribute): static + public function setAttribute($attribute): GetWeightedRouting { if (isset($attribute) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php b/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php index 86a698162..c79a3db9a 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php +++ b/src/OpenSearch/Endpoints/Cluster/PutComponentTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutComponentTemplate { if (isset($body) !== true) { return $this; @@ -70,7 +70,7 @@ public function setBody($body): static return $this; } - public function setName($name): static + public function setName($name): PutComponentTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php b/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php index 713856003..c80fed513 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php +++ b/src/OpenSearch/Endpoints/Cluster/PutDecommissionAwareness.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setAwarenessAttributeName($awareness_attribute_name): static + public function setAwarenessAttributeName($awareness_attribute_name): PutDecommissionAwareness { if (isset($awareness_attribute_name) !== true) { return $this; @@ -62,7 +62,7 @@ public function setAwarenessAttributeName($awareness_attribute_name): static return $this; } - public function setAwarenessAttributeValue($awareness_attribute_value): static + public function setAwarenessAttributeValue($awareness_attribute_value): PutDecommissionAwareness { if (isset($awareness_attribute_value) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/PutSettings.php b/src/OpenSearch/Endpoints/Cluster/PutSettings.php index adc67a564..2a78a059e 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutSettings.php +++ b/src/OpenSearch/Endpoints/Cluster/PutSettings.php @@ -53,7 +53,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutSettings { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php b/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php index 4c707f665..2cb8eb3c6 100644 --- a/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php +++ b/src/OpenSearch/Endpoints/Cluster/PutWeightedRouting.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutWeightedRouting { if (isset($body) !== true) { return $this; @@ -60,7 +60,7 @@ public function setBody($body): static return $this; } - public function setAttribute($attribute): static + public function setAttribute($attribute): PutWeightedRouting { if (isset($attribute) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/Reroute.php b/src/OpenSearch/Endpoints/Cluster/Reroute.php index 522469177..235e55154 100644 --- a/src/OpenSearch/Endpoints/Cluster/Reroute.php +++ b/src/OpenSearch/Endpoints/Cluster/Reroute.php @@ -56,7 +56,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Reroute { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/State.php b/src/OpenSearch/Endpoints/Cluster/State.php index 61cf3ba69..a8b7f2ebc 100644 --- a/src/OpenSearch/Endpoints/Cluster/State.php +++ b/src/OpenSearch/Endpoints/Cluster/State.php @@ -68,7 +68,7 @@ public function getMethod(): string return 'GET'; } - public function setMetric($metric): static + public function setMetric($metric): State { if (isset($metric) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Cluster/Stats.php b/src/OpenSearch/Endpoints/Cluster/Stats.php index 8967dd08d..4236808ae 100644 --- a/src/OpenSearch/Endpoints/Cluster/Stats.php +++ b/src/OpenSearch/Endpoints/Cluster/Stats.php @@ -57,7 +57,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): static + public function setNodeId($node_id): Stats { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Count.php b/src/OpenSearch/Endpoints/Count.php index b83201db1..43abf6b74 100644 --- a/src/OpenSearch/Endpoints/Count.php +++ b/src/OpenSearch/Endpoints/Count.php @@ -67,7 +67,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): Count { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Create.php b/src/OpenSearch/Endpoints/Create.php index 28dac6add..9fd7b60b9 100644 --- a/src/OpenSearch/Endpoints/Create.php +++ b/src/OpenSearch/Endpoints/Create.php @@ -69,7 +69,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): Create { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php b/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php index 7e9a82c7d..bc1e1d8ad 100644 --- a/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php +++ b/src/OpenSearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'DELETE'; } - public function setIndexUuid($index_uuid): static + public function setIndexUuid($index_uuid): DeleteDanglingIndex { if (isset($index_uuid) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php b/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php index 595507962..ca86f44d6 100644 --- a/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php +++ b/src/OpenSearch/Endpoints/DanglingIndices/ImportDanglingIndex.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'POST'; } - public function setIndexUuid($index_uuid): static + public function setIndexUuid($index_uuid): ImportDanglingIndex { if (isset($index_uuid) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/DeleteByQuery.php b/src/OpenSearch/Endpoints/DeleteByQuery.php index f01f07cf7..cbcf95eb4 100644 --- a/src/OpenSearch/Endpoints/DeleteByQuery.php +++ b/src/OpenSearch/Endpoints/DeleteByQuery.php @@ -89,7 +89,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): DeleteByQuery { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php b/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php index 05a53021b..a8cab68c9 100644 --- a/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php +++ b/src/OpenSearch/Endpoints/DeleteByQueryRethrottle.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setTaskId($task_id): static + public function setTaskId($task_id): DeleteByQueryRethrottle { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/DeletePit.php b/src/OpenSearch/Endpoints/DeletePit.php index eca440196..df9768d35 100644 --- a/src/OpenSearch/Endpoints/DeletePit.php +++ b/src/OpenSearch/Endpoints/DeletePit.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'DELETE'; } - public function setBody($body): static + public function setBody($body): DeletePit { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Explain.php b/src/OpenSearch/Endpoints/Explain.php index 9241ef835..cf5a6f1c2 100644 --- a/src/OpenSearch/Endpoints/Explain.php +++ b/src/OpenSearch/Endpoints/Explain.php @@ -74,7 +74,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): Explain { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FieldCaps.php b/src/OpenSearch/Endpoints/FieldCaps.php index d6f22027a..93cd37492 100644 --- a/src/OpenSearch/Endpoints/FieldCaps.php +++ b/src/OpenSearch/Endpoints/FieldCaps.php @@ -58,7 +58,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): FieldCaps { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Create.php b/src/OpenSearch/Endpoints/FlowFramework/Create.php index 60fbac848..38084e8b0 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Create.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Create.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Create { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Delete.php b/src/OpenSearch/Endpoints/FlowFramework/Delete.php index c1a75384e..2dd15cb76 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Delete.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Delete.php @@ -51,7 +51,7 @@ public function getMethod(): string return 'DELETE'; } - public function setWorkflowId($workflow_id): static + public function setWorkflowId($workflow_id): Delete { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php b/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php index c9ef2db18..d9429096a 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Deprovision.php @@ -51,7 +51,7 @@ public function getMethod(): string return 'POST'; } - public function setWorkflowId($workflow_id): static + public function setWorkflowId($workflow_id): Deprovision { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Get.php b/src/OpenSearch/Endpoints/FlowFramework/Get.php index 09226a2fa..f9c6fc9b1 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Get.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Get.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setWorkflowId($workflow_id): static + public function setWorkflowId($workflow_id): Get { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php b/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php index 9576306f7..e00e918e5 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php +++ b/src/OpenSearch/Endpoints/FlowFramework/GetStatus.php @@ -51,7 +51,7 @@ public function getMethod(): string return 'GET'; } - public function setWorkflowId($workflow_id): static + public function setWorkflowId($workflow_id): GetStatus { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Provision.php b/src/OpenSearch/Endpoints/FlowFramework/Provision.php index 9ee121c8f..97479db37 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Provision.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Provision.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Provision { if (isset($body) !== true) { return $this; @@ -60,7 +60,7 @@ public function setBody($body): static return $this; } - public function setWorkflowId($workflow_id): static + public function setWorkflowId($workflow_id): Provision { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Search.php b/src/OpenSearch/Endpoints/FlowFramework/Search.php index 353287d89..7c584a920 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Search.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Search.php @@ -43,7 +43,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): Search { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/SearchState.php b/src/OpenSearch/Endpoints/FlowFramework/SearchState.php index d1ee9c7e3..493339c99 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/SearchState.php +++ b/src/OpenSearch/Endpoints/FlowFramework/SearchState.php @@ -43,7 +43,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): SearchState { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/FlowFramework/Update.php b/src/OpenSearch/Endpoints/FlowFramework/Update.php index 73fa0e123..3b3479f9d 100644 --- a/src/OpenSearch/Endpoints/FlowFramework/Update.php +++ b/src/OpenSearch/Endpoints/FlowFramework/Update.php @@ -55,7 +55,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): Update { if (isset($body) !== true) { return $this; @@ -65,7 +65,7 @@ public function setBody($body): static return $this; } - public function setWorkflowId($workflow_id): static + public function setWorkflowId($workflow_id): Update { if (isset($workflow_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Index.php b/src/OpenSearch/Endpoints/Index.php index 48ad123c7..abeecc314 100644 --- a/src/OpenSearch/Endpoints/Index.php +++ b/src/OpenSearch/Endpoints/Index.php @@ -71,7 +71,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Index { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/AddBlock.php b/src/OpenSearch/Endpoints/Indices/AddBlock.php index 867c07886..5c878c890 100644 --- a/src/OpenSearch/Endpoints/Indices/AddBlock.php +++ b/src/OpenSearch/Endpoints/Indices/AddBlock.php @@ -63,7 +63,7 @@ public function getMethod(): string return 'PUT'; } - public function setBlock($block): static + public function setBlock($block): AddBlock { if (isset($block) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Analyze.php b/src/OpenSearch/Endpoints/Indices/Analyze.php index 63f6612a4..845502ca7 100644 --- a/src/OpenSearch/Endpoints/Indices/Analyze.php +++ b/src/OpenSearch/Endpoints/Indices/Analyze.php @@ -54,7 +54,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): Analyze { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/CloneIndices.php b/src/OpenSearch/Endpoints/Indices/CloneIndices.php index dd92e5344..ca94ac967 100644 --- a/src/OpenSearch/Endpoints/Indices/CloneIndices.php +++ b/src/OpenSearch/Endpoints/Indices/CloneIndices.php @@ -63,7 +63,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CloneIndices { if (isset($body) !== true) { return $this; @@ -73,7 +73,7 @@ public function setBody($body): static return $this; } - public function setTarget($target): static + public function setTarget($target): CloneIndices { if (isset($target) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Create.php b/src/OpenSearch/Endpoints/Indices/Create.php index e0336b805..bf9e3d564 100644 --- a/src/OpenSearch/Endpoints/Indices/Create.php +++ b/src/OpenSearch/Endpoints/Indices/Create.php @@ -58,7 +58,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): Create { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/CreateDataStream.php b/src/OpenSearch/Endpoints/Indices/CreateDataStream.php index 97a98880a..0c74c24d0 100644 --- a/src/OpenSearch/Endpoints/Indices/CreateDataStream.php +++ b/src/OpenSearch/Endpoints/Indices/CreateDataStream.php @@ -56,7 +56,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CreateDataStream { if (isset($body) !== true) { return $this; @@ -66,7 +66,7 @@ public function setBody($body): static return $this; } - public function setName($name): static + public function setName($name): CreateDataStream { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/DataStreamsStats.php b/src/OpenSearch/Endpoints/Indices/DataStreamsStats.php index 49619f240..fc3ee0399 100644 --- a/src/OpenSearch/Endpoints/Indices/DataStreamsStats.php +++ b/src/OpenSearch/Endpoints/Indices/DataStreamsStats.php @@ -55,7 +55,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): static + public function setName($name): DataStreamsStats { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/DeleteAlias.php b/src/OpenSearch/Endpoints/Indices/DeleteAlias.php index 7829f215b..edce99b36 100644 --- a/src/OpenSearch/Endpoints/Indices/DeleteAlias.php +++ b/src/OpenSearch/Endpoints/Indices/DeleteAlias.php @@ -67,7 +67,7 @@ public function getMethod(): string return 'DELETE'; } - public function setName($name): static + public function setName($name): DeleteAlias { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/DeleteDataStream.php b/src/OpenSearch/Endpoints/Indices/DeleteDataStream.php index be9fe5f00..f266b1d81 100644 --- a/src/OpenSearch/Endpoints/Indices/DeleteDataStream.php +++ b/src/OpenSearch/Endpoints/Indices/DeleteDataStream.php @@ -56,7 +56,7 @@ public function getMethod(): string return 'DELETE'; } - public function setName($name): static + public function setName($name): DeleteDataStream { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php index a4013a1e1..41f340d19 100644 --- a/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/DeleteIndexTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'DELETE'; } - public function setName($name): static + public function setName($name): DeleteIndexTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php b/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php index f1137aa0a..40f3c92ea 100644 --- a/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/DeleteTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'DELETE'; } - public function setName($name): static + public function setName($name): DeleteTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/ExistsAlias.php b/src/OpenSearch/Endpoints/Indices/ExistsAlias.php index e8a7fe6e3..5b391dd17 100644 --- a/src/OpenSearch/Endpoints/Indices/ExistsAlias.php +++ b/src/OpenSearch/Endpoints/Indices/ExistsAlias.php @@ -66,7 +66,7 @@ public function getMethod(): string return 'HEAD'; } - public function setName($name): static + public function setName($name): ExistsAlias { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php index e2a57d272..437baf77b 100644 --- a/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/ExistsIndexTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'HEAD'; } - public function setName($name): static + public function setName($name): ExistsIndexTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/ExistsTemplate.php b/src/OpenSearch/Endpoints/Indices/ExistsTemplate.php index 16cedd185..023903145 100644 --- a/src/OpenSearch/Endpoints/Indices/ExistsTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/ExistsTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'HEAD'; } - public function setName($name): static + public function setName($name): ExistsTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetAlias.php b/src/OpenSearch/Endpoints/Indices/GetAlias.php index ef22815f2..1a2cdc76e 100644 --- a/src/OpenSearch/Endpoints/Indices/GetAlias.php +++ b/src/OpenSearch/Endpoints/Indices/GetAlias.php @@ -66,7 +66,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): static + public function setName($name): GetAlias { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetDataStream.php b/src/OpenSearch/Endpoints/Indices/GetDataStream.php index 60888c85b..0b34c6570 100644 --- a/src/OpenSearch/Endpoints/Indices/GetDataStream.php +++ b/src/OpenSearch/Endpoints/Indices/GetDataStream.php @@ -55,7 +55,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): static + public function setName($name): GetDataStream { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetFieldMapping.php b/src/OpenSearch/Endpoints/Indices/GetFieldMapping.php index fe2575a8a..aa2db2de4 100644 --- a/src/OpenSearch/Endpoints/Indices/GetFieldMapping.php +++ b/src/OpenSearch/Endpoints/Indices/GetFieldMapping.php @@ -67,7 +67,7 @@ public function getMethod(): string return 'GET'; } - public function setFields($fields): static + public function setFields($fields): GetFieldMapping { if (isset($fields) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/GetIndexTemplate.php index aad6765bc..84915edd1 100644 --- a/src/OpenSearch/Endpoints/Indices/GetIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/GetIndexTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): static + public function setName($name): GetIndexTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetSettings.php b/src/OpenSearch/Endpoints/Indices/GetSettings.php index 16b1930ea..6f0aa1b50 100644 --- a/src/OpenSearch/Endpoints/Indices/GetSettings.php +++ b/src/OpenSearch/Endpoints/Indices/GetSettings.php @@ -70,7 +70,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): static + public function setName($name): GetSettings { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/GetTemplate.php b/src/OpenSearch/Endpoints/Indices/GetTemplate.php index e9876dcee..83568eb6b 100644 --- a/src/OpenSearch/Endpoints/Indices/GetTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/GetTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): static + public function setName($name): GetTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/PutAlias.php b/src/OpenSearch/Endpoints/Indices/PutAlias.php index eeb8bd5c7..62599f4c6 100644 --- a/src/OpenSearch/Endpoints/Indices/PutAlias.php +++ b/src/OpenSearch/Endpoints/Indices/PutAlias.php @@ -65,7 +65,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutAlias { if (isset($body) !== true) { return $this; @@ -75,7 +75,7 @@ public function setBody($body): static return $this; } - public function setName($name): static + public function setName($name): PutAlias { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php index f263c7f7f..527130297 100644 --- a/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/PutIndexTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutIndexTemplate { if (isset($body) !== true) { return $this; @@ -70,7 +70,7 @@ public function setBody($body): static return $this; } - public function setName($name): static + public function setName($name): PutIndexTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/PutMapping.php b/src/OpenSearch/Endpoints/Indices/PutMapping.php index b3f636260..fd10a8885 100644 --- a/src/OpenSearch/Endpoints/Indices/PutMapping.php +++ b/src/OpenSearch/Endpoints/Indices/PutMapping.php @@ -61,7 +61,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutMapping { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/PutSettings.php b/src/OpenSearch/Endpoints/Indices/PutSettings.php index 0f66696c0..332b2286e 100644 --- a/src/OpenSearch/Endpoints/Indices/PutSettings.php +++ b/src/OpenSearch/Endpoints/Indices/PutSettings.php @@ -61,7 +61,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutSettings { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/PutTemplate.php b/src/OpenSearch/Endpoints/Indices/PutTemplate.php index 666d67b38..90c581a39 100644 --- a/src/OpenSearch/Endpoints/Indices/PutTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/PutTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutTemplate { if (isset($body) !== true) { return $this; @@ -70,7 +70,7 @@ public function setBody($body): static return $this; } - public function setName($name): static + public function setName($name): PutTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/ResolveIndex.php b/src/OpenSearch/Endpoints/Indices/ResolveIndex.php index 95604069b..c6d2fec0b 100644 --- a/src/OpenSearch/Endpoints/Indices/ResolveIndex.php +++ b/src/OpenSearch/Endpoints/Indices/ResolveIndex.php @@ -57,7 +57,7 @@ public function getMethod(): string return 'GET'; } - public function setName($name): static + public function setName($name): ResolveIndex { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Rollover.php b/src/OpenSearch/Endpoints/Indices/Rollover.php index 18c1519b6..0f4ec259e 100644 --- a/src/OpenSearch/Endpoints/Indices/Rollover.php +++ b/src/OpenSearch/Endpoints/Indices/Rollover.php @@ -68,7 +68,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Rollover { if (isset($body) !== true) { return $this; @@ -78,7 +78,7 @@ public function setBody($body): static return $this; } - public function setAlias($alias): static + public function setAlias($alias): Rollover { if (isset($alias) !== true) { return $this; @@ -88,7 +88,7 @@ public function setAlias($alias): static return $this; } - public function setNewIndex($new_index): static + public function setNewIndex($new_index): Rollover { if (isset($new_index) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Shrink.php b/src/OpenSearch/Endpoints/Indices/Shrink.php index c271712bf..8806b7e60 100644 --- a/src/OpenSearch/Endpoints/Indices/Shrink.php +++ b/src/OpenSearch/Endpoints/Indices/Shrink.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): Shrink { if (isset($body) !== true) { return $this; @@ -74,7 +74,7 @@ public function setBody($body): static return $this; } - public function setTarget($target): static + public function setTarget($target): Shrink { if (isset($target) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php b/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php index 977da3855..cc987ae2f 100644 --- a/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/SimulateIndexTemplate.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): SimulateIndexTemplate { if (isset($body) !== true) { return $this; @@ -70,7 +70,7 @@ public function setBody($body): static return $this; } - public function setName($name): static + public function setName($name): SimulateIndexTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php b/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php index 16ec3a9da..8aa2c0ffa 100644 --- a/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php +++ b/src/OpenSearch/Endpoints/Indices/SimulateTemplate.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): SimulateTemplate { if (isset($body) !== true) { return $this; @@ -69,7 +69,7 @@ public function setBody($body): static return $this; } - public function setName($name): static + public function setName($name): SimulateTemplate { if (isset($name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Split.php b/src/OpenSearch/Endpoints/Indices/Split.php index 3fff81d37..6559b8818 100644 --- a/src/OpenSearch/Endpoints/Indices/Split.php +++ b/src/OpenSearch/Endpoints/Indices/Split.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): Split { if (isset($body) !== true) { return $this; @@ -74,7 +74,7 @@ public function setBody($body): static return $this; } - public function setTarget($target): static + public function setTarget($target): Split { if (isset($target) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/Stats.php b/src/OpenSearch/Endpoints/Indices/Stats.php index a1f51f4d8..86195e165 100644 --- a/src/OpenSearch/Endpoints/Indices/Stats.php +++ b/src/OpenSearch/Endpoints/Indices/Stats.php @@ -71,7 +71,7 @@ public function getMethod(): string return 'GET'; } - public function setMetric($metric): static + public function setMetric($metric): Stats { if (isset($metric) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/UpdateAliases.php b/src/OpenSearch/Endpoints/Indices/UpdateAliases.php index d7dcbb9f8..fea7b223f 100644 --- a/src/OpenSearch/Endpoints/Indices/UpdateAliases.php +++ b/src/OpenSearch/Endpoints/Indices/UpdateAliases.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): UpdateAliases { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Indices/ValidateQuery.php b/src/OpenSearch/Endpoints/Indices/ValidateQuery.php index 008bebfe5..b6d6bda7d 100644 --- a/src/OpenSearch/Endpoints/Indices/ValidateQuery.php +++ b/src/OpenSearch/Endpoints/Indices/ValidateQuery.php @@ -65,7 +65,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): ValidateQuery { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ingest/PutPipeline.php b/src/OpenSearch/Endpoints/Ingest/PutPipeline.php index 1a4cef432..9205cbc42 100644 --- a/src/OpenSearch/Endpoints/Ingest/PutPipeline.php +++ b/src/OpenSearch/Endpoints/Ingest/PutPipeline.php @@ -57,7 +57,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutPipeline { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ingest/Simulate.php b/src/OpenSearch/Endpoints/Ingest/Simulate.php index 44e3ba9d2..afc876231 100644 --- a/src/OpenSearch/Endpoints/Ingest/Simulate.php +++ b/src/OpenSearch/Endpoints/Ingest/Simulate.php @@ -54,7 +54,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): Simulate { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/AddPolicy.php b/src/OpenSearch/Endpoints/Ism/AddPolicy.php index 045768abe..f87d83b68 100644 --- a/src/OpenSearch/Endpoints/Ism/AddPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/AddPolicy.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): AddPolicy { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/ChangePolicy.php b/src/OpenSearch/Endpoints/Ism/ChangePolicy.php index 49dbb9d23..8815ec48a 100644 --- a/src/OpenSearch/Endpoints/Ism/ChangePolicy.php +++ b/src/OpenSearch/Endpoints/Ism/ChangePolicy.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): ChangePolicy { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/DeletePolicy.php b/src/OpenSearch/Endpoints/Ism/DeletePolicy.php index a30b2a258..00e92dbd3 100644 --- a/src/OpenSearch/Endpoints/Ism/DeletePolicy.php +++ b/src/OpenSearch/Endpoints/Ism/DeletePolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setPolicyId($policy_id): static + public function setPolicyId($policy_id): DeletePolicy { if (isset($policy_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php b/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php index 55ea59b58..c7187f999 100644 --- a/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/ExistsPolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'HEAD'; } - public function setPolicyId($policy_id): static + public function setPolicyId($policy_id): ExistsPolicy { if (isset($policy_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php b/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php index 35236df6b..80b2bb9a4 100644 --- a/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/ExplainPolicy.php @@ -47,7 +47,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): ExplainPolicy { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/GetPolicy.php b/src/OpenSearch/Endpoints/Ism/GetPolicy.php index 469dc7758..6138c890d 100644 --- a/src/OpenSearch/Endpoints/Ism/GetPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/GetPolicy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setPolicyId($policy_id): static + public function setPolicyId($policy_id): GetPolicy { if (isset($policy_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/PutPolicies.php b/src/OpenSearch/Endpoints/Ism/PutPolicies.php index 5148d8811..8b80ed8e8 100644 --- a/src/OpenSearch/Endpoints/Ism/PutPolicies.php +++ b/src/OpenSearch/Endpoints/Ism/PutPolicies.php @@ -46,7 +46,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutPolicies { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/PutPolicy.php b/src/OpenSearch/Endpoints/Ism/PutPolicy.php index e93b289b3..253b4d554 100644 --- a/src/OpenSearch/Endpoints/Ism/PutPolicy.php +++ b/src/OpenSearch/Endpoints/Ism/PutPolicy.php @@ -54,7 +54,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutPolicy { if (isset($body) !== true) { return $this; @@ -64,7 +64,7 @@ public function setBody($body): static return $this; } - public function setPolicyId($policy_id): static + public function setPolicyId($policy_id): PutPolicy { if (isset($policy_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ism/RetryIndex.php b/src/OpenSearch/Endpoints/Ism/RetryIndex.php index 1056aab5e..d263e8502 100644 --- a/src/OpenSearch/Endpoints/Ism/RetryIndex.php +++ b/src/OpenSearch/Endpoints/Ism/RetryIndex.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): RetryIndex { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Knn/DeleteModel.php b/src/OpenSearch/Endpoints/Knn/DeleteModel.php index f650a5751..e4afbc057 100644 --- a/src/OpenSearch/Endpoints/Knn/DeleteModel.php +++ b/src/OpenSearch/Endpoints/Knn/DeleteModel.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setModelId($model_id): static + public function setModelId($model_id): DeleteModel { if (isset($model_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Knn/GetModel.php b/src/OpenSearch/Endpoints/Knn/GetModel.php index 410d884b1..c8d2e927b 100644 --- a/src/OpenSearch/Endpoints/Knn/GetModel.php +++ b/src/OpenSearch/Endpoints/Knn/GetModel.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setModelId($model_id): static + public function setModelId($model_id): GetModel { if (isset($model_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Knn/SearchModels.php b/src/OpenSearch/Endpoints/Knn/SearchModels.php index cd25afc58..23e988cd4 100644 --- a/src/OpenSearch/Endpoints/Knn/SearchModels.php +++ b/src/OpenSearch/Endpoints/Knn/SearchModels.php @@ -85,7 +85,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): SearchModels { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Knn/Stats.php b/src/OpenSearch/Endpoints/Knn/Stats.php index a8d17d78a..a5fac1964 100644 --- a/src/OpenSearch/Endpoints/Knn/Stats.php +++ b/src/OpenSearch/Endpoints/Knn/Stats.php @@ -58,7 +58,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): static + public function setNodeId($node_id): Stats { if (isset($node_id) !== true) { return $this; @@ -71,7 +71,7 @@ public function setNodeId($node_id): static return $this; } - public function setStat($stat): static + public function setStat($stat): Stats { if (isset($stat) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Knn/TrainModel.php b/src/OpenSearch/Endpoints/Knn/TrainModel.php index cf4cbc3b1..19b8d8074 100644 --- a/src/OpenSearch/Endpoints/Knn/TrainModel.php +++ b/src/OpenSearch/Endpoints/Knn/TrainModel.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): TrainModel { if (isset($body) !== true) { return $this; @@ -60,7 +60,7 @@ public function setBody($body): static return $this; } - public function setModelId($model_id): static + public function setModelId($model_id): TrainModel { if (isset($model_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/MTermVectors.php b/src/OpenSearch/Endpoints/MTermVectors.php index f76e08807..11afa11e9 100644 --- a/src/OpenSearch/Endpoints/MTermVectors.php +++ b/src/OpenSearch/Endpoints/MTermVectors.php @@ -65,7 +65,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): MTermVectors { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Mget.php b/src/OpenSearch/Endpoints/Mget.php index edd7682f9..e1a57615b 100644 --- a/src/OpenSearch/Endpoints/Mget.php +++ b/src/OpenSearch/Endpoints/Mget.php @@ -61,7 +61,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): Mget { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/CreateConnector.php b/src/OpenSearch/Endpoints/Ml/CreateConnector.php index 887bf9872..6a62bbcb9 100644 --- a/src/OpenSearch/Endpoints/Ml/CreateConnector.php +++ b/src/OpenSearch/Endpoints/Ml/CreateConnector.php @@ -41,7 +41,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): CreateConnector { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/DeleteAgent.php b/src/OpenSearch/Endpoints/Ml/DeleteAgent.php index fb8c46560..759c5a54b 100644 --- a/src/OpenSearch/Endpoints/Ml/DeleteAgent.php +++ b/src/OpenSearch/Endpoints/Ml/DeleteAgent.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setAgentId($agent_id): static + public function setAgentId($agent_id): DeleteAgent { if (isset($agent_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/DeleteConnector.php b/src/OpenSearch/Endpoints/Ml/DeleteConnector.php index 6c28dd276..f457358cf 100644 --- a/src/OpenSearch/Endpoints/Ml/DeleteConnector.php +++ b/src/OpenSearch/Endpoints/Ml/DeleteConnector.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'DELETE'; } - public function setConnectorId($connector_id): static + public function setConnectorId($connector_id): DeleteConnector { if (isset($connector_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/DeleteTask.php b/src/OpenSearch/Endpoints/Ml/DeleteTask.php index cbff3d87a..6a2a3036c 100644 --- a/src/OpenSearch/Endpoints/Ml/DeleteTask.php +++ b/src/OpenSearch/Endpoints/Ml/DeleteTask.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setTaskId($task_id): static + public function setTaskId($task_id): DeleteTask { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/DeployModel.php b/src/OpenSearch/Endpoints/Ml/DeployModel.php index e69da6946..0d9cf4cb7 100644 --- a/src/OpenSearch/Endpoints/Ml/DeployModel.php +++ b/src/OpenSearch/Endpoints/Ml/DeployModel.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setModelId($model_id): static + public function setModelId($model_id): DeployModel { if (isset($model_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/GetModelGroup.php b/src/OpenSearch/Endpoints/Ml/GetModelGroup.php index 989f9ae23..f061ea6c6 100644 --- a/src/OpenSearch/Endpoints/Ml/GetModelGroup.php +++ b/src/OpenSearch/Endpoints/Ml/GetModelGroup.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setModelGroupId($model_group_id): static + public function setModelGroupId($model_group_id): GetModelGroup { if (isset($model_group_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/RegisterAgents.php b/src/OpenSearch/Endpoints/Ml/RegisterAgents.php index 11051da16..7c14d852b 100644 --- a/src/OpenSearch/Endpoints/Ml/RegisterAgents.php +++ b/src/OpenSearch/Endpoints/Ml/RegisterAgents.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): RegisterAgents { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/RegisterModel.php b/src/OpenSearch/Endpoints/Ml/RegisterModel.php index 49824326a..698659c96 100644 --- a/src/OpenSearch/Endpoints/Ml/RegisterModel.php +++ b/src/OpenSearch/Endpoints/Ml/RegisterModel.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): RegisterModel { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php b/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php index ff4943eca..046581e8c 100644 --- a/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php +++ b/src/OpenSearch/Endpoints/Ml/RegisterModelGroup.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): RegisterModelGroup { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/SearchModels.php b/src/OpenSearch/Endpoints/Ml/SearchModels.php index 84512e7c5..a6874ac1f 100644 --- a/src/OpenSearch/Endpoints/Ml/SearchModels.php +++ b/src/OpenSearch/Endpoints/Ml/SearchModels.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'GET'; } - public function setBody($body): static + public function setBody($body): SearchModels { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ml/UndeployModel.php b/src/OpenSearch/Endpoints/Ml/UndeployModel.php index 3aff2bad8..2dd63058f 100644 --- a/src/OpenSearch/Endpoints/Ml/UndeployModel.php +++ b/src/OpenSearch/Endpoints/Ml/UndeployModel.php @@ -48,7 +48,7 @@ public function getMethod(): string return 'POST'; } - public function setModelId($model_id): static + public function setModelId($model_id): UndeployModel { if (isset($model_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Msearch.php b/src/OpenSearch/Endpoints/Msearch.php index a7e392857..e2a5fb6e1 100644 --- a/src/OpenSearch/Endpoints/Msearch.php +++ b/src/OpenSearch/Endpoints/Msearch.php @@ -68,7 +68,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): Msearch { if (isset($body) !== true) { return $this; @@ -87,5 +87,4 @@ public function setBody($body): static } return $this; } - } diff --git a/src/OpenSearch/Endpoints/MsearchTemplate.php b/src/OpenSearch/Endpoints/MsearchTemplate.php index 247882f7f..560c62d8f 100644 --- a/src/OpenSearch/Endpoints/MsearchTemplate.php +++ b/src/OpenSearch/Endpoints/MsearchTemplate.php @@ -66,7 +66,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): MsearchTemplate { if (isset($body) !== true) { return $this; @@ -85,5 +85,4 @@ public function setBody($body): static } return $this; } - } diff --git a/src/OpenSearch/Endpoints/Nodes/HotThreads.php b/src/OpenSearch/Endpoints/Nodes/HotThreads.php index a4854a600..ab4e0a976 100644 --- a/src/OpenSearch/Endpoints/Nodes/HotThreads.php +++ b/src/OpenSearch/Endpoints/Nodes/HotThreads.php @@ -61,7 +61,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): static + public function setNodeId($node_id): HotThreads { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Nodes/Info.php b/src/OpenSearch/Endpoints/Nodes/Info.php index da403a7c8..b02a894a3 100644 --- a/src/OpenSearch/Endpoints/Nodes/Info.php +++ b/src/OpenSearch/Endpoints/Nodes/Info.php @@ -70,7 +70,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeIdOrMetric($node_id_or_metric): static + public function setNodeIdOrMetric($node_id_or_metric): Info { if (isset($node_id_or_metric) !== true) { return $this; @@ -80,7 +80,7 @@ public function setNodeIdOrMetric($node_id_or_metric): static return $this; } - public function setMetric($metric): static + public function setMetric($metric): Info { if (isset($metric) !== true) { return $this; @@ -93,7 +93,7 @@ public function setMetric($metric): static return $this; } - public function setNodeId($node_id): static + public function setNodeId($node_id): Info { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php b/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php index 6b3a6a140..f858252db 100644 --- a/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php +++ b/src/OpenSearch/Endpoints/Nodes/ReloadSecureSettings.php @@ -56,7 +56,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): ReloadSecureSettings { if (isset($body) !== true) { return $this; @@ -66,7 +66,7 @@ public function setBody($body): static return $this; } - public function setNodeId($node_id): static + public function setNodeId($node_id): ReloadSecureSettings { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Nodes/Stats.php b/src/OpenSearch/Endpoints/Nodes/Stats.php index b3d84d198..1758d29f8 100644 --- a/src/OpenSearch/Endpoints/Nodes/Stats.php +++ b/src/OpenSearch/Endpoints/Nodes/Stats.php @@ -79,7 +79,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): static + public function setNodeId($node_id): Stats { if (isset($node_id) !== true) { return $this; @@ -92,7 +92,7 @@ public function setNodeId($node_id): static return $this; } - public function setMetric($metric): static + public function setMetric($metric): Stats { if (isset($metric) !== true) { return $this; @@ -105,7 +105,7 @@ public function setMetric($metric): static return $this; } - public function setIndexMetric($index_metric): static + public function setIndexMetric($index_metric): Stats { if (isset($index_metric) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Nodes/Usage.php b/src/OpenSearch/Endpoints/Nodes/Usage.php index 18098ada5..3693c5918 100644 --- a/src/OpenSearch/Endpoints/Nodes/Usage.php +++ b/src/OpenSearch/Endpoints/Nodes/Usage.php @@ -64,7 +64,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): static + public function setNodeId($node_id): Usage { if (isset($node_id) !== true) { return $this; @@ -77,7 +77,7 @@ public function setNodeId($node_id): static return $this; } - public function setMetric($metric): static + public function setMetric($metric): Usage { if (isset($metric) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/CreateConfig.php b/src/OpenSearch/Endpoints/Notifications/CreateConfig.php index a21b3c4ce..72ddf5931 100644 --- a/src/OpenSearch/Endpoints/Notifications/CreateConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/CreateConfig.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): CreateConfig { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php b/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php index 6bab9ea4f..afe39ff2e 100644 --- a/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/DeleteConfig.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setConfigId($config_id): static + public function setConfigId($config_id): DeleteConfig { if (isset($config_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/GetConfig.php b/src/OpenSearch/Endpoints/Notifications/GetConfig.php index 444dfb10c..ded17c039 100644 --- a/src/OpenSearch/Endpoints/Notifications/GetConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/GetConfig.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setConfigId($config_id): static + public function setConfigId($config_id): GetConfig { if (isset($config_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/GetConfigs.php b/src/OpenSearch/Endpoints/Notifications/GetConfigs.php index 22d250e16..95bdfbde1 100644 --- a/src/OpenSearch/Endpoints/Notifications/GetConfigs.php +++ b/src/OpenSearch/Endpoints/Notifications/GetConfigs.php @@ -83,7 +83,7 @@ public function getMethod(): string return 'GET'; } - public function setBody($body): static + public function setBody($body): GetConfigs { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/SendTest.php b/src/OpenSearch/Endpoints/Notifications/SendTest.php index 2ff691812..2066781c1 100644 --- a/src/OpenSearch/Endpoints/Notifications/SendTest.php +++ b/src/OpenSearch/Endpoints/Notifications/SendTest.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setConfigId($config_id): static + public function setConfigId($config_id): SendTest { if (isset($config_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php b/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php index 55fa55758..d493a5c78 100644 --- a/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php +++ b/src/OpenSearch/Endpoints/Notifications/UpdateConfig.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): UpdateConfig { if (isset($body) !== true) { return $this; @@ -60,7 +60,7 @@ public function setBody($body): static return $this; } - public function setConfigId($config_id): static + public function setConfigId($config_id): UpdateConfig { if (isset($config_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Observability/CreateObject.php b/src/OpenSearch/Endpoints/Observability/CreateObject.php index a88377e5c..47494884c 100644 --- a/src/OpenSearch/Endpoints/Observability/CreateObject.php +++ b/src/OpenSearch/Endpoints/Observability/CreateObject.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): CreateObject { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Observability/DeleteObject.php b/src/OpenSearch/Endpoints/Observability/DeleteObject.php index 308d4da41..cc600211f 100644 --- a/src/OpenSearch/Endpoints/Observability/DeleteObject.php +++ b/src/OpenSearch/Endpoints/Observability/DeleteObject.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setObjectId($object_id): static + public function setObjectId($object_id): DeleteObject { if (isset($object_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Observability/GetObject.php b/src/OpenSearch/Endpoints/Observability/GetObject.php index ed967f9bc..e2cea7a87 100644 --- a/src/OpenSearch/Endpoints/Observability/GetObject.php +++ b/src/OpenSearch/Endpoints/Observability/GetObject.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setObjectId($object_id): static + public function setObjectId($object_id): GetObject { if (isset($object_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Observability/UpdateObject.php b/src/OpenSearch/Endpoints/Observability/UpdateObject.php index 69d44e46f..a1c07f46d 100644 --- a/src/OpenSearch/Endpoints/Observability/UpdateObject.php +++ b/src/OpenSearch/Endpoints/Observability/UpdateObject.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): UpdateObject { if (isset($body) !== true) { return $this; @@ -60,7 +60,7 @@ public function setBody($body): static return $this; } - public function setObjectId($object_id): static + public function setObjectId($object_id): UpdateObject { if (isset($object_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ppl/Explain.php b/src/OpenSearch/Endpoints/Ppl/Explain.php index 4e1c04683..708526b7d 100644 --- a/src/OpenSearch/Endpoints/Ppl/Explain.php +++ b/src/OpenSearch/Endpoints/Ppl/Explain.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Explain { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ppl/PostStats.php b/src/OpenSearch/Endpoints/Ppl/PostStats.php index e7763bdce..5efac6f39 100644 --- a/src/OpenSearch/Endpoints/Ppl/PostStats.php +++ b/src/OpenSearch/Endpoints/Ppl/PostStats.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): PostStats { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Ppl/Query.php b/src/OpenSearch/Endpoints/Ppl/Query.php index 47c31e35e..bb544c862 100644 --- a/src/OpenSearch/Endpoints/Ppl/Query.php +++ b/src/OpenSearch/Endpoints/Ppl/Query.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Query { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/PutScript.php b/src/OpenSearch/Endpoints/PutScript.php index 43323828b..5615c7806 100644 --- a/src/OpenSearch/Endpoints/PutScript.php +++ b/src/OpenSearch/Endpoints/PutScript.php @@ -66,7 +66,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): PutScript { if (isset($body) !== true) { return $this; @@ -76,7 +76,7 @@ public function setBody($body): static return $this; } - public function setContext($context): static + public function setContext($context): PutScript { if (isset($context) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Query/DatasourceDelete.php b/src/OpenSearch/Endpoints/Query/DatasourceDelete.php index 717019ba4..fac161964 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourceDelete.php +++ b/src/OpenSearch/Endpoints/Query/DatasourceDelete.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'DELETE'; } - public function setDatasourceName($datasource_name): static + public function setDatasourceName($datasource_name): DatasourceDelete { if (isset($datasource_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php b/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php index e04725583..f45d1adb9 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php +++ b/src/OpenSearch/Endpoints/Query/DatasourceRetrieve.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'GET'; } - public function setDatasourceName($datasource_name): static + public function setDatasourceName($datasource_name): DatasourceRetrieve { if (isset($datasource_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php b/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php index 9f1c2d4e2..b2a478816 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php +++ b/src/OpenSearch/Endpoints/Query/DatasourcesCreate.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): DatasourcesCreate { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php b/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php index 6836d7261..4da38b367 100644 --- a/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php +++ b/src/OpenSearch/Endpoints/Query/DatasourcesUpdate.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): DatasourcesUpdate { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/RankEval.php b/src/OpenSearch/Endpoints/RankEval.php index 4b1b23de1..ee92c79f0 100644 --- a/src/OpenSearch/Endpoints/RankEval.php +++ b/src/OpenSearch/Endpoints/RankEval.php @@ -57,7 +57,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): RankEval { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Reindex.php b/src/OpenSearch/Endpoints/Reindex.php index 85b19007d..8aacbcda6 100644 --- a/src/OpenSearch/Endpoints/Reindex.php +++ b/src/OpenSearch/Endpoints/Reindex.php @@ -57,7 +57,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Reindex { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/ReindexRethrottle.php b/src/OpenSearch/Endpoints/ReindexRethrottle.php index fbbdb5290..50d7bc457 100644 --- a/src/OpenSearch/Endpoints/ReindexRethrottle.php +++ b/src/OpenSearch/Endpoints/ReindexRethrottle.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setTaskId($task_id): static + public function setTaskId($task_id): ReindexRethrottle { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/RemoteStore/Restore.php b/src/OpenSearch/Endpoints/RemoteStore/Restore.php index fb4c6c415..d1c4630fc 100644 --- a/src/OpenSearch/Endpoints/RemoteStore/Restore.php +++ b/src/OpenSearch/Endpoints/RemoteStore/Restore.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Restore { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/RenderSearchTemplate.php b/src/OpenSearch/Endpoints/RenderSearchTemplate.php index 48e320423..80bea800e 100644 --- a/src/OpenSearch/Endpoints/RenderSearchTemplate.php +++ b/src/OpenSearch/Endpoints/RenderSearchTemplate.php @@ -53,7 +53,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): RenderSearchTemplate { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Rollups/Put.php b/src/OpenSearch/Endpoints/Rollups/Put.php index dc8ec8458..6aa63aaf8 100644 --- a/src/OpenSearch/Endpoints/Rollups/Put.php +++ b/src/OpenSearch/Endpoints/Rollups/Put.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): Put { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php b/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php index 1e3ecef26..5a6b8b71d 100644 --- a/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php +++ b/src/OpenSearch/Endpoints/ScriptsPainlessExecute.php @@ -49,7 +49,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): ScriptsPainlessExecute { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Scroll.php b/src/OpenSearch/Endpoints/Scroll.php index f4042d833..907a555dc 100644 --- a/src/OpenSearch/Endpoints/Scroll.php +++ b/src/OpenSearch/Endpoints/Scroll.php @@ -62,7 +62,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): Scroll { if (isset($body) !== true) { return $this; @@ -72,7 +72,7 @@ public function setBody($body): static return $this; } - public function setScrollId($scroll_id): static + public function setScrollId($scroll_id): Scroll { if (isset($scroll_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Search.php b/src/OpenSearch/Endpoints/Search.php index 8380e3f5b..0bbdf51cf 100644 --- a/src/OpenSearch/Endpoints/Search.php +++ b/src/OpenSearch/Endpoints/Search.php @@ -99,7 +99,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): Search { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/SearchPipeline/Put.php b/src/OpenSearch/Endpoints/SearchPipeline/Put.php index dc0332a52..c194a59d4 100644 --- a/src/OpenSearch/Endpoints/SearchPipeline/Put.php +++ b/src/OpenSearch/Endpoints/SearchPipeline/Put.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): Put { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/SearchTemplate.php b/src/OpenSearch/Endpoints/SearchTemplate.php index e52369161..f297b183c 100644 --- a/src/OpenSearch/Endpoints/SearchTemplate.php +++ b/src/OpenSearch/Endpoints/SearchTemplate.php @@ -66,7 +66,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): SearchTemplate { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/ChangePassword.php b/src/OpenSearch/Endpoints/Security/ChangePassword.php index 494921f5c..12d2f7df4 100644 --- a/src/OpenSearch/Endpoints/Security/ChangePassword.php +++ b/src/OpenSearch/Endpoints/Security/ChangePassword.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): ChangePassword { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php b/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php index cc68e11fa..ad049f472 100644 --- a/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php +++ b/src/OpenSearch/Endpoints/Security/ConfigUpgradePerform.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): ConfigUpgradePerform { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateActionGroup.php b/src/OpenSearch/Endpoints/Security/CreateActionGroup.php index dfb844c02..22424f366 100644 --- a/src/OpenSearch/Endpoints/Security/CreateActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/CreateActionGroup.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CreateActionGroup { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setActionGroup($action_group): static + public function setActionGroup($action_group): CreateActionGroup { if (isset($action_group) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateAllowlist.php b/src/OpenSearch/Endpoints/Security/CreateAllowlist.php index 1cccd618d..7562eb98d 100644 --- a/src/OpenSearch/Endpoints/Security/CreateAllowlist.php +++ b/src/OpenSearch/Endpoints/Security/CreateAllowlist.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CreateAllowlist { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateRole.php b/src/OpenSearch/Endpoints/Security/CreateRole.php index 5bf8a7b58..7402b3e95 100644 --- a/src/OpenSearch/Endpoints/Security/CreateRole.php +++ b/src/OpenSearch/Endpoints/Security/CreateRole.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CreateRole { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setRole($role): static + public function setRole($role): CreateRole { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php b/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php index 7acbb7925..6fcd61b92 100644 --- a/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/CreateRoleMapping.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CreateRoleMapping { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setRole($role): static + public function setRole($role): CreateRoleMapping { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateTenant.php b/src/OpenSearch/Endpoints/Security/CreateTenant.php index 5463d44da..54ce0ee09 100644 --- a/src/OpenSearch/Endpoints/Security/CreateTenant.php +++ b/src/OpenSearch/Endpoints/Security/CreateTenant.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CreateTenant { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setTenant($tenant): static + public function setTenant($tenant): CreateTenant { if (isset($tenant) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php b/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php index 15574d10c..3d60632f4 100644 --- a/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php +++ b/src/OpenSearch/Endpoints/Security/CreateUpdateTenancyConfig.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CreateUpdateTenancyConfig { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateUser.php b/src/OpenSearch/Endpoints/Security/CreateUser.php index a43677385..b69347047 100644 --- a/src/OpenSearch/Endpoints/Security/CreateUser.php +++ b/src/OpenSearch/Endpoints/Security/CreateUser.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CreateUser { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setUsername($username): static + public function setUsername($username): CreateUser { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php b/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php index 4e2bd51fb..e3f5ea21e 100644 --- a/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php +++ b/src/OpenSearch/Endpoints/Security/CreateUserLegacy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CreateUserLegacy { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setUsername($username): static + public function setUsername($username): CreateUserLegacy { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php b/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php index 9645e761d..4257f964c 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/DeleteActionGroup.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setActionGroup($action_group): static + public function setActionGroup($action_group): DeleteActionGroup { if (isset($action_group) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php b/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php index f80c7e9c3..8e8920729 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/DeleteDistinguishedName.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setClusterName($cluster_name): static + public function setClusterName($cluster_name): DeleteDistinguishedName { if (isset($cluster_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteRole.php b/src/OpenSearch/Endpoints/Security/DeleteRole.php index aa906d66f..cea84504d 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteRole.php +++ b/src/OpenSearch/Endpoints/Security/DeleteRole.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setRole($role): static + public function setRole($role): DeleteRole { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php b/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php index 67b6d54a4..d1ec1f134 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/DeleteRoleMapping.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setRole($role): static + public function setRole($role): DeleteRoleMapping { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteTenant.php b/src/OpenSearch/Endpoints/Security/DeleteTenant.php index d2e4d89e1..be3a5d840 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteTenant.php +++ b/src/OpenSearch/Endpoints/Security/DeleteTenant.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setTenant($tenant): static + public function setTenant($tenant): DeleteTenant { if (isset($tenant) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteUser.php b/src/OpenSearch/Endpoints/Security/DeleteUser.php index 10c3b5937..639dc4a99 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteUser.php +++ b/src/OpenSearch/Endpoints/Security/DeleteUser.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setUsername($username): static + public function setUsername($username): DeleteUser { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php b/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php index cdaf73156..590494f46 100644 --- a/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php +++ b/src/OpenSearch/Endpoints/Security/DeleteUserLegacy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'DELETE'; } - public function setUsername($username): static + public function setUsername($username): DeleteUserLegacy { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GenerateOboToken.php b/src/OpenSearch/Endpoints/Security/GenerateOboToken.php index 503d30219..d9855ae2b 100644 --- a/src/OpenSearch/Endpoints/Security/GenerateOboToken.php +++ b/src/OpenSearch/Endpoints/Security/GenerateOboToken.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): GenerateOboToken { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GenerateUserToken.php b/src/OpenSearch/Endpoints/Security/GenerateUserToken.php index 16d214569..476d259df 100644 --- a/src/OpenSearch/Endpoints/Security/GenerateUserToken.php +++ b/src/OpenSearch/Endpoints/Security/GenerateUserToken.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'POST'; } - public function setUsername($username): static + public function setUsername($username): GenerateUserToken { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php b/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php index 4ebdfecdf..b62ecc6e8 100644 --- a/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php +++ b/src/OpenSearch/Endpoints/Security/GenerateUserTokenLegacy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'POST'; } - public function setUsername($username): static + public function setUsername($username): GenerateUserTokenLegacy { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetActionGroup.php b/src/OpenSearch/Endpoints/Security/GetActionGroup.php index c0c51c547..2e117de73 100644 --- a/src/OpenSearch/Endpoints/Security/GetActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/GetActionGroup.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setActionGroup($action_group): static + public function setActionGroup($action_group): GetActionGroup { if (isset($action_group) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php b/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php index e7dd3ee05..29ebf9fac 100644 --- a/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/GetDistinguishedName.php @@ -53,7 +53,7 @@ public function getMethod(): string return 'GET'; } - public function setClusterName($cluster_name): static + public function setClusterName($cluster_name): GetDistinguishedName { if (isset($cluster_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php b/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php index a0013349f..7d66df31e 100644 --- a/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php +++ b/src/OpenSearch/Endpoints/Security/GetNodeCertificates.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setNodeId($node_id): static + public function setNodeId($node_id): GetNodeCertificates { if (isset($node_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetRole.php b/src/OpenSearch/Endpoints/Security/GetRole.php index de9dfc71c..21db28ce8 100644 --- a/src/OpenSearch/Endpoints/Security/GetRole.php +++ b/src/OpenSearch/Endpoints/Security/GetRole.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setRole($role): static + public function setRole($role): GetRole { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetRoleMapping.php b/src/OpenSearch/Endpoints/Security/GetRoleMapping.php index b58d74ecb..34656ac79 100644 --- a/src/OpenSearch/Endpoints/Security/GetRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/GetRoleMapping.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setRole($role): static + public function setRole($role): GetRoleMapping { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetTenant.php b/src/OpenSearch/Endpoints/Security/GetTenant.php index dcfd3c002..bbb46f22c 100644 --- a/src/OpenSearch/Endpoints/Security/GetTenant.php +++ b/src/OpenSearch/Endpoints/Security/GetTenant.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setTenant($tenant): static + public function setTenant($tenant): GetTenant { if (isset($tenant) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetUser.php b/src/OpenSearch/Endpoints/Security/GetUser.php index ec67393ae..71616462f 100644 --- a/src/OpenSearch/Endpoints/Security/GetUser.php +++ b/src/OpenSearch/Endpoints/Security/GetUser.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setUsername($username): static + public function setUsername($username): GetUser { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/GetUserLegacy.php b/src/OpenSearch/Endpoints/Security/GetUserLegacy.php index f58bdf4d1..285bb3535 100644 --- a/src/OpenSearch/Endpoints/Security/GetUserLegacy.php +++ b/src/OpenSearch/Endpoints/Security/GetUserLegacy.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'GET'; } - public function setUsername($username): static + public function setUsername($username): GetUserLegacy { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchActionGroup.php b/src/OpenSearch/Endpoints/Security/PatchActionGroup.php index 35e737aa9..23a7ae15d 100644 --- a/src/OpenSearch/Endpoints/Security/PatchActionGroup.php +++ b/src/OpenSearch/Endpoints/Security/PatchActionGroup.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchActionGroup { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setActionGroup($action_group): static + public function setActionGroup($action_group): PatchActionGroup { if (isset($action_group) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchActionGroups.php b/src/OpenSearch/Endpoints/Security/PatchActionGroups.php index 53e84258c..1934ff7bb 100644 --- a/src/OpenSearch/Endpoints/Security/PatchActionGroups.php +++ b/src/OpenSearch/Endpoints/Security/PatchActionGroups.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchActionGroups { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchAllowlist.php b/src/OpenSearch/Endpoints/Security/PatchAllowlist.php index bbd76c6fe..1bf9c04fb 100644 --- a/src/OpenSearch/Endpoints/Security/PatchAllowlist.php +++ b/src/OpenSearch/Endpoints/Security/PatchAllowlist.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchAllowlist { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php b/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php index 3bcd2b91a..b20b9d438 100644 --- a/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/PatchAuditConfiguration.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchAuditConfiguration { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchConfiguration.php b/src/OpenSearch/Endpoints/Security/PatchConfiguration.php index 7fb935e2f..a1ab9a697 100644 --- a/src/OpenSearch/Endpoints/Security/PatchConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/PatchConfiguration.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchConfiguration { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php b/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php index 419d22cb0..2a25baab0 100644 --- a/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/PatchDistinguishedName.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchDistinguishedName { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setClusterName($cluster_name): static + public function setClusterName($cluster_name): PatchDistinguishedName { if (isset($cluster_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php b/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php index 280dd322b..26e488a3c 100644 --- a/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php +++ b/src/OpenSearch/Endpoints/Security/PatchDistinguishedNames.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchDistinguishedNames { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchRole.php b/src/OpenSearch/Endpoints/Security/PatchRole.php index 432817e7b..5d285ec3a 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRole.php +++ b/src/OpenSearch/Endpoints/Security/PatchRole.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchRole { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setRole($role): static + public function setRole($role): PatchRole { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php b/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php index b593f2bc6..f1e9bf4f5 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php +++ b/src/OpenSearch/Endpoints/Security/PatchRoleMapping.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchRoleMapping { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setRole($role): static + public function setRole($role): PatchRoleMapping { if (isset($role) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php b/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php index 29ef48b5b..0282e9135 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php +++ b/src/OpenSearch/Endpoints/Security/PatchRoleMappings.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchRoleMappings { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchRoles.php b/src/OpenSearch/Endpoints/Security/PatchRoles.php index cb1bb3b46..66c129624 100644 --- a/src/OpenSearch/Endpoints/Security/PatchRoles.php +++ b/src/OpenSearch/Endpoints/Security/PatchRoles.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchRoles { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchTenant.php b/src/OpenSearch/Endpoints/Security/PatchTenant.php index a3902d56d..b7efa65d6 100644 --- a/src/OpenSearch/Endpoints/Security/PatchTenant.php +++ b/src/OpenSearch/Endpoints/Security/PatchTenant.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchTenant { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setTenant($tenant): static + public function setTenant($tenant): PatchTenant { if (isset($tenant) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchTenants.php b/src/OpenSearch/Endpoints/Security/PatchTenants.php index 1f6b71a83..41a3dbc2b 100644 --- a/src/OpenSearch/Endpoints/Security/PatchTenants.php +++ b/src/OpenSearch/Endpoints/Security/PatchTenants.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchTenants { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchUser.php b/src/OpenSearch/Endpoints/Security/PatchUser.php index b15e8471e..147384652 100644 --- a/src/OpenSearch/Endpoints/Security/PatchUser.php +++ b/src/OpenSearch/Endpoints/Security/PatchUser.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchUser { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setUsername($username): static + public function setUsername($username): PatchUser { if (isset($username) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/PatchUsers.php b/src/OpenSearch/Endpoints/Security/PatchUsers.php index 8b61f6585..dafff0a40 100644 --- a/src/OpenSearch/Endpoints/Security/PatchUsers.php +++ b/src/OpenSearch/Endpoints/Security/PatchUsers.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PATCH'; } - public function setBody($body): static + public function setBody($body): PatchUsers { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php b/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php index c5e6824a7..00ff896f8 100644 --- a/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/UpdateAuditConfiguration.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): UpdateAuditConfiguration { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php b/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php index b0862fd1b..b805d6d57 100644 --- a/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php +++ b/src/OpenSearch/Endpoints/Security/UpdateConfiguration.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): UpdateConfiguration { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php b/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php index 25d8f1384..b78551c65 100644 --- a/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php +++ b/src/OpenSearch/Endpoints/Security/UpdateDistinguishedName.php @@ -52,7 +52,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): UpdateDistinguishedName { if (isset($body) !== true) { return $this; @@ -62,7 +62,7 @@ public function setBody($body): static return $this; } - public function setClusterName($cluster_name): static + public function setClusterName($cluster_name): UpdateDistinguishedName { if (isset($cluster_name) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php b/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php index 33800a060..4f7b5d723 100644 --- a/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/CleanupRepository.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setRepository($repository): static + public function setRepository($repository): CleanupRepository { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php b/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php index 2d4523301..9808f55ca 100644 --- a/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php +++ b/src/OpenSearch/Endpoints/Snapshot/CloneSnapshot.php @@ -62,7 +62,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CloneSnapshot { if (isset($body) !== true) { return $this; @@ -72,7 +72,7 @@ public function setBody($body): static return $this; } - public function setRepository($repository): static + public function setRepository($repository): CloneSnapshot { if (isset($repository) !== true) { return $this; @@ -82,7 +82,7 @@ public function setRepository($repository): static return $this; } - public function setSnapshot($snapshot): static + public function setSnapshot($snapshot): CloneSnapshot { if (isset($snapshot) !== true) { return $this; @@ -92,7 +92,7 @@ public function setSnapshot($snapshot): static return $this; } - public function setTargetSnapshot($target_snapshot): static + public function setTargetSnapshot($target_snapshot): CloneSnapshot { if (isset($target_snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/Create.php b/src/OpenSearch/Endpoints/Snapshot/Create.php index 63c5ea70f..e46cbd481 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Create.php +++ b/src/OpenSearch/Endpoints/Snapshot/Create.php @@ -61,7 +61,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): Create { if (isset($body) !== true) { return $this; @@ -71,7 +71,7 @@ public function setBody($body): static return $this; } - public function setRepository($repository): static + public function setRepository($repository): Create { if (isset($repository) !== true) { return $this; @@ -81,7 +81,7 @@ public function setRepository($repository): static return $this; } - public function setSnapshot($snapshot): static + public function setSnapshot($snapshot): Create { if (isset($snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php b/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php index 5d5f7ef6e..1fef0bed0 100644 --- a/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/CreateRepository.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): CreateRepository { if (isset($body) !== true) { return $this; @@ -70,7 +70,7 @@ public function setBody($body): static return $this; } - public function setRepository($repository): static + public function setRepository($repository): CreateRepository { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/Delete.php b/src/OpenSearch/Endpoints/Snapshot/Delete.php index 9dd2492ac..f543d1a6c 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Delete.php +++ b/src/OpenSearch/Endpoints/Snapshot/Delete.php @@ -60,7 +60,7 @@ public function getMethod(): string return 'DELETE'; } - public function setRepository($repository): static + public function setRepository($repository): Delete { if (isset($repository) !== true) { return $this; @@ -70,7 +70,7 @@ public function setRepository($repository): static return $this; } - public function setSnapshot($snapshot): static + public function setSnapshot($snapshot): Delete { if (isset($snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/DeleteRepository.php b/src/OpenSearch/Endpoints/Snapshot/DeleteRepository.php index 8e84c4888..b4f7bd36a 100644 --- a/src/OpenSearch/Endpoints/Snapshot/DeleteRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/DeleteRepository.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'DELETE'; } - public function setRepository($repository): static + public function setRepository($repository): DeleteRepository { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/Get.php b/src/OpenSearch/Endpoints/Snapshot/Get.php index 6951e15f8..77facdeed 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Get.php +++ b/src/OpenSearch/Endpoints/Snapshot/Get.php @@ -62,7 +62,7 @@ public function getMethod(): string return 'GET'; } - public function setRepository($repository): static + public function setRepository($repository): Get { if (isset($repository) !== true) { return $this; @@ -72,7 +72,7 @@ public function setRepository($repository): static return $this; } - public function setSnapshot($snapshot): static + public function setSnapshot($snapshot): Get { if (isset($snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/GetRepository.php b/src/OpenSearch/Endpoints/Snapshot/GetRepository.php index c4603a28e..d9b3442f1 100644 --- a/src/OpenSearch/Endpoints/Snapshot/GetRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/GetRepository.php @@ -58,7 +58,7 @@ public function getMethod(): string return 'GET'; } - public function setRepository($repository): static + public function setRepository($repository): GetRepository { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/Restore.php b/src/OpenSearch/Endpoints/Snapshot/Restore.php index 9c30e67aa..575cc3430 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Restore.php +++ b/src/OpenSearch/Endpoints/Snapshot/Restore.php @@ -61,7 +61,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Restore { if (isset($body) !== true) { return $this; @@ -71,7 +71,7 @@ public function setBody($body): static return $this; } - public function setRepository($repository): static + public function setRepository($repository): Restore { if (isset($repository) !== true) { return $this; @@ -81,7 +81,7 @@ public function setRepository($repository): static return $this; } - public function setSnapshot($snapshot): static + public function setSnapshot($snapshot): Restore { if (isset($snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/Status.php b/src/OpenSearch/Endpoints/Snapshot/Status.php index d894ce8c4..183272cb6 100644 --- a/src/OpenSearch/Endpoints/Snapshot/Status.php +++ b/src/OpenSearch/Endpoints/Snapshot/Status.php @@ -63,7 +63,7 @@ public function getMethod(): string return 'GET'; } - public function setRepository($repository): static + public function setRepository($repository): Status { if (isset($repository) !== true) { return $this; @@ -73,7 +73,7 @@ public function setRepository($repository): static return $this; } - public function setSnapshot($snapshot): static + public function setSnapshot($snapshot): Status { if (isset($snapshot) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php b/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php index 4c8b0f871..6203bc299 100644 --- a/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php +++ b/src/OpenSearch/Endpoints/Snapshot/VerifyRepository.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setRepository($repository): static + public function setRepository($repository): VerifyRepository { if (isset($repository) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Sql/Close.php b/src/OpenSearch/Endpoints/Sql/Close.php index dd9f8d32e..2ef15e00e 100644 --- a/src/OpenSearch/Endpoints/Sql/Close.php +++ b/src/OpenSearch/Endpoints/Sql/Close.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Close { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Sql/Explain.php b/src/OpenSearch/Endpoints/Sql/Explain.php index c7380165c..6291c3b39 100644 --- a/src/OpenSearch/Endpoints/Sql/Explain.php +++ b/src/OpenSearch/Endpoints/Sql/Explain.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Explain { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Sql/PostStats.php b/src/OpenSearch/Endpoints/Sql/PostStats.php index 4e1073ddc..744ae997b 100644 --- a/src/OpenSearch/Endpoints/Sql/PostStats.php +++ b/src/OpenSearch/Endpoints/Sql/PostStats.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): PostStats { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Sql/Query.php b/src/OpenSearch/Endpoints/Sql/Query.php index 47d3699e2..c92970e0c 100644 --- a/src/OpenSearch/Endpoints/Sql/Query.php +++ b/src/OpenSearch/Endpoints/Sql/Query.php @@ -45,7 +45,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Query { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Sql/Settings.php b/src/OpenSearch/Endpoints/Sql/Settings.php index 5872d364d..782898267 100644 --- a/src/OpenSearch/Endpoints/Sql/Settings.php +++ b/src/OpenSearch/Endpoints/Sql/Settings.php @@ -44,7 +44,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): Settings { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Tasks/Cancel.php b/src/OpenSearch/Endpoints/Tasks/Cancel.php index 2d578c53b..83deffe9f 100644 --- a/src/OpenSearch/Endpoints/Tasks/Cancel.php +++ b/src/OpenSearch/Endpoints/Tasks/Cancel.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setTaskId($task_id): static + public function setTaskId($task_id): Cancel { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Tasks/Get.php b/src/OpenSearch/Endpoints/Tasks/Get.php index 198941aba..df8e113df 100644 --- a/src/OpenSearch/Endpoints/Tasks/Get.php +++ b/src/OpenSearch/Endpoints/Tasks/Get.php @@ -58,7 +58,7 @@ public function getMethod(): string return 'GET'; } - public function setTaskId($task_id): static + public function setTaskId($task_id): Get { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/TermVectors.php b/src/OpenSearch/Endpoints/TermVectors.php index 7a35caf12..c06aefdbe 100644 --- a/src/OpenSearch/Endpoints/TermVectors.php +++ b/src/OpenSearch/Endpoints/TermVectors.php @@ -71,7 +71,7 @@ public function getMethod(): string return isset($this->body) ? 'POST' : 'GET'; } - public function setBody($body): static + public function setBody($body): TermVectors { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Transforms/Preview.php b/src/OpenSearch/Endpoints/Transforms/Preview.php index 167422e50..ad9dc44ae 100644 --- a/src/OpenSearch/Endpoints/Transforms/Preview.php +++ b/src/OpenSearch/Endpoints/Transforms/Preview.php @@ -43,7 +43,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Preview { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Transforms/Put.php b/src/OpenSearch/Endpoints/Transforms/Put.php index 5230fc884..68c371910 100644 --- a/src/OpenSearch/Endpoints/Transforms/Put.php +++ b/src/OpenSearch/Endpoints/Transforms/Put.php @@ -50,7 +50,7 @@ public function getMethod(): string return 'PUT'; } - public function setBody($body): static + public function setBody($body): Put { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Update.php b/src/OpenSearch/Endpoints/Update.php index a45d4ee22..eedb30196 100644 --- a/src/OpenSearch/Endpoints/Update.php +++ b/src/OpenSearch/Endpoints/Update.php @@ -74,7 +74,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): Update { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/UpdateByQuery.php b/src/OpenSearch/Endpoints/UpdateByQuery.php index 627176dd9..f08a450ee 100644 --- a/src/OpenSearch/Endpoints/UpdateByQuery.php +++ b/src/OpenSearch/Endpoints/UpdateByQuery.php @@ -90,7 +90,7 @@ public function getMethod(): string return 'POST'; } - public function setBody($body): static + public function setBody($body): UpdateByQuery { if (isset($body) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php b/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php index 1281a1ab7..37d8f7ff9 100644 --- a/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php +++ b/src/OpenSearch/Endpoints/UpdateByQueryRethrottle.php @@ -59,7 +59,7 @@ public function getMethod(): string return 'POST'; } - public function setTaskId($task_id): static + public function setTaskId($task_id): UpdateByQueryRethrottle { if (isset($task_id) !== true) { return $this; diff --git a/src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php deleted file mode 100644 index 299d98256..000000000 --- a/src/OpenSearch/Endpoints/Wlm/CreateQueryGroup.php +++ /dev/null @@ -1,55 +0,0 @@ -body = $body; - - return $this; - } -} diff --git a/src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php deleted file mode 100644 index 8a7cda794..000000000 --- a/src/OpenSearch/Endpoints/Wlm/DeleteQueryGroup.php +++ /dev/null @@ -1,62 +0,0 @@ -name ?? null; - if (isset($name)) { - return "/_wlm/query_group/$name"; - } - throw new RuntimeException('Missing parameter for the endpoint wlm.delete_query_group'); - } - - public function getParamWhitelist(): array - { - return [ - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path' - ]; - } - - public function getMethod(): string - { - return 'DELETE'; - } - - public function setName($name): static - { - if (isset($name) !== true) { - return $this; - } - $this->name = $name; - - return $this; - } -} diff --git a/src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php deleted file mode 100644 index 5db7e0319..000000000 --- a/src/OpenSearch/Endpoints/Wlm/GetQueryGroup.php +++ /dev/null @@ -1,61 +0,0 @@ -name ?? null; - if (isset($name)) { - return "/_wlm/query_group/$name"; - } - return "/_wlm/query_group"; - } - - public function getParamWhitelist(): array - { - return [ - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path' - ]; - } - - public function getMethod(): string - { - return 'GET'; - } - - public function setName($name): static - { - if (isset($name) !== true) { - return $this; - } - $this->name = $name; - - return $this; - } -} diff --git a/src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php b/src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php deleted file mode 100644 index 2c437c425..000000000 --- a/src/OpenSearch/Endpoints/Wlm/UpdateQueryGroup.php +++ /dev/null @@ -1,72 +0,0 @@ -name ?? null; - if (isset($name)) { - return "/_wlm/query_group/$name"; - } - throw new RuntimeException('Missing parameter for the endpoint wlm.update_query_group'); - } - - public function getParamWhitelist(): array - { - return [ - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path' - ]; - } - - public function getMethod(): string - { - return 'PUT'; - } - - public function setBody($body): static - { - if (isset($body) !== true) { - return $this; - } - $this->body = $body; - - return $this; - } - - public function setName($name): static - { - if (isset($name) !== true) { - return $this; - } - $this->name = $name; - - return $this; - } -} diff --git a/src/OpenSearch/Namespaces/WlmNamespace.php b/src/OpenSearch/Namespaces/WlmNamespace.php deleted file mode 100644 index 220fe0262..000000000 --- a/src/OpenSearch/Namespaces/WlmNamespace.php +++ /dev/null @@ -1,124 +0,0 @@ -extractArgument($params, 'body'); - - $endpointBuilder = $this->endpoints; - $endpoint = $endpointBuilder('Wlm\CreateQueryGroup'); - $endpoint->setParams($params); - $endpoint->setBody($body); - - return $this->performRequest($endpoint); - } - /** - * Deletes the specified QueryGroup. - * - * $params['name'] = (string) QueryGroup name. - * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. - * $params['human'] = (boolean) Whether to return human readable values for statistics. - * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. - * $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 deleteQueryGroup(array $params = []) - { - $name = $this->extractArgument($params, 'name'); - - $endpointBuilder = $this->endpoints; - $endpoint = $endpointBuilder('Wlm\DeleteQueryGroup'); - $endpoint->setParams($params); - $endpoint->setName($name); - - return $this->performRequest($endpoint); - } - /** - * Gets the specified QueryGroup or get all if no name is provided. - * - * $params['name'] = (string) QueryGroup name. - * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. - * $params['human'] = (boolean) Whether to return human readable values for statistics. - * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. - * $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 getQueryGroup(array $params = []) - { - $name = $this->extractArgument($params, 'name'); - - $endpointBuilder = $this->endpoints; - $endpoint = $endpointBuilder('Wlm\GetQueryGroup'); - $endpoint->setParams($params); - $endpoint->setName($name); - - return $this->performRequest($endpoint); - } - /** - * Updates the specified query group. - * - * $params['name'] = (string) QueryGroup name. - * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. - * $params['human'] = (boolean) Whether to return human readable values for statistics. - * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. - * $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 updateQueryGroup(array $params = []) - { - $name = $this->extractArgument($params, 'name'); - $body = $this->extractArgument($params, 'body'); - - $endpointBuilder = $this->endpoints; - $endpoint = $endpointBuilder('Wlm\UpdateQueryGroup'); - $endpoint->setParams($params); - $endpoint->setName($name); - $endpoint->setBody($body); - - return $this->performRequest($endpoint); - } -} From 9dd7038e34e8dad22c4276b4a2413e03bdf23118 Mon Sep 17 00:00:00 2001 From: Shyim Date: Tue, 5 Nov 2024 10:07:51 +0100 Subject: [PATCH 3/3] Update CHANGELOG.md Signed-off-by: Shyim --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d09907259..5f5e6a8b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added support for PHP 8.3 and 8.4 ([#229](https://github.com/opensearch-project/opensearch-php/pull/229)) ### Changed - Increased min version of `ezimuel/ringphp` to `^1.2.2` +- Changed fluent setters to return static ### Deprecated ### Removed ### Fixed