Completed
Push — master ( 0675a5...c513b3 )
by Maxence
03:29 queued 14s
created
lib/Vendor/Elastic/Elasticsearch/Endpoints/Nodes.php 3 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function clearRepositoriesMeteringArchive(array $params = [])
52 52
     {
53 53
         $this->checkRequiredParameters(['node_id', 'max_archive_version'], $params);
54
-        $url = '/_nodes/' . $this->encode($params['node_id']) . '/_repositories_metering/' . $this->encode($params['max_archive_version']);
54
+        $url = '/_nodes/'.$this->encode($params['node_id']).'/_repositories_metering/'.$this->encode($params['max_archive_version']);
55 55
         $method = 'DELETE';
56 56
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
57 57
         $headers = ['Accept' => 'application/json'];
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     public function getRepositoriesMeteringInfo(array $params = [])
83 83
     {
84 84
         $this->checkRequiredParameters(['node_id'], $params);
85
-        $url = '/_nodes/' . $this->encode($params['node_id']) . '/_repositories_metering';
85
+        $url = '/_nodes/'.$this->encode($params['node_id']).'/_repositories_metering';
86 86
         $method = 'GET';
87 87
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
88 88
         $headers = ['Accept' => 'application/json'];
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     public function hotThreads(array $params = [])
119 119
     {
120 120
         if (isset($params['node_id'])) {
121
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/hot_threads';
121
+            $url = '/_nodes/'.$this->encode($params['node_id']).'/hot_threads';
122 122
             $method = 'GET';
123 123
         } else {
124 124
             $url = '/_nodes/hot_threads';
@@ -154,13 +154,13 @@  discard block
 block discarded – undo
154 154
     public function info(array $params = [])
155 155
     {
156 156
         if (isset($params['node_id']) && isset($params['metric'])) {
157
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/' . $this->encode($params['metric']);
157
+            $url = '/_nodes/'.$this->encode($params['node_id']).'/'.$this->encode($params['metric']);
158 158
             $method = 'GET';
159 159
         } elseif (isset($params['node_id'])) {
160
-            $url = '/_nodes/' . $this->encode($params['node_id']);
160
+            $url = '/_nodes/'.$this->encode($params['node_id']);
161 161
             $method = 'GET';
162 162
         } elseif (isset($params['metric'])) {
163
-            $url = '/_nodes/' . $this->encode($params['metric']);
163
+            $url = '/_nodes/'.$this->encode($params['metric']);
164 164
             $method = 'GET';
165 165
         } else {
166 166
             $url = '/_nodes';
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     public function reloadSecureSettings(array $params = [])
196 196
     {
197 197
         if (isset($params['node_id'])) {
198
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/reload_secure_settings';
198
+            $url = '/_nodes/'.$this->encode($params['node_id']).'/reload_secure_settings';
199 199
             $method = 'POST';
200 200
         } else {
201 201
             $url = '/_nodes/reload_secure_settings';
@@ -239,19 +239,19 @@  discard block
 block discarded – undo
239 239
     public function stats(array $params = [])
240 240
     {
241 241
         if (isset($params['metric']) && isset($params['index_metric']) && isset($params['node_id'])) {
242
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/stats/' . $this->encode($params['metric']) . '/' . $this->encode($params['index_metric']);
242
+            $url = '/_nodes/'.$this->encode($params['node_id']).'/stats/'.$this->encode($params['metric']).'/'.$this->encode($params['index_metric']);
243 243
             $method = 'GET';
244 244
         } elseif (isset($params['metric']) && isset($params['node_id'])) {
245
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/stats/' . $this->encode($params['metric']);
245
+            $url = '/_nodes/'.$this->encode($params['node_id']).'/stats/'.$this->encode($params['metric']);
246 246
             $method = 'GET';
247 247
         } elseif (isset($params['metric']) && isset($params['index_metric'])) {
248
-            $url = '/_nodes/stats/' . $this->encode($params['metric']) . '/' . $this->encode($params['index_metric']);
248
+            $url = '/_nodes/stats/'.$this->encode($params['metric']).'/'.$this->encode($params['index_metric']);
249 249
             $method = 'GET';
250 250
         } elseif (isset($params['node_id'])) {
251
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/stats';
251
+            $url = '/_nodes/'.$this->encode($params['node_id']).'/stats';
252 252
             $method = 'GET';
253 253
         } elseif (isset($params['metric'])) {
254
-            $url = '/_nodes/stats/' . $this->encode($params['metric']);
254
+            $url = '/_nodes/stats/'.$this->encode($params['metric']);
255 255
             $method = 'GET';
256 256
         } else {
257 257
             $url = '/_nodes/stats';
@@ -286,13 +286,13 @@  discard block
 block discarded – undo
286 286
     public function usage(array $params = [])
287 287
     {
288 288
         if (isset($params['metric']) && isset($params['node_id'])) {
289
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/usage/' . $this->encode($params['metric']);
289
+            $url = '/_nodes/'.$this->encode($params['node_id']).'/usage/'.$this->encode($params['metric']);
290 290
             $method = 'GET';
291 291
         } elseif (isset($params['node_id'])) {
292
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/usage';
292
+            $url = '/_nodes/'.$this->encode($params['node_id']).'/usage';
293 293
             $method = 'GET';
294 294
         } elseif (isset($params['metric'])) {
295
-            $url = '/_nodes/usage/' . $this->encode($params['metric']);
295
+            $url = '/_nodes/usage/'.$this->encode($params['metric']);
296 296
             $method = 'GET';
297 297
         } else {
298 298
             $url = '/_nodes/usage';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Nodes extends AbstractEndpoint
27
-{
26
+class Nodes extends AbstractEndpoint {
28 27
     /**
29 28
      * Removes the archived repositories metering information present in the cluster.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +291 added lines, -291 removed lines patch added patch discarded remove patch
@@ -25,295 +25,295 @@
 block discarded – undo
25 25
  */
26 26
 class Nodes extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Removes the archived repositories metering information present in the cluster.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html
32
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
33
-     *
34
-     * @param array{
35
-     *     node_id: list, // (REQUIRED) Comma-separated list of node IDs or names used to limit returned information.
36
-     *     max_archive_version: long, // (REQUIRED) Specifies the maximum archive_version to be cleared from the archive.
37
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
38
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
39
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
40
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
41
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
42
-     * } $params
43
-     *
44
-     * @throws MissingParameterException if a required parameter is missing
45
-     * @throws NoNodeAvailableException if all the hosts are offline
46
-     * @throws ClientResponseException if the status code of response is 4xx
47
-     * @throws ServerResponseException if the status code of response is 5xx
48
-     *
49
-     * @return Elasticsearch|Promise
50
-     */
51
-    public function clearRepositoriesMeteringArchive(array $params = [])
52
-    {
53
-        $this->checkRequiredParameters(['node_id', 'max_archive_version'], $params);
54
-        $url = '/_nodes/' . $this->encode($params['node_id']) . '/_repositories_metering/' . $this->encode($params['max_archive_version']);
55
-        $method = 'DELETE';
56
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
57
-        $headers = ['Accept' => 'application/json'];
58
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
59
-        $request = $this->addOtelAttributes($params, ['node_id', 'max_archive_version'], $request, 'nodes.clear_repositories_metering_archive');
60
-        return $this->client->sendRequest($request);
61
-    }
62
-    /**
63
-     * Returns cluster repositories metering information.
64
-     *
65
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html
66
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
67
-     *
68
-     * @param array{
69
-     *     node_id: list, // (REQUIRED) A comma-separated list of node IDs or names to limit the returned information.
70
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
71
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
72
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
73
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
74
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
75
-     * } $params
76
-     *
77
-     * @throws MissingParameterException if a required parameter is missing
78
-     * @throws NoNodeAvailableException if all the hosts are offline
79
-     * @throws ClientResponseException if the status code of response is 4xx
80
-     * @throws ServerResponseException if the status code of response is 5xx
81
-     *
82
-     * @return Elasticsearch|Promise
83
-     */
84
-    public function getRepositoriesMeteringInfo(array $params = [])
85
-    {
86
-        $this->checkRequiredParameters(['node_id'], $params);
87
-        $url = '/_nodes/' . $this->encode($params['node_id']) . '/_repositories_metering';
88
-        $method = 'GET';
89
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
90
-        $headers = ['Accept' => 'application/json'];
91
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
92
-        $request = $this->addOtelAttributes($params, ['node_id'], $request, 'nodes.get_repositories_metering_info');
93
-        return $this->client->sendRequest($request);
94
-    }
95
-    /**
96
-     * Returns information about hot threads on each node in the cluster.
97
-     *
98
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html
99
-     *
100
-     * @param array{
101
-     *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
102
-     *     interval: time, // The interval for the second sampling of threads
103
-     *     snapshots: number, // Number of samples of thread stacktrace (default: 10)
104
-     *     threads: number, // Specify the number of threads to provide information for (default: 3)
105
-     *     ignore_idle_threads: boolean, // Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
106
-     *     type: enum, // The type to sample (default: cpu)
107
-     *     sort: enum, // The sort order for 'cpu' type (default: total)
108
-     *     timeout: time, // Explicit operation timeout
109
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
110
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
111
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
112
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
113
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
114
-     * } $params
115
-     *
116
-     * @throws NoNodeAvailableException if all the hosts are offline
117
-     * @throws ClientResponseException if the status code of response is 4xx
118
-     * @throws ServerResponseException if the status code of response is 5xx
119
-     *
120
-     * @return Elasticsearch|Promise
121
-     */
122
-    public function hotThreads(array $params = [])
123
-    {
124
-        if (isset($params['node_id'])) {
125
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/hot_threads';
126
-            $method = 'GET';
127
-        } else {
128
-            $url = '/_nodes/hot_threads';
129
-            $method = 'GET';
130
-        }
131
-        $url = $this->addQueryString($url, $params, ['interval', 'snapshots', 'threads', 'ignore_idle_threads', 'type', 'sort', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
132
-        $headers = ['Accept' => 'text/plain'];
133
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
134
-        $request = $this->addOtelAttributes($params, ['node_id'], $request, 'nodes.hot_threads');
135
-        return $this->client->sendRequest($request);
136
-    }
137
-    /**
138
-     * Returns information about nodes in the cluster.
139
-     *
140
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html
141
-     *
142
-     * @param array{
143
-     *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
144
-     *     metric: list, //  A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics.
145
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
146
-     *     timeout: time, // Explicit operation timeout
147
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
148
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
149
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
150
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
151
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
152
-     * } $params
153
-     *
154
-     * @throws NoNodeAvailableException if all the hosts are offline
155
-     * @throws ClientResponseException if the status code of response is 4xx
156
-     * @throws ServerResponseException if the status code of response is 5xx
157
-     *
158
-     * @return Elasticsearch|Promise
159
-     */
160
-    public function info(array $params = [])
161
-    {
162
-        if (isset($params['node_id']) && isset($params['metric'])) {
163
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/' . $this->encode($params['metric']);
164
-            $method = 'GET';
165
-        } elseif (isset($params['node_id'])) {
166
-            $url = '/_nodes/' . $this->encode($params['node_id']);
167
-            $method = 'GET';
168
-        } elseif (isset($params['metric'])) {
169
-            $url = '/_nodes/' . $this->encode($params['metric']);
170
-            $method = 'GET';
171
-        } else {
172
-            $url = '/_nodes';
173
-            $method = 'GET';
174
-        }
175
-        $url = $this->addQueryString($url, $params, ['flat_settings', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
176
-        $headers = ['Accept' => 'application/json'];
177
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
178
-        $request = $this->addOtelAttributes($params, ['node_id', 'metric'], $request, 'nodes.info');
179
-        return $this->client->sendRequest($request);
180
-    }
181
-    /**
182
-     * Reloads secure settings.
183
-     *
184
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings
185
-     *
186
-     * @param array{
187
-     *     node_id: list, //  A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes.
188
-     *     timeout: time, // Explicit operation timeout
189
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
190
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
191
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
192
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
193
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
194
-     *     body: array, //  An object containing the password for the elasticsearch keystore
195
-     * } $params
196
-     *
197
-     * @throws NoNodeAvailableException if all the hosts are offline
198
-     * @throws ClientResponseException if the status code of response is 4xx
199
-     * @throws ServerResponseException if the status code of response is 5xx
200
-     *
201
-     * @return Elasticsearch|Promise
202
-     */
203
-    public function reloadSecureSettings(array $params = [])
204
-    {
205
-        if (isset($params['node_id'])) {
206
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/reload_secure_settings';
207
-            $method = 'POST';
208
-        } else {
209
-            $url = '/_nodes/reload_secure_settings';
210
-            $method = 'POST';
211
-        }
212
-        $url = $this->addQueryString($url, $params, ['timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
213
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
214
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
215
-        $request = $this->addOtelAttributes($params, ['node_id'], $request, 'nodes.reload_secure_settings');
216
-        return $this->client->sendRequest($request);
217
-    }
218
-    /**
219
-     * Returns statistical information about nodes in the cluster.
220
-     *
221
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html
222
-     *
223
-     * @param array{
224
-     *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
225
-     *     metric: list, //  Limit the information returned to the specified metrics
226
-     *     index_metric: list, //  Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
227
-     *     completion_fields: list, // A comma-separated list of fields for the `completion` index metric (supports wildcards)
228
-     *     fielddata_fields: list, // A comma-separated list of fields for the `fielddata` index metric (supports wildcards)
229
-     *     fields: list, // A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
230
-     *     groups: boolean, // A comma-separated list of search groups for `search` index metric
231
-     *     level: enum, // Return indices stats aggregated at index, node or shard level
232
-     *     types: list, // A comma-separated list of document types for the `indexing` index metric
233
-     *     timeout: time, // Explicit operation timeout
234
-     *     include_segment_file_sizes: boolean, // Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
235
-     *     include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
236
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
237
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
238
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
239
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
240
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
241
-     * } $params
242
-     *
243
-     * @throws NoNodeAvailableException if all the hosts are offline
244
-     * @throws ClientResponseException if the status code of response is 4xx
245
-     * @throws ServerResponseException if the status code of response is 5xx
246
-     *
247
-     * @return Elasticsearch|Promise
248
-     */
249
-    public function stats(array $params = [])
250
-    {
251
-        if (isset($params['metric']) && isset($params['index_metric']) && isset($params['node_id'])) {
252
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/stats/' . $this->encode($params['metric']) . '/' . $this->encode($params['index_metric']);
253
-            $method = 'GET';
254
-        } elseif (isset($params['metric']) && isset($params['node_id'])) {
255
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/stats/' . $this->encode($params['metric']);
256
-            $method = 'GET';
257
-        } elseif (isset($params['metric']) && isset($params['index_metric'])) {
258
-            $url = '/_nodes/stats/' . $this->encode($params['metric']) . '/' . $this->encode($params['index_metric']);
259
-            $method = 'GET';
260
-        } elseif (isset($params['node_id'])) {
261
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/stats';
262
-            $method = 'GET';
263
-        } elseif (isset($params['metric'])) {
264
-            $url = '/_nodes/stats/' . $this->encode($params['metric']);
265
-            $method = 'GET';
266
-        } else {
267
-            $url = '/_nodes/stats';
268
-            $method = 'GET';
269
-        }
270
-        $url = $this->addQueryString($url, $params, ['completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'types', 'timeout', 'include_segment_file_sizes', 'include_unloaded_segments', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
271
-        $headers = ['Accept' => 'application/json'];
272
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
273
-        $request = $this->addOtelAttributes($params, ['node_id', 'metric', 'index_metric'], $request, 'nodes.stats');
274
-        return $this->client->sendRequest($request);
275
-    }
276
-    /**
277
-     * Returns low-level information about REST actions usage on nodes.
278
-     *
279
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html
280
-     *
281
-     * @param array{
282
-     *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
283
-     *     metric: list, //  Limit the information returned to the specified metrics
284
-     *     timeout: time, // Explicit operation timeout
285
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
286
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
287
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
288
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
289
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
290
-     * } $params
291
-     *
292
-     * @throws NoNodeAvailableException if all the hosts are offline
293
-     * @throws ClientResponseException if the status code of response is 4xx
294
-     * @throws ServerResponseException if the status code of response is 5xx
295
-     *
296
-     * @return Elasticsearch|Promise
297
-     */
298
-    public function usage(array $params = [])
299
-    {
300
-        if (isset($params['metric']) && isset($params['node_id'])) {
301
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/usage/' . $this->encode($params['metric']);
302
-            $method = 'GET';
303
-        } elseif (isset($params['node_id'])) {
304
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/usage';
305
-            $method = 'GET';
306
-        } elseif (isset($params['metric'])) {
307
-            $url = '/_nodes/usage/' . $this->encode($params['metric']);
308
-            $method = 'GET';
309
-        } else {
310
-            $url = '/_nodes/usage';
311
-            $method = 'GET';
312
-        }
313
-        $url = $this->addQueryString($url, $params, ['timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
314
-        $headers = ['Accept' => 'application/json'];
315
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
316
-        $request = $this->addOtelAttributes($params, ['node_id', 'metric'], $request, 'nodes.usage');
317
-        return $this->client->sendRequest($request);
318
-    }
28
+	/**
29
+	 * Removes the archived repositories metering information present in the cluster.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html
32
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
33
+	 *
34
+	 * @param array{
35
+	 *     node_id: list, // (REQUIRED) Comma-separated list of node IDs or names used to limit returned information.
36
+	 *     max_archive_version: long, // (REQUIRED) Specifies the maximum archive_version to be cleared from the archive.
37
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
38
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
39
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
40
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
41
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
42
+	 * } $params
43
+	 *
44
+	 * @throws MissingParameterException if a required parameter is missing
45
+	 * @throws NoNodeAvailableException if all the hosts are offline
46
+	 * @throws ClientResponseException if the status code of response is 4xx
47
+	 * @throws ServerResponseException if the status code of response is 5xx
48
+	 *
49
+	 * @return Elasticsearch|Promise
50
+	 */
51
+	public function clearRepositoriesMeteringArchive(array $params = [])
52
+	{
53
+		$this->checkRequiredParameters(['node_id', 'max_archive_version'], $params);
54
+		$url = '/_nodes/' . $this->encode($params['node_id']) . '/_repositories_metering/' . $this->encode($params['max_archive_version']);
55
+		$method = 'DELETE';
56
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
57
+		$headers = ['Accept' => 'application/json'];
58
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
59
+		$request = $this->addOtelAttributes($params, ['node_id', 'max_archive_version'], $request, 'nodes.clear_repositories_metering_archive');
60
+		return $this->client->sendRequest($request);
61
+	}
62
+	/**
63
+	 * Returns cluster repositories metering information.
64
+	 *
65
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html
66
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
67
+	 *
68
+	 * @param array{
69
+	 *     node_id: list, // (REQUIRED) A comma-separated list of node IDs or names to limit the returned information.
70
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
71
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
72
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
73
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
74
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
75
+	 * } $params
76
+	 *
77
+	 * @throws MissingParameterException if a required parameter is missing
78
+	 * @throws NoNodeAvailableException if all the hosts are offline
79
+	 * @throws ClientResponseException if the status code of response is 4xx
80
+	 * @throws ServerResponseException if the status code of response is 5xx
81
+	 *
82
+	 * @return Elasticsearch|Promise
83
+	 */
84
+	public function getRepositoriesMeteringInfo(array $params = [])
85
+	{
86
+		$this->checkRequiredParameters(['node_id'], $params);
87
+		$url = '/_nodes/' . $this->encode($params['node_id']) . '/_repositories_metering';
88
+		$method = 'GET';
89
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
90
+		$headers = ['Accept' => 'application/json'];
91
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
92
+		$request = $this->addOtelAttributes($params, ['node_id'], $request, 'nodes.get_repositories_metering_info');
93
+		return $this->client->sendRequest($request);
94
+	}
95
+	/**
96
+	 * Returns information about hot threads on each node in the cluster.
97
+	 *
98
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html
99
+	 *
100
+	 * @param array{
101
+	 *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
102
+	 *     interval: time, // The interval for the second sampling of threads
103
+	 *     snapshots: number, // Number of samples of thread stacktrace (default: 10)
104
+	 *     threads: number, // Specify the number of threads to provide information for (default: 3)
105
+	 *     ignore_idle_threads: boolean, // Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
106
+	 *     type: enum, // The type to sample (default: cpu)
107
+	 *     sort: enum, // The sort order for 'cpu' type (default: total)
108
+	 *     timeout: time, // Explicit operation timeout
109
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
110
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
111
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
112
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
113
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
114
+	 * } $params
115
+	 *
116
+	 * @throws NoNodeAvailableException if all the hosts are offline
117
+	 * @throws ClientResponseException if the status code of response is 4xx
118
+	 * @throws ServerResponseException if the status code of response is 5xx
119
+	 *
120
+	 * @return Elasticsearch|Promise
121
+	 */
122
+	public function hotThreads(array $params = [])
123
+	{
124
+		if (isset($params['node_id'])) {
125
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/hot_threads';
126
+			$method = 'GET';
127
+		} else {
128
+			$url = '/_nodes/hot_threads';
129
+			$method = 'GET';
130
+		}
131
+		$url = $this->addQueryString($url, $params, ['interval', 'snapshots', 'threads', 'ignore_idle_threads', 'type', 'sort', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
132
+		$headers = ['Accept' => 'text/plain'];
133
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
134
+		$request = $this->addOtelAttributes($params, ['node_id'], $request, 'nodes.hot_threads');
135
+		return $this->client->sendRequest($request);
136
+	}
137
+	/**
138
+	 * Returns information about nodes in the cluster.
139
+	 *
140
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html
141
+	 *
142
+	 * @param array{
143
+	 *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
144
+	 *     metric: list, //  A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics.
145
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
146
+	 *     timeout: time, // Explicit operation timeout
147
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
148
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
149
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
150
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
151
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
152
+	 * } $params
153
+	 *
154
+	 * @throws NoNodeAvailableException if all the hosts are offline
155
+	 * @throws ClientResponseException if the status code of response is 4xx
156
+	 * @throws ServerResponseException if the status code of response is 5xx
157
+	 *
158
+	 * @return Elasticsearch|Promise
159
+	 */
160
+	public function info(array $params = [])
161
+	{
162
+		if (isset($params['node_id']) && isset($params['metric'])) {
163
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/' . $this->encode($params['metric']);
164
+			$method = 'GET';
165
+		} elseif (isset($params['node_id'])) {
166
+			$url = '/_nodes/' . $this->encode($params['node_id']);
167
+			$method = 'GET';
168
+		} elseif (isset($params['metric'])) {
169
+			$url = '/_nodes/' . $this->encode($params['metric']);
170
+			$method = 'GET';
171
+		} else {
172
+			$url = '/_nodes';
173
+			$method = 'GET';
174
+		}
175
+		$url = $this->addQueryString($url, $params, ['flat_settings', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
176
+		$headers = ['Accept' => 'application/json'];
177
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
178
+		$request = $this->addOtelAttributes($params, ['node_id', 'metric'], $request, 'nodes.info');
179
+		return $this->client->sendRequest($request);
180
+	}
181
+	/**
182
+	 * Reloads secure settings.
183
+	 *
184
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings
185
+	 *
186
+	 * @param array{
187
+	 *     node_id: list, //  A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes.
188
+	 *     timeout: time, // Explicit operation timeout
189
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
190
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
191
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
192
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
193
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
194
+	 *     body: array, //  An object containing the password for the elasticsearch keystore
195
+	 * } $params
196
+	 *
197
+	 * @throws NoNodeAvailableException if all the hosts are offline
198
+	 * @throws ClientResponseException if the status code of response is 4xx
199
+	 * @throws ServerResponseException if the status code of response is 5xx
200
+	 *
201
+	 * @return Elasticsearch|Promise
202
+	 */
203
+	public function reloadSecureSettings(array $params = [])
204
+	{
205
+		if (isset($params['node_id'])) {
206
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/reload_secure_settings';
207
+			$method = 'POST';
208
+		} else {
209
+			$url = '/_nodes/reload_secure_settings';
210
+			$method = 'POST';
211
+		}
212
+		$url = $this->addQueryString($url, $params, ['timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
213
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
214
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
215
+		$request = $this->addOtelAttributes($params, ['node_id'], $request, 'nodes.reload_secure_settings');
216
+		return $this->client->sendRequest($request);
217
+	}
218
+	/**
219
+	 * Returns statistical information about nodes in the cluster.
220
+	 *
221
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html
222
+	 *
223
+	 * @param array{
224
+	 *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
225
+	 *     metric: list, //  Limit the information returned to the specified metrics
226
+	 *     index_metric: list, //  Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
227
+	 *     completion_fields: list, // A comma-separated list of fields for the `completion` index metric (supports wildcards)
228
+	 *     fielddata_fields: list, // A comma-separated list of fields for the `fielddata` index metric (supports wildcards)
229
+	 *     fields: list, // A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
230
+	 *     groups: boolean, // A comma-separated list of search groups for `search` index metric
231
+	 *     level: enum, // Return indices stats aggregated at index, node or shard level
232
+	 *     types: list, // A comma-separated list of document types for the `indexing` index metric
233
+	 *     timeout: time, // Explicit operation timeout
234
+	 *     include_segment_file_sizes: boolean, // Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
235
+	 *     include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
236
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
237
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
238
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
239
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
240
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
241
+	 * } $params
242
+	 *
243
+	 * @throws NoNodeAvailableException if all the hosts are offline
244
+	 * @throws ClientResponseException if the status code of response is 4xx
245
+	 * @throws ServerResponseException if the status code of response is 5xx
246
+	 *
247
+	 * @return Elasticsearch|Promise
248
+	 */
249
+	public function stats(array $params = [])
250
+	{
251
+		if (isset($params['metric']) && isset($params['index_metric']) && isset($params['node_id'])) {
252
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/stats/' . $this->encode($params['metric']) . '/' . $this->encode($params['index_metric']);
253
+			$method = 'GET';
254
+		} elseif (isset($params['metric']) && isset($params['node_id'])) {
255
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/stats/' . $this->encode($params['metric']);
256
+			$method = 'GET';
257
+		} elseif (isset($params['metric']) && isset($params['index_metric'])) {
258
+			$url = '/_nodes/stats/' . $this->encode($params['metric']) . '/' . $this->encode($params['index_metric']);
259
+			$method = 'GET';
260
+		} elseif (isset($params['node_id'])) {
261
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/stats';
262
+			$method = 'GET';
263
+		} elseif (isset($params['metric'])) {
264
+			$url = '/_nodes/stats/' . $this->encode($params['metric']);
265
+			$method = 'GET';
266
+		} else {
267
+			$url = '/_nodes/stats';
268
+			$method = 'GET';
269
+		}
270
+		$url = $this->addQueryString($url, $params, ['completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'types', 'timeout', 'include_segment_file_sizes', 'include_unloaded_segments', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
271
+		$headers = ['Accept' => 'application/json'];
272
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
273
+		$request = $this->addOtelAttributes($params, ['node_id', 'metric', 'index_metric'], $request, 'nodes.stats');
274
+		return $this->client->sendRequest($request);
275
+	}
276
+	/**
277
+	 * Returns low-level information about REST actions usage on nodes.
278
+	 *
279
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html
280
+	 *
281
+	 * @param array{
282
+	 *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
283
+	 *     metric: list, //  Limit the information returned to the specified metrics
284
+	 *     timeout: time, // Explicit operation timeout
285
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
286
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
287
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
288
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
289
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
290
+	 * } $params
291
+	 *
292
+	 * @throws NoNodeAvailableException if all the hosts are offline
293
+	 * @throws ClientResponseException if the status code of response is 4xx
294
+	 * @throws ServerResponseException if the status code of response is 5xx
295
+	 *
296
+	 * @return Elasticsearch|Promise
297
+	 */
298
+	public function usage(array $params = [])
299
+	{
300
+		if (isset($params['metric']) && isset($params['node_id'])) {
301
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/usage/' . $this->encode($params['metric']);
302
+			$method = 'GET';
303
+		} elseif (isset($params['node_id'])) {
304
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/usage';
305
+			$method = 'GET';
306
+		} elseif (isset($params['metric'])) {
307
+			$url = '/_nodes/usage/' . $this->encode($params['metric']);
308
+			$method = 'GET';
309
+		} else {
310
+			$url = '/_nodes/usage';
311
+			$method = 'GET';
312
+		}
313
+		$url = $this->addQueryString($url, $params, ['timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
314
+		$headers = ['Accept' => 'application/json'];
315
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
316
+		$request = $this->addOtelAttributes($params, ['node_id', 'metric'], $request, 'nodes.usage');
317
+		return $this->client->sendRequest($request);
318
+	}
319 319
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Simulate.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         $this->checkRequiredParameters(['body'], $params);
54 54
         if (isset($params['index'])) {
55
-            $url = '/_ingest/' . $this->encode($params['index']) . '/_simulate';
55
+            $url = '/_ingest/'.$this->encode($params['index']).'/_simulate';
56 56
             $method = empty($params['body']) ? 'GET' : 'POST';
57 57
         } else {
58 58
             $url = '/_ingest/_simulate';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Simulate extends AbstractEndpoint
27
-{
26
+class Simulate extends AbstractEndpoint {
28 27
     /**
29 28
      * Simulates running ingest with example documents.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -25,43 +25,43 @@
 block discarded – undo
25 25
  */
26 26
 class Simulate extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Simulates running ingest with example documents.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-ingest-api.html
32
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
33
-     *
34
-     * @param array{
35
-     *     index: string, //  Default index for docs which don't provide one
36
-     *     pipeline: string, // The pipeline id to preprocess incoming documents with if no pipeline is given for a particular document
37
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
38
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
39
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
40
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
41
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
42
-     *     body: array, // (REQUIRED) The simulate definition
43
-     * } $params
44
-     *
45
-     * @throws NoNodeAvailableException if all the hosts are offline
46
-     * @throws ClientResponseException if the status code of response is 4xx
47
-     * @throws ServerResponseException if the status code of response is 5xx
48
-     *
49
-     * @return Elasticsearch|Promise
50
-     */
51
-    public function ingest(array $params = [])
52
-    {
53
-        $this->checkRequiredParameters(['body'], $params);
54
-        if (isset($params['index'])) {
55
-            $url = '/_ingest/' . $this->encode($params['index']) . '/_simulate';
56
-            $method = empty($params['body']) ? 'GET' : 'POST';
57
-        } else {
58
-            $url = '/_ingest/_simulate';
59
-            $method = empty($params['body']) ? 'GET' : 'POST';
60
-        }
61
-        $url = $this->addQueryString($url, $params, ['pipeline', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
62
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
63
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
64
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'simulate.ingest');
65
-        return $this->client->sendRequest($request);
66
-    }
28
+	/**
29
+	 * Simulates running ingest with example documents.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-ingest-api.html
32
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
33
+	 *
34
+	 * @param array{
35
+	 *     index: string, //  Default index for docs which don't provide one
36
+	 *     pipeline: string, // The pipeline id to preprocess incoming documents with if no pipeline is given for a particular document
37
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
38
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
39
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
40
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
41
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
42
+	 *     body: array, // (REQUIRED) The simulate definition
43
+	 * } $params
44
+	 *
45
+	 * @throws NoNodeAvailableException if all the hosts are offline
46
+	 * @throws ClientResponseException if the status code of response is 4xx
47
+	 * @throws ServerResponseException if the status code of response is 5xx
48
+	 *
49
+	 * @return Elasticsearch|Promise
50
+	 */
51
+	public function ingest(array $params = [])
52
+	{
53
+		$this->checkRequiredParameters(['body'], $params);
54
+		if (isset($params['index'])) {
55
+			$url = '/_ingest/' . $this->encode($params['index']) . '/_simulate';
56
+			$method = empty($params['body']) ? 'GET' : 'POST';
57
+		} else {
58
+			$url = '/_ingest/_simulate';
59
+			$method = empty($params['body']) ? 'GET' : 'POST';
60
+		}
61
+		$url = $this->addQueryString($url, $params, ['pipeline', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
62
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
63
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
64
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'simulate.ingest');
65
+		return $this->client->sendRequest($request);
66
+	}
67 67
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Synonyms.php 3 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function deleteSynonym(array $params = [])
50 50
     {
51 51
         $this->checkRequiredParameters(['id'], $params);
52
-        $url = '/_synonyms/' . $this->encode($params['id']);
52
+        $url = '/_synonyms/'.$this->encode($params['id']);
53 53
         $method = 'DELETE';
54 54
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55 55
         $headers = ['Accept' => 'application/json'];
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function deleteSynonymRule(array $params = [])
81 81
     {
82 82
         $this->checkRequiredParameters(['set_id', 'rule_id'], $params);
83
-        $url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
83
+        $url = '/_synonyms/'.$this->encode($params['set_id']).'/'.$this->encode($params['rule_id']);
84 84
         $method = 'DELETE';
85 85
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
86 86
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     public function getSynonym(array $params = [])
113 113
     {
114 114
         $this->checkRequiredParameters(['id'], $params);
115
-        $url = '/_synonyms/' . $this->encode($params['id']);
115
+        $url = '/_synonyms/'.$this->encode($params['id']);
116 116
         $method = 'GET';
117 117
         $url = $this->addQueryString($url, $params, ['from', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
118 118
         $headers = ['Accept' => 'application/json'];
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     public function getSynonymRule(array $params = [])
144 144
     {
145 145
         $this->checkRequiredParameters(['set_id', 'rule_id'], $params);
146
-        $url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
146
+        $url = '/_synonyms/'.$this->encode($params['set_id']).'/'.$this->encode($params['rule_id']);
147 147
         $method = 'GET';
148 148
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
149 149
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     public function putSynonym(array $params = [])
204 204
     {
205 205
         $this->checkRequiredParameters(['id', 'body'], $params);
206
-        $url = '/_synonyms/' . $this->encode($params['id']);
206
+        $url = '/_synonyms/'.$this->encode($params['id']);
207 207
         $method = 'PUT';
208 208
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
209 209
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     public function putSynonymRule(array $params = [])
236 236
     {
237 237
         $this->checkRequiredParameters(['set_id', 'rule_id', 'body'], $params);
238
-        $url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
238
+        $url = '/_synonyms/'.$this->encode($params['set_id']).'/'.$this->encode($params['rule_id']);
239 239
         $method = 'PUT';
240 240
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
241 241
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Synonyms extends AbstractEndpoint
27
-{
26
+class Synonyms extends AbstractEndpoint {
28 27
     /**
29 28
      * Deletes a synonym set
30 29
      *
Please login to merge, or discard this patch.
Indentation   +230 added lines, -230 removed lines patch added patch discarded remove patch
@@ -25,234 +25,234 @@
 block discarded – undo
25 25
  */
26 26
 class Synonyms extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Deletes a synonym set
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-synonyms-set.html
32
-     *
33
-     * @param array{
34
-     *     id: string, // (REQUIRED) The id of the synonyms set to be deleted
35
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
-     * } $params
41
-     *
42
-     * @throws MissingParameterException if a required parameter is missing
43
-     * @throws NoNodeAvailableException if all the hosts are offline
44
-     * @throws ClientResponseException if the status code of response is 4xx
45
-     * @throws ServerResponseException if the status code of response is 5xx
46
-     *
47
-     * @return Elasticsearch|Promise
48
-     */
49
-    public function deleteSynonym(array $params = [])
50
-    {
51
-        $this->checkRequiredParameters(['id'], $params);
52
-        $url = '/_synonyms/' . $this->encode($params['id']);
53
-        $method = 'DELETE';
54
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55
-        $headers = ['Accept' => 'application/json'];
56
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
57
-        $request = $this->addOtelAttributes($params, ['id'], $request, 'synonyms.delete_synonym');
58
-        return $this->client->sendRequest($request);
59
-    }
60
-    /**
61
-     * Deletes a synonym rule in a synonym set
62
-     *
63
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-synonym-rule.html
64
-     *
65
-     * @param array{
66
-     *     set_id: string, // (REQUIRED) The id of the synonym set to be updated
67
-     *     rule_id: string, // (REQUIRED) The id of the synonym rule to be deleted
68
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
69
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
70
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
71
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
72
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
73
-     * } $params
74
-     *
75
-     * @throws MissingParameterException if a required parameter is missing
76
-     * @throws NoNodeAvailableException if all the hosts are offline
77
-     * @throws ClientResponseException if the status code of response is 4xx
78
-     * @throws ServerResponseException if the status code of response is 5xx
79
-     *
80
-     * @return Elasticsearch|Promise
81
-     */
82
-    public function deleteSynonymRule(array $params = [])
83
-    {
84
-        $this->checkRequiredParameters(['set_id', 'rule_id'], $params);
85
-        $url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
86
-        $method = 'DELETE';
87
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
88
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
89
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
90
-        $request = $this->addOtelAttributes($params, ['set_id', 'rule_id'], $request, 'synonyms.delete_synonym_rule');
91
-        return $this->client->sendRequest($request);
92
-    }
93
-    /**
94
-     * Retrieves a synonym set
95
-     *
96
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonyms-set.html
97
-     *
98
-     * @param array{
99
-     *     id: string, // (REQUIRED) The name of the synonyms set to be retrieved
100
-     *     from: int, // Starting offset
101
-     *     size: int, // specifies a max number of results to get
102
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
103
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
104
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
105
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
106
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
107
-     * } $params
108
-     *
109
-     * @throws MissingParameterException if a required parameter is missing
110
-     * @throws NoNodeAvailableException if all the hosts are offline
111
-     * @throws ClientResponseException if the status code of response is 4xx
112
-     * @throws ServerResponseException if the status code of response is 5xx
113
-     *
114
-     * @return Elasticsearch|Promise
115
-     */
116
-    public function getSynonym(array $params = [])
117
-    {
118
-        $this->checkRequiredParameters(['id'], $params);
119
-        $url = '/_synonyms/' . $this->encode($params['id']);
120
-        $method = 'GET';
121
-        $url = $this->addQueryString($url, $params, ['from', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
122
-        $headers = ['Accept' => 'application/json'];
123
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
124
-        $request = $this->addOtelAttributes($params, ['id'], $request, 'synonyms.get_synonym');
125
-        return $this->client->sendRequest($request);
126
-    }
127
-    /**
128
-     * Retrieves a synonym rule from a synonym set
129
-     *
130
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonym-rule.html
131
-     *
132
-     * @param array{
133
-     *     set_id: string, // (REQUIRED) The id of the synonym set to retrieve the synonym rule from
134
-     *     rule_id: string, // (REQUIRED) The id of the synonym rule to retrieve
135
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
136
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
137
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
138
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
139
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
140
-     * } $params
141
-     *
142
-     * @throws MissingParameterException if a required parameter is missing
143
-     * @throws NoNodeAvailableException if all the hosts are offline
144
-     * @throws ClientResponseException if the status code of response is 4xx
145
-     * @throws ServerResponseException if the status code of response is 5xx
146
-     *
147
-     * @return Elasticsearch|Promise
148
-     */
149
-    public function getSynonymRule(array $params = [])
150
-    {
151
-        $this->checkRequiredParameters(['set_id', 'rule_id'], $params);
152
-        $url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
153
-        $method = 'GET';
154
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
155
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
156
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
157
-        $request = $this->addOtelAttributes($params, ['set_id', 'rule_id'], $request, 'synonyms.get_synonym_rule');
158
-        return $this->client->sendRequest($request);
159
-    }
160
-    /**
161
-     * Retrieves a summary of all defined synonym sets
162
-     *
163
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-synonyms-sets.html
164
-     *
165
-     * @param array{
166
-     *     from: int, // Starting offset
167
-     *     size: int, // specifies a max number of results to get
168
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
169
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
170
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
171
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
172
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
173
-     * } $params
174
-     *
175
-     * @throws NoNodeAvailableException if all the hosts are offline
176
-     * @throws ClientResponseException if the status code of response is 4xx
177
-     * @throws ServerResponseException if the status code of response is 5xx
178
-     *
179
-     * @return Elasticsearch|Promise
180
-     */
181
-    public function getSynonymsSets(array $params = [])
182
-    {
183
-        $url = '/_synonyms';
184
-        $method = 'GET';
185
-        $url = $this->addQueryString($url, $params, ['from', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
186
-        $headers = ['Accept' => 'application/json'];
187
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
188
-        $request = $this->addOtelAttributes($params, [], $request, 'synonyms.get_synonyms_sets');
189
-        return $this->client->sendRequest($request);
190
-    }
191
-    /**
192
-     * Creates or updates a synonyms set
193
-     *
194
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonyms-set.html
195
-     *
196
-     * @param array{
197
-     *     id: string, // (REQUIRED) The id of the synonyms set to be created or updated
198
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
199
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
200
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
201
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
202
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
203
-     *     body: array, // (REQUIRED) Synonyms set rules
204
-     * } $params
205
-     *
206
-     * @throws MissingParameterException if a required parameter is missing
207
-     * @throws NoNodeAvailableException if all the hosts are offline
208
-     * @throws ClientResponseException if the status code of response is 4xx
209
-     * @throws ServerResponseException if the status code of response is 5xx
210
-     *
211
-     * @return Elasticsearch|Promise
212
-     */
213
-    public function putSynonym(array $params = [])
214
-    {
215
-        $this->checkRequiredParameters(['id', 'body'], $params);
216
-        $url = '/_synonyms/' . $this->encode($params['id']);
217
-        $method = 'PUT';
218
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
219
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
220
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
221
-        $request = $this->addOtelAttributes($params, ['id'], $request, 'synonyms.put_synonym');
222
-        return $this->client->sendRequest($request);
223
-    }
224
-    /**
225
-     * Creates or updates a synonym rule in a synonym set
226
-     *
227
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonym-rule.html
228
-     *
229
-     * @param array{
230
-     *     set_id: string, // (REQUIRED) The id of the synonym set to be updated with the synonym rule
231
-     *     rule_id: string, // (REQUIRED) The id of the synonym rule to be updated or created
232
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
233
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
234
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
235
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
236
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
237
-     *     body: array, // (REQUIRED) Synonym rule
238
-     * } $params
239
-     *
240
-     * @throws MissingParameterException if a required parameter is missing
241
-     * @throws NoNodeAvailableException if all the hosts are offline
242
-     * @throws ClientResponseException if the status code of response is 4xx
243
-     * @throws ServerResponseException if the status code of response is 5xx
244
-     *
245
-     * @return Elasticsearch|Promise
246
-     */
247
-    public function putSynonymRule(array $params = [])
248
-    {
249
-        $this->checkRequiredParameters(['set_id', 'rule_id', 'body'], $params);
250
-        $url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
251
-        $method = 'PUT';
252
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
253
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
254
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
255
-        $request = $this->addOtelAttributes($params, ['set_id', 'rule_id'], $request, 'synonyms.put_synonym_rule');
256
-        return $this->client->sendRequest($request);
257
-    }
28
+	/**
29
+	 * Deletes a synonym set
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-synonyms-set.html
32
+	 *
33
+	 * @param array{
34
+	 *     id: string, // (REQUIRED) The id of the synonyms set to be deleted
35
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
+	 * } $params
41
+	 *
42
+	 * @throws MissingParameterException if a required parameter is missing
43
+	 * @throws NoNodeAvailableException if all the hosts are offline
44
+	 * @throws ClientResponseException if the status code of response is 4xx
45
+	 * @throws ServerResponseException if the status code of response is 5xx
46
+	 *
47
+	 * @return Elasticsearch|Promise
48
+	 */
49
+	public function deleteSynonym(array $params = [])
50
+	{
51
+		$this->checkRequiredParameters(['id'], $params);
52
+		$url = '/_synonyms/' . $this->encode($params['id']);
53
+		$method = 'DELETE';
54
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55
+		$headers = ['Accept' => 'application/json'];
56
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
57
+		$request = $this->addOtelAttributes($params, ['id'], $request, 'synonyms.delete_synonym');
58
+		return $this->client->sendRequest($request);
59
+	}
60
+	/**
61
+	 * Deletes a synonym rule in a synonym set
62
+	 *
63
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-synonym-rule.html
64
+	 *
65
+	 * @param array{
66
+	 *     set_id: string, // (REQUIRED) The id of the synonym set to be updated
67
+	 *     rule_id: string, // (REQUIRED) The id of the synonym rule to be deleted
68
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
69
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
70
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
71
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
72
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
73
+	 * } $params
74
+	 *
75
+	 * @throws MissingParameterException if a required parameter is missing
76
+	 * @throws NoNodeAvailableException if all the hosts are offline
77
+	 * @throws ClientResponseException if the status code of response is 4xx
78
+	 * @throws ServerResponseException if the status code of response is 5xx
79
+	 *
80
+	 * @return Elasticsearch|Promise
81
+	 */
82
+	public function deleteSynonymRule(array $params = [])
83
+	{
84
+		$this->checkRequiredParameters(['set_id', 'rule_id'], $params);
85
+		$url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
86
+		$method = 'DELETE';
87
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
88
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
89
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
90
+		$request = $this->addOtelAttributes($params, ['set_id', 'rule_id'], $request, 'synonyms.delete_synonym_rule');
91
+		return $this->client->sendRequest($request);
92
+	}
93
+	/**
94
+	 * Retrieves a synonym set
95
+	 *
96
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonyms-set.html
97
+	 *
98
+	 * @param array{
99
+	 *     id: string, // (REQUIRED) The name of the synonyms set to be retrieved
100
+	 *     from: int, // Starting offset
101
+	 *     size: int, // specifies a max number of results to get
102
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
103
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
104
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
105
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
106
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
107
+	 * } $params
108
+	 *
109
+	 * @throws MissingParameterException if a required parameter is missing
110
+	 * @throws NoNodeAvailableException if all the hosts are offline
111
+	 * @throws ClientResponseException if the status code of response is 4xx
112
+	 * @throws ServerResponseException if the status code of response is 5xx
113
+	 *
114
+	 * @return Elasticsearch|Promise
115
+	 */
116
+	public function getSynonym(array $params = [])
117
+	{
118
+		$this->checkRequiredParameters(['id'], $params);
119
+		$url = '/_synonyms/' . $this->encode($params['id']);
120
+		$method = 'GET';
121
+		$url = $this->addQueryString($url, $params, ['from', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
122
+		$headers = ['Accept' => 'application/json'];
123
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
124
+		$request = $this->addOtelAttributes($params, ['id'], $request, 'synonyms.get_synonym');
125
+		return $this->client->sendRequest($request);
126
+	}
127
+	/**
128
+	 * Retrieves a synonym rule from a synonym set
129
+	 *
130
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonym-rule.html
131
+	 *
132
+	 * @param array{
133
+	 *     set_id: string, // (REQUIRED) The id of the synonym set to retrieve the synonym rule from
134
+	 *     rule_id: string, // (REQUIRED) The id of the synonym rule to retrieve
135
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
136
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
137
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
138
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
139
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
140
+	 * } $params
141
+	 *
142
+	 * @throws MissingParameterException if a required parameter is missing
143
+	 * @throws NoNodeAvailableException if all the hosts are offline
144
+	 * @throws ClientResponseException if the status code of response is 4xx
145
+	 * @throws ServerResponseException if the status code of response is 5xx
146
+	 *
147
+	 * @return Elasticsearch|Promise
148
+	 */
149
+	public function getSynonymRule(array $params = [])
150
+	{
151
+		$this->checkRequiredParameters(['set_id', 'rule_id'], $params);
152
+		$url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
153
+		$method = 'GET';
154
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
155
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
156
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
157
+		$request = $this->addOtelAttributes($params, ['set_id', 'rule_id'], $request, 'synonyms.get_synonym_rule');
158
+		return $this->client->sendRequest($request);
159
+	}
160
+	/**
161
+	 * Retrieves a summary of all defined synonym sets
162
+	 *
163
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-synonyms-sets.html
164
+	 *
165
+	 * @param array{
166
+	 *     from: int, // Starting offset
167
+	 *     size: int, // specifies a max number of results to get
168
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
169
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
170
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
171
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
172
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
173
+	 * } $params
174
+	 *
175
+	 * @throws NoNodeAvailableException if all the hosts are offline
176
+	 * @throws ClientResponseException if the status code of response is 4xx
177
+	 * @throws ServerResponseException if the status code of response is 5xx
178
+	 *
179
+	 * @return Elasticsearch|Promise
180
+	 */
181
+	public function getSynonymsSets(array $params = [])
182
+	{
183
+		$url = '/_synonyms';
184
+		$method = 'GET';
185
+		$url = $this->addQueryString($url, $params, ['from', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
186
+		$headers = ['Accept' => 'application/json'];
187
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
188
+		$request = $this->addOtelAttributes($params, [], $request, 'synonyms.get_synonyms_sets');
189
+		return $this->client->sendRequest($request);
190
+	}
191
+	/**
192
+	 * Creates or updates a synonyms set
193
+	 *
194
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonyms-set.html
195
+	 *
196
+	 * @param array{
197
+	 *     id: string, // (REQUIRED) The id of the synonyms set to be created or updated
198
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
199
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
200
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
201
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
202
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
203
+	 *     body: array, // (REQUIRED) Synonyms set rules
204
+	 * } $params
205
+	 *
206
+	 * @throws MissingParameterException if a required parameter is missing
207
+	 * @throws NoNodeAvailableException if all the hosts are offline
208
+	 * @throws ClientResponseException if the status code of response is 4xx
209
+	 * @throws ServerResponseException if the status code of response is 5xx
210
+	 *
211
+	 * @return Elasticsearch|Promise
212
+	 */
213
+	public function putSynonym(array $params = [])
214
+	{
215
+		$this->checkRequiredParameters(['id', 'body'], $params);
216
+		$url = '/_synonyms/' . $this->encode($params['id']);
217
+		$method = 'PUT';
218
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
219
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
220
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
221
+		$request = $this->addOtelAttributes($params, ['id'], $request, 'synonyms.put_synonym');
222
+		return $this->client->sendRequest($request);
223
+	}
224
+	/**
225
+	 * Creates or updates a synonym rule in a synonym set
226
+	 *
227
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonym-rule.html
228
+	 *
229
+	 * @param array{
230
+	 *     set_id: string, // (REQUIRED) The id of the synonym set to be updated with the synonym rule
231
+	 *     rule_id: string, // (REQUIRED) The id of the synonym rule to be updated or created
232
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
233
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
234
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
235
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
236
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
237
+	 *     body: array, // (REQUIRED) Synonym rule
238
+	 * } $params
239
+	 *
240
+	 * @throws MissingParameterException if a required parameter is missing
241
+	 * @throws NoNodeAvailableException if all the hosts are offline
242
+	 * @throws ClientResponseException if the status code of response is 4xx
243
+	 * @throws ServerResponseException if the status code of response is 5xx
244
+	 *
245
+	 * @return Elasticsearch|Promise
246
+	 */
247
+	public function putSynonymRule(array $params = [])
248
+	{
249
+		$this->checkRequiredParameters(['set_id', 'rule_id', 'body'], $params);
250
+		$url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
251
+		$method = 'PUT';
252
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
253
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
254
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
255
+		$request = $this->addOtelAttributes($params, ['set_id', 'rule_id'], $request, 'synonyms.put_synonym_rule');
256
+		return $this->client->sendRequest($request);
257
+	}
258 258
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Connector.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Connector extends AbstractEndpoint
27
-{
26
+class Connector extends AbstractEndpoint {
28 27
     /**
29 28
      * Updates the last_seen timestamp in the connector document.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +1014 added lines, -1014 removed lines patch added patch discarded remove patch
@@ -25,1018 +25,1018 @@
 block discarded – undo
25 25
  */
26 26
 class Connector extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Updates the last_seen timestamp in the connector document.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-api.html
32
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
33
-     *
34
-     * @param array{
35
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
36
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
37
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
38
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
39
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
40
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
41
-     * } $params
42
-     *
43
-     * @throws MissingParameterException if a required parameter is missing
44
-     * @throws NoNodeAvailableException if all the hosts are offline
45
-     * @throws ClientResponseException if the status code of response is 4xx
46
-     * @throws ServerResponseException if the status code of response is 5xx
47
-     *
48
-     * @return Elasticsearch|Promise
49
-     */
50
-    public function checkIn(array $params = [])
51
-    {
52
-        $this->checkRequiredParameters(['connector_id'], $params);
53
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_check_in';
54
-        $method = 'PUT';
55
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56
-        $headers = ['Accept' => 'application/json'];
57
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
58
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.check_in');
59
-        return $this->client->sendRequest($request);
60
-    }
61
-    /**
62
-     * Deletes a connector.
63
-     *
64
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-api.html
65
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
66
-     *
67
-     * @param array{
68
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be deleted.
69
-     *     delete_sync_jobs: boolean, // Determines whether associated sync jobs are also deleted.
70
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
71
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
72
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
73
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
74
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
75
-     * } $params
76
-     *
77
-     * @throws MissingParameterException if a required parameter is missing
78
-     * @throws NoNodeAvailableException if all the hosts are offline
79
-     * @throws ClientResponseException if the status code of response is 4xx
80
-     * @throws ServerResponseException if the status code of response is 5xx
81
-     *
82
-     * @return Elasticsearch|Promise
83
-     */
84
-    public function delete(array $params = [])
85
-    {
86
-        $this->checkRequiredParameters(['connector_id'], $params);
87
-        $url = '/_connector/' . $this->encode($params['connector_id']);
88
-        $method = 'DELETE';
89
-        $url = $this->addQueryString($url, $params, ['delete_sync_jobs', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
90
-        $headers = ['Accept' => 'application/json'];
91
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
92
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.delete');
93
-        return $this->client->sendRequest($request);
94
-    }
95
-    /**
96
-     * Returns the details about a connector.
97
-     *
98
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-api.html
99
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
100
-     *
101
-     * @param array{
102
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be returned.
103
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
104
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
105
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
106
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
107
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
108
-     * } $params
109
-     *
110
-     * @throws MissingParameterException if a required parameter is missing
111
-     * @throws NoNodeAvailableException if all the hosts are offline
112
-     * @throws ClientResponseException if the status code of response is 4xx
113
-     * @throws ServerResponseException if the status code of response is 5xx
114
-     *
115
-     * @return Elasticsearch|Promise
116
-     */
117
-    public function get(array $params = [])
118
-    {
119
-        $this->checkRequiredParameters(['connector_id'], $params);
120
-        $url = '/_connector/' . $this->encode($params['connector_id']);
121
-        $method = 'GET';
122
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
123
-        $headers = ['Accept' => 'application/json'];
124
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
125
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.get');
126
-        return $this->client->sendRequest($request);
127
-    }
128
-    /**
129
-     * Updates the stats of last sync in the connector document.
130
-     *
131
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-last-sync-api.html
132
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
133
-     *
134
-     * @param array{
135
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
136
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
137
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
138
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
139
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
140
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
141
-     *     body: array, // (REQUIRED) Object with stats related to the last connector sync run.
142
-     * } $params
143
-     *
144
-     * @throws MissingParameterException if a required parameter is missing
145
-     * @throws NoNodeAvailableException if all the hosts are offline
146
-     * @throws ClientResponseException if the status code of response is 4xx
147
-     * @throws ServerResponseException if the status code of response is 5xx
148
-     *
149
-     * @return Elasticsearch|Promise
150
-     */
151
-    public function lastSync(array $params = [])
152
-    {
153
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
154
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_last_sync';
155
-        $method = 'PUT';
156
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
157
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
158
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
159
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.last_sync');
160
-        return $this->client->sendRequest($request);
161
-    }
162
-    /**
163
-     * Lists all connectors.
164
-     *
165
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-api.html
166
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
167
-     *
168
-     * @param array{
169
-     *     from: int, // Starting offset (default: 0)
170
-     *     size: int, // Specifies a max number of results to get (default: 100)
171
-     *     index_name: list, // A comma-separated list of connector index names to fetch connector documents for
172
-     *     connector_name: list, // A comma-separated list of connector names to fetch connector documents for
173
-     *     service_type: list, // A comma-separated list of connector service types to fetch connector documents for
174
-     *     query: string, // A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names
175
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
176
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
177
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
178
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
179
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
180
-     * } $params
181
-     *
182
-     * @throws NoNodeAvailableException if all the hosts are offline
183
-     * @throws ClientResponseException if the status code of response is 4xx
184
-     * @throws ServerResponseException if the status code of response is 5xx
185
-     *
186
-     * @return Elasticsearch|Promise
187
-     */
188
-    public function list(array $params = [])
189
-    {
190
-        $url = '/_connector';
191
-        $method = 'GET';
192
-        $url = $this->addQueryString($url, $params, ['from', 'size', 'index_name', 'connector_name', 'service_type', 'query', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
193
-        $headers = ['Accept' => 'application/json'];
194
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
195
-        $request = $this->addOtelAttributes($params, [], $request, 'connector.list');
196
-        return $this->client->sendRequest($request);
197
-    }
198
-    /**
199
-     * Creates a connector.
200
-     *
201
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html
202
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
203
-     *
204
-     * @param array{
205
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
206
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
207
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
208
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
209
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
210
-     *     body: array, //  The connector configuration.
211
-     * } $params
212
-     *
213
-     * @throws NoNodeAvailableException if all the hosts are offline
214
-     * @throws ClientResponseException if the status code of response is 4xx
215
-     * @throws ServerResponseException if the status code of response is 5xx
216
-     *
217
-     * @return Elasticsearch|Promise
218
-     */
219
-    public function post(array $params = [])
220
-    {
221
-        $url = '/_connector';
222
-        $method = 'POST';
223
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
224
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
225
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
226
-        $request = $this->addOtelAttributes($params, [], $request, 'connector.post');
227
-        return $this->client->sendRequest($request);
228
-    }
229
-    /**
230
-     * Creates or updates a connector.
231
-     *
232
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html
233
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
234
-     *
235
-     * @param array{
236
-     *     connector_id: string, //  The unique identifier of the connector to be created or updated.
237
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
238
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
239
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
240
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
241
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
242
-     *     body: array, //  The connector configuration.
243
-     * } $params
244
-     *
245
-     * @throws NoNodeAvailableException if all the hosts are offline
246
-     * @throws ClientResponseException if the status code of response is 4xx
247
-     * @throws ServerResponseException if the status code of response is 5xx
248
-     *
249
-     * @return Elasticsearch|Promise
250
-     */
251
-    public function put(array $params = [])
252
-    {
253
-        if (isset($params['connector_id'])) {
254
-            $url = '/_connector/' . $this->encode($params['connector_id']);
255
-            $method = 'PUT';
256
-        } else {
257
-            $url = '/_connector';
258
-            $method = 'PUT';
259
-        }
260
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
261
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
262
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
263
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.put');
264
-        return $this->client->sendRequest($request);
265
-    }
266
-    /**
267
-     * Cancels a connector sync job.
268
-     *
269
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cancel-connector-sync-job-api.html
270
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
271
-     *
272
-     * @param array{
273
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be canceled
274
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
275
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
276
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
277
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
278
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
279
-     * } $params
280
-     *
281
-     * @throws MissingParameterException if a required parameter is missing
282
-     * @throws NoNodeAvailableException if all the hosts are offline
283
-     * @throws ClientResponseException if the status code of response is 4xx
284
-     * @throws ServerResponseException if the status code of response is 5xx
285
-     *
286
-     * @return Elasticsearch|Promise
287
-     */
288
-    public function syncJobCancel(array $params = [])
289
-    {
290
-        $this->checkRequiredParameters(['connector_sync_job_id'], $params);
291
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_cancel';
292
-        $method = 'PUT';
293
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
294
-        $headers = ['Accept' => 'application/json'];
295
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
296
-        $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_cancel');
297
-        return $this->client->sendRequest($request);
298
-    }
299
-    /**
300
-     * Checks in a connector sync job (refreshes 'last_seen').
301
-     *
302
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-sync-job-api.html
303
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
304
-     *
305
-     * @param array{
306
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be checked in
307
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
308
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
309
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
310
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
311
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
312
-     * } $params
313
-     *
314
-     * @throws MissingParameterException if a required parameter is missing
315
-     * @throws NoNodeAvailableException if all the hosts are offline
316
-     * @throws ClientResponseException if the status code of response is 4xx
317
-     * @throws ServerResponseException if the status code of response is 5xx
318
-     *
319
-     * @return Elasticsearch|Promise
320
-     */
321
-    public function syncJobCheckIn(array $params = [])
322
-    {
323
-        $this->checkRequiredParameters(['connector_sync_job_id'], $params);
324
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_check_in';
325
-        $method = 'PUT';
326
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
327
-        $headers = ['Accept' => 'application/json'];
328
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
329
-        $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_check_in');
330
-        return $this->client->sendRequest($request);
331
-    }
332
-    /**
333
-     * Claims a connector sync job.
334
-     *
335
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/claim-connector-sync-job-api.html
336
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
337
-     *
338
-     * @param array{
339
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be claimed.
340
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
341
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
342
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
343
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
344
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
345
-     *     body: array, // (REQUIRED) Data to claim a sync job.
346
-     * } $params
347
-     *
348
-     * @throws MissingParameterException if a required parameter is missing
349
-     * @throws NoNodeAvailableException if all the hosts are offline
350
-     * @throws ClientResponseException if the status code of response is 4xx
351
-     * @throws ServerResponseException if the status code of response is 5xx
352
-     *
353
-     * @return Elasticsearch|Promise
354
-     */
355
-    public function syncJobClaim(array $params = [])
356
-    {
357
-        $this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
358
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_claim';
359
-        $method = 'PUT';
360
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
361
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
362
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
363
-        $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_claim');
364
-        return $this->client->sendRequest($request);
365
-    }
366
-    /**
367
-     * Deletes a connector sync job.
368
-     *
369
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-sync-job-api.html
370
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
371
-     *
372
-     * @param array{
373
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be deleted.
374
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
375
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
376
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
377
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
378
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
379
-     * } $params
380
-     *
381
-     * @throws MissingParameterException if a required parameter is missing
382
-     * @throws NoNodeAvailableException if all the hosts are offline
383
-     * @throws ClientResponseException if the status code of response is 4xx
384
-     * @throws ServerResponseException if the status code of response is 5xx
385
-     *
386
-     * @return Elasticsearch|Promise
387
-     */
388
-    public function syncJobDelete(array $params = [])
389
-    {
390
-        $this->checkRequiredParameters(['connector_sync_job_id'], $params);
391
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
392
-        $method = 'DELETE';
393
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
394
-        $headers = ['Accept' => 'application/json'];
395
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
396
-        $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_delete');
397
-        return $this->client->sendRequest($request);
398
-    }
399
-    /**
400
-     * Sets an error for a connector sync job.
401
-     *
402
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-error-api.html
403
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
404
-     *
405
-     * @param array{
406
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to set an error for.
407
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
408
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
409
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
410
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
411
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
412
-     *     body: array, // (REQUIRED) The error to set in the connector sync job.
413
-     * } $params
414
-     *
415
-     * @throws MissingParameterException if a required parameter is missing
416
-     * @throws NoNodeAvailableException if all the hosts are offline
417
-     * @throws ClientResponseException if the status code of response is 4xx
418
-     * @throws ServerResponseException if the status code of response is 5xx
419
-     *
420
-     * @return Elasticsearch|Promise
421
-     */
422
-    public function syncJobError(array $params = [])
423
-    {
424
-        $this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
425
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_error';
426
-        $method = 'PUT';
427
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
428
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
429
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
430
-        $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_error');
431
-        return $this->client->sendRequest($request);
432
-    }
433
-    /**
434
-     * Returns the details about a connector sync job.
435
-     *
436
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-sync-job-api.html
437
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
438
-     *
439
-     * @param array{
440
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be returned.
441
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
442
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
443
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
444
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
445
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
446
-     * } $params
447
-     *
448
-     * @throws MissingParameterException if a required parameter is missing
449
-     * @throws NoNodeAvailableException if all the hosts are offline
450
-     * @throws ClientResponseException if the status code of response is 4xx
451
-     * @throws ServerResponseException if the status code of response is 5xx
452
-     *
453
-     * @return Elasticsearch|Promise
454
-     */
455
-    public function syncJobGet(array $params = [])
456
-    {
457
-        $this->checkRequiredParameters(['connector_sync_job_id'], $params);
458
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
459
-        $method = 'GET';
460
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
461
-        $headers = ['Accept' => 'application/json'];
462
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
463
-        $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_get');
464
-        return $this->client->sendRequest($request);
465
-    }
466
-    /**
467
-     * Lists all connector sync jobs.
468
-     *
469
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-sync-jobs-api.html
470
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
471
-     *
472
-     * @param array{
473
-     *     from: int, // Starting offset (default: 0)
474
-     *     size: int, // specifies a max number of results to get (default: 100)
475
-     *     status: string, // Sync job status, which sync jobs are fetched for
476
-     *     connector_id: string, // Id of the connector to fetch the sync jobs for
477
-     *     job_type: list, // A comma-separated list of job types
478
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
479
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
480
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
481
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
482
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
483
-     * } $params
484
-     *
485
-     * @throws NoNodeAvailableException if all the hosts are offline
486
-     * @throws ClientResponseException if the status code of response is 4xx
487
-     * @throws ServerResponseException if the status code of response is 5xx
488
-     *
489
-     * @return Elasticsearch|Promise
490
-     */
491
-    public function syncJobList(array $params = [])
492
-    {
493
-        $url = '/_connector/_sync_job';
494
-        $method = 'GET';
495
-        $url = $this->addQueryString($url, $params, ['from', 'size', 'status', 'connector_id', 'job_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
496
-        $headers = ['Accept' => 'application/json'];
497
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
498
-        $request = $this->addOtelAttributes($params, [], $request, 'connector.sync_job_list');
499
-        return $this->client->sendRequest($request);
500
-    }
501
-    /**
502
-     * Creates a connector sync job.
503
-     *
504
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-sync-job-api.html
505
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
506
-     *
507
-     * @param array{
508
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
509
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
510
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
511
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
512
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
513
-     *     body: array, // (REQUIRED) The connector sync job data.
514
-     * } $params
515
-     *
516
-     * @throws NoNodeAvailableException if all the hosts are offline
517
-     * @throws ClientResponseException if the status code of response is 4xx
518
-     * @throws ServerResponseException if the status code of response is 5xx
519
-     *
520
-     * @return Elasticsearch|Promise
521
-     */
522
-    public function syncJobPost(array $params = [])
523
-    {
524
-        $this->checkRequiredParameters(['body'], $params);
525
-        $url = '/_connector/_sync_job';
526
-        $method = 'POST';
527
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
528
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
529
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
530
-        $request = $this->addOtelAttributes($params, [], $request, 'connector.sync_job_post');
531
-        return $this->client->sendRequest($request);
532
-    }
533
-    /**
534
-     * Updates the stats fields in the connector sync job document.
535
-     *
536
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-stats-api.html
537
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
538
-     *
539
-     * @param array{
540
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be updated.
541
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
542
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
543
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
544
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
545
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
546
-     *     body: array, // (REQUIRED) The stats to update for the connector sync job.
547
-     * } $params
548
-     *
549
-     * @throws MissingParameterException if a required parameter is missing
550
-     * @throws NoNodeAvailableException if all the hosts are offline
551
-     * @throws ClientResponseException if the status code of response is 4xx
552
-     * @throws ServerResponseException if the status code of response is 5xx
553
-     *
554
-     * @return Elasticsearch|Promise
555
-     */
556
-    public function syncJobUpdateStats(array $params = [])
557
-    {
558
-        $this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
559
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_stats';
560
-        $method = 'PUT';
561
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
562
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
563
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
564
-        $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_update_stats');
565
-        return $this->client->sendRequest($request);
566
-    }
567
-    /**
568
-     * Activates the draft filtering rules if they are in a validated state.
569
-     *
570
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html
571
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
572
-     *
573
-     * @param array{
574
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
575
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
576
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
577
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
578
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
579
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
580
-     * } $params
581
-     *
582
-     * @throws MissingParameterException if a required parameter is missing
583
-     * @throws NoNodeAvailableException if all the hosts are offline
584
-     * @throws ClientResponseException if the status code of response is 4xx
585
-     * @throws ServerResponseException if the status code of response is 5xx
586
-     *
587
-     * @return Elasticsearch|Promise
588
-     */
589
-    public function updateActiveFiltering(array $params = [])
590
-    {
591
-        $this->checkRequiredParameters(['connector_id'], $params);
592
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering/_activate';
593
-        $method = 'PUT';
594
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
595
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
596
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
597
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_active_filtering');
598
-        return $this->client->sendRequest($request);
599
-    }
600
-    /**
601
-     * Updates the API key id and/or API key secret id fields in the connector document.
602
-     *
603
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-api-key-id-api.html
604
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
605
-     *
606
-     * @param array{
607
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
608
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
609
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
610
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
611
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
612
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
613
-     *     body: array, // (REQUIRED) An object containing the connector's API key id and/or Connector Secret document id for that API key.
614
-     * } $params
615
-     *
616
-     * @throws MissingParameterException if a required parameter is missing
617
-     * @throws NoNodeAvailableException if all the hosts are offline
618
-     * @throws ClientResponseException if the status code of response is 4xx
619
-     * @throws ServerResponseException if the status code of response is 5xx
620
-     *
621
-     * @return Elasticsearch|Promise
622
-     */
623
-    public function updateApiKeyId(array $params = [])
624
-    {
625
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
626
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_api_key_id';
627
-        $method = 'PUT';
628
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
629
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
630
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
631
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_api_key_id');
632
-        return $this->client->sendRequest($request);
633
-    }
634
-    /**
635
-     * Updates the connector configuration.
636
-     *
637
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-configuration-api.html
638
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
639
-     *
640
-     * @param array{
641
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
642
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
643
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
644
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
645
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
646
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
647
-     *     body: array, // (REQUIRED) Mapping between field names to configuration.
648
-     * } $params
649
-     *
650
-     * @throws MissingParameterException if a required parameter is missing
651
-     * @throws NoNodeAvailableException if all the hosts are offline
652
-     * @throws ClientResponseException if the status code of response is 4xx
653
-     * @throws ServerResponseException if the status code of response is 5xx
654
-     *
655
-     * @return Elasticsearch|Promise
656
-     */
657
-    public function updateConfiguration(array $params = [])
658
-    {
659
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
660
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_configuration';
661
-        $method = 'PUT';
662
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
663
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
664
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
665
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_configuration');
666
-        return $this->client->sendRequest($request);
667
-    }
668
-    /**
669
-     * Updates the error field in the connector document.
670
-     *
671
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-error-api.html
672
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
673
-     *
674
-     * @param array{
675
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
676
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
677
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
678
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
679
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
680
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
681
-     *     body: array, // (REQUIRED) An object containing the connector's error.
682
-     * } $params
683
-     *
684
-     * @throws MissingParameterException if a required parameter is missing
685
-     * @throws NoNodeAvailableException if all the hosts are offline
686
-     * @throws ClientResponseException if the status code of response is 4xx
687
-     * @throws ServerResponseException if the status code of response is 5xx
688
-     *
689
-     * @return Elasticsearch|Promise
690
-     */
691
-    public function updateError(array $params = [])
692
-    {
693
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
694
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_error';
695
-        $method = 'PUT';
696
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
697
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
698
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
699
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_error');
700
-        return $this->client->sendRequest($request);
701
-    }
702
-    /**
703
-     * Updates the connector features in the connector document.
704
-     *
705
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-features-api.html
706
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
707
-     *
708
-     * @param array{
709
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
710
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
711
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
712
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
713
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
714
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
715
-     *     body: array, // (REQUIRED) An object containing the connector's features definition.
716
-     * } $params
717
-     *
718
-     * @throws MissingParameterException if a required parameter is missing
719
-     * @throws NoNodeAvailableException if all the hosts are offline
720
-     * @throws ClientResponseException if the status code of response is 4xx
721
-     * @throws ServerResponseException if the status code of response is 5xx
722
-     *
723
-     * @return Elasticsearch|Promise
724
-     */
725
-    public function updateFeatures(array $params = [])
726
-    {
727
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
728
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_features';
729
-        $method = 'PUT';
730
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
731
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
732
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
733
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_features');
734
-        return $this->client->sendRequest($request);
735
-    }
736
-    /**
737
-     * Updates the filtering field in the connector document.
738
-     *
739
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html
740
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
741
-     *
742
-     * @param array{
743
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
744
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
745
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
746
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
747
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
748
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
749
-     *     body: array, // (REQUIRED) A list of connector filtering configurations.
750
-     * } $params
751
-     *
752
-     * @throws MissingParameterException if a required parameter is missing
753
-     * @throws NoNodeAvailableException if all the hosts are offline
754
-     * @throws ClientResponseException if the status code of response is 4xx
755
-     * @throws ServerResponseException if the status code of response is 5xx
756
-     *
757
-     * @return Elasticsearch|Promise
758
-     */
759
-    public function updateFiltering(array $params = [])
760
-    {
761
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
762
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering';
763
-        $method = 'PUT';
764
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
765
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
766
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
767
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_filtering');
768
-        return $this->client->sendRequest($request);
769
-    }
770
-    /**
771
-     * Updates the validation info of the draft filtering rules.
772
-     *
773
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html
774
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
775
-     *
776
-     * @param array{
777
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
778
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
779
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
780
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
781
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
782
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
783
-     *     body: array, // (REQUIRED) Validation info for the draft filtering rules
784
-     * } $params
785
-     *
786
-     * @throws MissingParameterException if a required parameter is missing
787
-     * @throws NoNodeAvailableException if all the hosts are offline
788
-     * @throws ClientResponseException if the status code of response is 4xx
789
-     * @throws ServerResponseException if the status code of response is 5xx
790
-     *
791
-     * @return Elasticsearch|Promise
792
-     */
793
-    public function updateFilteringValidation(array $params = [])
794
-    {
795
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
796
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering/_validation';
797
-        $method = 'PUT';
798
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
799
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
800
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
801
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_filtering_validation');
802
-        return $this->client->sendRequest($request);
803
-    }
804
-    /**
805
-     * Updates the index name of the connector.
806
-     *
807
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-index-name-api.html
808
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
809
-     *
810
-     * @param array{
811
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
812
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
813
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
814
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
815
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
816
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
817
-     *     body: array, // (REQUIRED) An object containing the connector's index name.
818
-     * } $params
819
-     *
820
-     * @throws MissingParameterException if a required parameter is missing
821
-     * @throws NoNodeAvailableException if all the hosts are offline
822
-     * @throws ClientResponseException if the status code of response is 4xx
823
-     * @throws ServerResponseException if the status code of response is 5xx
824
-     *
825
-     * @return Elasticsearch|Promise
826
-     */
827
-    public function updateIndexName(array $params = [])
828
-    {
829
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
830
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_index_name';
831
-        $method = 'PUT';
832
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
833
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
834
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
835
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_index_name');
836
-        return $this->client->sendRequest($request);
837
-    }
838
-    /**
839
-     * Updates the name and/or description fields in the connector document.
840
-     *
841
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-name-description-api.html
842
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
843
-     *
844
-     * @param array{
845
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
846
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
847
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
848
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
849
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
850
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
851
-     *     body: array, // (REQUIRED) An object containing the connector's name and/or description.
852
-     * } $params
853
-     *
854
-     * @throws MissingParameterException if a required parameter is missing
855
-     * @throws NoNodeAvailableException if all the hosts are offline
856
-     * @throws ClientResponseException if the status code of response is 4xx
857
-     * @throws ServerResponseException if the status code of response is 5xx
858
-     *
859
-     * @return Elasticsearch|Promise
860
-     */
861
-    public function updateName(array $params = [])
862
-    {
863
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
864
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_name';
865
-        $method = 'PUT';
866
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
867
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
868
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
869
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_name');
870
-        return $this->client->sendRequest($request);
871
-    }
872
-    /**
873
-     * Updates the is_native flag of the connector.
874
-     *
875
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/connector-apis.html
876
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
877
-     *
878
-     * @param array{
879
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
880
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
881
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
882
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
883
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
884
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
885
-     *     body: array, // (REQUIRED) An object containing the connector's is_native flag
886
-     * } $params
887
-     *
888
-     * @throws MissingParameterException if a required parameter is missing
889
-     * @throws NoNodeAvailableException if all the hosts are offline
890
-     * @throws ClientResponseException if the status code of response is 4xx
891
-     * @throws ServerResponseException if the status code of response is 5xx
892
-     *
893
-     * @return Elasticsearch|Promise
894
-     */
895
-    public function updateNative(array $params = [])
896
-    {
897
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
898
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_native';
899
-        $method = 'PUT';
900
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
901
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
902
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
903
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_native');
904
-        return $this->client->sendRequest($request);
905
-    }
906
-    /**
907
-     * Updates the pipeline field in the connector document.
908
-     *
909
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-pipeline-api.html
910
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
911
-     *
912
-     * @param array{
913
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
914
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
915
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
916
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
917
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
918
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
919
-     *     body: array, // (REQUIRED) An object with connector ingest pipeline configuration.
920
-     * } $params
921
-     *
922
-     * @throws MissingParameterException if a required parameter is missing
923
-     * @throws NoNodeAvailableException if all the hosts are offline
924
-     * @throws ClientResponseException if the status code of response is 4xx
925
-     * @throws ServerResponseException if the status code of response is 5xx
926
-     *
927
-     * @return Elasticsearch|Promise
928
-     */
929
-    public function updatePipeline(array $params = [])
930
-    {
931
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
932
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_pipeline';
933
-        $method = 'PUT';
934
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
935
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
936
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
937
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_pipeline');
938
-        return $this->client->sendRequest($request);
939
-    }
940
-    /**
941
-     * Updates the scheduling field in the connector document.
942
-     *
943
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-scheduling-api.html
944
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
945
-     *
946
-     * @param array{
947
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
948
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
949
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
950
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
951
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
952
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
953
-     *     body: array, // (REQUIRED) An object containing the connector's scheduling configuration.
954
-     * } $params
955
-     *
956
-     * @throws MissingParameterException if a required parameter is missing
957
-     * @throws NoNodeAvailableException if all the hosts are offline
958
-     * @throws ClientResponseException if the status code of response is 4xx
959
-     * @throws ServerResponseException if the status code of response is 5xx
960
-     *
961
-     * @return Elasticsearch|Promise
962
-     */
963
-    public function updateScheduling(array $params = [])
964
-    {
965
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
966
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_scheduling';
967
-        $method = 'PUT';
968
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
969
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
970
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
971
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_scheduling');
972
-        return $this->client->sendRequest($request);
973
-    }
974
-    /**
975
-     * Updates the service type of the connector.
976
-     *
977
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-service-type-api.html
978
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
979
-     *
980
-     * @param array{
981
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
982
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
983
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
984
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
985
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
986
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
987
-     *     body: array, // (REQUIRED) An object containing the connector's service type.
988
-     * } $params
989
-     *
990
-     * @throws MissingParameterException if a required parameter is missing
991
-     * @throws NoNodeAvailableException if all the hosts are offline
992
-     * @throws ClientResponseException if the status code of response is 4xx
993
-     * @throws ServerResponseException if the status code of response is 5xx
994
-     *
995
-     * @return Elasticsearch|Promise
996
-     */
997
-    public function updateServiceType(array $params = [])
998
-    {
999
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
1000
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_service_type';
1001
-        $method = 'PUT';
1002
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1003
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1004
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1005
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_service_type');
1006
-        return $this->client->sendRequest($request);
1007
-    }
1008
-    /**
1009
-     * Updates the status of the connector.
1010
-     *
1011
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-status-api.html
1012
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
1013
-     *
1014
-     * @param array{
1015
-     *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
1016
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1017
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1018
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1019
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1020
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1021
-     *     body: array, // (REQUIRED) An object containing the connector's status.
1022
-     * } $params
1023
-     *
1024
-     * @throws MissingParameterException if a required parameter is missing
1025
-     * @throws NoNodeAvailableException if all the hosts are offline
1026
-     * @throws ClientResponseException if the status code of response is 4xx
1027
-     * @throws ServerResponseException if the status code of response is 5xx
1028
-     *
1029
-     * @return Elasticsearch|Promise
1030
-     */
1031
-    public function updateStatus(array $params = [])
1032
-    {
1033
-        $this->checkRequiredParameters(['connector_id', 'body'], $params);
1034
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_status';
1035
-        $method = 'PUT';
1036
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1037
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1038
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1039
-        $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_status');
1040
-        return $this->client->sendRequest($request);
1041
-    }
28
+	/**
29
+	 * Updates the last_seen timestamp in the connector document.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-api.html
32
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
33
+	 *
34
+	 * @param array{
35
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
36
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
37
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
38
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
39
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
40
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
41
+	 * } $params
42
+	 *
43
+	 * @throws MissingParameterException if a required parameter is missing
44
+	 * @throws NoNodeAvailableException if all the hosts are offline
45
+	 * @throws ClientResponseException if the status code of response is 4xx
46
+	 * @throws ServerResponseException if the status code of response is 5xx
47
+	 *
48
+	 * @return Elasticsearch|Promise
49
+	 */
50
+	public function checkIn(array $params = [])
51
+	{
52
+		$this->checkRequiredParameters(['connector_id'], $params);
53
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_check_in';
54
+		$method = 'PUT';
55
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56
+		$headers = ['Accept' => 'application/json'];
57
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
58
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.check_in');
59
+		return $this->client->sendRequest($request);
60
+	}
61
+	/**
62
+	 * Deletes a connector.
63
+	 *
64
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-api.html
65
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
66
+	 *
67
+	 * @param array{
68
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be deleted.
69
+	 *     delete_sync_jobs: boolean, // Determines whether associated sync jobs are also deleted.
70
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
71
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
72
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
73
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
74
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
75
+	 * } $params
76
+	 *
77
+	 * @throws MissingParameterException if a required parameter is missing
78
+	 * @throws NoNodeAvailableException if all the hosts are offline
79
+	 * @throws ClientResponseException if the status code of response is 4xx
80
+	 * @throws ServerResponseException if the status code of response is 5xx
81
+	 *
82
+	 * @return Elasticsearch|Promise
83
+	 */
84
+	public function delete(array $params = [])
85
+	{
86
+		$this->checkRequiredParameters(['connector_id'], $params);
87
+		$url = '/_connector/' . $this->encode($params['connector_id']);
88
+		$method = 'DELETE';
89
+		$url = $this->addQueryString($url, $params, ['delete_sync_jobs', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
90
+		$headers = ['Accept' => 'application/json'];
91
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
92
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.delete');
93
+		return $this->client->sendRequest($request);
94
+	}
95
+	/**
96
+	 * Returns the details about a connector.
97
+	 *
98
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-api.html
99
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
100
+	 *
101
+	 * @param array{
102
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be returned.
103
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
104
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
105
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
106
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
107
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
108
+	 * } $params
109
+	 *
110
+	 * @throws MissingParameterException if a required parameter is missing
111
+	 * @throws NoNodeAvailableException if all the hosts are offline
112
+	 * @throws ClientResponseException if the status code of response is 4xx
113
+	 * @throws ServerResponseException if the status code of response is 5xx
114
+	 *
115
+	 * @return Elasticsearch|Promise
116
+	 */
117
+	public function get(array $params = [])
118
+	{
119
+		$this->checkRequiredParameters(['connector_id'], $params);
120
+		$url = '/_connector/' . $this->encode($params['connector_id']);
121
+		$method = 'GET';
122
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
123
+		$headers = ['Accept' => 'application/json'];
124
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
125
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.get');
126
+		return $this->client->sendRequest($request);
127
+	}
128
+	/**
129
+	 * Updates the stats of last sync in the connector document.
130
+	 *
131
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-last-sync-api.html
132
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
133
+	 *
134
+	 * @param array{
135
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
136
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
137
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
138
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
139
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
140
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
141
+	 *     body: array, // (REQUIRED) Object with stats related to the last connector sync run.
142
+	 * } $params
143
+	 *
144
+	 * @throws MissingParameterException if a required parameter is missing
145
+	 * @throws NoNodeAvailableException if all the hosts are offline
146
+	 * @throws ClientResponseException if the status code of response is 4xx
147
+	 * @throws ServerResponseException if the status code of response is 5xx
148
+	 *
149
+	 * @return Elasticsearch|Promise
150
+	 */
151
+	public function lastSync(array $params = [])
152
+	{
153
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
154
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_last_sync';
155
+		$method = 'PUT';
156
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
157
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
158
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
159
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.last_sync');
160
+		return $this->client->sendRequest($request);
161
+	}
162
+	/**
163
+	 * Lists all connectors.
164
+	 *
165
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-api.html
166
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
167
+	 *
168
+	 * @param array{
169
+	 *     from: int, // Starting offset (default: 0)
170
+	 *     size: int, // Specifies a max number of results to get (default: 100)
171
+	 *     index_name: list, // A comma-separated list of connector index names to fetch connector documents for
172
+	 *     connector_name: list, // A comma-separated list of connector names to fetch connector documents for
173
+	 *     service_type: list, // A comma-separated list of connector service types to fetch connector documents for
174
+	 *     query: string, // A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names
175
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
176
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
177
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
178
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
179
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
180
+	 * } $params
181
+	 *
182
+	 * @throws NoNodeAvailableException if all the hosts are offline
183
+	 * @throws ClientResponseException if the status code of response is 4xx
184
+	 * @throws ServerResponseException if the status code of response is 5xx
185
+	 *
186
+	 * @return Elasticsearch|Promise
187
+	 */
188
+	public function list(array $params = [])
189
+	{
190
+		$url = '/_connector';
191
+		$method = 'GET';
192
+		$url = $this->addQueryString($url, $params, ['from', 'size', 'index_name', 'connector_name', 'service_type', 'query', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
193
+		$headers = ['Accept' => 'application/json'];
194
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
195
+		$request = $this->addOtelAttributes($params, [], $request, 'connector.list');
196
+		return $this->client->sendRequest($request);
197
+	}
198
+	/**
199
+	 * Creates a connector.
200
+	 *
201
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html
202
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
203
+	 *
204
+	 * @param array{
205
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
206
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
207
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
208
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
209
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
210
+	 *     body: array, //  The connector configuration.
211
+	 * } $params
212
+	 *
213
+	 * @throws NoNodeAvailableException if all the hosts are offline
214
+	 * @throws ClientResponseException if the status code of response is 4xx
215
+	 * @throws ServerResponseException if the status code of response is 5xx
216
+	 *
217
+	 * @return Elasticsearch|Promise
218
+	 */
219
+	public function post(array $params = [])
220
+	{
221
+		$url = '/_connector';
222
+		$method = 'POST';
223
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
224
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
225
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
226
+		$request = $this->addOtelAttributes($params, [], $request, 'connector.post');
227
+		return $this->client->sendRequest($request);
228
+	}
229
+	/**
230
+	 * Creates or updates a connector.
231
+	 *
232
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html
233
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
234
+	 *
235
+	 * @param array{
236
+	 *     connector_id: string, //  The unique identifier of the connector to be created or updated.
237
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
238
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
239
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
240
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
241
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
242
+	 *     body: array, //  The connector configuration.
243
+	 * } $params
244
+	 *
245
+	 * @throws NoNodeAvailableException if all the hosts are offline
246
+	 * @throws ClientResponseException if the status code of response is 4xx
247
+	 * @throws ServerResponseException if the status code of response is 5xx
248
+	 *
249
+	 * @return Elasticsearch|Promise
250
+	 */
251
+	public function put(array $params = [])
252
+	{
253
+		if (isset($params['connector_id'])) {
254
+			$url = '/_connector/' . $this->encode($params['connector_id']);
255
+			$method = 'PUT';
256
+		} else {
257
+			$url = '/_connector';
258
+			$method = 'PUT';
259
+		}
260
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
261
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
262
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
263
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.put');
264
+		return $this->client->sendRequest($request);
265
+	}
266
+	/**
267
+	 * Cancels a connector sync job.
268
+	 *
269
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cancel-connector-sync-job-api.html
270
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
271
+	 *
272
+	 * @param array{
273
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be canceled
274
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
275
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
276
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
277
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
278
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
279
+	 * } $params
280
+	 *
281
+	 * @throws MissingParameterException if a required parameter is missing
282
+	 * @throws NoNodeAvailableException if all the hosts are offline
283
+	 * @throws ClientResponseException if the status code of response is 4xx
284
+	 * @throws ServerResponseException if the status code of response is 5xx
285
+	 *
286
+	 * @return Elasticsearch|Promise
287
+	 */
288
+	public function syncJobCancel(array $params = [])
289
+	{
290
+		$this->checkRequiredParameters(['connector_sync_job_id'], $params);
291
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_cancel';
292
+		$method = 'PUT';
293
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
294
+		$headers = ['Accept' => 'application/json'];
295
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
296
+		$request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_cancel');
297
+		return $this->client->sendRequest($request);
298
+	}
299
+	/**
300
+	 * Checks in a connector sync job (refreshes 'last_seen').
301
+	 *
302
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-sync-job-api.html
303
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
304
+	 *
305
+	 * @param array{
306
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be checked in
307
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
308
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
309
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
310
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
311
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
312
+	 * } $params
313
+	 *
314
+	 * @throws MissingParameterException if a required parameter is missing
315
+	 * @throws NoNodeAvailableException if all the hosts are offline
316
+	 * @throws ClientResponseException if the status code of response is 4xx
317
+	 * @throws ServerResponseException if the status code of response is 5xx
318
+	 *
319
+	 * @return Elasticsearch|Promise
320
+	 */
321
+	public function syncJobCheckIn(array $params = [])
322
+	{
323
+		$this->checkRequiredParameters(['connector_sync_job_id'], $params);
324
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_check_in';
325
+		$method = 'PUT';
326
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
327
+		$headers = ['Accept' => 'application/json'];
328
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
329
+		$request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_check_in');
330
+		return $this->client->sendRequest($request);
331
+	}
332
+	/**
333
+	 * Claims a connector sync job.
334
+	 *
335
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/claim-connector-sync-job-api.html
336
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
337
+	 *
338
+	 * @param array{
339
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be claimed.
340
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
341
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
342
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
343
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
344
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
345
+	 *     body: array, // (REQUIRED) Data to claim a sync job.
346
+	 * } $params
347
+	 *
348
+	 * @throws MissingParameterException if a required parameter is missing
349
+	 * @throws NoNodeAvailableException if all the hosts are offline
350
+	 * @throws ClientResponseException if the status code of response is 4xx
351
+	 * @throws ServerResponseException if the status code of response is 5xx
352
+	 *
353
+	 * @return Elasticsearch|Promise
354
+	 */
355
+	public function syncJobClaim(array $params = [])
356
+	{
357
+		$this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
358
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_claim';
359
+		$method = 'PUT';
360
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
361
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
362
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
363
+		$request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_claim');
364
+		return $this->client->sendRequest($request);
365
+	}
366
+	/**
367
+	 * Deletes a connector sync job.
368
+	 *
369
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-sync-job-api.html
370
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
371
+	 *
372
+	 * @param array{
373
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be deleted.
374
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
375
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
376
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
377
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
378
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
379
+	 * } $params
380
+	 *
381
+	 * @throws MissingParameterException if a required parameter is missing
382
+	 * @throws NoNodeAvailableException if all the hosts are offline
383
+	 * @throws ClientResponseException if the status code of response is 4xx
384
+	 * @throws ServerResponseException if the status code of response is 5xx
385
+	 *
386
+	 * @return Elasticsearch|Promise
387
+	 */
388
+	public function syncJobDelete(array $params = [])
389
+	{
390
+		$this->checkRequiredParameters(['connector_sync_job_id'], $params);
391
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
392
+		$method = 'DELETE';
393
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
394
+		$headers = ['Accept' => 'application/json'];
395
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
396
+		$request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_delete');
397
+		return $this->client->sendRequest($request);
398
+	}
399
+	/**
400
+	 * Sets an error for a connector sync job.
401
+	 *
402
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-error-api.html
403
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
404
+	 *
405
+	 * @param array{
406
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to set an error for.
407
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
408
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
409
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
410
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
411
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
412
+	 *     body: array, // (REQUIRED) The error to set in the connector sync job.
413
+	 * } $params
414
+	 *
415
+	 * @throws MissingParameterException if a required parameter is missing
416
+	 * @throws NoNodeAvailableException if all the hosts are offline
417
+	 * @throws ClientResponseException if the status code of response is 4xx
418
+	 * @throws ServerResponseException if the status code of response is 5xx
419
+	 *
420
+	 * @return Elasticsearch|Promise
421
+	 */
422
+	public function syncJobError(array $params = [])
423
+	{
424
+		$this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
425
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_error';
426
+		$method = 'PUT';
427
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
428
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
429
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
430
+		$request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_error');
431
+		return $this->client->sendRequest($request);
432
+	}
433
+	/**
434
+	 * Returns the details about a connector sync job.
435
+	 *
436
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-sync-job-api.html
437
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
438
+	 *
439
+	 * @param array{
440
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be returned.
441
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
442
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
443
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
444
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
445
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
446
+	 * } $params
447
+	 *
448
+	 * @throws MissingParameterException if a required parameter is missing
449
+	 * @throws NoNodeAvailableException if all the hosts are offline
450
+	 * @throws ClientResponseException if the status code of response is 4xx
451
+	 * @throws ServerResponseException if the status code of response is 5xx
452
+	 *
453
+	 * @return Elasticsearch|Promise
454
+	 */
455
+	public function syncJobGet(array $params = [])
456
+	{
457
+		$this->checkRequiredParameters(['connector_sync_job_id'], $params);
458
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
459
+		$method = 'GET';
460
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
461
+		$headers = ['Accept' => 'application/json'];
462
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
463
+		$request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_get');
464
+		return $this->client->sendRequest($request);
465
+	}
466
+	/**
467
+	 * Lists all connector sync jobs.
468
+	 *
469
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-sync-jobs-api.html
470
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
471
+	 *
472
+	 * @param array{
473
+	 *     from: int, // Starting offset (default: 0)
474
+	 *     size: int, // specifies a max number of results to get (default: 100)
475
+	 *     status: string, // Sync job status, which sync jobs are fetched for
476
+	 *     connector_id: string, // Id of the connector to fetch the sync jobs for
477
+	 *     job_type: list, // A comma-separated list of job types
478
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
479
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
480
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
481
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
482
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
483
+	 * } $params
484
+	 *
485
+	 * @throws NoNodeAvailableException if all the hosts are offline
486
+	 * @throws ClientResponseException if the status code of response is 4xx
487
+	 * @throws ServerResponseException if the status code of response is 5xx
488
+	 *
489
+	 * @return Elasticsearch|Promise
490
+	 */
491
+	public function syncJobList(array $params = [])
492
+	{
493
+		$url = '/_connector/_sync_job';
494
+		$method = 'GET';
495
+		$url = $this->addQueryString($url, $params, ['from', 'size', 'status', 'connector_id', 'job_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
496
+		$headers = ['Accept' => 'application/json'];
497
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
498
+		$request = $this->addOtelAttributes($params, [], $request, 'connector.sync_job_list');
499
+		return $this->client->sendRequest($request);
500
+	}
501
+	/**
502
+	 * Creates a connector sync job.
503
+	 *
504
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-sync-job-api.html
505
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
506
+	 *
507
+	 * @param array{
508
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
509
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
510
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
511
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
512
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
513
+	 *     body: array, // (REQUIRED) The connector sync job data.
514
+	 * } $params
515
+	 *
516
+	 * @throws NoNodeAvailableException if all the hosts are offline
517
+	 * @throws ClientResponseException if the status code of response is 4xx
518
+	 * @throws ServerResponseException if the status code of response is 5xx
519
+	 *
520
+	 * @return Elasticsearch|Promise
521
+	 */
522
+	public function syncJobPost(array $params = [])
523
+	{
524
+		$this->checkRequiredParameters(['body'], $params);
525
+		$url = '/_connector/_sync_job';
526
+		$method = 'POST';
527
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
528
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
529
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
530
+		$request = $this->addOtelAttributes($params, [], $request, 'connector.sync_job_post');
531
+		return $this->client->sendRequest($request);
532
+	}
533
+	/**
534
+	 * Updates the stats fields in the connector sync job document.
535
+	 *
536
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-stats-api.html
537
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
538
+	 *
539
+	 * @param array{
540
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be updated.
541
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
542
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
543
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
544
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
545
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
546
+	 *     body: array, // (REQUIRED) The stats to update for the connector sync job.
547
+	 * } $params
548
+	 *
549
+	 * @throws MissingParameterException if a required parameter is missing
550
+	 * @throws NoNodeAvailableException if all the hosts are offline
551
+	 * @throws ClientResponseException if the status code of response is 4xx
552
+	 * @throws ServerResponseException if the status code of response is 5xx
553
+	 *
554
+	 * @return Elasticsearch|Promise
555
+	 */
556
+	public function syncJobUpdateStats(array $params = [])
557
+	{
558
+		$this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
559
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_stats';
560
+		$method = 'PUT';
561
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
562
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
563
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
564
+		$request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_update_stats');
565
+		return $this->client->sendRequest($request);
566
+	}
567
+	/**
568
+	 * Activates the draft filtering rules if they are in a validated state.
569
+	 *
570
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html
571
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
572
+	 *
573
+	 * @param array{
574
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
575
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
576
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
577
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
578
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
579
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
580
+	 * } $params
581
+	 *
582
+	 * @throws MissingParameterException if a required parameter is missing
583
+	 * @throws NoNodeAvailableException if all the hosts are offline
584
+	 * @throws ClientResponseException if the status code of response is 4xx
585
+	 * @throws ServerResponseException if the status code of response is 5xx
586
+	 *
587
+	 * @return Elasticsearch|Promise
588
+	 */
589
+	public function updateActiveFiltering(array $params = [])
590
+	{
591
+		$this->checkRequiredParameters(['connector_id'], $params);
592
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering/_activate';
593
+		$method = 'PUT';
594
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
595
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
596
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
597
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_active_filtering');
598
+		return $this->client->sendRequest($request);
599
+	}
600
+	/**
601
+	 * Updates the API key id and/or API key secret id fields in the connector document.
602
+	 *
603
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-api-key-id-api.html
604
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
605
+	 *
606
+	 * @param array{
607
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
608
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
609
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
610
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
611
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
612
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
613
+	 *     body: array, // (REQUIRED) An object containing the connector's API key id and/or Connector Secret document id for that API key.
614
+	 * } $params
615
+	 *
616
+	 * @throws MissingParameterException if a required parameter is missing
617
+	 * @throws NoNodeAvailableException if all the hosts are offline
618
+	 * @throws ClientResponseException if the status code of response is 4xx
619
+	 * @throws ServerResponseException if the status code of response is 5xx
620
+	 *
621
+	 * @return Elasticsearch|Promise
622
+	 */
623
+	public function updateApiKeyId(array $params = [])
624
+	{
625
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
626
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_api_key_id';
627
+		$method = 'PUT';
628
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
629
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
630
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
631
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_api_key_id');
632
+		return $this->client->sendRequest($request);
633
+	}
634
+	/**
635
+	 * Updates the connector configuration.
636
+	 *
637
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-configuration-api.html
638
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
639
+	 *
640
+	 * @param array{
641
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
642
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
643
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
644
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
645
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
646
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
647
+	 *     body: array, // (REQUIRED) Mapping between field names to configuration.
648
+	 * } $params
649
+	 *
650
+	 * @throws MissingParameterException if a required parameter is missing
651
+	 * @throws NoNodeAvailableException if all the hosts are offline
652
+	 * @throws ClientResponseException if the status code of response is 4xx
653
+	 * @throws ServerResponseException if the status code of response is 5xx
654
+	 *
655
+	 * @return Elasticsearch|Promise
656
+	 */
657
+	public function updateConfiguration(array $params = [])
658
+	{
659
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
660
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_configuration';
661
+		$method = 'PUT';
662
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
663
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
664
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
665
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_configuration');
666
+		return $this->client->sendRequest($request);
667
+	}
668
+	/**
669
+	 * Updates the error field in the connector document.
670
+	 *
671
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-error-api.html
672
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
673
+	 *
674
+	 * @param array{
675
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
676
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
677
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
678
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
679
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
680
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
681
+	 *     body: array, // (REQUIRED) An object containing the connector's error.
682
+	 * } $params
683
+	 *
684
+	 * @throws MissingParameterException if a required parameter is missing
685
+	 * @throws NoNodeAvailableException if all the hosts are offline
686
+	 * @throws ClientResponseException if the status code of response is 4xx
687
+	 * @throws ServerResponseException if the status code of response is 5xx
688
+	 *
689
+	 * @return Elasticsearch|Promise
690
+	 */
691
+	public function updateError(array $params = [])
692
+	{
693
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
694
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_error';
695
+		$method = 'PUT';
696
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
697
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
698
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
699
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_error');
700
+		return $this->client->sendRequest($request);
701
+	}
702
+	/**
703
+	 * Updates the connector features in the connector document.
704
+	 *
705
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-features-api.html
706
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
707
+	 *
708
+	 * @param array{
709
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
710
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
711
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
712
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
713
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
714
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
715
+	 *     body: array, // (REQUIRED) An object containing the connector's features definition.
716
+	 * } $params
717
+	 *
718
+	 * @throws MissingParameterException if a required parameter is missing
719
+	 * @throws NoNodeAvailableException if all the hosts are offline
720
+	 * @throws ClientResponseException if the status code of response is 4xx
721
+	 * @throws ServerResponseException if the status code of response is 5xx
722
+	 *
723
+	 * @return Elasticsearch|Promise
724
+	 */
725
+	public function updateFeatures(array $params = [])
726
+	{
727
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
728
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_features';
729
+		$method = 'PUT';
730
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
731
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
732
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
733
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_features');
734
+		return $this->client->sendRequest($request);
735
+	}
736
+	/**
737
+	 * Updates the filtering field in the connector document.
738
+	 *
739
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html
740
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
741
+	 *
742
+	 * @param array{
743
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
744
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
745
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
746
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
747
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
748
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
749
+	 *     body: array, // (REQUIRED) A list of connector filtering configurations.
750
+	 * } $params
751
+	 *
752
+	 * @throws MissingParameterException if a required parameter is missing
753
+	 * @throws NoNodeAvailableException if all the hosts are offline
754
+	 * @throws ClientResponseException if the status code of response is 4xx
755
+	 * @throws ServerResponseException if the status code of response is 5xx
756
+	 *
757
+	 * @return Elasticsearch|Promise
758
+	 */
759
+	public function updateFiltering(array $params = [])
760
+	{
761
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
762
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering';
763
+		$method = 'PUT';
764
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
765
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
766
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
767
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_filtering');
768
+		return $this->client->sendRequest($request);
769
+	}
770
+	/**
771
+	 * Updates the validation info of the draft filtering rules.
772
+	 *
773
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html
774
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
775
+	 *
776
+	 * @param array{
777
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
778
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
779
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
780
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
781
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
782
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
783
+	 *     body: array, // (REQUIRED) Validation info for the draft filtering rules
784
+	 * } $params
785
+	 *
786
+	 * @throws MissingParameterException if a required parameter is missing
787
+	 * @throws NoNodeAvailableException if all the hosts are offline
788
+	 * @throws ClientResponseException if the status code of response is 4xx
789
+	 * @throws ServerResponseException if the status code of response is 5xx
790
+	 *
791
+	 * @return Elasticsearch|Promise
792
+	 */
793
+	public function updateFilteringValidation(array $params = [])
794
+	{
795
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
796
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering/_validation';
797
+		$method = 'PUT';
798
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
799
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
800
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
801
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_filtering_validation');
802
+		return $this->client->sendRequest($request);
803
+	}
804
+	/**
805
+	 * Updates the index name of the connector.
806
+	 *
807
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-index-name-api.html
808
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
809
+	 *
810
+	 * @param array{
811
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
812
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
813
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
814
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
815
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
816
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
817
+	 *     body: array, // (REQUIRED) An object containing the connector's index name.
818
+	 * } $params
819
+	 *
820
+	 * @throws MissingParameterException if a required parameter is missing
821
+	 * @throws NoNodeAvailableException if all the hosts are offline
822
+	 * @throws ClientResponseException if the status code of response is 4xx
823
+	 * @throws ServerResponseException if the status code of response is 5xx
824
+	 *
825
+	 * @return Elasticsearch|Promise
826
+	 */
827
+	public function updateIndexName(array $params = [])
828
+	{
829
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
830
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_index_name';
831
+		$method = 'PUT';
832
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
833
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
834
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
835
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_index_name');
836
+		return $this->client->sendRequest($request);
837
+	}
838
+	/**
839
+	 * Updates the name and/or description fields in the connector document.
840
+	 *
841
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-name-description-api.html
842
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
843
+	 *
844
+	 * @param array{
845
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
846
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
847
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
848
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
849
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
850
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
851
+	 *     body: array, // (REQUIRED) An object containing the connector's name and/or description.
852
+	 * } $params
853
+	 *
854
+	 * @throws MissingParameterException if a required parameter is missing
855
+	 * @throws NoNodeAvailableException if all the hosts are offline
856
+	 * @throws ClientResponseException if the status code of response is 4xx
857
+	 * @throws ServerResponseException if the status code of response is 5xx
858
+	 *
859
+	 * @return Elasticsearch|Promise
860
+	 */
861
+	public function updateName(array $params = [])
862
+	{
863
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
864
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_name';
865
+		$method = 'PUT';
866
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
867
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
868
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
869
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_name');
870
+		return $this->client->sendRequest($request);
871
+	}
872
+	/**
873
+	 * Updates the is_native flag of the connector.
874
+	 *
875
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/connector-apis.html
876
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
877
+	 *
878
+	 * @param array{
879
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
880
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
881
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
882
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
883
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
884
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
885
+	 *     body: array, // (REQUIRED) An object containing the connector's is_native flag
886
+	 * } $params
887
+	 *
888
+	 * @throws MissingParameterException if a required parameter is missing
889
+	 * @throws NoNodeAvailableException if all the hosts are offline
890
+	 * @throws ClientResponseException if the status code of response is 4xx
891
+	 * @throws ServerResponseException if the status code of response is 5xx
892
+	 *
893
+	 * @return Elasticsearch|Promise
894
+	 */
895
+	public function updateNative(array $params = [])
896
+	{
897
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
898
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_native';
899
+		$method = 'PUT';
900
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
901
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
902
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
903
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_native');
904
+		return $this->client->sendRequest($request);
905
+	}
906
+	/**
907
+	 * Updates the pipeline field in the connector document.
908
+	 *
909
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-pipeline-api.html
910
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
911
+	 *
912
+	 * @param array{
913
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
914
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
915
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
916
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
917
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
918
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
919
+	 *     body: array, // (REQUIRED) An object with connector ingest pipeline configuration.
920
+	 * } $params
921
+	 *
922
+	 * @throws MissingParameterException if a required parameter is missing
923
+	 * @throws NoNodeAvailableException if all the hosts are offline
924
+	 * @throws ClientResponseException if the status code of response is 4xx
925
+	 * @throws ServerResponseException if the status code of response is 5xx
926
+	 *
927
+	 * @return Elasticsearch|Promise
928
+	 */
929
+	public function updatePipeline(array $params = [])
930
+	{
931
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
932
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_pipeline';
933
+		$method = 'PUT';
934
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
935
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
936
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
937
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_pipeline');
938
+		return $this->client->sendRequest($request);
939
+	}
940
+	/**
941
+	 * Updates the scheduling field in the connector document.
942
+	 *
943
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-scheduling-api.html
944
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
945
+	 *
946
+	 * @param array{
947
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
948
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
949
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
950
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
951
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
952
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
953
+	 *     body: array, // (REQUIRED) An object containing the connector's scheduling configuration.
954
+	 * } $params
955
+	 *
956
+	 * @throws MissingParameterException if a required parameter is missing
957
+	 * @throws NoNodeAvailableException if all the hosts are offline
958
+	 * @throws ClientResponseException if the status code of response is 4xx
959
+	 * @throws ServerResponseException if the status code of response is 5xx
960
+	 *
961
+	 * @return Elasticsearch|Promise
962
+	 */
963
+	public function updateScheduling(array $params = [])
964
+	{
965
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
966
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_scheduling';
967
+		$method = 'PUT';
968
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
969
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
970
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
971
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_scheduling');
972
+		return $this->client->sendRequest($request);
973
+	}
974
+	/**
975
+	 * Updates the service type of the connector.
976
+	 *
977
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-service-type-api.html
978
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
979
+	 *
980
+	 * @param array{
981
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
982
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
983
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
984
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
985
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
986
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
987
+	 *     body: array, // (REQUIRED) An object containing the connector's service type.
988
+	 * } $params
989
+	 *
990
+	 * @throws MissingParameterException if a required parameter is missing
991
+	 * @throws NoNodeAvailableException if all the hosts are offline
992
+	 * @throws ClientResponseException if the status code of response is 4xx
993
+	 * @throws ServerResponseException if the status code of response is 5xx
994
+	 *
995
+	 * @return Elasticsearch|Promise
996
+	 */
997
+	public function updateServiceType(array $params = [])
998
+	{
999
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
1000
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_service_type';
1001
+		$method = 'PUT';
1002
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1003
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1004
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1005
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_service_type');
1006
+		return $this->client->sendRequest($request);
1007
+	}
1008
+	/**
1009
+	 * Updates the status of the connector.
1010
+	 *
1011
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-status-api.html
1012
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
1013
+	 *
1014
+	 * @param array{
1015
+	 *     connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
1016
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1017
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1018
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1019
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1020
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1021
+	 *     body: array, // (REQUIRED) An object containing the connector's status.
1022
+	 * } $params
1023
+	 *
1024
+	 * @throws MissingParameterException if a required parameter is missing
1025
+	 * @throws NoNodeAvailableException if all the hosts are offline
1026
+	 * @throws ClientResponseException if the status code of response is 4xx
1027
+	 * @throws ServerResponseException if the status code of response is 5xx
1028
+	 *
1029
+	 * @return Elasticsearch|Promise
1030
+	 */
1031
+	public function updateStatus(array $params = [])
1032
+	{
1033
+		$this->checkRequiredParameters(['connector_id', 'body'], $params);
1034
+		$url = '/_connector/' . $this->encode($params['connector_id']) . '/_status';
1035
+		$method = 'PUT';
1036
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1037
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1038
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1039
+		$request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_status');
1040
+		return $this->client->sendRequest($request);
1041
+	}
1042 1042
 }
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function checkIn(array $params = [])
51 51
     {
52 52
         $this->checkRequiredParameters(['connector_id'], $params);
53
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_check_in';
53
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_check_in';
54 54
         $method = 'PUT';
55 55
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56 56
         $headers = ['Accept' => 'application/json'];
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function delete(array $params = [])
85 85
     {
86 86
         $this->checkRequiredParameters(['connector_id'], $params);
87
-        $url = '/_connector/' . $this->encode($params['connector_id']);
87
+        $url = '/_connector/'.$this->encode($params['connector_id']);
88 88
         $method = 'DELETE';
89 89
         $url = $this->addQueryString($url, $params, ['delete_sync_jobs', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
90 90
         $headers = ['Accept' => 'application/json'];
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     public function get(array $params = [])
118 118
     {
119 119
         $this->checkRequiredParameters(['connector_id'], $params);
120
-        $url = '/_connector/' . $this->encode($params['connector_id']);
120
+        $url = '/_connector/'.$this->encode($params['connector_id']);
121 121
         $method = 'GET';
122 122
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
123 123
         $headers = ['Accept' => 'application/json'];
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     public function lastSync(array $params = [])
152 152
     {
153 153
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
154
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_last_sync';
154
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_last_sync';
155 155
         $method = 'PUT';
156 156
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
157 157
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
     public function put(array $params = [])
252 252
     {
253 253
         if (isset($params['connector_id'])) {
254
-            $url = '/_connector/' . $this->encode($params['connector_id']);
254
+            $url = '/_connector/'.$this->encode($params['connector_id']);
255 255
             $method = 'PUT';
256 256
         } else {
257 257
             $url = '/_connector';
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
     public function syncJobCancel(array $params = [])
289 289
     {
290 290
         $this->checkRequiredParameters(['connector_sync_job_id'], $params);
291
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_cancel';
291
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']).'/_cancel';
292 292
         $method = 'PUT';
293 293
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
294 294
         $headers = ['Accept' => 'application/json'];
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     public function syncJobCheckIn(array $params = [])
322 322
     {
323 323
         $this->checkRequiredParameters(['connector_sync_job_id'], $params);
324
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_check_in';
324
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']).'/_check_in';
325 325
         $method = 'PUT';
326 326
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
327 327
         $headers = ['Accept' => 'application/json'];
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
     public function syncJobClaim(array $params = [])
356 356
     {
357 357
         $this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
358
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_claim';
358
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']).'/_claim';
359 359
         $method = 'PUT';
360 360
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
361 361
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
     public function syncJobDelete(array $params = [])
389 389
     {
390 390
         $this->checkRequiredParameters(['connector_sync_job_id'], $params);
391
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
391
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']);
392 392
         $method = 'DELETE';
393 393
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
394 394
         $headers = ['Accept' => 'application/json'];
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
     public function syncJobError(array $params = [])
423 423
     {
424 424
         $this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
425
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_error';
425
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']).'/_error';
426 426
         $method = 'PUT';
427 427
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
428 428
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
     public function syncJobGet(array $params = [])
456 456
     {
457 457
         $this->checkRequiredParameters(['connector_sync_job_id'], $params);
458
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
458
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']);
459 459
         $method = 'GET';
460 460
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
461 461
         $headers = ['Accept' => 'application/json'];
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
     public function syncJobUpdateStats(array $params = [])
557 557
     {
558 558
         $this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
559
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_stats';
559
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']).'/_stats';
560 560
         $method = 'PUT';
561 561
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
562 562
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
     public function updateActiveFiltering(array $params = [])
590 590
     {
591 591
         $this->checkRequiredParameters(['connector_id'], $params);
592
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering/_activate';
592
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_filtering/_activate';
593 593
         $method = 'PUT';
594 594
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
595 595
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
     public function updateApiKeyId(array $params = [])
624 624
     {
625 625
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
626
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_api_key_id';
626
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_api_key_id';
627 627
         $method = 'PUT';
628 628
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
629 629
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
     public function updateConfiguration(array $params = [])
658 658
     {
659 659
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
660
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_configuration';
660
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_configuration';
661 661
         $method = 'PUT';
662 662
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
663 663
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
     public function updateError(array $params = [])
692 692
     {
693 693
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
694
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_error';
694
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_error';
695 695
         $method = 'PUT';
696 696
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
697 697
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
     public function updateFeatures(array $params = [])
726 726
     {
727 727
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
728
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_features';
728
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_features';
729 729
         $method = 'PUT';
730 730
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
731 731
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
     public function updateFiltering(array $params = [])
760 760
     {
761 761
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
762
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering';
762
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_filtering';
763 763
         $method = 'PUT';
764 764
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
765 765
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
     public function updateFilteringValidation(array $params = [])
794 794
     {
795 795
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
796
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering/_validation';
796
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_filtering/_validation';
797 797
         $method = 'PUT';
798 798
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
799 799
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
     public function updateIndexName(array $params = [])
828 828
     {
829 829
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
830
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_index_name';
830
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_index_name';
831 831
         $method = 'PUT';
832 832
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
833 833
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
     public function updateName(array $params = [])
862 862
     {
863 863
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
864
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_name';
864
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_name';
865 865
         $method = 'PUT';
866 866
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
867 867
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
     public function updateNative(array $params = [])
896 896
     {
897 897
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
898
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_native';
898
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_native';
899 899
         $method = 'PUT';
900 900
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
901 901
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
     public function updatePipeline(array $params = [])
930 930
     {
931 931
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
932
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_pipeline';
932
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_pipeline';
933 933
         $method = 'PUT';
934 934
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
935 935
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -963,7 +963,7 @@  discard block
 block discarded – undo
963 963
     public function updateScheduling(array $params = [])
964 964
     {
965 965
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
966
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_scheduling';
966
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_scheduling';
967 967
         $method = 'PUT';
968 968
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
969 969
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
     public function updateServiceType(array $params = [])
998 998
     {
999 999
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
1000
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_service_type';
1000
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_service_type';
1001 1001
         $method = 'PUT';
1002 1002
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1003 1003
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -1031,7 +1031,7 @@  discard block
 block discarded – undo
1031 1031
     public function updateStatus(array $params = [])
1032 1032
     {
1033 1033
         $this->checkRequiredParameters(['connector_id', 'body'], $params);
1034
-        $url = '/_connector/' . $this->encode($params['connector_id']) . '/_status';
1034
+        $url = '/_connector/'.$this->encode($params['connector_id']).'/_status';
1035 1035
         $method = 'PUT';
1036 1036
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1037 1037
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Cluster.php 3 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public function deleteComponentTemplate(array $params = [])
82 82
     {
83 83
         $this->checkRequiredParameters(['name'], $params);
84
-        $url = '/_component_template/' . $this->encode($params['name']);
84
+        $url = '/_component_template/'.$this->encode($params['name']);
85 85
         $method = 'DELETE';
86 86
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
87 87
         $headers = ['Accept' => 'application/json'];
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     public function existsComponentTemplate(array $params = [])
143 143
     {
144 144
         $this->checkRequiredParameters(['name'], $params);
145
-        $url = '/_component_template/' . $this->encode($params['name']);
145
+        $url = '/_component_template/'.$this->encode($params['name']);
146 146
         $method = 'HEAD';
147 147
         $url = $this->addQueryString($url, $params, ['master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
148 148
         $headers = ['Accept' => 'application/json'];
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     public function getComponentTemplate(array $params = [])
175 175
     {
176 176
         if (isset($params['name'])) {
177
-            $url = '/_component_template/' . $this->encode($params['name']);
177
+            $url = '/_component_template/'.$this->encode($params['name']);
178 178
             $method = 'GET';
179 179
         } else {
180 180
             $url = '/_component_template';
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     public function health(array $params = [])
250 250
     {
251 251
         if (isset($params['index'])) {
252
-            $url = '/_cluster/health/' . $this->encode($params['index']);
252
+            $url = '/_cluster/health/'.$this->encode($params['index']);
253 253
             $method = 'GET';
254 254
         } else {
255 255
             $url = '/_cluster/health';
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
     public function info(array $params = [])
284 284
     {
285 285
         $this->checkRequiredParameters(['target'], $params);
286
-        $url = '/_info/' . $this->encode($params['target']);
286
+        $url = '/_info/'.$this->encode($params['target']);
287 287
         $method = 'GET';
288 288
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
289 289
         $headers = ['Accept' => 'application/json'];
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
     public function putComponentTemplate(array $params = [])
379 379
     {
380 380
         $this->checkRequiredParameters(['name', 'body'], $params);
381
-        $url = '/_component_template/' . $this->encode($params['name']);
381
+        $url = '/_component_template/'.$this->encode($params['name']);
382 382
         $method = 'PUT';
383 383
         $url = $this->addQueryString($url, $params, ['create', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
384 384
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -509,10 +509,10 @@  discard block
 block discarded – undo
509 509
     public function state(array $params = [])
510 510
     {
511 511
         if (isset($params['index']) && isset($params['metric'])) {
512
-            $url = '/_cluster/state/' . $this->encode($params['metric']) . '/' . $this->encode($params['index']);
512
+            $url = '/_cluster/state/'.$this->encode($params['metric']).'/'.$this->encode($params['index']);
513 513
             $method = 'GET';
514 514
         } elseif (isset($params['metric'])) {
515
-            $url = '/_cluster/state/' . $this->encode($params['metric']);
515
+            $url = '/_cluster/state/'.$this->encode($params['metric']);
516 516
             $method = 'GET';
517 517
         } else {
518 518
             $url = '/_cluster/state';
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
     public function stats(array $params = [])
548 548
     {
549 549
         if (isset($params['node_id'])) {
550
-            $url = '/_cluster/stats/nodes/' . $this->encode($params['node_id']);
550
+            $url = '/_cluster/stats/nodes/'.$this->encode($params['node_id']);
551 551
             $method = 'GET';
552 552
         } else {
553 553
             $url = '/_cluster/stats';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Cluster extends AbstractEndpoint
27
-{
26
+class Cluster extends AbstractEndpoint {
28 27
     /**
29 28
      * Provides explanations for shard allocations in the cluster.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +565 added lines, -565 removed lines patch added patch discarded remove patch
@@ -25,569 +25,569 @@
 block discarded – undo
25 25
  */
26 26
 class Cluster extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Provides explanations for shard allocations in the cluster.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html
32
-     *
33
-     * @param array{
34
-     *     master_timeout: time, // Timeout for connection to master node
35
-     *     include_yes_decisions: boolean, // Return 'YES' decisions in explanation (default: false)
36
-     *     include_disk_info: boolean, // Return information about disk usage and shard sizes (default: false)
37
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
38
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
39
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
40
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
41
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
42
-     *     body: array, //  The index, shard, and primary flag to explain. Empty means 'explain a randomly-chosen unassigned shard'
43
-     * } $params
44
-     *
45
-     * @throws NoNodeAvailableException if all the hosts are offline
46
-     * @throws ClientResponseException if the status code of response is 4xx
47
-     * @throws ServerResponseException if the status code of response is 5xx
48
-     *
49
-     * @return Elasticsearch|Promise
50
-     */
51
-    public function allocationExplain(array $params = [])
52
-    {
53
-        $url = '/_cluster/allocation/explain';
54
-        $method = empty($params['body']) ? 'GET' : 'POST';
55
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'include_yes_decisions', 'include_disk_info', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
56
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
57
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
58
-        $request = $this->addOtelAttributes($params, [], $request, 'cluster.allocation_explain');
59
-        return $this->client->sendRequest($request);
60
-    }
61
-    /**
62
-     * Deletes a component template
63
-     *
64
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
65
-     *
66
-     * @param array{
67
-     *     name: string, // (REQUIRED) The name of the template
68
-     *     timeout: time, // Explicit operation timeout
69
-     *     master_timeout: time, // Specify timeout for connection to master
70
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
71
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
72
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
73
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
74
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
75
-     * } $params
76
-     *
77
-     * @throws MissingParameterException if a required parameter is missing
78
-     * @throws NoNodeAvailableException if all the hosts are offline
79
-     * @throws ClientResponseException if the status code of response is 4xx
80
-     * @throws ServerResponseException if the status code of response is 5xx
81
-     *
82
-     * @return Elasticsearch|Promise
83
-     */
84
-    public function deleteComponentTemplate(array $params = [])
85
-    {
86
-        $this->checkRequiredParameters(['name'], $params);
87
-        $url = '/_component_template/' . $this->encode($params['name']);
88
-        $method = 'DELETE';
89
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
90
-        $headers = ['Accept' => 'application/json'];
91
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
92
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'cluster.delete_component_template');
93
-        return $this->client->sendRequest($request);
94
-    }
95
-    /**
96
-     * Clears cluster voting config exclusions.
97
-     *
98
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html
99
-     *
100
-     * @param array{
101
-     *     wait_for_removal: boolean, // Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.
102
-     *     master_timeout: time, // Timeout for submitting request to master
103
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
104
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
105
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
106
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
107
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
108
-     * } $params
109
-     *
110
-     * @throws NoNodeAvailableException if all the hosts are offline
111
-     * @throws ClientResponseException if the status code of response is 4xx
112
-     * @throws ServerResponseException if the status code of response is 5xx
113
-     *
114
-     * @return Elasticsearch|Promise
115
-     */
116
-    public function deleteVotingConfigExclusions(array $params = [])
117
-    {
118
-        $url = '/_cluster/voting_config_exclusions';
119
-        $method = 'DELETE';
120
-        $url = $this->addQueryString($url, $params, ['wait_for_removal', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
121
-        $headers = ['Accept' => 'application/json'];
122
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
123
-        $request = $this->addOtelAttributes($params, [], $request, 'cluster.delete_voting_config_exclusions');
124
-        return $this->client->sendRequest($request);
125
-    }
126
-    /**
127
-     * Returns information about whether a particular component template exist
128
-     *
129
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
130
-     *
131
-     * @param array{
132
-     *     name: string, // (REQUIRED) The name of the template
133
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
134
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
135
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
136
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
137
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
138
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
139
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
140
-     * } $params
141
-     *
142
-     * @throws MissingParameterException if a required parameter is missing
143
-     * @throws NoNodeAvailableException if all the hosts are offline
144
-     * @throws ClientResponseException if the status code of response is 4xx
145
-     * @throws ServerResponseException if the status code of response is 5xx
146
-     *
147
-     * @return Elasticsearch|Promise
148
-     */
149
-    public function existsComponentTemplate(array $params = [])
150
-    {
151
-        $this->checkRequiredParameters(['name'], $params);
152
-        $url = '/_component_template/' . $this->encode($params['name']);
153
-        $method = 'HEAD';
154
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
155
-        $headers = ['Accept' => 'application/json'];
156
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
157
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'cluster.exists_component_template');
158
-        return $this->client->sendRequest($request);
159
-    }
160
-    /**
161
-     * Returns one or more component templates
162
-     *
163
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
164
-     *
165
-     * @param array{
166
-     *     name: list, //  The comma separated names of the component templates
167
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
168
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
169
-     *     include_defaults: boolean, // Return all default configurations for the component template (default: false)
170
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
171
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
172
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
173
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
174
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
175
-     * } $params
176
-     *
177
-     * @throws NoNodeAvailableException if all the hosts are offline
178
-     * @throws ClientResponseException if the status code of response is 4xx
179
-     * @throws ServerResponseException if the status code of response is 5xx
180
-     *
181
-     * @return Elasticsearch|Promise
182
-     */
183
-    public function getComponentTemplate(array $params = [])
184
-    {
185
-        if (isset($params['name'])) {
186
-            $url = '/_component_template/' . $this->encode($params['name']);
187
-            $method = 'GET';
188
-        } else {
189
-            $url = '/_component_template';
190
-            $method = 'GET';
191
-        }
192
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'local', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
193
-        $headers = ['Accept' => 'application/json'];
194
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
195
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'cluster.get_component_template');
196
-        return $this->client->sendRequest($request);
197
-    }
198
-    /**
199
-     * Returns cluster settings.
200
-     *
201
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html
202
-     *
203
-     * @param array{
204
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
205
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
206
-     *     timeout: time, // Explicit operation timeout
207
-     *     include_defaults: boolean, // Whether to return all default clusters setting.
208
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
209
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
210
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
211
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
212
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
213
-     * } $params
214
-     *
215
-     * @throws NoNodeAvailableException if all the hosts are offline
216
-     * @throws ClientResponseException if the status code of response is 4xx
217
-     * @throws ServerResponseException if the status code of response is 5xx
218
-     *
219
-     * @return Elasticsearch|Promise
220
-     */
221
-    public function getSettings(array $params = [])
222
-    {
223
-        $url = '/_cluster/settings';
224
-        $method = 'GET';
225
-        $url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'timeout', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
226
-        $headers = ['Accept' => 'application/json'];
227
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
228
-        $request = $this->addOtelAttributes($params, [], $request, 'cluster.get_settings');
229
-        return $this->client->sendRequest($request);
230
-    }
231
-    /**
232
-     * Returns basic information about the health of the cluster.
233
-     *
234
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html
235
-     *
236
-     * @param array{
237
-     *     index: list, //  Limit the information returned to a specific index
238
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
239
-     *     level: enum, // Specify the level of detail for returned information
240
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
241
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
242
-     *     timeout: time, // Explicit operation timeout
243
-     *     wait_for_active_shards: string, // Wait until the specified number of shards is active
244
-     *     wait_for_nodes: string, // Wait until the specified number of nodes is available
245
-     *     wait_for_events: enum, // Wait until all currently queued events with the given priority are processed
246
-     *     wait_for_no_relocating_shards: boolean, // Whether to wait until there are no relocating shards in the cluster
247
-     *     wait_for_no_initializing_shards: boolean, // Whether to wait until there are no initializing shards in the cluster
248
-     *     wait_for_status: enum, // Wait until cluster is in a specific state
249
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
250
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
251
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
252
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
253
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
254
-     * } $params
255
-     *
256
-     * @throws NoNodeAvailableException if all the hosts are offline
257
-     * @throws ClientResponseException if the status code of response is 4xx
258
-     * @throws ServerResponseException if the status code of response is 5xx
259
-     *
260
-     * @return Elasticsearch|Promise
261
-     */
262
-    public function health(array $params = [])
263
-    {
264
-        if (isset($params['index'])) {
265
-            $url = '/_cluster/health/' . $this->encode($params['index']);
266
-            $method = 'GET';
267
-        } else {
268
-            $url = '/_cluster/health';
269
-            $method = 'GET';
270
-        }
271
-        $url = $this->addQueryString($url, $params, ['expand_wildcards', 'level', 'local', 'master_timeout', 'timeout', 'wait_for_active_shards', 'wait_for_nodes', 'wait_for_events', 'wait_for_no_relocating_shards', 'wait_for_no_initializing_shards', 'wait_for_status', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
272
-        $headers = ['Accept' => 'application/json'];
273
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
274
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'cluster.health');
275
-        return $this->client->sendRequest($request);
276
-    }
277
-    /**
278
-     * Returns different information about the cluster.
279
-     *
280
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-info.html
281
-     *
282
-     * @param array{
283
-     *     target: list, // (REQUIRED) Limit the information returned to the specified target.
284
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
285
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
286
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
287
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
288
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
289
-     * } $params
290
-     *
291
-     * @throws MissingParameterException if a required parameter is missing
292
-     * @throws NoNodeAvailableException if all the hosts are offline
293
-     * @throws ClientResponseException if the status code of response is 4xx
294
-     * @throws ServerResponseException if the status code of response is 5xx
295
-     *
296
-     * @return Elasticsearch|Promise
297
-     */
298
-    public function info(array $params = [])
299
-    {
300
-        $this->checkRequiredParameters(['target'], $params);
301
-        $url = '/_info/' . $this->encode($params['target']);
302
-        $method = 'GET';
303
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
304
-        $headers = ['Accept' => 'application/json'];
305
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
306
-        $request = $this->addOtelAttributes($params, ['target'], $request, 'cluster.info');
307
-        return $this->client->sendRequest($request);
308
-    }
309
-    /**
310
-     * Returns a list of any cluster-level changes (e.g. create index, update mapping,
311
-     * allocate or fail shard) which have not yet been executed.
312
-     *
313
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html
314
-     *
315
-     * @param array{
316
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
317
-     *     master_timeout: time, // Specify timeout for connection to master
318
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
319
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
320
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
321
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
322
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
323
-     * } $params
324
-     *
325
-     * @throws NoNodeAvailableException if all the hosts are offline
326
-     * @throws ClientResponseException if the status code of response is 4xx
327
-     * @throws ServerResponseException if the status code of response is 5xx
328
-     *
329
-     * @return Elasticsearch|Promise
330
-     */
331
-    public function pendingTasks(array $params = [])
332
-    {
333
-        $url = '/_cluster/pending_tasks';
334
-        $method = 'GET';
335
-        $url = $this->addQueryString($url, $params, ['local', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
336
-        $headers = ['Accept' => 'application/json'];
337
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
338
-        $request = $this->addOtelAttributes($params, [], $request, 'cluster.pending_tasks');
339
-        return $this->client->sendRequest($request);
340
-    }
341
-    /**
342
-     * Updates the cluster voting config exclusions by node ids or node names.
343
-     *
344
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html
345
-     *
346
-     * @param array{
347
-     *     node_ids: string, // A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_names.
348
-     *     node_names: string, // A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_ids.
349
-     *     timeout: time, // Explicit operation timeout
350
-     *     master_timeout: time, // Timeout for submitting request to master
351
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
352
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
353
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
354
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
355
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
356
-     * } $params
357
-     *
358
-     * @throws NoNodeAvailableException if all the hosts are offline
359
-     * @throws ClientResponseException if the status code of response is 4xx
360
-     * @throws ServerResponseException if the status code of response is 5xx
361
-     *
362
-     * @return Elasticsearch|Promise
363
-     */
364
-    public function postVotingConfigExclusions(array $params = [])
365
-    {
366
-        $url = '/_cluster/voting_config_exclusions';
367
-        $method = 'POST';
368
-        $url = $this->addQueryString($url, $params, ['node_ids', 'node_names', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
369
-        $headers = ['Accept' => 'application/json'];
370
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
371
-        $request = $this->addOtelAttributes($params, [], $request, 'cluster.post_voting_config_exclusions');
372
-        return $this->client->sendRequest($request);
373
-    }
374
-    /**
375
-     * Creates or updates a component template
376
-     *
377
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
378
-     *
379
-     * @param array{
380
-     *     name: string, // (REQUIRED) The name of the template
381
-     *     create: boolean, // Whether the index template should only be added if new or can also replace an existing one
382
-     *     timeout: time, // Explicit operation timeout
383
-     *     master_timeout: time, // Specify timeout for connection to master
384
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
385
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
386
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
387
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
388
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
389
-     *     body: array, // (REQUIRED) The template definition
390
-     * } $params
391
-     *
392
-     * @throws MissingParameterException if a required parameter is missing
393
-     * @throws NoNodeAvailableException if all the hosts are offline
394
-     * @throws ClientResponseException if the status code of response is 4xx
395
-     * @throws ServerResponseException if the status code of response is 5xx
396
-     *
397
-     * @return Elasticsearch|Promise
398
-     */
399
-    public function putComponentTemplate(array $params = [])
400
-    {
401
-        $this->checkRequiredParameters(['name', 'body'], $params);
402
-        $url = '/_component_template/' . $this->encode($params['name']);
403
-        $method = 'PUT';
404
-        $url = $this->addQueryString($url, $params, ['create', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
405
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
406
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
407
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'cluster.put_component_template');
408
-        return $this->client->sendRequest($request);
409
-    }
410
-    /**
411
-     * Updates the cluster settings.
412
-     *
413
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html
414
-     *
415
-     * @param array{
416
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
417
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
418
-     *     timeout: time, // Explicit operation timeout
419
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
420
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
421
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
422
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
423
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
424
-     *     body: array, // (REQUIRED) The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).
425
-     * } $params
426
-     *
427
-     * @throws NoNodeAvailableException if all the hosts are offline
428
-     * @throws ClientResponseException if the status code of response is 4xx
429
-     * @throws ServerResponseException if the status code of response is 5xx
430
-     *
431
-     * @return Elasticsearch|Promise
432
-     */
433
-    public function putSettings(array $params = [])
434
-    {
435
-        $this->checkRequiredParameters(['body'], $params);
436
-        $url = '/_cluster/settings';
437
-        $method = 'PUT';
438
-        $url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
439
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
440
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
441
-        $request = $this->addOtelAttributes($params, [], $request, 'cluster.put_settings');
442
-        return $this->client->sendRequest($request);
443
-    }
444
-    /**
445
-     * Returns the information about configured remote clusters.
446
-     *
447
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html
448
-     *
449
-     * @param array{
450
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
451
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
452
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
453
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
454
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
455
-     * } $params
456
-     *
457
-     * @throws NoNodeAvailableException if all the hosts are offline
458
-     * @throws ClientResponseException if the status code of response is 4xx
459
-     * @throws ServerResponseException if the status code of response is 5xx
460
-     *
461
-     * @return Elasticsearch|Promise
462
-     */
463
-    public function remoteInfo(array $params = [])
464
-    {
465
-        $url = '/_remote/info';
466
-        $method = 'GET';
467
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
468
-        $headers = ['Accept' => 'application/json'];
469
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
470
-        $request = $this->addOtelAttributes($params, [], $request, 'cluster.remote_info');
471
-        return $this->client->sendRequest($request);
472
-    }
473
-    /**
474
-     * Allows to manually change the allocation of individual shards in the cluster.
475
-     *
476
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html
477
-     *
478
-     * @param array{
479
-     *     dry_run: boolean, // Simulate the operation only and return the resulting state
480
-     *     explain: boolean, // Return an explanation of why the commands can or cannot be executed
481
-     *     retry_failed: boolean, // Retries allocation of shards that are blocked due to too many subsequent allocation failures
482
-     *     metric: list, // Limit the information returned to the specified metrics. Defaults to all but metadata
483
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
484
-     *     timeout: time, // Explicit operation timeout
485
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
486
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
487
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
488
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
489
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
490
-     *     body: array, //  The definition of `commands` to perform (`move`, `cancel`, `allocate`)
491
-     * } $params
492
-     *
493
-     * @throws NoNodeAvailableException if all the hosts are offline
494
-     * @throws ClientResponseException if the status code of response is 4xx
495
-     * @throws ServerResponseException if the status code of response is 5xx
496
-     *
497
-     * @return Elasticsearch|Promise
498
-     */
499
-    public function reroute(array $params = [])
500
-    {
501
-        $url = '/_cluster/reroute';
502
-        $method = 'POST';
503
-        $url = $this->addQueryString($url, $params, ['dry_run', 'explain', 'retry_failed', 'metric', 'master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
504
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
505
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
506
-        $request = $this->addOtelAttributes($params, [], $request, 'cluster.reroute');
507
-        return $this->client->sendRequest($request);
508
-    }
509
-    /**
510
-     * Returns a comprehensive information about the state of the cluster.
511
-     *
512
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html
513
-     *
514
-     * @param array{
515
-     *     metric: list, //  Limit the information returned to the specified metrics
516
-     *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
517
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
518
-     *     master_timeout: time, // Specify timeout for connection to master
519
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
520
-     *     wait_for_metadata_version: number, // Wait for the metadata version to be equal or greater than the specified metadata version
521
-     *     wait_for_timeout: time, // The maximum time to wait for wait_for_metadata_version before timing out
522
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
523
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
524
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
525
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
526
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
527
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
528
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
529
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
530
-     * } $params
531
-     *
532
-     * @throws NoNodeAvailableException if all the hosts are offline
533
-     * @throws ClientResponseException if the status code of response is 4xx
534
-     * @throws ServerResponseException if the status code of response is 5xx
535
-     *
536
-     * @return Elasticsearch|Promise
537
-     */
538
-    public function state(array $params = [])
539
-    {
540
-        if (isset($params['index']) && isset($params['metric'])) {
541
-            $url = '/_cluster/state/' . $this->encode($params['metric']) . '/' . $this->encode($params['index']);
542
-            $method = 'GET';
543
-        } elseif (isset($params['metric'])) {
544
-            $url = '/_cluster/state/' . $this->encode($params['metric']);
545
-            $method = 'GET';
546
-        } else {
547
-            $url = '/_cluster/state';
548
-            $method = 'GET';
549
-        }
550
-        $url = $this->addQueryString($url, $params, ['local', 'master_timeout', 'flat_settings', 'wait_for_metadata_version', 'wait_for_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
551
-        $headers = ['Accept' => 'application/json'];
552
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
553
-        $request = $this->addOtelAttributes($params, ['metric', 'index'], $request, 'cluster.state');
554
-        return $this->client->sendRequest($request);
555
-    }
556
-    /**
557
-     * Returns high-level overview of cluster statistics.
558
-     *
559
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html
560
-     *
561
-     * @param array{
562
-     *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
563
-     *     include_remotes: boolean, // Include remote cluster data into the response (default: false)
564
-     *     timeout: time, // Explicit operation timeout
565
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
566
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
567
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
568
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
569
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
570
-     * } $params
571
-     *
572
-     * @throws NoNodeAvailableException if all the hosts are offline
573
-     * @throws ClientResponseException if the status code of response is 4xx
574
-     * @throws ServerResponseException if the status code of response is 5xx
575
-     *
576
-     * @return Elasticsearch|Promise
577
-     */
578
-    public function stats(array $params = [])
579
-    {
580
-        if (isset($params['node_id'])) {
581
-            $url = '/_cluster/stats/nodes/' . $this->encode($params['node_id']);
582
-            $method = 'GET';
583
-        } else {
584
-            $url = '/_cluster/stats';
585
-            $method = 'GET';
586
-        }
587
-        $url = $this->addQueryString($url, $params, ['include_remotes', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
588
-        $headers = ['Accept' => 'application/json'];
589
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
590
-        $request = $this->addOtelAttributes($params, ['node_id'], $request, 'cluster.stats');
591
-        return $this->client->sendRequest($request);
592
-    }
28
+	/**
29
+	 * Provides explanations for shard allocations in the cluster.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html
32
+	 *
33
+	 * @param array{
34
+	 *     master_timeout: time, // Timeout for connection to master node
35
+	 *     include_yes_decisions: boolean, // Return 'YES' decisions in explanation (default: false)
36
+	 *     include_disk_info: boolean, // Return information about disk usage and shard sizes (default: false)
37
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
38
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
39
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
40
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
41
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
42
+	 *     body: array, //  The index, shard, and primary flag to explain. Empty means 'explain a randomly-chosen unassigned shard'
43
+	 * } $params
44
+	 *
45
+	 * @throws NoNodeAvailableException if all the hosts are offline
46
+	 * @throws ClientResponseException if the status code of response is 4xx
47
+	 * @throws ServerResponseException if the status code of response is 5xx
48
+	 *
49
+	 * @return Elasticsearch|Promise
50
+	 */
51
+	public function allocationExplain(array $params = [])
52
+	{
53
+		$url = '/_cluster/allocation/explain';
54
+		$method = empty($params['body']) ? 'GET' : 'POST';
55
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'include_yes_decisions', 'include_disk_info', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
56
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
57
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
58
+		$request = $this->addOtelAttributes($params, [], $request, 'cluster.allocation_explain');
59
+		return $this->client->sendRequest($request);
60
+	}
61
+	/**
62
+	 * Deletes a component template
63
+	 *
64
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
65
+	 *
66
+	 * @param array{
67
+	 *     name: string, // (REQUIRED) The name of the template
68
+	 *     timeout: time, // Explicit operation timeout
69
+	 *     master_timeout: time, // Specify timeout for connection to master
70
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
71
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
72
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
73
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
74
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
75
+	 * } $params
76
+	 *
77
+	 * @throws MissingParameterException if a required parameter is missing
78
+	 * @throws NoNodeAvailableException if all the hosts are offline
79
+	 * @throws ClientResponseException if the status code of response is 4xx
80
+	 * @throws ServerResponseException if the status code of response is 5xx
81
+	 *
82
+	 * @return Elasticsearch|Promise
83
+	 */
84
+	public function deleteComponentTemplate(array $params = [])
85
+	{
86
+		$this->checkRequiredParameters(['name'], $params);
87
+		$url = '/_component_template/' . $this->encode($params['name']);
88
+		$method = 'DELETE';
89
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
90
+		$headers = ['Accept' => 'application/json'];
91
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
92
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'cluster.delete_component_template');
93
+		return $this->client->sendRequest($request);
94
+	}
95
+	/**
96
+	 * Clears cluster voting config exclusions.
97
+	 *
98
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html
99
+	 *
100
+	 * @param array{
101
+	 *     wait_for_removal: boolean, // Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.
102
+	 *     master_timeout: time, // Timeout for submitting request to master
103
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
104
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
105
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
106
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
107
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
108
+	 * } $params
109
+	 *
110
+	 * @throws NoNodeAvailableException if all the hosts are offline
111
+	 * @throws ClientResponseException if the status code of response is 4xx
112
+	 * @throws ServerResponseException if the status code of response is 5xx
113
+	 *
114
+	 * @return Elasticsearch|Promise
115
+	 */
116
+	public function deleteVotingConfigExclusions(array $params = [])
117
+	{
118
+		$url = '/_cluster/voting_config_exclusions';
119
+		$method = 'DELETE';
120
+		$url = $this->addQueryString($url, $params, ['wait_for_removal', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
121
+		$headers = ['Accept' => 'application/json'];
122
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
123
+		$request = $this->addOtelAttributes($params, [], $request, 'cluster.delete_voting_config_exclusions');
124
+		return $this->client->sendRequest($request);
125
+	}
126
+	/**
127
+	 * Returns information about whether a particular component template exist
128
+	 *
129
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
130
+	 *
131
+	 * @param array{
132
+	 *     name: string, // (REQUIRED) The name of the template
133
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
134
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
135
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
136
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
137
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
138
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
139
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
140
+	 * } $params
141
+	 *
142
+	 * @throws MissingParameterException if a required parameter is missing
143
+	 * @throws NoNodeAvailableException if all the hosts are offline
144
+	 * @throws ClientResponseException if the status code of response is 4xx
145
+	 * @throws ServerResponseException if the status code of response is 5xx
146
+	 *
147
+	 * @return Elasticsearch|Promise
148
+	 */
149
+	public function existsComponentTemplate(array $params = [])
150
+	{
151
+		$this->checkRequiredParameters(['name'], $params);
152
+		$url = '/_component_template/' . $this->encode($params['name']);
153
+		$method = 'HEAD';
154
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
155
+		$headers = ['Accept' => 'application/json'];
156
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
157
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'cluster.exists_component_template');
158
+		return $this->client->sendRequest($request);
159
+	}
160
+	/**
161
+	 * Returns one or more component templates
162
+	 *
163
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
164
+	 *
165
+	 * @param array{
166
+	 *     name: list, //  The comma separated names of the component templates
167
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
168
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
169
+	 *     include_defaults: boolean, // Return all default configurations for the component template (default: false)
170
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
171
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
172
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
173
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
174
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
175
+	 * } $params
176
+	 *
177
+	 * @throws NoNodeAvailableException if all the hosts are offline
178
+	 * @throws ClientResponseException if the status code of response is 4xx
179
+	 * @throws ServerResponseException if the status code of response is 5xx
180
+	 *
181
+	 * @return Elasticsearch|Promise
182
+	 */
183
+	public function getComponentTemplate(array $params = [])
184
+	{
185
+		if (isset($params['name'])) {
186
+			$url = '/_component_template/' . $this->encode($params['name']);
187
+			$method = 'GET';
188
+		} else {
189
+			$url = '/_component_template';
190
+			$method = 'GET';
191
+		}
192
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'local', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
193
+		$headers = ['Accept' => 'application/json'];
194
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
195
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'cluster.get_component_template');
196
+		return $this->client->sendRequest($request);
197
+	}
198
+	/**
199
+	 * Returns cluster settings.
200
+	 *
201
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html
202
+	 *
203
+	 * @param array{
204
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
205
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
206
+	 *     timeout: time, // Explicit operation timeout
207
+	 *     include_defaults: boolean, // Whether to return all default clusters setting.
208
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
209
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
210
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
211
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
212
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
213
+	 * } $params
214
+	 *
215
+	 * @throws NoNodeAvailableException if all the hosts are offline
216
+	 * @throws ClientResponseException if the status code of response is 4xx
217
+	 * @throws ServerResponseException if the status code of response is 5xx
218
+	 *
219
+	 * @return Elasticsearch|Promise
220
+	 */
221
+	public function getSettings(array $params = [])
222
+	{
223
+		$url = '/_cluster/settings';
224
+		$method = 'GET';
225
+		$url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'timeout', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
226
+		$headers = ['Accept' => 'application/json'];
227
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
228
+		$request = $this->addOtelAttributes($params, [], $request, 'cluster.get_settings');
229
+		return $this->client->sendRequest($request);
230
+	}
231
+	/**
232
+	 * Returns basic information about the health of the cluster.
233
+	 *
234
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html
235
+	 *
236
+	 * @param array{
237
+	 *     index: list, //  Limit the information returned to a specific index
238
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
239
+	 *     level: enum, // Specify the level of detail for returned information
240
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
241
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
242
+	 *     timeout: time, // Explicit operation timeout
243
+	 *     wait_for_active_shards: string, // Wait until the specified number of shards is active
244
+	 *     wait_for_nodes: string, // Wait until the specified number of nodes is available
245
+	 *     wait_for_events: enum, // Wait until all currently queued events with the given priority are processed
246
+	 *     wait_for_no_relocating_shards: boolean, // Whether to wait until there are no relocating shards in the cluster
247
+	 *     wait_for_no_initializing_shards: boolean, // Whether to wait until there are no initializing shards in the cluster
248
+	 *     wait_for_status: enum, // Wait until cluster is in a specific state
249
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
250
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
251
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
252
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
253
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
254
+	 * } $params
255
+	 *
256
+	 * @throws NoNodeAvailableException if all the hosts are offline
257
+	 * @throws ClientResponseException if the status code of response is 4xx
258
+	 * @throws ServerResponseException if the status code of response is 5xx
259
+	 *
260
+	 * @return Elasticsearch|Promise
261
+	 */
262
+	public function health(array $params = [])
263
+	{
264
+		if (isset($params['index'])) {
265
+			$url = '/_cluster/health/' . $this->encode($params['index']);
266
+			$method = 'GET';
267
+		} else {
268
+			$url = '/_cluster/health';
269
+			$method = 'GET';
270
+		}
271
+		$url = $this->addQueryString($url, $params, ['expand_wildcards', 'level', 'local', 'master_timeout', 'timeout', 'wait_for_active_shards', 'wait_for_nodes', 'wait_for_events', 'wait_for_no_relocating_shards', 'wait_for_no_initializing_shards', 'wait_for_status', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
272
+		$headers = ['Accept' => 'application/json'];
273
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
274
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'cluster.health');
275
+		return $this->client->sendRequest($request);
276
+	}
277
+	/**
278
+	 * Returns different information about the cluster.
279
+	 *
280
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-info.html
281
+	 *
282
+	 * @param array{
283
+	 *     target: list, // (REQUIRED) Limit the information returned to the specified target.
284
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
285
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
286
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
287
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
288
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
289
+	 * } $params
290
+	 *
291
+	 * @throws MissingParameterException if a required parameter is missing
292
+	 * @throws NoNodeAvailableException if all the hosts are offline
293
+	 * @throws ClientResponseException if the status code of response is 4xx
294
+	 * @throws ServerResponseException if the status code of response is 5xx
295
+	 *
296
+	 * @return Elasticsearch|Promise
297
+	 */
298
+	public function info(array $params = [])
299
+	{
300
+		$this->checkRequiredParameters(['target'], $params);
301
+		$url = '/_info/' . $this->encode($params['target']);
302
+		$method = 'GET';
303
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
304
+		$headers = ['Accept' => 'application/json'];
305
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
306
+		$request = $this->addOtelAttributes($params, ['target'], $request, 'cluster.info');
307
+		return $this->client->sendRequest($request);
308
+	}
309
+	/**
310
+	 * Returns a list of any cluster-level changes (e.g. create index, update mapping,
311
+	 * allocate or fail shard) which have not yet been executed.
312
+	 *
313
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html
314
+	 *
315
+	 * @param array{
316
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
317
+	 *     master_timeout: time, // Specify timeout for connection to master
318
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
319
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
320
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
321
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
322
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
323
+	 * } $params
324
+	 *
325
+	 * @throws NoNodeAvailableException if all the hosts are offline
326
+	 * @throws ClientResponseException if the status code of response is 4xx
327
+	 * @throws ServerResponseException if the status code of response is 5xx
328
+	 *
329
+	 * @return Elasticsearch|Promise
330
+	 */
331
+	public function pendingTasks(array $params = [])
332
+	{
333
+		$url = '/_cluster/pending_tasks';
334
+		$method = 'GET';
335
+		$url = $this->addQueryString($url, $params, ['local', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
336
+		$headers = ['Accept' => 'application/json'];
337
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
338
+		$request = $this->addOtelAttributes($params, [], $request, 'cluster.pending_tasks');
339
+		return $this->client->sendRequest($request);
340
+	}
341
+	/**
342
+	 * Updates the cluster voting config exclusions by node ids or node names.
343
+	 *
344
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/voting-config-exclusions.html
345
+	 *
346
+	 * @param array{
347
+	 *     node_ids: string, // A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_names.
348
+	 *     node_names: string, // A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_ids.
349
+	 *     timeout: time, // Explicit operation timeout
350
+	 *     master_timeout: time, // Timeout for submitting request to master
351
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
352
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
353
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
354
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
355
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
356
+	 * } $params
357
+	 *
358
+	 * @throws NoNodeAvailableException if all the hosts are offline
359
+	 * @throws ClientResponseException if the status code of response is 4xx
360
+	 * @throws ServerResponseException if the status code of response is 5xx
361
+	 *
362
+	 * @return Elasticsearch|Promise
363
+	 */
364
+	public function postVotingConfigExclusions(array $params = [])
365
+	{
366
+		$url = '/_cluster/voting_config_exclusions';
367
+		$method = 'POST';
368
+		$url = $this->addQueryString($url, $params, ['node_ids', 'node_names', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
369
+		$headers = ['Accept' => 'application/json'];
370
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
371
+		$request = $this->addOtelAttributes($params, [], $request, 'cluster.post_voting_config_exclusions');
372
+		return $this->client->sendRequest($request);
373
+	}
374
+	/**
375
+	 * Creates or updates a component template
376
+	 *
377
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html
378
+	 *
379
+	 * @param array{
380
+	 *     name: string, // (REQUIRED) The name of the template
381
+	 *     create: boolean, // Whether the index template should only be added if new or can also replace an existing one
382
+	 *     timeout: time, // Explicit operation timeout
383
+	 *     master_timeout: time, // Specify timeout for connection to master
384
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
385
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
386
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
387
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
388
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
389
+	 *     body: array, // (REQUIRED) The template definition
390
+	 * } $params
391
+	 *
392
+	 * @throws MissingParameterException if a required parameter is missing
393
+	 * @throws NoNodeAvailableException if all the hosts are offline
394
+	 * @throws ClientResponseException if the status code of response is 4xx
395
+	 * @throws ServerResponseException if the status code of response is 5xx
396
+	 *
397
+	 * @return Elasticsearch|Promise
398
+	 */
399
+	public function putComponentTemplate(array $params = [])
400
+	{
401
+		$this->checkRequiredParameters(['name', 'body'], $params);
402
+		$url = '/_component_template/' . $this->encode($params['name']);
403
+		$method = 'PUT';
404
+		$url = $this->addQueryString($url, $params, ['create', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
405
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
406
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
407
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'cluster.put_component_template');
408
+		return $this->client->sendRequest($request);
409
+	}
410
+	/**
411
+	 * Updates the cluster settings.
412
+	 *
413
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html
414
+	 *
415
+	 * @param array{
416
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
417
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
418
+	 *     timeout: time, // Explicit operation timeout
419
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
420
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
421
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
422
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
423
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
424
+	 *     body: array, // (REQUIRED) The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).
425
+	 * } $params
426
+	 *
427
+	 * @throws NoNodeAvailableException if all the hosts are offline
428
+	 * @throws ClientResponseException if the status code of response is 4xx
429
+	 * @throws ServerResponseException if the status code of response is 5xx
430
+	 *
431
+	 * @return Elasticsearch|Promise
432
+	 */
433
+	public function putSettings(array $params = [])
434
+	{
435
+		$this->checkRequiredParameters(['body'], $params);
436
+		$url = '/_cluster/settings';
437
+		$method = 'PUT';
438
+		$url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
439
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
440
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
441
+		$request = $this->addOtelAttributes($params, [], $request, 'cluster.put_settings');
442
+		return $this->client->sendRequest($request);
443
+	}
444
+	/**
445
+	 * Returns the information about configured remote clusters.
446
+	 *
447
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html
448
+	 *
449
+	 * @param array{
450
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
451
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
452
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
453
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
454
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
455
+	 * } $params
456
+	 *
457
+	 * @throws NoNodeAvailableException if all the hosts are offline
458
+	 * @throws ClientResponseException if the status code of response is 4xx
459
+	 * @throws ServerResponseException if the status code of response is 5xx
460
+	 *
461
+	 * @return Elasticsearch|Promise
462
+	 */
463
+	public function remoteInfo(array $params = [])
464
+	{
465
+		$url = '/_remote/info';
466
+		$method = 'GET';
467
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
468
+		$headers = ['Accept' => 'application/json'];
469
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
470
+		$request = $this->addOtelAttributes($params, [], $request, 'cluster.remote_info');
471
+		return $this->client->sendRequest($request);
472
+	}
473
+	/**
474
+	 * Allows to manually change the allocation of individual shards in the cluster.
475
+	 *
476
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html
477
+	 *
478
+	 * @param array{
479
+	 *     dry_run: boolean, // Simulate the operation only and return the resulting state
480
+	 *     explain: boolean, // Return an explanation of why the commands can or cannot be executed
481
+	 *     retry_failed: boolean, // Retries allocation of shards that are blocked due to too many subsequent allocation failures
482
+	 *     metric: list, // Limit the information returned to the specified metrics. Defaults to all but metadata
483
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
484
+	 *     timeout: time, // Explicit operation timeout
485
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
486
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
487
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
488
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
489
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
490
+	 *     body: array, //  The definition of `commands` to perform (`move`, `cancel`, `allocate`)
491
+	 * } $params
492
+	 *
493
+	 * @throws NoNodeAvailableException if all the hosts are offline
494
+	 * @throws ClientResponseException if the status code of response is 4xx
495
+	 * @throws ServerResponseException if the status code of response is 5xx
496
+	 *
497
+	 * @return Elasticsearch|Promise
498
+	 */
499
+	public function reroute(array $params = [])
500
+	{
501
+		$url = '/_cluster/reroute';
502
+		$method = 'POST';
503
+		$url = $this->addQueryString($url, $params, ['dry_run', 'explain', 'retry_failed', 'metric', 'master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
504
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
505
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
506
+		$request = $this->addOtelAttributes($params, [], $request, 'cluster.reroute');
507
+		return $this->client->sendRequest($request);
508
+	}
509
+	/**
510
+	 * Returns a comprehensive information about the state of the cluster.
511
+	 *
512
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html
513
+	 *
514
+	 * @param array{
515
+	 *     metric: list, //  Limit the information returned to the specified metrics
516
+	 *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
517
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
518
+	 *     master_timeout: time, // Specify timeout for connection to master
519
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
520
+	 *     wait_for_metadata_version: number, // Wait for the metadata version to be equal or greater than the specified metadata version
521
+	 *     wait_for_timeout: time, // The maximum time to wait for wait_for_metadata_version before timing out
522
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
523
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
524
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
525
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
526
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
527
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
528
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
529
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
530
+	 * } $params
531
+	 *
532
+	 * @throws NoNodeAvailableException if all the hosts are offline
533
+	 * @throws ClientResponseException if the status code of response is 4xx
534
+	 * @throws ServerResponseException if the status code of response is 5xx
535
+	 *
536
+	 * @return Elasticsearch|Promise
537
+	 */
538
+	public function state(array $params = [])
539
+	{
540
+		if (isset($params['index']) && isset($params['metric'])) {
541
+			$url = '/_cluster/state/' . $this->encode($params['metric']) . '/' . $this->encode($params['index']);
542
+			$method = 'GET';
543
+		} elseif (isset($params['metric'])) {
544
+			$url = '/_cluster/state/' . $this->encode($params['metric']);
545
+			$method = 'GET';
546
+		} else {
547
+			$url = '/_cluster/state';
548
+			$method = 'GET';
549
+		}
550
+		$url = $this->addQueryString($url, $params, ['local', 'master_timeout', 'flat_settings', 'wait_for_metadata_version', 'wait_for_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
551
+		$headers = ['Accept' => 'application/json'];
552
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
553
+		$request = $this->addOtelAttributes($params, ['metric', 'index'], $request, 'cluster.state');
554
+		return $this->client->sendRequest($request);
555
+	}
556
+	/**
557
+	 * Returns high-level overview of cluster statistics.
558
+	 *
559
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html
560
+	 *
561
+	 * @param array{
562
+	 *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
563
+	 *     include_remotes: boolean, // Include remote cluster data into the response (default: false)
564
+	 *     timeout: time, // Explicit operation timeout
565
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
566
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
567
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
568
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
569
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
570
+	 * } $params
571
+	 *
572
+	 * @throws NoNodeAvailableException if all the hosts are offline
573
+	 * @throws ClientResponseException if the status code of response is 4xx
574
+	 * @throws ServerResponseException if the status code of response is 5xx
575
+	 *
576
+	 * @return Elasticsearch|Promise
577
+	 */
578
+	public function stats(array $params = [])
579
+	{
580
+		if (isset($params['node_id'])) {
581
+			$url = '/_cluster/stats/nodes/' . $this->encode($params['node_id']);
582
+			$method = 'GET';
583
+		} else {
584
+			$url = '/_cluster/stats';
585
+			$method = 'GET';
586
+		}
587
+		$url = $this->addQueryString($url, $params, ['include_remotes', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
588
+		$headers = ['Accept' => 'application/json'];
589
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
590
+		$request = $this->addOtelAttributes($params, ['node_id'], $request, 'cluster.stats');
591
+		return $this->client->sendRequest($request);
592
+	}
593 593
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Ilm.php 3 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function deleteLifecycle(array $params = [])
50 50
     {
51 51
         $this->checkRequiredParameters(['policy'], $params);
52
-        $url = '/_ilm/policy/' . $this->encode($params['policy']);
52
+        $url = '/_ilm/policy/'.$this->encode($params['policy']);
53 53
         $method = 'DELETE';
54 54
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55 55
         $headers = ['Accept' => 'application/json'];
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public function explainLifecycle(array $params = [])
82 82
     {
83 83
         $this->checkRequiredParameters(['index'], $params);
84
-        $url = '/' . $this->encode($params['index']) . '/_ilm/explain';
84
+        $url = '/'.$this->encode($params['index']).'/_ilm/explain';
85 85
         $method = 'GET';
86 86
         $url = $this->addQueryString($url, $params, ['only_managed', 'only_errors', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
87 87
         $headers = ['Accept' => 'application/json'];
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public function getLifecycle(array $params = [])
111 111
     {
112 112
         if (isset($params['policy'])) {
113
-            $url = '/_ilm/policy/' . $this->encode($params['policy']);
113
+            $url = '/_ilm/policy/'.$this->encode($params['policy']);
114 114
             $method = 'GET';
115 115
         } else {
116 116
             $url = '/_ilm/policy';
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     public function moveToStep(array $params = [])
202 202
     {
203 203
         $this->checkRequiredParameters(['index'], $params);
204
-        $url = '/_ilm/move/' . $this->encode($params['index']);
204
+        $url = '/_ilm/move/'.$this->encode($params['index']);
205 205
         $method = 'POST';
206 206
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
207 207
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
     public function putLifecycle(array $params = [])
233 233
     {
234 234
         $this->checkRequiredParameters(['policy'], $params);
235
-        $url = '/_ilm/policy/' . $this->encode($params['policy']);
235
+        $url = '/_ilm/policy/'.$this->encode($params['policy']);
236 236
         $method = 'PUT';
237 237
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
238 238
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     public function removePolicy(array $params = [])
263 263
     {
264 264
         $this->checkRequiredParameters(['index'], $params);
265
-        $url = '/' . $this->encode($params['index']) . '/_ilm/remove';
265
+        $url = '/'.$this->encode($params['index']).'/_ilm/remove';
266 266
         $method = 'POST';
267 267
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
268 268
         $headers = ['Accept' => 'application/json'];
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     public function retry(array $params = [])
293 293
     {
294 294
         $this->checkRequiredParameters(['index'], $params);
295
-        $url = '/' . $this->encode($params['index']) . '/_ilm/retry';
295
+        $url = '/'.$this->encode($params['index']).'/_ilm/retry';
296 296
         $method = 'POST';
297 297
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
298 298
         $headers = ['Accept' => 'application/json'];
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Ilm extends AbstractEndpoint
27
-{
26
+class Ilm extends AbstractEndpoint {
28 27
     /**
29 28
      * Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +349 added lines, -349 removed lines patch added patch discarded remove patch
@@ -25,353 +25,353 @@
 block discarded – undo
25 25
  */
26 26
 class Ilm extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html
32
-     *
33
-     * @param array{
34
-     *     policy: string, // (REQUIRED) The name of the index lifecycle policy
35
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
-     * } $params
41
-     *
42
-     * @throws MissingParameterException if a required parameter is missing
43
-     * @throws NoNodeAvailableException if all the hosts are offline
44
-     * @throws ClientResponseException if the status code of response is 4xx
45
-     * @throws ServerResponseException if the status code of response is 5xx
46
-     *
47
-     * @return Elasticsearch|Promise
48
-     */
49
-    public function deleteLifecycle(array $params = [])
50
-    {
51
-        $this->checkRequiredParameters(['policy'], $params);
52
-        $url = '/_ilm/policy/' . $this->encode($params['policy']);
53
-        $method = 'DELETE';
54
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55
-        $headers = ['Accept' => 'application/json'];
56
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
57
-        $request = $this->addOtelAttributes($params, ['policy'], $request, 'ilm.delete_lifecycle');
58
-        return $this->client->sendRequest($request);
59
-    }
60
-    /**
61
-     * Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step.
62
-     *
63
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html
64
-     *
65
-     * @param array{
66
-     *     index: string, // (REQUIRED) The name of the index to explain
67
-     *     only_managed: boolean, // filters the indices included in the response to ones managed by ILM
68
-     *     only_errors: boolean, // filters the indices included in the response to ones in an ILM error state, implies only_managed
69
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
70
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
71
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
72
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
73
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
74
-     * } $params
75
-     *
76
-     * @throws MissingParameterException if a required parameter is missing
77
-     * @throws NoNodeAvailableException if all the hosts are offline
78
-     * @throws ClientResponseException if the status code of response is 4xx
79
-     * @throws ServerResponseException if the status code of response is 5xx
80
-     *
81
-     * @return Elasticsearch|Promise
82
-     */
83
-    public function explainLifecycle(array $params = [])
84
-    {
85
-        $this->checkRequiredParameters(['index'], $params);
86
-        $url = '/' . $this->encode($params['index']) . '/_ilm/explain';
87
-        $method = 'GET';
88
-        $url = $this->addQueryString($url, $params, ['only_managed', 'only_errors', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
89
-        $headers = ['Accept' => 'application/json'];
90
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
91
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'ilm.explain_lifecycle');
92
-        return $this->client->sendRequest($request);
93
-    }
94
-    /**
95
-     * Returns the specified policy definition. Includes the policy version and last modified date.
96
-     *
97
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html
98
-     *
99
-     * @param array{
100
-     *     policy: string, //  The name of the index lifecycle policy
101
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
102
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
103
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
104
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
105
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
106
-     * } $params
107
-     *
108
-     * @throws NoNodeAvailableException if all the hosts are offline
109
-     * @throws ClientResponseException if the status code of response is 4xx
110
-     * @throws ServerResponseException if the status code of response is 5xx
111
-     *
112
-     * @return Elasticsearch|Promise
113
-     */
114
-    public function getLifecycle(array $params = [])
115
-    {
116
-        if (isset($params['policy'])) {
117
-            $url = '/_ilm/policy/' . $this->encode($params['policy']);
118
-            $method = 'GET';
119
-        } else {
120
-            $url = '/_ilm/policy';
121
-            $method = 'GET';
122
-        }
123
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
124
-        $headers = ['Accept' => 'application/json'];
125
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
126
-        $request = $this->addOtelAttributes($params, ['policy'], $request, 'ilm.get_lifecycle');
127
-        return $this->client->sendRequest($request);
128
-    }
129
-    /**
130
-     * Retrieves the current index lifecycle management (ILM) status.
131
-     *
132
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html
133
-     *
134
-     * @param array{
135
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
136
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
137
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
138
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
139
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
140
-     * } $params
141
-     *
142
-     * @throws NoNodeAvailableException if all the hosts are offline
143
-     * @throws ClientResponseException if the status code of response is 4xx
144
-     * @throws ServerResponseException if the status code of response is 5xx
145
-     *
146
-     * @return Elasticsearch|Promise
147
-     */
148
-    public function getStatus(array $params = [])
149
-    {
150
-        $url = '/_ilm/status';
151
-        $method = 'GET';
152
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
153
-        $headers = ['Accept' => 'application/json'];
154
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
155
-        $request = $this->addOtelAttributes($params, [], $request, 'ilm.get_status');
156
-        return $this->client->sendRequest($request);
157
-    }
158
-    /**
159
-     * Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing
160
-     *
161
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html
162
-     *
163
-     * @param array{
164
-     *     dry_run: boolean, // If set to true it will simulate the migration, providing a way to retrieve the ILM policies and indices that need to be migrated. The default is false
165
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
166
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
167
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
168
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
169
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
170
-     *     body: array, //  Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data")
171
-     * } $params
172
-     *
173
-     * @throws NoNodeAvailableException if all the hosts are offline
174
-     * @throws ClientResponseException if the status code of response is 4xx
175
-     * @throws ServerResponseException if the status code of response is 5xx
176
-     *
177
-     * @return Elasticsearch|Promise
178
-     */
179
-    public function migrateToDataTiers(array $params = [])
180
-    {
181
-        $url = '/_ilm/migrate_to_data_tiers';
182
-        $method = 'POST';
183
-        $url = $this->addQueryString($url, $params, ['dry_run', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
184
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
185
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
186
-        $request = $this->addOtelAttributes($params, [], $request, 'ilm.migrate_to_data_tiers');
187
-        return $this->client->sendRequest($request);
188
-    }
189
-    /**
190
-     * Manually moves an index into the specified step and executes that step.
191
-     *
192
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html
193
-     *
194
-     * @param array{
195
-     *     index: string, // (REQUIRED) The name of the index whose lifecycle step is to change
196
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
197
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
198
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
199
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
200
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
201
-     *     body: array, //  The new lifecycle step to move to
202
-     * } $params
203
-     *
204
-     * @throws MissingParameterException if a required parameter is missing
205
-     * @throws NoNodeAvailableException if all the hosts are offline
206
-     * @throws ClientResponseException if the status code of response is 4xx
207
-     * @throws ServerResponseException if the status code of response is 5xx
208
-     *
209
-     * @return Elasticsearch|Promise
210
-     */
211
-    public function moveToStep(array $params = [])
212
-    {
213
-        $this->checkRequiredParameters(['index'], $params);
214
-        $url = '/_ilm/move/' . $this->encode($params['index']);
215
-        $method = 'POST';
216
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
217
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
218
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
219
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'ilm.move_to_step');
220
-        return $this->client->sendRequest($request);
221
-    }
222
-    /**
223
-     * Creates a lifecycle policy
224
-     *
225
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html
226
-     *
227
-     * @param array{
228
-     *     policy: string, // (REQUIRED) The name of the index lifecycle policy
229
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
230
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
231
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
232
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
233
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
234
-     *     body: array, //  The lifecycle policy definition to register
235
-     * } $params
236
-     *
237
-     * @throws MissingParameterException if a required parameter is missing
238
-     * @throws NoNodeAvailableException if all the hosts are offline
239
-     * @throws ClientResponseException if the status code of response is 4xx
240
-     * @throws ServerResponseException if the status code of response is 5xx
241
-     *
242
-     * @return Elasticsearch|Promise
243
-     */
244
-    public function putLifecycle(array $params = [])
245
-    {
246
-        $this->checkRequiredParameters(['policy'], $params);
247
-        $url = '/_ilm/policy/' . $this->encode($params['policy']);
248
-        $method = 'PUT';
249
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
250
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
251
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
252
-        $request = $this->addOtelAttributes($params, ['policy'], $request, 'ilm.put_lifecycle');
253
-        return $this->client->sendRequest($request);
254
-    }
255
-    /**
256
-     * Removes the assigned lifecycle policy and stops managing the specified index
257
-     *
258
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html
259
-     *
260
-     * @param array{
261
-     *     index: string, // (REQUIRED) The name of the index to remove policy on
262
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
263
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
264
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
265
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
266
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
267
-     * } $params
268
-     *
269
-     * @throws MissingParameterException if a required parameter is missing
270
-     * @throws NoNodeAvailableException if all the hosts are offline
271
-     * @throws ClientResponseException if the status code of response is 4xx
272
-     * @throws ServerResponseException if the status code of response is 5xx
273
-     *
274
-     * @return Elasticsearch|Promise
275
-     */
276
-    public function removePolicy(array $params = [])
277
-    {
278
-        $this->checkRequiredParameters(['index'], $params);
279
-        $url = '/' . $this->encode($params['index']) . '/_ilm/remove';
280
-        $method = 'POST';
281
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
282
-        $headers = ['Accept' => 'application/json'];
283
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
284
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'ilm.remove_policy');
285
-        return $this->client->sendRequest($request);
286
-    }
287
-    /**
288
-     * Retries executing the policy for an index that is in the ERROR step.
289
-     *
290
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html
291
-     *
292
-     * @param array{
293
-     *     index: string, // (REQUIRED) The name of the indices (comma-separated) whose failed lifecycle step is to be retry
294
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
295
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
296
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
297
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
298
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
299
-     * } $params
300
-     *
301
-     * @throws MissingParameterException if a required parameter is missing
302
-     * @throws NoNodeAvailableException if all the hosts are offline
303
-     * @throws ClientResponseException if the status code of response is 4xx
304
-     * @throws ServerResponseException if the status code of response is 5xx
305
-     *
306
-     * @return Elasticsearch|Promise
307
-     */
308
-    public function retry(array $params = [])
309
-    {
310
-        $this->checkRequiredParameters(['index'], $params);
311
-        $url = '/' . $this->encode($params['index']) . '/_ilm/retry';
312
-        $method = 'POST';
313
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
314
-        $headers = ['Accept' => 'application/json'];
315
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
316
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'ilm.retry');
317
-        return $this->client->sendRequest($request);
318
-    }
319
-    /**
320
-     * Start the index lifecycle management (ILM) plugin.
321
-     *
322
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html
323
-     *
324
-     * @param array{
325
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
326
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
327
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
328
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
329
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
330
-     * } $params
331
-     *
332
-     * @throws NoNodeAvailableException if all the hosts are offline
333
-     * @throws ClientResponseException if the status code of response is 4xx
334
-     * @throws ServerResponseException if the status code of response is 5xx
335
-     *
336
-     * @return Elasticsearch|Promise
337
-     */
338
-    public function start(array $params = [])
339
-    {
340
-        $url = '/_ilm/start';
341
-        $method = 'POST';
342
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
343
-        $headers = ['Accept' => 'application/json'];
344
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
345
-        $request = $this->addOtelAttributes($params, [], $request, 'ilm.start');
346
-        return $this->client->sendRequest($request);
347
-    }
348
-    /**
349
-     * Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin
350
-     *
351
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html
352
-     *
353
-     * @param array{
354
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
355
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
356
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
357
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
358
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
359
-     * } $params
360
-     *
361
-     * @throws NoNodeAvailableException if all the hosts are offline
362
-     * @throws ClientResponseException if the status code of response is 4xx
363
-     * @throws ServerResponseException if the status code of response is 5xx
364
-     *
365
-     * @return Elasticsearch|Promise
366
-     */
367
-    public function stop(array $params = [])
368
-    {
369
-        $url = '/_ilm/stop';
370
-        $method = 'POST';
371
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
372
-        $headers = ['Accept' => 'application/json'];
373
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
374
-        $request = $this->addOtelAttributes($params, [], $request, 'ilm.stop');
375
-        return $this->client->sendRequest($request);
376
-    }
28
+	/**
29
+	 * Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html
32
+	 *
33
+	 * @param array{
34
+	 *     policy: string, // (REQUIRED) The name of the index lifecycle policy
35
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
+	 * } $params
41
+	 *
42
+	 * @throws MissingParameterException if a required parameter is missing
43
+	 * @throws NoNodeAvailableException if all the hosts are offline
44
+	 * @throws ClientResponseException if the status code of response is 4xx
45
+	 * @throws ServerResponseException if the status code of response is 5xx
46
+	 *
47
+	 * @return Elasticsearch|Promise
48
+	 */
49
+	public function deleteLifecycle(array $params = [])
50
+	{
51
+		$this->checkRequiredParameters(['policy'], $params);
52
+		$url = '/_ilm/policy/' . $this->encode($params['policy']);
53
+		$method = 'DELETE';
54
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55
+		$headers = ['Accept' => 'application/json'];
56
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
57
+		$request = $this->addOtelAttributes($params, ['policy'], $request, 'ilm.delete_lifecycle');
58
+		return $this->client->sendRequest($request);
59
+	}
60
+	/**
61
+	 * Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step.
62
+	 *
63
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html
64
+	 *
65
+	 * @param array{
66
+	 *     index: string, // (REQUIRED) The name of the index to explain
67
+	 *     only_managed: boolean, // filters the indices included in the response to ones managed by ILM
68
+	 *     only_errors: boolean, // filters the indices included in the response to ones in an ILM error state, implies only_managed
69
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
70
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
71
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
72
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
73
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
74
+	 * } $params
75
+	 *
76
+	 * @throws MissingParameterException if a required parameter is missing
77
+	 * @throws NoNodeAvailableException if all the hosts are offline
78
+	 * @throws ClientResponseException if the status code of response is 4xx
79
+	 * @throws ServerResponseException if the status code of response is 5xx
80
+	 *
81
+	 * @return Elasticsearch|Promise
82
+	 */
83
+	public function explainLifecycle(array $params = [])
84
+	{
85
+		$this->checkRequiredParameters(['index'], $params);
86
+		$url = '/' . $this->encode($params['index']) . '/_ilm/explain';
87
+		$method = 'GET';
88
+		$url = $this->addQueryString($url, $params, ['only_managed', 'only_errors', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
89
+		$headers = ['Accept' => 'application/json'];
90
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
91
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'ilm.explain_lifecycle');
92
+		return $this->client->sendRequest($request);
93
+	}
94
+	/**
95
+	 * Returns the specified policy definition. Includes the policy version and last modified date.
96
+	 *
97
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html
98
+	 *
99
+	 * @param array{
100
+	 *     policy: string, //  The name of the index lifecycle policy
101
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
102
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
103
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
104
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
105
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
106
+	 * } $params
107
+	 *
108
+	 * @throws NoNodeAvailableException if all the hosts are offline
109
+	 * @throws ClientResponseException if the status code of response is 4xx
110
+	 * @throws ServerResponseException if the status code of response is 5xx
111
+	 *
112
+	 * @return Elasticsearch|Promise
113
+	 */
114
+	public function getLifecycle(array $params = [])
115
+	{
116
+		if (isset($params['policy'])) {
117
+			$url = '/_ilm/policy/' . $this->encode($params['policy']);
118
+			$method = 'GET';
119
+		} else {
120
+			$url = '/_ilm/policy';
121
+			$method = 'GET';
122
+		}
123
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
124
+		$headers = ['Accept' => 'application/json'];
125
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
126
+		$request = $this->addOtelAttributes($params, ['policy'], $request, 'ilm.get_lifecycle');
127
+		return $this->client->sendRequest($request);
128
+	}
129
+	/**
130
+	 * Retrieves the current index lifecycle management (ILM) status.
131
+	 *
132
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html
133
+	 *
134
+	 * @param array{
135
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
136
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
137
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
138
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
139
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
140
+	 * } $params
141
+	 *
142
+	 * @throws NoNodeAvailableException if all the hosts are offline
143
+	 * @throws ClientResponseException if the status code of response is 4xx
144
+	 * @throws ServerResponseException if the status code of response is 5xx
145
+	 *
146
+	 * @return Elasticsearch|Promise
147
+	 */
148
+	public function getStatus(array $params = [])
149
+	{
150
+		$url = '/_ilm/status';
151
+		$method = 'GET';
152
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
153
+		$headers = ['Accept' => 'application/json'];
154
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
155
+		$request = $this->addOtelAttributes($params, [], $request, 'ilm.get_status');
156
+		return $this->client->sendRequest($request);
157
+	}
158
+	/**
159
+	 * Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing
160
+	 *
161
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html
162
+	 *
163
+	 * @param array{
164
+	 *     dry_run: boolean, // If set to true it will simulate the migration, providing a way to retrieve the ILM policies and indices that need to be migrated. The default is false
165
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
166
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
167
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
168
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
169
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
170
+	 *     body: array, //  Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data")
171
+	 * } $params
172
+	 *
173
+	 * @throws NoNodeAvailableException if all the hosts are offline
174
+	 * @throws ClientResponseException if the status code of response is 4xx
175
+	 * @throws ServerResponseException if the status code of response is 5xx
176
+	 *
177
+	 * @return Elasticsearch|Promise
178
+	 */
179
+	public function migrateToDataTiers(array $params = [])
180
+	{
181
+		$url = '/_ilm/migrate_to_data_tiers';
182
+		$method = 'POST';
183
+		$url = $this->addQueryString($url, $params, ['dry_run', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
184
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
185
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
186
+		$request = $this->addOtelAttributes($params, [], $request, 'ilm.migrate_to_data_tiers');
187
+		return $this->client->sendRequest($request);
188
+	}
189
+	/**
190
+	 * Manually moves an index into the specified step and executes that step.
191
+	 *
192
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html
193
+	 *
194
+	 * @param array{
195
+	 *     index: string, // (REQUIRED) The name of the index whose lifecycle step is to change
196
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
197
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
198
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
199
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
200
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
201
+	 *     body: array, //  The new lifecycle step to move to
202
+	 * } $params
203
+	 *
204
+	 * @throws MissingParameterException if a required parameter is missing
205
+	 * @throws NoNodeAvailableException if all the hosts are offline
206
+	 * @throws ClientResponseException if the status code of response is 4xx
207
+	 * @throws ServerResponseException if the status code of response is 5xx
208
+	 *
209
+	 * @return Elasticsearch|Promise
210
+	 */
211
+	public function moveToStep(array $params = [])
212
+	{
213
+		$this->checkRequiredParameters(['index'], $params);
214
+		$url = '/_ilm/move/' . $this->encode($params['index']);
215
+		$method = 'POST';
216
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
217
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
218
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
219
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'ilm.move_to_step');
220
+		return $this->client->sendRequest($request);
221
+	}
222
+	/**
223
+	 * Creates a lifecycle policy
224
+	 *
225
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html
226
+	 *
227
+	 * @param array{
228
+	 *     policy: string, // (REQUIRED) The name of the index lifecycle policy
229
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
230
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
231
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
232
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
233
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
234
+	 *     body: array, //  The lifecycle policy definition to register
235
+	 * } $params
236
+	 *
237
+	 * @throws MissingParameterException if a required parameter is missing
238
+	 * @throws NoNodeAvailableException if all the hosts are offline
239
+	 * @throws ClientResponseException if the status code of response is 4xx
240
+	 * @throws ServerResponseException if the status code of response is 5xx
241
+	 *
242
+	 * @return Elasticsearch|Promise
243
+	 */
244
+	public function putLifecycle(array $params = [])
245
+	{
246
+		$this->checkRequiredParameters(['policy'], $params);
247
+		$url = '/_ilm/policy/' . $this->encode($params['policy']);
248
+		$method = 'PUT';
249
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
250
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
251
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
252
+		$request = $this->addOtelAttributes($params, ['policy'], $request, 'ilm.put_lifecycle');
253
+		return $this->client->sendRequest($request);
254
+	}
255
+	/**
256
+	 * Removes the assigned lifecycle policy and stops managing the specified index
257
+	 *
258
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html
259
+	 *
260
+	 * @param array{
261
+	 *     index: string, // (REQUIRED) The name of the index to remove policy on
262
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
263
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
264
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
265
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
266
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
267
+	 * } $params
268
+	 *
269
+	 * @throws MissingParameterException if a required parameter is missing
270
+	 * @throws NoNodeAvailableException if all the hosts are offline
271
+	 * @throws ClientResponseException if the status code of response is 4xx
272
+	 * @throws ServerResponseException if the status code of response is 5xx
273
+	 *
274
+	 * @return Elasticsearch|Promise
275
+	 */
276
+	public function removePolicy(array $params = [])
277
+	{
278
+		$this->checkRequiredParameters(['index'], $params);
279
+		$url = '/' . $this->encode($params['index']) . '/_ilm/remove';
280
+		$method = 'POST';
281
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
282
+		$headers = ['Accept' => 'application/json'];
283
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
284
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'ilm.remove_policy');
285
+		return $this->client->sendRequest($request);
286
+	}
287
+	/**
288
+	 * Retries executing the policy for an index that is in the ERROR step.
289
+	 *
290
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html
291
+	 *
292
+	 * @param array{
293
+	 *     index: string, // (REQUIRED) The name of the indices (comma-separated) whose failed lifecycle step is to be retry
294
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
295
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
296
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
297
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
298
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
299
+	 * } $params
300
+	 *
301
+	 * @throws MissingParameterException if a required parameter is missing
302
+	 * @throws NoNodeAvailableException if all the hosts are offline
303
+	 * @throws ClientResponseException if the status code of response is 4xx
304
+	 * @throws ServerResponseException if the status code of response is 5xx
305
+	 *
306
+	 * @return Elasticsearch|Promise
307
+	 */
308
+	public function retry(array $params = [])
309
+	{
310
+		$this->checkRequiredParameters(['index'], $params);
311
+		$url = '/' . $this->encode($params['index']) . '/_ilm/retry';
312
+		$method = 'POST';
313
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
314
+		$headers = ['Accept' => 'application/json'];
315
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
316
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'ilm.retry');
317
+		return $this->client->sendRequest($request);
318
+	}
319
+	/**
320
+	 * Start the index lifecycle management (ILM) plugin.
321
+	 *
322
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html
323
+	 *
324
+	 * @param array{
325
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
326
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
327
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
328
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
329
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
330
+	 * } $params
331
+	 *
332
+	 * @throws NoNodeAvailableException if all the hosts are offline
333
+	 * @throws ClientResponseException if the status code of response is 4xx
334
+	 * @throws ServerResponseException if the status code of response is 5xx
335
+	 *
336
+	 * @return Elasticsearch|Promise
337
+	 */
338
+	public function start(array $params = [])
339
+	{
340
+		$url = '/_ilm/start';
341
+		$method = 'POST';
342
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
343
+		$headers = ['Accept' => 'application/json'];
344
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
345
+		$request = $this->addOtelAttributes($params, [], $request, 'ilm.start');
346
+		return $this->client->sendRequest($request);
347
+	}
348
+	/**
349
+	 * Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin
350
+	 *
351
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html
352
+	 *
353
+	 * @param array{
354
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
355
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
356
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
357
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
358
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
359
+	 * } $params
360
+	 *
361
+	 * @throws NoNodeAvailableException if all the hosts are offline
362
+	 * @throws ClientResponseException if the status code of response is 4xx
363
+	 * @throws ServerResponseException if the status code of response is 5xx
364
+	 *
365
+	 * @return Elasticsearch|Promise
366
+	 */
367
+	public function stop(array $params = [])
368
+	{
369
+		$url = '/_ilm/stop';
370
+		$method = 'POST';
371
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
372
+		$headers = ['Accept' => 'application/json'];
373
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
374
+		$request = $this->addOtelAttributes($params, [], $request, 'ilm.stop');
375
+		return $this->client->sendRequest($request);
376
+	}
377 377
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Migration.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     public function deprecations(array $params = [])
49 49
     {
50 50
         if (isset($params['index'])) {
51
-            $url = '/' . $this->encode($params['index']) . '/_migration/deprecations';
51
+            $url = '/'.$this->encode($params['index']).'/_migration/deprecations';
52 52
             $method = 'GET';
53 53
         } else {
54 54
             $url = '/_migration/deprecations';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Migration extends AbstractEndpoint
27
-{
26
+class Migration extends AbstractEndpoint {
28 27
     /**
29 28
      * Retrieves information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -25,97 +25,97 @@
 block discarded – undo
25 25
  */
26 26
 class Migration extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Retrieves information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html
32
-     *
33
-     * @param array{
34
-     *     index: string, //  Index pattern
35
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
-     * } $params
41
-     *
42
-     * @throws NoNodeAvailableException if all the hosts are offline
43
-     * @throws ClientResponseException if the status code of response is 4xx
44
-     * @throws ServerResponseException if the status code of response is 5xx
45
-     *
46
-     * @return Elasticsearch|Promise
47
-     */
48
-    public function deprecations(array $params = [])
49
-    {
50
-        if (isset($params['index'])) {
51
-            $url = '/' . $this->encode($params['index']) . '/_migration/deprecations';
52
-            $method = 'GET';
53
-        } else {
54
-            $url = '/_migration/deprecations';
55
-            $method = 'GET';
56
-        }
57
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
58
-        $headers = ['Accept' => 'application/json'];
59
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
60
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'migration.deprecations');
61
-        return $this->client->sendRequest($request);
62
-    }
63
-    /**
64
-     * Find out whether system features need to be upgraded or not
65
-     *
66
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html
67
-     *
68
-     * @param array{
69
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
70
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
71
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
72
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
73
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
74
-     * } $params
75
-     *
76
-     * @throws NoNodeAvailableException if all the hosts are offline
77
-     * @throws ClientResponseException if the status code of response is 4xx
78
-     * @throws ServerResponseException if the status code of response is 5xx
79
-     *
80
-     * @return Elasticsearch|Promise
81
-     */
82
-    public function getFeatureUpgradeStatus(array $params = [])
83
-    {
84
-        $url = '/_migration/system_features';
85
-        $method = 'GET';
86
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
87
-        $headers = ['Accept' => 'application/json'];
88
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
89
-        $request = $this->addOtelAttributes($params, [], $request, 'migration.get_feature_upgrade_status');
90
-        return $this->client->sendRequest($request);
91
-    }
92
-    /**
93
-     * Begin upgrades for system features
94
-     *
95
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html
96
-     *
97
-     * @param array{
98
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
99
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
100
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
101
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
102
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
103
-     * } $params
104
-     *
105
-     * @throws NoNodeAvailableException if all the hosts are offline
106
-     * @throws ClientResponseException if the status code of response is 4xx
107
-     * @throws ServerResponseException if the status code of response is 5xx
108
-     *
109
-     * @return Elasticsearch|Promise
110
-     */
111
-    public function postFeatureUpgrade(array $params = [])
112
-    {
113
-        $url = '/_migration/system_features';
114
-        $method = 'POST';
115
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
116
-        $headers = ['Accept' => 'application/json'];
117
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
118
-        $request = $this->addOtelAttributes($params, [], $request, 'migration.post_feature_upgrade');
119
-        return $this->client->sendRequest($request);
120
-    }
28
+	/**
29
+	 * Retrieves information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html
32
+	 *
33
+	 * @param array{
34
+	 *     index: string, //  Index pattern
35
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
+	 * } $params
41
+	 *
42
+	 * @throws NoNodeAvailableException if all the hosts are offline
43
+	 * @throws ClientResponseException if the status code of response is 4xx
44
+	 * @throws ServerResponseException if the status code of response is 5xx
45
+	 *
46
+	 * @return Elasticsearch|Promise
47
+	 */
48
+	public function deprecations(array $params = [])
49
+	{
50
+		if (isset($params['index'])) {
51
+			$url = '/' . $this->encode($params['index']) . '/_migration/deprecations';
52
+			$method = 'GET';
53
+		} else {
54
+			$url = '/_migration/deprecations';
55
+			$method = 'GET';
56
+		}
57
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
58
+		$headers = ['Accept' => 'application/json'];
59
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
60
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'migration.deprecations');
61
+		return $this->client->sendRequest($request);
62
+	}
63
+	/**
64
+	 * Find out whether system features need to be upgraded or not
65
+	 *
66
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html
67
+	 *
68
+	 * @param array{
69
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
70
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
71
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
72
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
73
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
74
+	 * } $params
75
+	 *
76
+	 * @throws NoNodeAvailableException if all the hosts are offline
77
+	 * @throws ClientResponseException if the status code of response is 4xx
78
+	 * @throws ServerResponseException if the status code of response is 5xx
79
+	 *
80
+	 * @return Elasticsearch|Promise
81
+	 */
82
+	public function getFeatureUpgradeStatus(array $params = [])
83
+	{
84
+		$url = '/_migration/system_features';
85
+		$method = 'GET';
86
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
87
+		$headers = ['Accept' => 'application/json'];
88
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
89
+		$request = $this->addOtelAttributes($params, [], $request, 'migration.get_feature_upgrade_status');
90
+		return $this->client->sendRequest($request);
91
+	}
92
+	/**
93
+	 * Begin upgrades for system features
94
+	 *
95
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html
96
+	 *
97
+	 * @param array{
98
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
99
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
100
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
101
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
102
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
103
+	 * } $params
104
+	 *
105
+	 * @throws NoNodeAvailableException if all the hosts are offline
106
+	 * @throws ClientResponseException if the status code of response is 4xx
107
+	 * @throws ServerResponseException if the status code of response is 5xx
108
+	 *
109
+	 * @return Elasticsearch|Promise
110
+	 */
111
+	public function postFeatureUpgrade(array $params = [])
112
+	{
113
+		$url = '/_migration/system_features';
114
+		$method = 'POST';
115
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
116
+		$headers = ['Accept' => 'application/json'];
117
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
118
+		$request = $this->addOtelAttributes($params, [], $request, 'migration.post_feature_upgrade');
119
+		return $this->client->sendRequest($request);
120
+	}
121 121
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Autoscaling.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Autoscaling extends AbstractEndpoint
27
-{
26
+class Autoscaling extends AbstractEndpoint {
28 27
     /**
29 28
      * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +132 added lines, -132 removed lines patch added patch discarded remove patch
@@ -25,136 +25,136 @@
 block discarded – undo
25 25
  */
26 26
 class Autoscaling extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html
32
-     *
33
-     * @param array{
34
-     *     name: string, // (REQUIRED) the name of the autoscaling policy
35
-     *     master_timeout: time, // Timeout for processing on master node
36
-     *     timeout: time, // Timeout for acknowledgement of update from all nodes in cluster
37
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
38
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
39
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
40
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
41
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
42
-     * } $params
43
-     *
44
-     * @throws MissingParameterException if a required parameter is missing
45
-     * @throws NoNodeAvailableException if all the hosts are offline
46
-     * @throws ClientResponseException if the status code of response is 4xx
47
-     * @throws ServerResponseException if the status code of response is 5xx
48
-     *
49
-     * @return Elasticsearch|Promise
50
-     */
51
-    public function deleteAutoscalingPolicy(array $params = [])
52
-    {
53
-        $this->checkRequiredParameters(['name'], $params);
54
-        $url = '/_autoscaling/policy/' . $this->encode($params['name']);
55
-        $method = 'DELETE';
56
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
57
-        $headers = ['Accept' => 'application/json'];
58
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
59
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'autoscaling.delete_autoscaling_policy');
60
-        return $this->client->sendRequest($request);
61
-    }
62
-    /**
63
-     * Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
64
-     *
65
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html
66
-     *
67
-     * @param array{
68
-     *     master_timeout: time, // Timeout for processing on master node
69
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
70
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
71
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
72
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
73
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
74
-     * } $params
75
-     *
76
-     * @throws NoNodeAvailableException if all the hosts are offline
77
-     * @throws ClientResponseException if the status code of response is 4xx
78
-     * @throws ServerResponseException if the status code of response is 5xx
79
-     *
80
-     * @return Elasticsearch|Promise
81
-     */
82
-    public function getAutoscalingCapacity(array $params = [])
83
-    {
84
-        $url = '/_autoscaling/capacity';
85
-        $method = 'GET';
86
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
87
-        $headers = ['Accept' => 'application/json'];
88
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
89
-        $request = $this->addOtelAttributes($params, [], $request, 'autoscaling.get_autoscaling_capacity');
90
-        return $this->client->sendRequest($request);
91
-    }
92
-    /**
93
-     * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
94
-     *
95
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html
96
-     *
97
-     * @param array{
98
-     *     name: string, // (REQUIRED) the name of the autoscaling policy
99
-     *     master_timeout: time, // Timeout for processing on master node
100
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
101
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
102
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
103
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
104
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
105
-     * } $params
106
-     *
107
-     * @throws MissingParameterException if a required parameter is missing
108
-     * @throws NoNodeAvailableException if all the hosts are offline
109
-     * @throws ClientResponseException if the status code of response is 4xx
110
-     * @throws ServerResponseException if the status code of response is 5xx
111
-     *
112
-     * @return Elasticsearch|Promise
113
-     */
114
-    public function getAutoscalingPolicy(array $params = [])
115
-    {
116
-        $this->checkRequiredParameters(['name'], $params);
117
-        $url = '/_autoscaling/policy/' . $this->encode($params['name']);
118
-        $method = 'GET';
119
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
120
-        $headers = ['Accept' => 'application/json'];
121
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
122
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'autoscaling.get_autoscaling_policy');
123
-        return $this->client->sendRequest($request);
124
-    }
125
-    /**
126
-     * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
127
-     *
128
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html
129
-     *
130
-     * @param array{
131
-     *     name: string, // (REQUIRED) the name of the autoscaling policy
132
-     *     master_timeout: time, // Timeout for processing on master node
133
-     *     timeout: time, // Timeout for acknowledgement of update from all nodes in cluster
134
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
135
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
136
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
137
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
138
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
139
-     *     body: array, // (REQUIRED) the specification of the autoscaling policy
140
-     * } $params
141
-     *
142
-     * @throws MissingParameterException if a required parameter is missing
143
-     * @throws NoNodeAvailableException if all the hosts are offline
144
-     * @throws ClientResponseException if the status code of response is 4xx
145
-     * @throws ServerResponseException if the status code of response is 5xx
146
-     *
147
-     * @return Elasticsearch|Promise
148
-     */
149
-    public function putAutoscalingPolicy(array $params = [])
150
-    {
151
-        $this->checkRequiredParameters(['name', 'body'], $params);
152
-        $url = '/_autoscaling/policy/' . $this->encode($params['name']);
153
-        $method = 'PUT';
154
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
155
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
156
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
157
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'autoscaling.put_autoscaling_policy');
158
-        return $this->client->sendRequest($request);
159
-    }
28
+	/**
29
+	 * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html
32
+	 *
33
+	 * @param array{
34
+	 *     name: string, // (REQUIRED) the name of the autoscaling policy
35
+	 *     master_timeout: time, // Timeout for processing on master node
36
+	 *     timeout: time, // Timeout for acknowledgement of update from all nodes in cluster
37
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
38
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
39
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
40
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
41
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
42
+	 * } $params
43
+	 *
44
+	 * @throws MissingParameterException if a required parameter is missing
45
+	 * @throws NoNodeAvailableException if all the hosts are offline
46
+	 * @throws ClientResponseException if the status code of response is 4xx
47
+	 * @throws ServerResponseException if the status code of response is 5xx
48
+	 *
49
+	 * @return Elasticsearch|Promise
50
+	 */
51
+	public function deleteAutoscalingPolicy(array $params = [])
52
+	{
53
+		$this->checkRequiredParameters(['name'], $params);
54
+		$url = '/_autoscaling/policy/' . $this->encode($params['name']);
55
+		$method = 'DELETE';
56
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
57
+		$headers = ['Accept' => 'application/json'];
58
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
59
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'autoscaling.delete_autoscaling_policy');
60
+		return $this->client->sendRequest($request);
61
+	}
62
+	/**
63
+	 * Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
64
+	 *
65
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html
66
+	 *
67
+	 * @param array{
68
+	 *     master_timeout: time, // Timeout for processing on master node
69
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
70
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
71
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
72
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
73
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
74
+	 * } $params
75
+	 *
76
+	 * @throws NoNodeAvailableException if all the hosts are offline
77
+	 * @throws ClientResponseException if the status code of response is 4xx
78
+	 * @throws ServerResponseException if the status code of response is 5xx
79
+	 *
80
+	 * @return Elasticsearch|Promise
81
+	 */
82
+	public function getAutoscalingCapacity(array $params = [])
83
+	{
84
+		$url = '/_autoscaling/capacity';
85
+		$method = 'GET';
86
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
87
+		$headers = ['Accept' => 'application/json'];
88
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
89
+		$request = $this->addOtelAttributes($params, [], $request, 'autoscaling.get_autoscaling_capacity');
90
+		return $this->client->sendRequest($request);
91
+	}
92
+	/**
93
+	 * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
94
+	 *
95
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html
96
+	 *
97
+	 * @param array{
98
+	 *     name: string, // (REQUIRED) the name of the autoscaling policy
99
+	 *     master_timeout: time, // Timeout for processing on master node
100
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
101
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
102
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
103
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
104
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
105
+	 * } $params
106
+	 *
107
+	 * @throws MissingParameterException if a required parameter is missing
108
+	 * @throws NoNodeAvailableException if all the hosts are offline
109
+	 * @throws ClientResponseException if the status code of response is 4xx
110
+	 * @throws ServerResponseException if the status code of response is 5xx
111
+	 *
112
+	 * @return Elasticsearch|Promise
113
+	 */
114
+	public function getAutoscalingPolicy(array $params = [])
115
+	{
116
+		$this->checkRequiredParameters(['name'], $params);
117
+		$url = '/_autoscaling/policy/' . $this->encode($params['name']);
118
+		$method = 'GET';
119
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
120
+		$headers = ['Accept' => 'application/json'];
121
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
122
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'autoscaling.get_autoscaling_policy');
123
+		return $this->client->sendRequest($request);
124
+	}
125
+	/**
126
+	 * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
127
+	 *
128
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html
129
+	 *
130
+	 * @param array{
131
+	 *     name: string, // (REQUIRED) the name of the autoscaling policy
132
+	 *     master_timeout: time, // Timeout for processing on master node
133
+	 *     timeout: time, // Timeout for acknowledgement of update from all nodes in cluster
134
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
135
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
136
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
137
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
138
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
139
+	 *     body: array, // (REQUIRED) the specification of the autoscaling policy
140
+	 * } $params
141
+	 *
142
+	 * @throws MissingParameterException if a required parameter is missing
143
+	 * @throws NoNodeAvailableException if all the hosts are offline
144
+	 * @throws ClientResponseException if the status code of response is 4xx
145
+	 * @throws ServerResponseException if the status code of response is 5xx
146
+	 *
147
+	 * @return Elasticsearch|Promise
148
+	 */
149
+	public function putAutoscalingPolicy(array $params = [])
150
+	{
151
+		$this->checkRequiredParameters(['name', 'body'], $params);
152
+		$url = '/_autoscaling/policy/' . $this->encode($params['name']);
153
+		$method = 'PUT';
154
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
155
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
156
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
157
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'autoscaling.put_autoscaling_policy');
158
+		return $this->client->sendRequest($request);
159
+	}
160 160
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function deleteAutoscalingPolicy(array $params = [])
52 52
     {
53 53
         $this->checkRequiredParameters(['name'], $params);
54
-        $url = '/_autoscaling/policy/' . $this->encode($params['name']);
54
+        $url = '/_autoscaling/policy/'.$this->encode($params['name']);
55 55
         $method = 'DELETE';
56 56
         $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
57 57
         $headers = ['Accept' => 'application/json'];
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     public function getAutoscalingPolicy(array $params = [])
115 115
     {
116 116
         $this->checkRequiredParameters(['name'], $params);
117
-        $url = '/_autoscaling/policy/' . $this->encode($params['name']);
117
+        $url = '/_autoscaling/policy/'.$this->encode($params['name']);
118 118
         $method = 'GET';
119 119
         $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
120 120
         $headers = ['Accept' => 'application/json'];
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     public function putAutoscalingPolicy(array $params = [])
150 150
     {
151 151
         $this->checkRequiredParameters(['name', 'body'], $params);
152
-        $url = '/_autoscaling/policy/' . $this->encode($params['name']);
152
+        $url = '/_autoscaling/policy/'.$this->encode($params['name']);
153 153
         $method = 'PUT';
154 154
         $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
155 155
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Indices.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Indices extends AbstractEndpoint
27
-{
26
+class Indices extends AbstractEndpoint {
28 27
     /**
29 28
      * Adds a block to an index.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +2241 added lines, -2241 removed lines patch added patch discarded remove patch
@@ -25,2245 +25,2245 @@
 block discarded – undo
25 25
  */
26 26
 class Indices extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Adds a block to an index.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html
32
-     *
33
-     * @param array{
34
-     *     index: list, // (REQUIRED) A comma separated list of indices to add a block to
35
-     *     block: string, // (REQUIRED) The block to add (one of read, write, read_only or metadata)
36
-     *     timeout: time, // Explicit operation timeout
37
-     *     master_timeout: time, // Specify timeout for connection to master
38
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
39
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
40
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
41
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
42
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
43
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
44
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
45
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
46
-     * } $params
47
-     *
48
-     * @throws MissingParameterException if a required parameter is missing
49
-     * @throws NoNodeAvailableException if all the hosts are offline
50
-     * @throws ClientResponseException if the status code of response is 4xx
51
-     * @throws ServerResponseException if the status code of response is 5xx
52
-     *
53
-     * @return Elasticsearch|Promise
54
-     */
55
-    public function addBlock(array $params = [])
56
-    {
57
-        $this->checkRequiredParameters(['index', 'block'], $params);
58
-        $url = '/' . $this->encode($params['index']) . '/_block/' . $this->encode($params['block']);
59
-        $method = 'PUT';
60
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
61
-        $headers = ['Accept' => 'application/json'];
62
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
63
-        $request = $this->addOtelAttributes($params, ['index', 'block'], $request, 'indices.add_block');
64
-        return $this->client->sendRequest($request);
65
-    }
66
-    /**
67
-     * Performs the analysis process on a text and return the tokens breakdown of the text.
68
-     *
69
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html
70
-     *
71
-     * @param array{
72
-     *     index: string, //  The name of the index to scope the operation
73
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
74
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
75
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
76
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
77
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
78
-     *     body: array, //  Define analyzer/tokenizer parameters and the text on which the analysis should be performed
79
-     * } $params
80
-     *
81
-     * @throws NoNodeAvailableException if all the hosts are offline
82
-     * @throws ClientResponseException if the status code of response is 4xx
83
-     * @throws ServerResponseException if the status code of response is 5xx
84
-     *
85
-     * @return Elasticsearch|Promise
86
-     */
87
-    public function analyze(array $params = [])
88
-    {
89
-        if (isset($params['index'])) {
90
-            $url = '/' . $this->encode($params['index']) . '/_analyze';
91
-            $method = empty($params['body']) ? 'GET' : 'POST';
92
-        } else {
93
-            $url = '/_analyze';
94
-            $method = empty($params['body']) ? 'GET' : 'POST';
95
-        }
96
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
97
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
98
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
99
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.analyze');
100
-        return $this->client->sendRequest($request);
101
-    }
102
-    /**
103
-     * Clears all or specific caches for one or more indices.
104
-     *
105
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html
106
-     *
107
-     * @param array{
108
-     *     index: list, //  A comma-separated list of index name to limit the operation
109
-     *     fielddata: boolean, // Clear field data
110
-     *     fields: list, // A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)
111
-     *     query: boolean, // Clear query caches
112
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
113
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
114
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
115
-     *     request: boolean, // Clear request cache
116
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
117
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
118
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
119
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
120
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
121
-     * } $params
122
-     *
123
-     * @throws NoNodeAvailableException if all the hosts are offline
124
-     * @throws ClientResponseException if the status code of response is 4xx
125
-     * @throws ServerResponseException if the status code of response is 5xx
126
-     *
127
-     * @return Elasticsearch|Promise
128
-     */
129
-    public function clearCache(array $params = [])
130
-    {
131
-        if (isset($params['index'])) {
132
-            $url = '/' . $this->encode($params['index']) . '/_cache/clear';
133
-            $method = 'POST';
134
-        } else {
135
-            $url = '/_cache/clear';
136
-            $method = 'POST';
137
-        }
138
-        $url = $this->addQueryString($url, $params, ['fielddata', 'fields', 'query', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'request', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
139
-        $headers = ['Accept' => 'application/json'];
140
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
141
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.clear_cache');
142
-        return $this->client->sendRequest($request);
143
-    }
144
-    /**
145
-     * Clones an index
146
-     *
147
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html
148
-     *
149
-     * @param array{
150
-     *     index: string, // (REQUIRED) The name of the source index to clone
151
-     *     target: string, // (REQUIRED) The name of the target index to clone into
152
-     *     timeout: time, // Explicit operation timeout
153
-     *     master_timeout: time, // Specify timeout for connection to master
154
-     *     wait_for_active_shards: string, // Set the number of active shards to wait for on the cloned index before the operation returns.
155
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
156
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
157
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
158
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
159
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
160
-     *     body: array, //  The configuration for the target index (`settings` and `aliases`)
161
-     * } $params
162
-     *
163
-     * @throws MissingParameterException if a required parameter is missing
164
-     * @throws NoNodeAvailableException if all the hosts are offline
165
-     * @throws ClientResponseException if the status code of response is 4xx
166
-     * @throws ServerResponseException if the status code of response is 5xx
167
-     *
168
-     * @return Elasticsearch|Promise
169
-     */
170
-    public function clone(array $params = [])
171
-    {
172
-        $this->checkRequiredParameters(['index', 'target'], $params);
173
-        $url = '/' . $this->encode($params['index']) . '/_clone/' . $this->encode($params['target']);
174
-        $method = 'PUT';
175
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
176
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
177
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
178
-        $request = $this->addOtelAttributes($params, ['index', 'target'], $request, 'indices.clone');
179
-        return $this->client->sendRequest($request);
180
-    }
181
-    /**
182
-     * Closes an index.
183
-     *
184
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
185
-     *
186
-     * @param array{
187
-     *     index: list, // (REQUIRED) A comma separated list of indices to close
188
-     *     timeout: time, // Explicit operation timeout
189
-     *     master_timeout: time, // Specify timeout for connection to master
190
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
191
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
192
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
193
-     *     wait_for_active_shards: string, // Sets the number of active shards to wait for before the operation returns.
194
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
195
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
196
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
197
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
198
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
199
-     * } $params
200
-     *
201
-     * @throws MissingParameterException if a required parameter is missing
202
-     * @throws NoNodeAvailableException if all the hosts are offline
203
-     * @throws ClientResponseException if the status code of response is 4xx
204
-     * @throws ServerResponseException if the status code of response is 5xx
205
-     *
206
-     * @return Elasticsearch|Promise
207
-     */
208
-    public function close(array $params = [])
209
-    {
210
-        $this->checkRequiredParameters(['index'], $params);
211
-        $url = '/' . $this->encode($params['index']) . '/_close';
212
-        $method = 'POST';
213
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
214
-        $headers = ['Accept' => 'application/json'];
215
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
216
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.close');
217
-        return $this->client->sendRequest($request);
218
-    }
219
-    /**
220
-     * Creates an index with optional settings and mappings.
221
-     *
222
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html
223
-     *
224
-     * @param array{
225
-     *     index: string, // (REQUIRED) The name of the index
226
-     *     wait_for_active_shards: string, // Set the number of active shards to wait for before the operation returns.
227
-     *     timeout: time, // Explicit operation timeout
228
-     *     master_timeout: time, // Specify timeout for connection to master
229
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
230
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
231
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
232
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
233
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
234
-     *     body: array, //  The configuration for the index (`settings` and `mappings`)
235
-     * } $params
236
-     *
237
-     * @throws MissingParameterException if a required parameter is missing
238
-     * @throws NoNodeAvailableException if all the hosts are offline
239
-     * @throws ClientResponseException if the status code of response is 4xx
240
-     * @throws ServerResponseException if the status code of response is 5xx
241
-     *
242
-     * @return Elasticsearch|Promise
243
-     */
244
-    public function create(array $params = [])
245
-    {
246
-        $this->checkRequiredParameters(['index'], $params);
247
-        $url = '/' . $this->encode($params['index']);
248
-        $method = 'PUT';
249
-        $url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
250
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
251
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
252
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.create');
253
-        return $this->client->sendRequest($request);
254
-    }
255
-    /**
256
-     * Creates a data stream
257
-     *
258
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
259
-     *
260
-     * @param array{
261
-     *     name: string, // (REQUIRED) The name of the data stream
262
-     *     timeout: time, // Specify timeout for acknowledging the cluster state update
263
-     *     master_timeout: time, // Specify timeout for connection to master
264
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
265
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
266
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
267
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
268
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
269
-     * } $params
270
-     *
271
-     * @throws MissingParameterException if a required parameter is missing
272
-     * @throws NoNodeAvailableException if all the hosts are offline
273
-     * @throws ClientResponseException if the status code of response is 4xx
274
-     * @throws ServerResponseException if the status code of response is 5xx
275
-     *
276
-     * @return Elasticsearch|Promise
277
-     */
278
-    public function createDataStream(array $params = [])
279
-    {
280
-        $this->checkRequiredParameters(['name'], $params);
281
-        $url = '/_data_stream/' . $this->encode($params['name']);
282
-        $method = 'PUT';
283
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
284
-        $headers = ['Accept' => 'application/json'];
285
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
286
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.create_data_stream');
287
-        return $this->client->sendRequest($request);
288
-    }
289
-    /**
290
-     * Provides statistics on operations happening in a data stream.
291
-     *
292
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
293
-     *
294
-     * @param array{
295
-     *     name: list, //  A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams
296
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
297
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
298
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
299
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
300
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
301
-     * } $params
302
-     *
303
-     * @throws NoNodeAvailableException if all the hosts are offline
304
-     * @throws ClientResponseException if the status code of response is 4xx
305
-     * @throws ServerResponseException if the status code of response is 5xx
306
-     *
307
-     * @return Elasticsearch|Promise
308
-     */
309
-    public function dataStreamsStats(array $params = [])
310
-    {
311
-        if (isset($params['name'])) {
312
-            $url = '/_data_stream/' . $this->encode($params['name']) . '/_stats';
313
-            $method = 'GET';
314
-        } else {
315
-            $url = '/_data_stream/_stats';
316
-            $method = 'GET';
317
-        }
318
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
319
-        $headers = ['Accept' => 'application/json'];
320
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
321
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.data_streams_stats');
322
-        return $this->client->sendRequest($request);
323
-    }
324
-    /**
325
-     * Deletes an index.
326
-     *
327
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html
328
-     *
329
-     * @param array{
330
-     *     index: list, // (REQUIRED) A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
331
-     *     timeout: time, // Explicit operation timeout
332
-     *     master_timeout: time, // Specify timeout for connection to master
333
-     *     ignore_unavailable: boolean, // Ignore unavailable indexes (default: false)
334
-     *     allow_no_indices: boolean, // Ignore if a wildcard expression resolves to no concrete indices (default: false)
335
-     *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open, closed, or hidden indices
336
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
337
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
338
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
339
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
340
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
341
-     * } $params
342
-     *
343
-     * @throws MissingParameterException if a required parameter is missing
344
-     * @throws NoNodeAvailableException if all the hosts are offline
345
-     * @throws ClientResponseException if the status code of response is 4xx
346
-     * @throws ServerResponseException if the status code of response is 5xx
347
-     *
348
-     * @return Elasticsearch|Promise
349
-     */
350
-    public function delete(array $params = [])
351
-    {
352
-        $this->checkRequiredParameters(['index'], $params);
353
-        $url = '/' . $this->encode($params['index']);
354
-        $method = 'DELETE';
355
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
356
-        $headers = ['Accept' => 'application/json'];
357
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
358
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.delete');
359
-        return $this->client->sendRequest($request);
360
-    }
361
-    /**
362
-     * Deletes an alias.
363
-     *
364
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
365
-     *
366
-     * @param array{
367
-     *     index: list, // (REQUIRED) A comma-separated list of index names (supports wildcards); use `_all` for all indices
368
-     *     name: list, // (REQUIRED) A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
369
-     *     timeout: time, // Explicit timestamp for the document
370
-     *     master_timeout: time, // Specify timeout for connection to master
371
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
372
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
373
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
374
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
375
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
376
-     * } $params
377
-     *
378
-     * @throws MissingParameterException if a required parameter is missing
379
-     * @throws NoNodeAvailableException if all the hosts are offline
380
-     * @throws ClientResponseException if the status code of response is 4xx
381
-     * @throws ServerResponseException if the status code of response is 5xx
382
-     *
383
-     * @return Elasticsearch|Promise
384
-     */
385
-    public function deleteAlias(array $params = [])
386
-    {
387
-        $this->checkRequiredParameters(['index', 'name'], $params);
388
-        $url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
389
-        $method = 'DELETE';
390
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
391
-        $headers = ['Accept' => 'application/json'];
392
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
393
-        $request = $this->addOtelAttributes($params, ['index', 'name'], $request, 'indices.delete_alias');
394
-        return $this->client->sendRequest($request);
395
-    }
396
-    /**
397
-     * Deletes the data stream lifecycle of the selected data streams.
398
-     *
399
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html
400
-     *
401
-     * @param array{
402
-     *     name: list, // (REQUIRED) A comma-separated list of data streams of which the data stream lifecycle will be deleted; use `*` to get all data streams
403
-     *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
404
-     *     timeout: time, // Explicit timestamp for the document
405
-     *     master_timeout: time, // Specify timeout for connection to master
406
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
407
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
408
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
409
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
410
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
411
-     * } $params
412
-     *
413
-     * @throws MissingParameterException if a required parameter is missing
414
-     * @throws NoNodeAvailableException if all the hosts are offline
415
-     * @throws ClientResponseException if the status code of response is 4xx
416
-     * @throws ServerResponseException if the status code of response is 5xx
417
-     *
418
-     * @return Elasticsearch|Promise
419
-     */
420
-    public function deleteDataLifecycle(array $params = [])
421
-    {
422
-        $this->checkRequiredParameters(['name'], $params);
423
-        $url = '/_data_stream/' . $this->encode($params['name']) . '/_lifecycle';
424
-        $method = 'DELETE';
425
-        $url = $this->addQueryString($url, $params, ['expand_wildcards', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
426
-        $headers = ['Accept' => 'application/json'];
427
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
428
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.delete_data_lifecycle');
429
-        return $this->client->sendRequest($request);
430
-    }
431
-    /**
432
-     * Deletes a data stream.
433
-     *
434
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
435
-     *
436
-     * @param array{
437
-     *     name: list, // (REQUIRED) A comma-separated list of data streams to delete; use `*` to delete all data streams
438
-     *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
439
-     *     master_timeout: time, // Specify timeout for connection to master
440
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
441
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
442
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
443
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
444
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
445
-     * } $params
446
-     *
447
-     * @throws MissingParameterException if a required parameter is missing
448
-     * @throws NoNodeAvailableException if all the hosts are offline
449
-     * @throws ClientResponseException if the status code of response is 4xx
450
-     * @throws ServerResponseException if the status code of response is 5xx
451
-     *
452
-     * @return Elasticsearch|Promise
453
-     */
454
-    public function deleteDataStream(array $params = [])
455
-    {
456
-        $this->checkRequiredParameters(['name'], $params);
457
-        $url = '/_data_stream/' . $this->encode($params['name']);
458
-        $method = 'DELETE';
459
-        $url = $this->addQueryString($url, $params, ['expand_wildcards', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
460
-        $headers = ['Accept' => 'application/json'];
461
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
462
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.delete_data_stream');
463
-        return $this->client->sendRequest($request);
464
-    }
465
-    /**
466
-     * Deletes an index template.
467
-     *
468
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template.html
469
-     *
470
-     * @param array{
471
-     *     name: string, // (REQUIRED) The name of the template
472
-     *     timeout: time, // Explicit operation timeout
473
-     *     master_timeout: time, // Specify timeout for connection to master
474
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
475
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
476
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
477
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
478
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
479
-     * } $params
480
-     *
481
-     * @throws MissingParameterException if a required parameter is missing
482
-     * @throws NoNodeAvailableException if all the hosts are offline
483
-     * @throws ClientResponseException if the status code of response is 4xx
484
-     * @throws ServerResponseException if the status code of response is 5xx
485
-     *
486
-     * @return Elasticsearch|Promise
487
-     */
488
-    public function deleteIndexTemplate(array $params = [])
489
-    {
490
-        $this->checkRequiredParameters(['name'], $params);
491
-        $url = '/_index_template/' . $this->encode($params['name']);
492
-        $method = 'DELETE';
493
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
494
-        $headers = ['Accept' => 'application/json'];
495
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
496
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.delete_index_template');
497
-        return $this->client->sendRequest($request);
498
-    }
499
-    /**
500
-     * Deletes an index template.
501
-     *
502
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template-v1.html
503
-     *
504
-     * @param array{
505
-     *     name: string, // (REQUIRED) The name of the template
506
-     *     timeout: time, // Explicit operation timeout
507
-     *     master_timeout: time, // Specify timeout for connection to master
508
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
509
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
510
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
511
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
512
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
513
-     * } $params
514
-     *
515
-     * @throws MissingParameterException if a required parameter is missing
516
-     * @throws NoNodeAvailableException if all the hosts are offline
517
-     * @throws ClientResponseException if the status code of response is 4xx
518
-     * @throws ServerResponseException if the status code of response is 5xx
519
-     *
520
-     * @return Elasticsearch|Promise
521
-     */
522
-    public function deleteTemplate(array $params = [])
523
-    {
524
-        $this->checkRequiredParameters(['name'], $params);
525
-        $url = '/_template/' . $this->encode($params['name']);
526
-        $method = 'DELETE';
527
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
528
-        $headers = ['Accept' => 'application/json'];
529
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
530
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.delete_template');
531
-        return $this->client->sendRequest($request);
532
-    }
533
-    /**
534
-     * Analyzes the disk usage of each field of an index or data stream
535
-     *
536
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html
537
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
538
-     *
539
-     * @param array{
540
-     *     index: string, // (REQUIRED) Comma-separated list of indices or data streams to analyze the disk usage
541
-     *     run_expensive_tasks: boolean, // Must be set to [true] in order for the task to be performed. Defaults to false.
542
-     *     flush: boolean, // Whether flush or not before analyzing the index disk usage. Defaults to true
543
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
544
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
545
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
546
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
547
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
548
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
549
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
550
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
551
-     * } $params
552
-     *
553
-     * @throws MissingParameterException if a required parameter is missing
554
-     * @throws NoNodeAvailableException if all the hosts are offline
555
-     * @throws ClientResponseException if the status code of response is 4xx
556
-     * @throws ServerResponseException if the status code of response is 5xx
557
-     *
558
-     * @return Elasticsearch|Promise
559
-     */
560
-    public function diskUsage(array $params = [])
561
-    {
562
-        $this->checkRequiredParameters(['index'], $params);
563
-        $url = '/' . $this->encode($params['index']) . '/_disk_usage';
564
-        $method = 'POST';
565
-        $url = $this->addQueryString($url, $params, ['run_expensive_tasks', 'flush', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
566
-        $headers = ['Accept' => 'application/json'];
567
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
568
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.disk_usage');
569
-        return $this->client->sendRequest($request);
570
-    }
571
-    /**
572
-     * Downsample an index
573
-     *
574
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html
575
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
576
-     *
577
-     * @param array{
578
-     *     index: string, // (REQUIRED) The index to downsample
579
-     *     target_index: string, // (REQUIRED) The name of the target index to store downsampled data
580
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
581
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
582
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
583
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
584
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
585
-     *     body: array, // (REQUIRED) The downsampling configuration
586
-     * } $params
587
-     *
588
-     * @throws MissingParameterException if a required parameter is missing
589
-     * @throws NoNodeAvailableException if all the hosts are offline
590
-     * @throws ClientResponseException if the status code of response is 4xx
591
-     * @throws ServerResponseException if the status code of response is 5xx
592
-     *
593
-     * @return Elasticsearch|Promise
594
-     */
595
-    public function downsample(array $params = [])
596
-    {
597
-        $this->checkRequiredParameters(['index', 'target_index', 'body'], $params);
598
-        $url = '/' . $this->encode($params['index']) . '/_downsample/' . $this->encode($params['target_index']);
599
-        $method = 'POST';
600
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
601
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
602
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
603
-        $request = $this->addOtelAttributes($params, ['index', 'target_index'], $request, 'indices.downsample');
604
-        return $this->client->sendRequest($request);
605
-    }
606
-    /**
607
-     * Returns information about whether a particular index exists.
608
-     *
609
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html
610
-     *
611
-     * @param array{
612
-     *     index: list, // (REQUIRED) A comma-separated list of index names
613
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
614
-     *     ignore_unavailable: boolean, // Ignore unavailable indexes (default: false)
615
-     *     allow_no_indices: boolean, // Ignore if a wildcard expression resolves to no concrete indices (default: false)
616
-     *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
617
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
618
-     *     include_defaults: boolean, // Whether to return all default setting for each of the indices.
619
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
620
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
621
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
622
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
623
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
624
-     * } $params
625
-     *
626
-     * @throws MissingParameterException if a required parameter is missing
627
-     * @throws NoNodeAvailableException if all the hosts are offline
628
-     * @throws ClientResponseException if the status code of response is 4xx
629
-     * @throws ServerResponseException if the status code of response is 5xx
630
-     *
631
-     * @return Elasticsearch|Promise
632
-     */
633
-    public function exists(array $params = [])
634
-    {
635
-        $this->checkRequiredParameters(['index'], $params);
636
-        $url = '/' . $this->encode($params['index']);
637
-        $method = 'HEAD';
638
-        $url = $this->addQueryString($url, $params, ['local', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'flat_settings', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
639
-        $headers = ['Accept' => 'application/json'];
640
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
641
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.exists');
642
-        return $this->client->sendRequest($request);
643
-    }
644
-    /**
645
-     * Returns information about whether a particular alias exists.
646
-     *
647
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
648
-     *
649
-     * @param array{
650
-     *     name: list, // (REQUIRED) A comma-separated list of alias names to return
651
-     *     index: list, //  A comma-separated list of index names to filter aliases
652
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
653
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
654
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
655
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
656
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
657
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
658
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
659
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
660
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
661
-     * } $params
662
-     *
663
-     * @throws MissingParameterException if a required parameter is missing
664
-     * @throws NoNodeAvailableException if all the hosts are offline
665
-     * @throws ClientResponseException if the status code of response is 4xx
666
-     * @throws ServerResponseException if the status code of response is 5xx
667
-     *
668
-     * @return Elasticsearch|Promise
669
-     */
670
-    public function existsAlias(array $params = [])
671
-    {
672
-        $this->checkRequiredParameters(['name'], $params);
673
-        if (isset($params['index'])) {
674
-            $url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
675
-            $method = 'HEAD';
676
-        } else {
677
-            $url = '/_alias/' . $this->encode($params['name']);
678
-            $method = 'HEAD';
679
-        }
680
-        $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
681
-        $headers = ['Accept' => 'application/json'];
682
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
683
-        $request = $this->addOtelAttributes($params, ['name', 'index'], $request, 'indices.exists_alias');
684
-        return $this->client->sendRequest($request);
685
-    }
686
-    /**
687
-     * Returns information about whether a particular index template exists.
688
-     *
689
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html
690
-     *
691
-     * @param array{
692
-     *     name: string, // (REQUIRED) The name of the template
693
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
694
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
695
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
696
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
697
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
698
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
699
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
700
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
701
-     * } $params
702
-     *
703
-     * @throws MissingParameterException if a required parameter is missing
704
-     * @throws NoNodeAvailableException if all the hosts are offline
705
-     * @throws ClientResponseException if the status code of response is 4xx
706
-     * @throws ServerResponseException if the status code of response is 5xx
707
-     *
708
-     * @return Elasticsearch|Promise
709
-     */
710
-    public function existsIndexTemplate(array $params = [])
711
-    {
712
-        $this->checkRequiredParameters(['name'], $params);
713
-        $url = '/_index_template/' . $this->encode($params['name']);
714
-        $method = 'HEAD';
715
-        $url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
716
-        $headers = ['Accept' => 'application/json'];
717
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
718
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.exists_index_template');
719
-        return $this->client->sendRequest($request);
720
-    }
721
-    /**
722
-     * Returns information about whether a particular index template exists.
723
-     *
724
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-template-exists-v1.html
725
-     *
726
-     * @param array{
727
-     *     name: list, // (REQUIRED) The comma separated names of the index templates
728
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
729
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
730
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
731
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
732
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
733
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
734
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
735
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
736
-     * } $params
737
-     *
738
-     * @throws MissingParameterException if a required parameter is missing
739
-     * @throws NoNodeAvailableException if all the hosts are offline
740
-     * @throws ClientResponseException if the status code of response is 4xx
741
-     * @throws ServerResponseException if the status code of response is 5xx
742
-     *
743
-     * @return Elasticsearch|Promise
744
-     */
745
-    public function existsTemplate(array $params = [])
746
-    {
747
-        $this->checkRequiredParameters(['name'], $params);
748
-        $url = '/_template/' . $this->encode($params['name']);
749
-        $method = 'HEAD';
750
-        $url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
751
-        $headers = ['Accept' => 'application/json'];
752
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
753
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.exists_template');
754
-        return $this->client->sendRequest($request);
755
-    }
756
-    /**
757
-     * Retrieves information about the index's current data stream lifecycle, such as any potential encountered error, time since creation etc.
758
-     *
759
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html
760
-     *
761
-     * @param array{
762
-     *     index: string, // (REQUIRED) The name of the index to explain
763
-     *     include_defaults: boolean, // indicates if the API should return the default values the system uses for the index's lifecycle
764
-     *     master_timeout: time, // Specify timeout for connection to master
765
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
766
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
767
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
768
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
769
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
770
-     * } $params
771
-     *
772
-     * @throws MissingParameterException if a required parameter is missing
773
-     * @throws NoNodeAvailableException if all the hosts are offline
774
-     * @throws ClientResponseException if the status code of response is 4xx
775
-     * @throws ServerResponseException if the status code of response is 5xx
776
-     *
777
-     * @return Elasticsearch|Promise
778
-     */
779
-    public function explainDataLifecycle(array $params = [])
780
-    {
781
-        $this->checkRequiredParameters(['index'], $params);
782
-        $url = '/' . $this->encode($params['index']) . '/_lifecycle/explain';
783
-        $method = 'GET';
784
-        $url = $this->addQueryString($url, $params, ['include_defaults', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
785
-        $headers = ['Accept' => 'application/json'];
786
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
787
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.explain_data_lifecycle');
788
-        return $this->client->sendRequest($request);
789
-    }
790
-    /**
791
-     * Returns the field usage stats for each field of an index
792
-     *
793
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/field-usage-stats.html
794
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
795
-     *
796
-     * @param array{
797
-     *     index: string, // (REQUIRED) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
798
-     *     fields: list, // A comma-separated list of fields to include in the stats if only a subset of fields should be returned (supports wildcards)
799
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
800
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
801
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
802
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
803
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
804
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
805
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
806
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
807
-     * } $params
808
-     *
809
-     * @throws MissingParameterException if a required parameter is missing
810
-     * @throws NoNodeAvailableException if all the hosts are offline
811
-     * @throws ClientResponseException if the status code of response is 4xx
812
-     * @throws ServerResponseException if the status code of response is 5xx
813
-     *
814
-     * @return Elasticsearch|Promise
815
-     */
816
-    public function fieldUsageStats(array $params = [])
817
-    {
818
-        $this->checkRequiredParameters(['index'], $params);
819
-        $url = '/' . $this->encode($params['index']) . '/_field_usage_stats';
820
-        $method = 'GET';
821
-        $url = $this->addQueryString($url, $params, ['fields', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
822
-        $headers = ['Accept' => 'application/json'];
823
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
824
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.field_usage_stats');
825
-        return $this->client->sendRequest($request);
826
-    }
827
-    /**
828
-     * Performs the flush operation on one or more indices.
829
-     *
830
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html
831
-     *
832
-     * @param array{
833
-     *     index: list, //  A comma-separated list of index names; use `_all` or empty string for all indices
834
-     *     force: boolean, // Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
835
-     *     wait_if_ongoing: boolean, // If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
836
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
837
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
838
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
839
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
840
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
841
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
842
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
843
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
844
-     * } $params
845
-     *
846
-     * @throws NoNodeAvailableException if all the hosts are offline
847
-     * @throws ClientResponseException if the status code of response is 4xx
848
-     * @throws ServerResponseException if the status code of response is 5xx
849
-     *
850
-     * @return Elasticsearch|Promise
851
-     */
852
-    public function flush(array $params = [])
853
-    {
854
-        if (isset($params['index'])) {
855
-            $url = '/' . $this->encode($params['index']) . '/_flush';
856
-            $method = empty($params['body']) ? 'GET' : 'POST';
857
-        } else {
858
-            $url = '/_flush';
859
-            $method = empty($params['body']) ? 'GET' : 'POST';
860
-        }
861
-        $url = $this->addQueryString($url, $params, ['force', 'wait_if_ongoing', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
862
-        $headers = ['Accept' => 'application/json'];
863
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
864
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.flush');
865
-        return $this->client->sendRequest($request);
866
-    }
867
-    /**
868
-     * Performs the force merge operation on one or more indices.
869
-     *
870
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html
871
-     *
872
-     * @param array{
873
-     *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
874
-     *     flush: boolean, // Specify whether the index should be flushed after performing the operation (default: true)
875
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
876
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
877
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
878
-     *     max_num_segments: number, // The number of segments the index should be merged into (default: dynamic)
879
-     *     only_expunge_deletes: boolean, // Specify whether the operation should only expunge deleted documents
880
-     *     wait_for_completion: boolean, // Should the request wait until the force merge is completed.
881
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
882
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
883
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
884
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
885
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
886
-     * } $params
887
-     *
888
-     * @throws NoNodeAvailableException if all the hosts are offline
889
-     * @throws ClientResponseException if the status code of response is 4xx
890
-     * @throws ServerResponseException if the status code of response is 5xx
891
-     *
892
-     * @return Elasticsearch|Promise
893
-     */
894
-    public function forcemerge(array $params = [])
895
-    {
896
-        if (isset($params['index'])) {
897
-            $url = '/' . $this->encode($params['index']) . '/_forcemerge';
898
-            $method = 'POST';
899
-        } else {
900
-            $url = '/_forcemerge';
901
-            $method = 'POST';
902
-        }
903
-        $url = $this->addQueryString($url, $params, ['flush', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'max_num_segments', 'only_expunge_deletes', 'wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
904
-        $headers = ['Accept' => 'application/json'];
905
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
906
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.forcemerge');
907
-        return $this->client->sendRequest($request);
908
-    }
909
-    /**
910
-     * Returns information about one or more indices.
911
-     *
912
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html
913
-     *
914
-     * @param array{
915
-     *     index: list, // (REQUIRED) A comma-separated list of index names
916
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
917
-     *     ignore_unavailable: boolean, // Ignore unavailable indexes (default: false)
918
-     *     allow_no_indices: boolean, // Ignore if a wildcard expression resolves to no concrete indices (default: false)
919
-     *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
920
-     *     features: enum, // Return only information on specified index features
921
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
922
-     *     include_defaults: boolean, // Whether to return all default setting for each of the indices.
923
-     *     master_timeout: time, // Specify timeout for connection to master
924
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
925
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
926
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
927
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
928
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
929
-     * } $params
930
-     *
931
-     * @throws MissingParameterException if a required parameter is missing
932
-     * @throws NoNodeAvailableException if all the hosts are offline
933
-     * @throws ClientResponseException if the status code of response is 4xx
934
-     * @throws ServerResponseException if the status code of response is 5xx
935
-     *
936
-     * @return Elasticsearch|Promise
937
-     */
938
-    public function get(array $params = [])
939
-    {
940
-        $this->checkRequiredParameters(['index'], $params);
941
-        $url = '/' . $this->encode($params['index']);
942
-        $method = 'GET';
943
-        $url = $this->addQueryString($url, $params, ['local', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'features', 'flat_settings', 'include_defaults', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
944
-        $headers = ['Accept' => 'application/json'];
945
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
946
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.get');
947
-        return $this->client->sendRequest($request);
948
-    }
949
-    /**
950
-     * Returns an alias.
951
-     *
952
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
953
-     *
954
-     * @param array{
955
-     *     name: list, //  A comma-separated list of alias names to return
956
-     *     index: list, //  A comma-separated list of index names to filter aliases
957
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
958
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
959
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
960
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
961
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
962
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
963
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
964
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
965
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
966
-     * } $params
967
-     *
968
-     * @throws NoNodeAvailableException if all the hosts are offline
969
-     * @throws ClientResponseException if the status code of response is 4xx
970
-     * @throws ServerResponseException if the status code of response is 5xx
971
-     *
972
-     * @return Elasticsearch|Promise
973
-     */
974
-    public function getAlias(array $params = [])
975
-    {
976
-        if (isset($params['index']) && isset($params['name'])) {
977
-            $url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
978
-            $method = 'GET';
979
-        } elseif (isset($params['name'])) {
980
-            $url = '/_alias/' . $this->encode($params['name']);
981
-            $method = 'GET';
982
-        } elseif (isset($params['index'])) {
983
-            $url = '/' . $this->encode($params['index']) . '/_alias';
984
-            $method = 'GET';
985
-        } else {
986
-            $url = '/_alias';
987
-            $method = 'GET';
988
-        }
989
-        $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
990
-        $headers = ['Accept' => 'application/json'];
991
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
992
-        $request = $this->addOtelAttributes($params, ['name', 'index'], $request, 'indices.get_alias');
993
-        return $this->client->sendRequest($request);
994
-    }
995
-    /**
996
-     * Returns the data stream lifecycle of the selected data streams.
997
-     *
998
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle.html
999
-     *
1000
-     * @param array{
1001
-     *     name: list, // (REQUIRED) A comma-separated list of data streams to get; use `*` to get all data streams
1002
-     *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1003
-     *     include_defaults: boolean, // Return all relevant default configurations for the data stream (default: false)
1004
-     *     master_timeout: time, // Specify timeout for connection to master
1005
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1006
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1007
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1008
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1009
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1010
-     * } $params
1011
-     *
1012
-     * @throws MissingParameterException if a required parameter is missing
1013
-     * @throws NoNodeAvailableException if all the hosts are offline
1014
-     * @throws ClientResponseException if the status code of response is 4xx
1015
-     * @throws ServerResponseException if the status code of response is 5xx
1016
-     *
1017
-     * @return Elasticsearch|Promise
1018
-     */
1019
-    public function getDataLifecycle(array $params = [])
1020
-    {
1021
-        $this->checkRequiredParameters(['name'], $params);
1022
-        $url = '/_data_stream/' . $this->encode($params['name']) . '/_lifecycle';
1023
-        $method = 'GET';
1024
-        $url = $this->addQueryString($url, $params, ['expand_wildcards', 'include_defaults', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1025
-        $headers = ['Accept' => 'application/json'];
1026
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1027
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.get_data_lifecycle');
1028
-        return $this->client->sendRequest($request);
1029
-    }
1030
-    /**
1031
-     * Returns data streams.
1032
-     *
1033
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
1034
-     *
1035
-     * @param array{
1036
-     *     name: list, //  A comma-separated list of data streams to get; use `*` to get all data streams
1037
-     *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1038
-     *     include_defaults: boolean, // Return all relevant default configurations for the data stream (default: false)
1039
-     *     master_timeout: time, // Specify timeout for connection to master
1040
-     *     verbose: boolean, // Whether the maximum timestamp for each data stream should be calculated and returned (default: false)
1041
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1042
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1043
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1044
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1045
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1046
-     * } $params
1047
-     *
1048
-     * @throws NoNodeAvailableException if all the hosts are offline
1049
-     * @throws ClientResponseException if the status code of response is 4xx
1050
-     * @throws ServerResponseException if the status code of response is 5xx
1051
-     *
1052
-     * @return Elasticsearch|Promise
1053
-     */
1054
-    public function getDataStream(array $params = [])
1055
-    {
1056
-        if (isset($params['name'])) {
1057
-            $url = '/_data_stream/' . $this->encode($params['name']);
1058
-            $method = 'GET';
1059
-        } else {
1060
-            $url = '/_data_stream';
1061
-            $method = 'GET';
1062
-        }
1063
-        $url = $this->addQueryString($url, $params, ['expand_wildcards', 'include_defaults', 'master_timeout', 'verbose', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1064
-        $headers = ['Accept' => 'application/json'];
1065
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1066
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.get_data_stream');
1067
-        return $this->client->sendRequest($request);
1068
-    }
1069
-    /**
1070
-     * Returns mapping for one or more fields.
1071
-     *
1072
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html
1073
-     *
1074
-     * @param array{
1075
-     *     fields: list, // (REQUIRED) A comma-separated list of fields
1076
-     *     index: list, //  A comma-separated list of index names
1077
-     *     include_defaults: boolean, // Whether the default mapping values should be returned as well
1078
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1079
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1080
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1081
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1082
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1083
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1084
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1085
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1086
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1087
-     * } $params
1088
-     *
1089
-     * @throws MissingParameterException if a required parameter is missing
1090
-     * @throws NoNodeAvailableException if all the hosts are offline
1091
-     * @throws ClientResponseException if the status code of response is 4xx
1092
-     * @throws ServerResponseException if the status code of response is 5xx
1093
-     *
1094
-     * @return Elasticsearch|Promise
1095
-     */
1096
-    public function getFieldMapping(array $params = [])
1097
-    {
1098
-        $this->checkRequiredParameters(['fields'], $params);
1099
-        if (isset($params['index'])) {
1100
-            $url = '/' . $this->encode($params['index']) . '/_mapping/field/' . $this->encode($params['fields']);
1101
-            $method = 'GET';
1102
-        } else {
1103
-            $url = '/_mapping/field/' . $this->encode($params['fields']);
1104
-            $method = 'GET';
1105
-        }
1106
-        $url = $this->addQueryString($url, $params, ['include_defaults', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1107
-        $headers = ['Accept' => 'application/json'];
1108
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1109
-        $request = $this->addOtelAttributes($params, ['fields', 'index'], $request, 'indices.get_field_mapping');
1110
-        return $this->client->sendRequest($request);
1111
-    }
1112
-    /**
1113
-     * Returns an index template.
1114
-     *
1115
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html
1116
-     *
1117
-     * @param array{
1118
-     *     name: string, //  A pattern that returned template names must match
1119
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
1120
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
1121
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1122
-     *     include_defaults: boolean, // Return all relevant default configurations for the index template (default: false)
1123
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1124
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1125
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1126
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1127
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1128
-     * } $params
1129
-     *
1130
-     * @throws NoNodeAvailableException if all the hosts are offline
1131
-     * @throws ClientResponseException if the status code of response is 4xx
1132
-     * @throws ServerResponseException if the status code of response is 5xx
1133
-     *
1134
-     * @return Elasticsearch|Promise
1135
-     */
1136
-    public function getIndexTemplate(array $params = [])
1137
-    {
1138
-        if (isset($params['name'])) {
1139
-            $url = '/_index_template/' . $this->encode($params['name']);
1140
-            $method = 'GET';
1141
-        } else {
1142
-            $url = '/_index_template';
1143
-            $method = 'GET';
1144
-        }
1145
-        $url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'local', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1146
-        $headers = ['Accept' => 'application/json'];
1147
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1148
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.get_index_template');
1149
-        return $this->client->sendRequest($request);
1150
-    }
1151
-    /**
1152
-     * Returns mappings for one or more indices.
1153
-     *
1154
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
1155
-     *
1156
-     * @param array{
1157
-     *     index: list, //  A comma-separated list of index names
1158
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1159
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1160
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1161
-     *     master_timeout: time, // Specify timeout for connection to master
1162
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1163
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1164
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1165
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1166
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1167
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1168
-     * } $params
1169
-     *
1170
-     * @throws NoNodeAvailableException if all the hosts are offline
1171
-     * @throws ClientResponseException if the status code of response is 4xx
1172
-     * @throws ServerResponseException if the status code of response is 5xx
1173
-     *
1174
-     * @return Elasticsearch|Promise
1175
-     */
1176
-    public function getMapping(array $params = [])
1177
-    {
1178
-        if (isset($params['index'])) {
1179
-            $url = '/' . $this->encode($params['index']) . '/_mapping';
1180
-            $method = 'GET';
1181
-        } else {
1182
-            $url = '/_mapping';
1183
-            $method = 'GET';
1184
-        }
1185
-        $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1186
-        $headers = ['Accept' => 'application/json'];
1187
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1188
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.get_mapping');
1189
-        return $this->client->sendRequest($request);
1190
-    }
1191
-    /**
1192
-     * Returns settings for one or more indices.
1193
-     *
1194
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html
1195
-     *
1196
-     * @param array{
1197
-     *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1198
-     *     name: list, //  The name of the settings that should be included
1199
-     *     master_timeout: time, // Specify timeout for connection to master
1200
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1201
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1202
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1203
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
1204
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1205
-     *     include_defaults: boolean, // Whether to return all default setting for each of the indices.
1206
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1207
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1208
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1209
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1210
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1211
-     * } $params
1212
-     *
1213
-     * @throws NoNodeAvailableException if all the hosts are offline
1214
-     * @throws ClientResponseException if the status code of response is 4xx
1215
-     * @throws ServerResponseException if the status code of response is 5xx
1216
-     *
1217
-     * @return Elasticsearch|Promise
1218
-     */
1219
-    public function getSettings(array $params = [])
1220
-    {
1221
-        if (isset($params['index']) && isset($params['name'])) {
1222
-            $url = '/' . $this->encode($params['index']) . '/_settings/' . $this->encode($params['name']);
1223
-            $method = 'GET';
1224
-        } elseif (isset($params['index'])) {
1225
-            $url = '/' . $this->encode($params['index']) . '/_settings';
1226
-            $method = 'GET';
1227
-        } elseif (isset($params['name'])) {
1228
-            $url = '/_settings/' . $this->encode($params['name']);
1229
-            $method = 'GET';
1230
-        } else {
1231
-            $url = '/_settings';
1232
-            $method = 'GET';
1233
-        }
1234
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'flat_settings', 'local', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1235
-        $headers = ['Accept' => 'application/json'];
1236
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1237
-        $request = $this->addOtelAttributes($params, ['index', 'name'], $request, 'indices.get_settings');
1238
-        return $this->client->sendRequest($request);
1239
-    }
1240
-    /**
1241
-     * Returns an index template.
1242
-     *
1243
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html
1244
-     *
1245
-     * @param array{
1246
-     *     name: list, //  The comma separated names of the index templates
1247
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
1248
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
1249
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1250
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1251
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1252
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1253
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1254
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1255
-     * } $params
1256
-     *
1257
-     * @throws NoNodeAvailableException if all the hosts are offline
1258
-     * @throws ClientResponseException if the status code of response is 4xx
1259
-     * @throws ServerResponseException if the status code of response is 5xx
1260
-     *
1261
-     * @return Elasticsearch|Promise
1262
-     */
1263
-    public function getTemplate(array $params = [])
1264
-    {
1265
-        if (isset($params['name'])) {
1266
-            $url = '/_template/' . $this->encode($params['name']);
1267
-            $method = 'GET';
1268
-        } else {
1269
-            $url = '/_template';
1270
-            $method = 'GET';
1271
-        }
1272
-        $url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1273
-        $headers = ['Accept' => 'application/json'];
1274
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1275
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.get_template');
1276
-        return $this->client->sendRequest($request);
1277
-    }
1278
-    /**
1279
-     * Migrates an alias to a data stream
1280
-     *
1281
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
1282
-     *
1283
-     * @param array{
1284
-     *     name: string, // (REQUIRED) The name of the alias to migrate
1285
-     *     timeout: time, // Specify timeout for acknowledging the cluster state update
1286
-     *     master_timeout: time, // Specify timeout for connection to master
1287
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1288
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1289
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1290
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1291
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1292
-     * } $params
1293
-     *
1294
-     * @throws MissingParameterException if a required parameter is missing
1295
-     * @throws NoNodeAvailableException if all the hosts are offline
1296
-     * @throws ClientResponseException if the status code of response is 4xx
1297
-     * @throws ServerResponseException if the status code of response is 5xx
1298
-     *
1299
-     * @return Elasticsearch|Promise
1300
-     */
1301
-    public function migrateToDataStream(array $params = [])
1302
-    {
1303
-        $this->checkRequiredParameters(['name'], $params);
1304
-        $url = '/_data_stream/_migrate/' . $this->encode($params['name']);
1305
-        $method = 'POST';
1306
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1307
-        $headers = ['Accept' => 'application/json'];
1308
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1309
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.migrate_to_data_stream');
1310
-        return $this->client->sendRequest($request);
1311
-    }
1312
-    /**
1313
-     * Modifies a data stream
1314
-     *
1315
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
1316
-     *
1317
-     * @param array{
1318
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1319
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1320
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1321
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1322
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1323
-     *     body: array, // (REQUIRED) The data stream modifications
1324
-     * } $params
1325
-     *
1326
-     * @throws NoNodeAvailableException if all the hosts are offline
1327
-     * @throws ClientResponseException if the status code of response is 4xx
1328
-     * @throws ServerResponseException if the status code of response is 5xx
1329
-     *
1330
-     * @return Elasticsearch|Promise
1331
-     */
1332
-    public function modifyDataStream(array $params = [])
1333
-    {
1334
-        $this->checkRequiredParameters(['body'], $params);
1335
-        $url = '/_data_stream/_modify';
1336
-        $method = 'POST';
1337
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1338
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1339
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1340
-        $request = $this->addOtelAttributes($params, [], $request, 'indices.modify_data_stream');
1341
-        return $this->client->sendRequest($request);
1342
-    }
1343
-    /**
1344
-     * Opens an index.
1345
-     *
1346
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
1347
-     *
1348
-     * @param array{
1349
-     *     index: list, // (REQUIRED) A comma separated list of indices to open
1350
-     *     timeout: time, // Explicit operation timeout
1351
-     *     master_timeout: time, // Specify timeout for connection to master
1352
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1353
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1354
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1355
-     *     wait_for_active_shards: string, // Sets the number of active shards to wait for before the operation returns.
1356
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1357
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1358
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1359
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1360
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1361
-     * } $params
1362
-     *
1363
-     * @throws MissingParameterException if a required parameter is missing
1364
-     * @throws NoNodeAvailableException if all the hosts are offline
1365
-     * @throws ClientResponseException if the status code of response is 4xx
1366
-     * @throws ServerResponseException if the status code of response is 5xx
1367
-     *
1368
-     * @return Elasticsearch|Promise
1369
-     */
1370
-    public function open(array $params = [])
1371
-    {
1372
-        $this->checkRequiredParameters(['index'], $params);
1373
-        $url = '/' . $this->encode($params['index']) . '/_open';
1374
-        $method = 'POST';
1375
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1376
-        $headers = ['Accept' => 'application/json'];
1377
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1378
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.open');
1379
-        return $this->client->sendRequest($request);
1380
-    }
1381
-    /**
1382
-     * Promotes a data stream from a replicated data stream managed by CCR to a regular data stream
1383
-     *
1384
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
1385
-     *
1386
-     * @param array{
1387
-     *     name: string, // (REQUIRED) The name of the data stream
1388
-     *     master_timeout: time, // Specify timeout for connection to master
1389
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1390
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1391
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1392
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1393
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1394
-     * } $params
1395
-     *
1396
-     * @throws MissingParameterException if a required parameter is missing
1397
-     * @throws NoNodeAvailableException if all the hosts are offline
1398
-     * @throws ClientResponseException if the status code of response is 4xx
1399
-     * @throws ServerResponseException if the status code of response is 5xx
1400
-     *
1401
-     * @return Elasticsearch|Promise
1402
-     */
1403
-    public function promoteDataStream(array $params = [])
1404
-    {
1405
-        $this->checkRequiredParameters(['name'], $params);
1406
-        $url = '/_data_stream/_promote/' . $this->encode($params['name']);
1407
-        $method = 'POST';
1408
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1409
-        $headers = ['Accept' => 'application/json'];
1410
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1411
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.promote_data_stream');
1412
-        return $this->client->sendRequest($request);
1413
-    }
1414
-    /**
1415
-     * Creates or updates an alias.
1416
-     *
1417
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
1418
-     *
1419
-     * @param array{
1420
-     *     index: list, // (REQUIRED) A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
1421
-     *     name: string, // (REQUIRED) The name of the alias to be created or updated
1422
-     *     timeout: time, // Explicit timestamp for the document
1423
-     *     master_timeout: time, // Specify timeout for connection to master
1424
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1425
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1426
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1427
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1428
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1429
-     *     body: array, //  The settings for the alias, such as `routing` or `filter`
1430
-     * } $params
1431
-     *
1432
-     * @throws MissingParameterException if a required parameter is missing
1433
-     * @throws NoNodeAvailableException if all the hosts are offline
1434
-     * @throws ClientResponseException if the status code of response is 4xx
1435
-     * @throws ServerResponseException if the status code of response is 5xx
1436
-     *
1437
-     * @return Elasticsearch|Promise
1438
-     */
1439
-    public function putAlias(array $params = [])
1440
-    {
1441
-        $this->checkRequiredParameters(['index', 'name'], $params);
1442
-        $url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
1443
-        $method = 'PUT';
1444
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1445
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1446
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1447
-        $request = $this->addOtelAttributes($params, ['index', 'name'], $request, 'indices.put_alias');
1448
-        return $this->client->sendRequest($request);
1449
-    }
1450
-    /**
1451
-     * Updates the data stream lifecycle of the selected data streams.
1452
-     *
1453
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html
1454
-     *
1455
-     * @param array{
1456
-     *     name: list, // (REQUIRED) A comma-separated list of data streams whose lifecycle will be updated; use `*` to set the lifecycle to all data streams
1457
-     *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1458
-     *     timeout: time, // Explicit timestamp for the document
1459
-     *     master_timeout: time, // Specify timeout for connection to master
1460
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1461
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1462
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1463
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1464
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1465
-     *     body: array, //  The data stream lifecycle configuration that consist of the data retention
1466
-     * } $params
1467
-     *
1468
-     * @throws MissingParameterException if a required parameter is missing
1469
-     * @throws NoNodeAvailableException if all the hosts are offline
1470
-     * @throws ClientResponseException if the status code of response is 4xx
1471
-     * @throws ServerResponseException if the status code of response is 5xx
1472
-     *
1473
-     * @return Elasticsearch|Promise
1474
-     */
1475
-    public function putDataLifecycle(array $params = [])
1476
-    {
1477
-        $this->checkRequiredParameters(['name'], $params);
1478
-        $url = '/_data_stream/' . $this->encode($params['name']) . '/_lifecycle';
1479
-        $method = 'PUT';
1480
-        $url = $this->addQueryString($url, $params, ['expand_wildcards', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1481
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1482
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1483
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.put_data_lifecycle');
1484
-        return $this->client->sendRequest($request);
1485
-    }
1486
-    /**
1487
-     * Creates or updates an index template.
1488
-     *
1489
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html
1490
-     *
1491
-     * @param array{
1492
-     *     name: string, // (REQUIRED) The name of the template
1493
-     *     create: boolean, // Whether the index template should only be added if new or can also replace an existing one
1494
-     *     cause: string, // User defined reason for creating/updating the index template
1495
-     *     master_timeout: time, // Specify timeout for connection to master
1496
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1497
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1498
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1499
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1500
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1501
-     *     body: array, // (REQUIRED) The template definition
1502
-     * } $params
1503
-     *
1504
-     * @throws MissingParameterException if a required parameter is missing
1505
-     * @throws NoNodeAvailableException if all the hosts are offline
1506
-     * @throws ClientResponseException if the status code of response is 4xx
1507
-     * @throws ServerResponseException if the status code of response is 5xx
1508
-     *
1509
-     * @return Elasticsearch|Promise
1510
-     */
1511
-    public function putIndexTemplate(array $params = [])
1512
-    {
1513
-        $this->checkRequiredParameters(['name', 'body'], $params);
1514
-        $url = '/_index_template/' . $this->encode($params['name']);
1515
-        $method = 'PUT';
1516
-        $url = $this->addQueryString($url, $params, ['create', 'cause', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1517
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1518
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1519
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.put_index_template');
1520
-        return $this->client->sendRequest($request);
1521
-    }
1522
-    /**
1523
-     * Updates the index mappings.
1524
-     *
1525
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html
1526
-     *
1527
-     * @param array{
1528
-     *     index: list, // (REQUIRED) A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
1529
-     *     timeout: time, // Explicit operation timeout
1530
-     *     master_timeout: time, // Specify timeout for connection to master
1531
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1532
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1533
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1534
-     *     write_index_only: boolean, // When true, applies mappings only to the write index of an alias or data stream
1535
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1536
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1537
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1538
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1539
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1540
-     *     body: array, // (REQUIRED) The mapping definition
1541
-     * } $params
1542
-     *
1543
-     * @throws MissingParameterException if a required parameter is missing
1544
-     * @throws NoNodeAvailableException if all the hosts are offline
1545
-     * @throws ClientResponseException if the status code of response is 4xx
1546
-     * @throws ServerResponseException if the status code of response is 5xx
1547
-     *
1548
-     * @return Elasticsearch|Promise
1549
-     */
1550
-    public function putMapping(array $params = [])
1551
-    {
1552
-        $this->checkRequiredParameters(['index', 'body'], $params);
1553
-        $url = '/' . $this->encode($params['index']) . '/_mapping';
1554
-        $method = 'PUT';
1555
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'write_index_only', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1556
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1557
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1558
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.put_mapping');
1559
-        return $this->client->sendRequest($request);
1560
-    }
1561
-    /**
1562
-     * Updates the index settings.
1563
-     *
1564
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html
1565
-     *
1566
-     * @param array{
1567
-     *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1568
-     *     master_timeout: time, // Specify timeout for connection to master
1569
-     *     timeout: time, // Explicit operation timeout
1570
-     *     preserve_existing: boolean, // Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`
1571
-     *     reopen: boolean, // Whether to close and reopen the index to apply non-dynamic settings. If set to `true` the indices to which the settings are being applied will be closed temporarily and then reopened in order to apply the changes. The default is `false`
1572
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1573
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1574
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1575
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
1576
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1577
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1578
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1579
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1580
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1581
-     *     body: array, // (REQUIRED) The index settings to be updated
1582
-     * } $params
1583
-     *
1584
-     * @throws NoNodeAvailableException if all the hosts are offline
1585
-     * @throws ClientResponseException if the status code of response is 4xx
1586
-     * @throws ServerResponseException if the status code of response is 5xx
1587
-     *
1588
-     * @return Elasticsearch|Promise
1589
-     */
1590
-    public function putSettings(array $params = [])
1591
-    {
1592
-        $this->checkRequiredParameters(['body'], $params);
1593
-        if (isset($params['index'])) {
1594
-            $url = '/' . $this->encode($params['index']) . '/_settings';
1595
-            $method = 'PUT';
1596
-        } else {
1597
-            $url = '/_settings';
1598
-            $method = 'PUT';
1599
-        }
1600
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'preserve_existing', 'reopen', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'flat_settings', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1601
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1602
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1603
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.put_settings');
1604
-        return $this->client->sendRequest($request);
1605
-    }
1606
-    /**
1607
-     * Creates or updates an index template.
1608
-     *
1609
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html
1610
-     *
1611
-     * @param array{
1612
-     *     name: string, // (REQUIRED) The name of the template
1613
-     *     order: number, // The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
1614
-     *     create: boolean, // Whether the index template should only be added if new or can also replace an existing one
1615
-     *     master_timeout: time, // Specify timeout for connection to master
1616
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1617
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1618
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1619
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1620
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1621
-     *     body: array, // (REQUIRED) The template definition
1622
-     * } $params
1623
-     *
1624
-     * @throws MissingParameterException if a required parameter is missing
1625
-     * @throws NoNodeAvailableException if all the hosts are offline
1626
-     * @throws ClientResponseException if the status code of response is 4xx
1627
-     * @throws ServerResponseException if the status code of response is 5xx
1628
-     *
1629
-     * @return Elasticsearch|Promise
1630
-     */
1631
-    public function putTemplate(array $params = [])
1632
-    {
1633
-        $this->checkRequiredParameters(['name', 'body'], $params);
1634
-        $url = '/_template/' . $this->encode($params['name']);
1635
-        $method = 'PUT';
1636
-        $url = $this->addQueryString($url, $params, ['order', 'create', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1637
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1638
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1639
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.put_template');
1640
-        return $this->client->sendRequest($request);
1641
-    }
1642
-    /**
1643
-     * Returns information about ongoing index shard recoveries.
1644
-     *
1645
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html
1646
-     *
1647
-     * @param array{
1648
-     *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1649
-     *     detailed: boolean, // Whether to display detailed information about shard recovery
1650
-     *     active_only: boolean, // Display only those recoveries that are currently on-going
1651
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1652
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1653
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1654
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1655
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1656
-     * } $params
1657
-     *
1658
-     * @throws NoNodeAvailableException if all the hosts are offline
1659
-     * @throws ClientResponseException if the status code of response is 4xx
1660
-     * @throws ServerResponseException if the status code of response is 5xx
1661
-     *
1662
-     * @return Elasticsearch|Promise
1663
-     */
1664
-    public function recovery(array $params = [])
1665
-    {
1666
-        if (isset($params['index'])) {
1667
-            $url = '/' . $this->encode($params['index']) . '/_recovery';
1668
-            $method = 'GET';
1669
-        } else {
1670
-            $url = '/_recovery';
1671
-            $method = 'GET';
1672
-        }
1673
-        $url = $this->addQueryString($url, $params, ['detailed', 'active_only', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1674
-        $headers = ['Accept' => 'application/json'];
1675
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1676
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.recovery');
1677
-        return $this->client->sendRequest($request);
1678
-    }
1679
-    /**
1680
-     * Performs the refresh operation in one or more indices.
1681
-     *
1682
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html
1683
-     *
1684
-     * @param array{
1685
-     *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1686
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1687
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1688
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1689
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1690
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1691
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1692
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1693
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1694
-     * } $params
1695
-     *
1696
-     * @throws NoNodeAvailableException if all the hosts are offline
1697
-     * @throws ClientResponseException if the status code of response is 4xx
1698
-     * @throws ServerResponseException if the status code of response is 5xx
1699
-     *
1700
-     * @return Elasticsearch|Promise
1701
-     */
1702
-    public function refresh(array $params = [])
1703
-    {
1704
-        if (isset($params['index'])) {
1705
-            $url = '/' . $this->encode($params['index']) . '/_refresh';
1706
-            $method = empty($params['body']) ? 'GET' : 'POST';
1707
-        } else {
1708
-            $url = '/_refresh';
1709
-            $method = empty($params['body']) ? 'GET' : 'POST';
1710
-        }
1711
-        $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1712
-        $headers = ['Accept' => 'application/json'];
1713
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1714
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.refresh');
1715
-        return $this->client->sendRequest($request);
1716
-    }
1717
-    /**
1718
-     * Reloads an index's search analyzers and their resources.
1719
-     *
1720
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-reload-analyzers.html
1721
-     *
1722
-     * @param array{
1723
-     *     index: list, // (REQUIRED) A comma-separated list of index names to reload analyzers for
1724
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1725
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1726
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1727
-     *     resource: string, // changed resource to reload analyzers from if applicable
1728
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1729
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1730
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1731
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1732
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1733
-     * } $params
1734
-     *
1735
-     * @throws MissingParameterException if a required parameter is missing
1736
-     * @throws NoNodeAvailableException if all the hosts are offline
1737
-     * @throws ClientResponseException if the status code of response is 4xx
1738
-     * @throws ServerResponseException if the status code of response is 5xx
1739
-     *
1740
-     * @return Elasticsearch|Promise
1741
-     */
1742
-    public function reloadSearchAnalyzers(array $params = [])
1743
-    {
1744
-        $this->checkRequiredParameters(['index'], $params);
1745
-        $url = '/' . $this->encode($params['index']) . '/_reload_search_analyzers';
1746
-        $method = empty($params['body']) ? 'GET' : 'POST';
1747
-        $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'resource', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1748
-        $headers = ['Accept' => 'application/json'];
1749
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1750
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.reload_search_analyzers');
1751
-        return $this->client->sendRequest($request);
1752
-    }
1753
-    /**
1754
-     * Resolves the specified index expressions to return information about each cluster, including the local cluster, if included.
1755
-     *
1756
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-cluster-api.html
1757
-     *
1758
-     * @param array{
1759
-     *     name: list, // (REQUIRED) A comma-separated list of cluster:index names or wildcard expressions
1760
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1761
-     *     ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
1762
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1763
-     *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1764
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1765
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1766
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1767
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1768
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1769
-     * } $params
1770
-     *
1771
-     * @throws MissingParameterException if a required parameter is missing
1772
-     * @throws NoNodeAvailableException if all the hosts are offline
1773
-     * @throws ClientResponseException if the status code of response is 4xx
1774
-     * @throws ServerResponseException if the status code of response is 5xx
1775
-     *
1776
-     * @return Elasticsearch|Promise
1777
-     */
1778
-    public function resolveCluster(array $params = [])
1779
-    {
1780
-        $this->checkRequiredParameters(['name'], $params);
1781
-        $url = '/_resolve/cluster/' . $this->encode($params['name']);
1782
-        $method = 'GET';
1783
-        $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1784
-        $headers = ['Accept' => 'application/json'];
1785
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1786
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.resolve_cluster');
1787
-        return $this->client->sendRequest($request);
1788
-    }
1789
-    /**
1790
-     * Returns information about any matching indices, aliases, and data streams
1791
-     *
1792
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html
1793
-     *
1794
-     * @param array{
1795
-     *     name: list, // (REQUIRED) A comma-separated list of names or wildcard expressions
1796
-     *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1797
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1798
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1799
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1800
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1801
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1802
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1803
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1804
-     * } $params
1805
-     *
1806
-     * @throws MissingParameterException if a required parameter is missing
1807
-     * @throws NoNodeAvailableException if all the hosts are offline
1808
-     * @throws ClientResponseException if the status code of response is 4xx
1809
-     * @throws ServerResponseException if the status code of response is 5xx
1810
-     *
1811
-     * @return Elasticsearch|Promise
1812
-     */
1813
-    public function resolveIndex(array $params = [])
1814
-    {
1815
-        $this->checkRequiredParameters(['name'], $params);
1816
-        $url = '/_resolve/index/' . $this->encode($params['name']);
1817
-        $method = 'GET';
1818
-        $url = $this->addQueryString($url, $params, ['expand_wildcards', 'ignore_unavailable', 'allow_no_indices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1819
-        $headers = ['Accept' => 'application/json'];
1820
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1821
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.resolve_index');
1822
-        return $this->client->sendRequest($request);
1823
-    }
1824
-    /**
1825
-     * Updates an alias to point to a new index when the existing index
1826
-     * is considered to be too large or too old.
1827
-     *
1828
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html
1829
-     *
1830
-     * @param array{
1831
-     *     alias: string, // (REQUIRED) The name of the alias to rollover
1832
-     *     new_index: string, //  The name of the rollover index
1833
-     *     timeout: time, // Explicit operation timeout
1834
-     *     dry_run: boolean, // If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false
1835
-     *     master_timeout: time, // Specify timeout for connection to master
1836
-     *     wait_for_active_shards: string, // Set the number of active shards to wait for on the newly created rollover index before the operation returns.
1837
-     *     lazy: boolean, // If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams.
1838
-     *     target_failure_store: boolean, // If set to true, the rollover action will be applied on the failure store of the data stream.
1839
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1840
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1841
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1842
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1843
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1844
-     *     body: array, //  The conditions that needs to be met for executing rollover
1845
-     * } $params
1846
-     *
1847
-     * @throws MissingParameterException if a required parameter is missing
1848
-     * @throws NoNodeAvailableException if all the hosts are offline
1849
-     * @throws ClientResponseException if the status code of response is 4xx
1850
-     * @throws ServerResponseException if the status code of response is 5xx
1851
-     *
1852
-     * @return Elasticsearch|Promise
1853
-     */
1854
-    public function rollover(array $params = [])
1855
-    {
1856
-        $this->checkRequiredParameters(['alias'], $params);
1857
-        if (isset($params['new_index'])) {
1858
-            $url = '/' . $this->encode($params['alias']) . '/_rollover/' . $this->encode($params['new_index']);
1859
-            $method = 'POST';
1860
-        } else {
1861
-            $url = '/' . $this->encode($params['alias']) . '/_rollover';
1862
-            $method = 'POST';
1863
-        }
1864
-        $url = $this->addQueryString($url, $params, ['timeout', 'dry_run', 'master_timeout', 'wait_for_active_shards', 'lazy', 'target_failure_store', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1865
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1866
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1867
-        $request = $this->addOtelAttributes($params, ['alias', 'new_index'], $request, 'indices.rollover');
1868
-        return $this->client->sendRequest($request);
1869
-    }
1870
-    /**
1871
-     * Provides low-level information about segments in a Lucene index.
1872
-     *
1873
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html
1874
-     *
1875
-     * @param array{
1876
-     *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1877
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1878
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1879
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1880
-     *     verbose: boolean, // Includes detailed memory usage by Lucene.
1881
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1882
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1883
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1884
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1885
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1886
-     * } $params
1887
-     *
1888
-     * @throws NoNodeAvailableException if all the hosts are offline
1889
-     * @throws ClientResponseException if the status code of response is 4xx
1890
-     * @throws ServerResponseException if the status code of response is 5xx
1891
-     *
1892
-     * @return Elasticsearch|Promise
1893
-     */
1894
-    public function segments(array $params = [])
1895
-    {
1896
-        if (isset($params['index'])) {
1897
-            $url = '/' . $this->encode($params['index']) . '/_segments';
1898
-            $method = 'GET';
1899
-        } else {
1900
-            $url = '/_segments';
1901
-            $method = 'GET';
1902
-        }
1903
-        $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'verbose', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1904
-        $headers = ['Accept' => 'application/json'];
1905
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1906
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.segments');
1907
-        return $this->client->sendRequest($request);
1908
-    }
1909
-    /**
1910
-     * Provides store information for shard copies of indices.
1911
-     *
1912
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html
1913
-     *
1914
-     * @param array{
1915
-     *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1916
-     *     status: list, // A comma-separated list of statuses used to filter on shards to get store information for
1917
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1918
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1919
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1920
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1921
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1922
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1923
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1924
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1925
-     * } $params
1926
-     *
1927
-     * @throws NoNodeAvailableException if all the hosts are offline
1928
-     * @throws ClientResponseException if the status code of response is 4xx
1929
-     * @throws ServerResponseException if the status code of response is 5xx
1930
-     *
1931
-     * @return Elasticsearch|Promise
1932
-     */
1933
-    public function shardStores(array $params = [])
1934
-    {
1935
-        if (isset($params['index'])) {
1936
-            $url = '/' . $this->encode($params['index']) . '/_shard_stores';
1937
-            $method = 'GET';
1938
-        } else {
1939
-            $url = '/_shard_stores';
1940
-            $method = 'GET';
1941
-        }
1942
-        $url = $this->addQueryString($url, $params, ['status', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1943
-        $headers = ['Accept' => 'application/json'];
1944
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1945
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.shard_stores');
1946
-        return $this->client->sendRequest($request);
1947
-    }
1948
-    /**
1949
-     * Allow to shrink an existing index into a new index with fewer primary shards.
1950
-     *
1951
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html
1952
-     *
1953
-     * @param array{
1954
-     *     index: string, // (REQUIRED) The name of the source index to shrink
1955
-     *     target: string, // (REQUIRED) The name of the target index to shrink into
1956
-     *     timeout: time, // Explicit operation timeout
1957
-     *     master_timeout: time, // Specify timeout for connection to master
1958
-     *     wait_for_active_shards: string, // Set the number of active shards to wait for on the shrunken index before the operation returns.
1959
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1960
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1961
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1962
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1963
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1964
-     *     body: array, //  The configuration for the target index (`settings` and `aliases`)
1965
-     * } $params
1966
-     *
1967
-     * @throws MissingParameterException if a required parameter is missing
1968
-     * @throws NoNodeAvailableException if all the hosts are offline
1969
-     * @throws ClientResponseException if the status code of response is 4xx
1970
-     * @throws ServerResponseException if the status code of response is 5xx
1971
-     *
1972
-     * @return Elasticsearch|Promise
1973
-     */
1974
-    public function shrink(array $params = [])
1975
-    {
1976
-        $this->checkRequiredParameters(['index', 'target'], $params);
1977
-        $url = '/' . $this->encode($params['index']) . '/_shrink/' . $this->encode($params['target']);
1978
-        $method = 'PUT';
1979
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1980
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1981
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1982
-        $request = $this->addOtelAttributes($params, ['index', 'target'], $request, 'indices.shrink');
1983
-        return $this->client->sendRequest($request);
1984
-    }
1985
-    /**
1986
-     * Simulate matching the given index name against the index templates in the system
1987
-     *
1988
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html
1989
-     *
1990
-     * @param array{
1991
-     *     name: string, // (REQUIRED) The name of the index (it must be a concrete index name)
1992
-     *     create: boolean, // Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
1993
-     *     cause: string, // User defined reason for dry-run creating the new template for simulation purposes
1994
-     *     master_timeout: time, // Specify timeout for connection to master
1995
-     *     include_defaults: boolean, // Return all relevant default configurations for this index template simulation (default: false)
1996
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1997
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1998
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1999
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2000
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2001
-     *     body: array, //  New index template definition, which will be included in the simulation, as if it already exists in the system
2002
-     * } $params
2003
-     *
2004
-     * @throws MissingParameterException if a required parameter is missing
2005
-     * @throws NoNodeAvailableException if all the hosts are offline
2006
-     * @throws ClientResponseException if the status code of response is 4xx
2007
-     * @throws ServerResponseException if the status code of response is 5xx
2008
-     *
2009
-     * @return Elasticsearch|Promise
2010
-     */
2011
-    public function simulateIndexTemplate(array $params = [])
2012
-    {
2013
-        $this->checkRequiredParameters(['name'], $params);
2014
-        $url = '/_index_template/_simulate_index/' . $this->encode($params['name']);
2015
-        $method = 'POST';
2016
-        $url = $this->addQueryString($url, $params, ['create', 'cause', 'master_timeout', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2017
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
2018
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2019
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.simulate_index_template');
2020
-        return $this->client->sendRequest($request);
2021
-    }
2022
-    /**
2023
-     * Simulate resolving the given template name or body
2024
-     *
2025
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html
2026
-     *
2027
-     * @param array{
2028
-     *     name: string, //  The name of the index template
2029
-     *     create: boolean, // Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
2030
-     *     cause: string, // User defined reason for dry-run creating the new template for simulation purposes
2031
-     *     master_timeout: time, // Specify timeout for connection to master
2032
-     *     include_defaults: boolean, // Return all relevant default configurations for this template simulation (default: false)
2033
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2034
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2035
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2036
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2037
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2038
-     *     body: array, //  New index template definition to be simulated, if no index template name is specified
2039
-     * } $params
2040
-     *
2041
-     * @throws NoNodeAvailableException if all the hosts are offline
2042
-     * @throws ClientResponseException if the status code of response is 4xx
2043
-     * @throws ServerResponseException if the status code of response is 5xx
2044
-     *
2045
-     * @return Elasticsearch|Promise
2046
-     */
2047
-    public function simulateTemplate(array $params = [])
2048
-    {
2049
-        if (isset($params['name'])) {
2050
-            $url = '/_index_template/_simulate/' . $this->encode($params['name']);
2051
-            $method = 'POST';
2052
-        } else {
2053
-            $url = '/_index_template/_simulate';
2054
-            $method = 'POST';
2055
-        }
2056
-        $url = $this->addQueryString($url, $params, ['create', 'cause', 'master_timeout', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2057
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
2058
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2059
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'indices.simulate_template');
2060
-        return $this->client->sendRequest($request);
2061
-    }
2062
-    /**
2063
-     * Allows you to split an existing index into a new index with more primary shards.
2064
-     *
2065
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html
2066
-     *
2067
-     * @param array{
2068
-     *     index: string, // (REQUIRED) The name of the source index to split
2069
-     *     target: string, // (REQUIRED) The name of the target index to split into
2070
-     *     timeout: time, // Explicit operation timeout
2071
-     *     master_timeout: time, // Specify timeout for connection to master
2072
-     *     wait_for_active_shards: string, // Set the number of active shards to wait for on the shrunken index before the operation returns.
2073
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2074
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2075
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2076
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2077
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2078
-     *     body: array, //  The configuration for the target index (`settings` and `aliases`)
2079
-     * } $params
2080
-     *
2081
-     * @throws MissingParameterException if a required parameter is missing
2082
-     * @throws NoNodeAvailableException if all the hosts are offline
2083
-     * @throws ClientResponseException if the status code of response is 4xx
2084
-     * @throws ServerResponseException if the status code of response is 5xx
2085
-     *
2086
-     * @return Elasticsearch|Promise
2087
-     */
2088
-    public function split(array $params = [])
2089
-    {
2090
-        $this->checkRequiredParameters(['index', 'target'], $params);
2091
-        $url = '/' . $this->encode($params['index']) . '/_split/' . $this->encode($params['target']);
2092
-        $method = 'PUT';
2093
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2094
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
2095
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2096
-        $request = $this->addOtelAttributes($params, ['index', 'target'], $request, 'indices.split');
2097
-        return $this->client->sendRequest($request);
2098
-    }
2099
-    /**
2100
-     * Provides statistics on operations happening in an index.
2101
-     *
2102
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html
2103
-     *
2104
-     * @param array{
2105
-     *     metric: list, //  Limit the information returned the specific metrics.
2106
-     *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
2107
-     *     completion_fields: list, // A comma-separated list of fields for the `completion` index metric (supports wildcards)
2108
-     *     fielddata_fields: list, // A comma-separated list of fields for the `fielddata` index metric (supports wildcards)
2109
-     *     fields: list, // A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
2110
-     *     groups: list, // A comma-separated list of search groups for `search` index metric
2111
-     *     level: enum, // Return stats aggregated at cluster, index or shard level
2112
-     *     include_segment_file_sizes: boolean, // Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
2113
-     *     include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
2114
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
2115
-     *     forbid_closed_indices: boolean, // If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices
2116
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2117
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2118
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2119
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2120
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2121
-     * } $params
2122
-     *
2123
-     * @throws NoNodeAvailableException if all the hosts are offline
2124
-     * @throws ClientResponseException if the status code of response is 4xx
2125
-     * @throws ServerResponseException if the status code of response is 5xx
2126
-     *
2127
-     * @return Elasticsearch|Promise
2128
-     */
2129
-    public function stats(array $params = [])
2130
-    {
2131
-        if (isset($params['index']) && isset($params['metric'])) {
2132
-            $url = '/' . $this->encode($params['index']) . '/_stats/' . $this->encode($params['metric']);
2133
-            $method = 'GET';
2134
-        } elseif (isset($params['metric'])) {
2135
-            $url = '/_stats/' . $this->encode($params['metric']);
2136
-            $method = 'GET';
2137
-        } elseif (isset($params['index'])) {
2138
-            $url = '/' . $this->encode($params['index']) . '/_stats';
2139
-            $method = 'GET';
2140
-        } else {
2141
-            $url = '/_stats';
2142
-            $method = 'GET';
2143
-        }
2144
-        $url = $this->addQueryString($url, $params, ['completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'include_segment_file_sizes', 'include_unloaded_segments', 'expand_wildcards', 'forbid_closed_indices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2145
-        $headers = ['Accept' => 'application/json'];
2146
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2147
-        $request = $this->addOtelAttributes($params, ['metric', 'index'], $request, 'indices.stats');
2148
-        return $this->client->sendRequest($request);
2149
-    }
2150
-    /**
2151
-     * Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.
2152
-     *
2153
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html
2154
-     *
2155
-     * @param array{
2156
-     *     index: string, // (REQUIRED) The name of the index to unfreeze
2157
-     *     timeout: time, // Explicit operation timeout
2158
-     *     master_timeout: time, // Specify timeout for connection to master
2159
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
2160
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
2161
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
2162
-     *     wait_for_active_shards: string, // Sets the number of active shards to wait for before the operation returns.
2163
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2164
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2165
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2166
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2167
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2168
-     * } $params
2169
-     *
2170
-     * @throws MissingParameterException if a required parameter is missing
2171
-     * @throws NoNodeAvailableException if all the hosts are offline
2172
-     * @throws ClientResponseException if the status code of response is 4xx
2173
-     * @throws ServerResponseException if the status code of response is 5xx
2174
-     *
2175
-     * @return Elasticsearch|Promise
2176
-     */
2177
-    public function unfreeze(array $params = [])
2178
-    {
2179
-        $this->checkRequiredParameters(['index'], $params);
2180
-        $url = '/' . $this->encode($params['index']) . '/_unfreeze';
2181
-        $method = 'POST';
2182
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2183
-        $headers = ['Accept' => 'application/json'];
2184
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2185
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.unfreeze');
2186
-        return $this->client->sendRequest($request);
2187
-    }
2188
-    /**
2189
-     * Updates index aliases.
2190
-     *
2191
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
2192
-     *
2193
-     * @param array{
2194
-     *     timeout: time, // Request timeout
2195
-     *     master_timeout: time, // Specify timeout for connection to master
2196
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2197
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2198
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2199
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2200
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2201
-     *     body: array, // (REQUIRED) The definition of `actions` to perform
2202
-     * } $params
2203
-     *
2204
-     * @throws NoNodeAvailableException if all the hosts are offline
2205
-     * @throws ClientResponseException if the status code of response is 4xx
2206
-     * @throws ServerResponseException if the status code of response is 5xx
2207
-     *
2208
-     * @return Elasticsearch|Promise
2209
-     */
2210
-    public function updateAliases(array $params = [])
2211
-    {
2212
-        $this->checkRequiredParameters(['body'], $params);
2213
-        $url = '/_aliases';
2214
-        $method = 'POST';
2215
-        $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2216
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
2217
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2218
-        $request = $this->addOtelAttributes($params, [], $request, 'indices.update_aliases');
2219
-        return $this->client->sendRequest($request);
2220
-    }
2221
-    /**
2222
-     * Allows a user to validate a potentially expensive query without executing it.
2223
-     *
2224
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html
2225
-     *
2226
-     * @param array{
2227
-     *     index: list, //  A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
2228
-     *     explain: boolean, // Return detailed information about the error
2229
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
2230
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
2231
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
2232
-     *     q: string, // Query in the Lucene query string syntax
2233
-     *     analyzer: string, // The analyzer to use for the query string
2234
-     *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
2235
-     *     default_operator: enum, // The default operator for query string query (AND or OR)
2236
-     *     df: string, // The field to use as default where no field prefix is given in the query string
2237
-     *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
2238
-     *     rewrite: boolean, // Provide a more detailed explanation showing the actual Lucene query that will be executed.
2239
-     *     all_shards: boolean, // Execute validation on all shards instead of one random shard per index
2240
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2241
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2242
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2243
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2244
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2245
-     *     body: array, //  The query definition specified with the Query DSL
2246
-     * } $params
2247
-     *
2248
-     * @throws NoNodeAvailableException if all the hosts are offline
2249
-     * @throws ClientResponseException if the status code of response is 4xx
2250
-     * @throws ServerResponseException if the status code of response is 5xx
2251
-     *
2252
-     * @return Elasticsearch|Promise
2253
-     */
2254
-    public function validateQuery(array $params = [])
2255
-    {
2256
-        if (isset($params['index'])) {
2257
-            $url = '/' . $this->encode($params['index']) . '/_validate/query';
2258
-            $method = empty($params['body']) ? 'GET' : 'POST';
2259
-        } else {
2260
-            $url = '/_validate/query';
2261
-            $method = empty($params['body']) ? 'GET' : 'POST';
2262
-        }
2263
-        $url = $this->addQueryString($url, $params, ['explain', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'q', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'lenient', 'rewrite', 'all_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2264
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
2265
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2266
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'indices.validate_query');
2267
-        return $this->client->sendRequest($request);
2268
-    }
28
+	/**
29
+	 * Adds a block to an index.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html
32
+	 *
33
+	 * @param array{
34
+	 *     index: list, // (REQUIRED) A comma separated list of indices to add a block to
35
+	 *     block: string, // (REQUIRED) The block to add (one of read, write, read_only or metadata)
36
+	 *     timeout: time, // Explicit operation timeout
37
+	 *     master_timeout: time, // Specify timeout for connection to master
38
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
39
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
40
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
41
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
42
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
43
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
44
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
45
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
46
+	 * } $params
47
+	 *
48
+	 * @throws MissingParameterException if a required parameter is missing
49
+	 * @throws NoNodeAvailableException if all the hosts are offline
50
+	 * @throws ClientResponseException if the status code of response is 4xx
51
+	 * @throws ServerResponseException if the status code of response is 5xx
52
+	 *
53
+	 * @return Elasticsearch|Promise
54
+	 */
55
+	public function addBlock(array $params = [])
56
+	{
57
+		$this->checkRequiredParameters(['index', 'block'], $params);
58
+		$url = '/' . $this->encode($params['index']) . '/_block/' . $this->encode($params['block']);
59
+		$method = 'PUT';
60
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
61
+		$headers = ['Accept' => 'application/json'];
62
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
63
+		$request = $this->addOtelAttributes($params, ['index', 'block'], $request, 'indices.add_block');
64
+		return $this->client->sendRequest($request);
65
+	}
66
+	/**
67
+	 * Performs the analysis process on a text and return the tokens breakdown of the text.
68
+	 *
69
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html
70
+	 *
71
+	 * @param array{
72
+	 *     index: string, //  The name of the index to scope the operation
73
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
74
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
75
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
76
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
77
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
78
+	 *     body: array, //  Define analyzer/tokenizer parameters and the text on which the analysis should be performed
79
+	 * } $params
80
+	 *
81
+	 * @throws NoNodeAvailableException if all the hosts are offline
82
+	 * @throws ClientResponseException if the status code of response is 4xx
83
+	 * @throws ServerResponseException if the status code of response is 5xx
84
+	 *
85
+	 * @return Elasticsearch|Promise
86
+	 */
87
+	public function analyze(array $params = [])
88
+	{
89
+		if (isset($params['index'])) {
90
+			$url = '/' . $this->encode($params['index']) . '/_analyze';
91
+			$method = empty($params['body']) ? 'GET' : 'POST';
92
+		} else {
93
+			$url = '/_analyze';
94
+			$method = empty($params['body']) ? 'GET' : 'POST';
95
+		}
96
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
97
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
98
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
99
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.analyze');
100
+		return $this->client->sendRequest($request);
101
+	}
102
+	/**
103
+	 * Clears all or specific caches for one or more indices.
104
+	 *
105
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html
106
+	 *
107
+	 * @param array{
108
+	 *     index: list, //  A comma-separated list of index name to limit the operation
109
+	 *     fielddata: boolean, // Clear field data
110
+	 *     fields: list, // A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)
111
+	 *     query: boolean, // Clear query caches
112
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
113
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
114
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
115
+	 *     request: boolean, // Clear request cache
116
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
117
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
118
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
119
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
120
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
121
+	 * } $params
122
+	 *
123
+	 * @throws NoNodeAvailableException if all the hosts are offline
124
+	 * @throws ClientResponseException if the status code of response is 4xx
125
+	 * @throws ServerResponseException if the status code of response is 5xx
126
+	 *
127
+	 * @return Elasticsearch|Promise
128
+	 */
129
+	public function clearCache(array $params = [])
130
+	{
131
+		if (isset($params['index'])) {
132
+			$url = '/' . $this->encode($params['index']) . '/_cache/clear';
133
+			$method = 'POST';
134
+		} else {
135
+			$url = '/_cache/clear';
136
+			$method = 'POST';
137
+		}
138
+		$url = $this->addQueryString($url, $params, ['fielddata', 'fields', 'query', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'request', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
139
+		$headers = ['Accept' => 'application/json'];
140
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
141
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.clear_cache');
142
+		return $this->client->sendRequest($request);
143
+	}
144
+	/**
145
+	 * Clones an index
146
+	 *
147
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html
148
+	 *
149
+	 * @param array{
150
+	 *     index: string, // (REQUIRED) The name of the source index to clone
151
+	 *     target: string, // (REQUIRED) The name of the target index to clone into
152
+	 *     timeout: time, // Explicit operation timeout
153
+	 *     master_timeout: time, // Specify timeout for connection to master
154
+	 *     wait_for_active_shards: string, // Set the number of active shards to wait for on the cloned index before the operation returns.
155
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
156
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
157
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
158
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
159
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
160
+	 *     body: array, //  The configuration for the target index (`settings` and `aliases`)
161
+	 * } $params
162
+	 *
163
+	 * @throws MissingParameterException if a required parameter is missing
164
+	 * @throws NoNodeAvailableException if all the hosts are offline
165
+	 * @throws ClientResponseException if the status code of response is 4xx
166
+	 * @throws ServerResponseException if the status code of response is 5xx
167
+	 *
168
+	 * @return Elasticsearch|Promise
169
+	 */
170
+	public function clone(array $params = [])
171
+	{
172
+		$this->checkRequiredParameters(['index', 'target'], $params);
173
+		$url = '/' . $this->encode($params['index']) . '/_clone/' . $this->encode($params['target']);
174
+		$method = 'PUT';
175
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
176
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
177
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
178
+		$request = $this->addOtelAttributes($params, ['index', 'target'], $request, 'indices.clone');
179
+		return $this->client->sendRequest($request);
180
+	}
181
+	/**
182
+	 * Closes an index.
183
+	 *
184
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
185
+	 *
186
+	 * @param array{
187
+	 *     index: list, // (REQUIRED) A comma separated list of indices to close
188
+	 *     timeout: time, // Explicit operation timeout
189
+	 *     master_timeout: time, // Specify timeout for connection to master
190
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
191
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
192
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
193
+	 *     wait_for_active_shards: string, // Sets the number of active shards to wait for before the operation returns.
194
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
195
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
196
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
197
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
198
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
199
+	 * } $params
200
+	 *
201
+	 * @throws MissingParameterException if a required parameter is missing
202
+	 * @throws NoNodeAvailableException if all the hosts are offline
203
+	 * @throws ClientResponseException if the status code of response is 4xx
204
+	 * @throws ServerResponseException if the status code of response is 5xx
205
+	 *
206
+	 * @return Elasticsearch|Promise
207
+	 */
208
+	public function close(array $params = [])
209
+	{
210
+		$this->checkRequiredParameters(['index'], $params);
211
+		$url = '/' . $this->encode($params['index']) . '/_close';
212
+		$method = 'POST';
213
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
214
+		$headers = ['Accept' => 'application/json'];
215
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
216
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.close');
217
+		return $this->client->sendRequest($request);
218
+	}
219
+	/**
220
+	 * Creates an index with optional settings and mappings.
221
+	 *
222
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html
223
+	 *
224
+	 * @param array{
225
+	 *     index: string, // (REQUIRED) The name of the index
226
+	 *     wait_for_active_shards: string, // Set the number of active shards to wait for before the operation returns.
227
+	 *     timeout: time, // Explicit operation timeout
228
+	 *     master_timeout: time, // Specify timeout for connection to master
229
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
230
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
231
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
232
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
233
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
234
+	 *     body: array, //  The configuration for the index (`settings` and `mappings`)
235
+	 * } $params
236
+	 *
237
+	 * @throws MissingParameterException if a required parameter is missing
238
+	 * @throws NoNodeAvailableException if all the hosts are offline
239
+	 * @throws ClientResponseException if the status code of response is 4xx
240
+	 * @throws ServerResponseException if the status code of response is 5xx
241
+	 *
242
+	 * @return Elasticsearch|Promise
243
+	 */
244
+	public function create(array $params = [])
245
+	{
246
+		$this->checkRequiredParameters(['index'], $params);
247
+		$url = '/' . $this->encode($params['index']);
248
+		$method = 'PUT';
249
+		$url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
250
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
251
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
252
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.create');
253
+		return $this->client->sendRequest($request);
254
+	}
255
+	/**
256
+	 * Creates a data stream
257
+	 *
258
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
259
+	 *
260
+	 * @param array{
261
+	 *     name: string, // (REQUIRED) The name of the data stream
262
+	 *     timeout: time, // Specify timeout for acknowledging the cluster state update
263
+	 *     master_timeout: time, // Specify timeout for connection to master
264
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
265
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
266
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
267
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
268
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
269
+	 * } $params
270
+	 *
271
+	 * @throws MissingParameterException if a required parameter is missing
272
+	 * @throws NoNodeAvailableException if all the hosts are offline
273
+	 * @throws ClientResponseException if the status code of response is 4xx
274
+	 * @throws ServerResponseException if the status code of response is 5xx
275
+	 *
276
+	 * @return Elasticsearch|Promise
277
+	 */
278
+	public function createDataStream(array $params = [])
279
+	{
280
+		$this->checkRequiredParameters(['name'], $params);
281
+		$url = '/_data_stream/' . $this->encode($params['name']);
282
+		$method = 'PUT';
283
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
284
+		$headers = ['Accept' => 'application/json'];
285
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
286
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.create_data_stream');
287
+		return $this->client->sendRequest($request);
288
+	}
289
+	/**
290
+	 * Provides statistics on operations happening in a data stream.
291
+	 *
292
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
293
+	 *
294
+	 * @param array{
295
+	 *     name: list, //  A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams
296
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
297
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
298
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
299
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
300
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
301
+	 * } $params
302
+	 *
303
+	 * @throws NoNodeAvailableException if all the hosts are offline
304
+	 * @throws ClientResponseException if the status code of response is 4xx
305
+	 * @throws ServerResponseException if the status code of response is 5xx
306
+	 *
307
+	 * @return Elasticsearch|Promise
308
+	 */
309
+	public function dataStreamsStats(array $params = [])
310
+	{
311
+		if (isset($params['name'])) {
312
+			$url = '/_data_stream/' . $this->encode($params['name']) . '/_stats';
313
+			$method = 'GET';
314
+		} else {
315
+			$url = '/_data_stream/_stats';
316
+			$method = 'GET';
317
+		}
318
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
319
+		$headers = ['Accept' => 'application/json'];
320
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
321
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.data_streams_stats');
322
+		return $this->client->sendRequest($request);
323
+	}
324
+	/**
325
+	 * Deletes an index.
326
+	 *
327
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html
328
+	 *
329
+	 * @param array{
330
+	 *     index: list, // (REQUIRED) A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
331
+	 *     timeout: time, // Explicit operation timeout
332
+	 *     master_timeout: time, // Specify timeout for connection to master
333
+	 *     ignore_unavailable: boolean, // Ignore unavailable indexes (default: false)
334
+	 *     allow_no_indices: boolean, // Ignore if a wildcard expression resolves to no concrete indices (default: false)
335
+	 *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open, closed, or hidden indices
336
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
337
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
338
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
339
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
340
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
341
+	 * } $params
342
+	 *
343
+	 * @throws MissingParameterException if a required parameter is missing
344
+	 * @throws NoNodeAvailableException if all the hosts are offline
345
+	 * @throws ClientResponseException if the status code of response is 4xx
346
+	 * @throws ServerResponseException if the status code of response is 5xx
347
+	 *
348
+	 * @return Elasticsearch|Promise
349
+	 */
350
+	public function delete(array $params = [])
351
+	{
352
+		$this->checkRequiredParameters(['index'], $params);
353
+		$url = '/' . $this->encode($params['index']);
354
+		$method = 'DELETE';
355
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
356
+		$headers = ['Accept' => 'application/json'];
357
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
358
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.delete');
359
+		return $this->client->sendRequest($request);
360
+	}
361
+	/**
362
+	 * Deletes an alias.
363
+	 *
364
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
365
+	 *
366
+	 * @param array{
367
+	 *     index: list, // (REQUIRED) A comma-separated list of index names (supports wildcards); use `_all` for all indices
368
+	 *     name: list, // (REQUIRED) A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
369
+	 *     timeout: time, // Explicit timestamp for the document
370
+	 *     master_timeout: time, // Specify timeout for connection to master
371
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
372
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
373
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
374
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
375
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
376
+	 * } $params
377
+	 *
378
+	 * @throws MissingParameterException if a required parameter is missing
379
+	 * @throws NoNodeAvailableException if all the hosts are offline
380
+	 * @throws ClientResponseException if the status code of response is 4xx
381
+	 * @throws ServerResponseException if the status code of response is 5xx
382
+	 *
383
+	 * @return Elasticsearch|Promise
384
+	 */
385
+	public function deleteAlias(array $params = [])
386
+	{
387
+		$this->checkRequiredParameters(['index', 'name'], $params);
388
+		$url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
389
+		$method = 'DELETE';
390
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
391
+		$headers = ['Accept' => 'application/json'];
392
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
393
+		$request = $this->addOtelAttributes($params, ['index', 'name'], $request, 'indices.delete_alias');
394
+		return $this->client->sendRequest($request);
395
+	}
396
+	/**
397
+	 * Deletes the data stream lifecycle of the selected data streams.
398
+	 *
399
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html
400
+	 *
401
+	 * @param array{
402
+	 *     name: list, // (REQUIRED) A comma-separated list of data streams of which the data stream lifecycle will be deleted; use `*` to get all data streams
403
+	 *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
404
+	 *     timeout: time, // Explicit timestamp for the document
405
+	 *     master_timeout: time, // Specify timeout for connection to master
406
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
407
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
408
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
409
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
410
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
411
+	 * } $params
412
+	 *
413
+	 * @throws MissingParameterException if a required parameter is missing
414
+	 * @throws NoNodeAvailableException if all the hosts are offline
415
+	 * @throws ClientResponseException if the status code of response is 4xx
416
+	 * @throws ServerResponseException if the status code of response is 5xx
417
+	 *
418
+	 * @return Elasticsearch|Promise
419
+	 */
420
+	public function deleteDataLifecycle(array $params = [])
421
+	{
422
+		$this->checkRequiredParameters(['name'], $params);
423
+		$url = '/_data_stream/' . $this->encode($params['name']) . '/_lifecycle';
424
+		$method = 'DELETE';
425
+		$url = $this->addQueryString($url, $params, ['expand_wildcards', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
426
+		$headers = ['Accept' => 'application/json'];
427
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
428
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.delete_data_lifecycle');
429
+		return $this->client->sendRequest($request);
430
+	}
431
+	/**
432
+	 * Deletes a data stream.
433
+	 *
434
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
435
+	 *
436
+	 * @param array{
437
+	 *     name: list, // (REQUIRED) A comma-separated list of data streams to delete; use `*` to delete all data streams
438
+	 *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
439
+	 *     master_timeout: time, // Specify timeout for connection to master
440
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
441
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
442
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
443
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
444
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
445
+	 * } $params
446
+	 *
447
+	 * @throws MissingParameterException if a required parameter is missing
448
+	 * @throws NoNodeAvailableException if all the hosts are offline
449
+	 * @throws ClientResponseException if the status code of response is 4xx
450
+	 * @throws ServerResponseException if the status code of response is 5xx
451
+	 *
452
+	 * @return Elasticsearch|Promise
453
+	 */
454
+	public function deleteDataStream(array $params = [])
455
+	{
456
+		$this->checkRequiredParameters(['name'], $params);
457
+		$url = '/_data_stream/' . $this->encode($params['name']);
458
+		$method = 'DELETE';
459
+		$url = $this->addQueryString($url, $params, ['expand_wildcards', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
460
+		$headers = ['Accept' => 'application/json'];
461
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
462
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.delete_data_stream');
463
+		return $this->client->sendRequest($request);
464
+	}
465
+	/**
466
+	 * Deletes an index template.
467
+	 *
468
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template.html
469
+	 *
470
+	 * @param array{
471
+	 *     name: string, // (REQUIRED) The name of the template
472
+	 *     timeout: time, // Explicit operation timeout
473
+	 *     master_timeout: time, // Specify timeout for connection to master
474
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
475
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
476
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
477
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
478
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
479
+	 * } $params
480
+	 *
481
+	 * @throws MissingParameterException if a required parameter is missing
482
+	 * @throws NoNodeAvailableException if all the hosts are offline
483
+	 * @throws ClientResponseException if the status code of response is 4xx
484
+	 * @throws ServerResponseException if the status code of response is 5xx
485
+	 *
486
+	 * @return Elasticsearch|Promise
487
+	 */
488
+	public function deleteIndexTemplate(array $params = [])
489
+	{
490
+		$this->checkRequiredParameters(['name'], $params);
491
+		$url = '/_index_template/' . $this->encode($params['name']);
492
+		$method = 'DELETE';
493
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
494
+		$headers = ['Accept' => 'application/json'];
495
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
496
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.delete_index_template');
497
+		return $this->client->sendRequest($request);
498
+	}
499
+	/**
500
+	 * Deletes an index template.
501
+	 *
502
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template-v1.html
503
+	 *
504
+	 * @param array{
505
+	 *     name: string, // (REQUIRED) The name of the template
506
+	 *     timeout: time, // Explicit operation timeout
507
+	 *     master_timeout: time, // Specify timeout for connection to master
508
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
509
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
510
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
511
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
512
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
513
+	 * } $params
514
+	 *
515
+	 * @throws MissingParameterException if a required parameter is missing
516
+	 * @throws NoNodeAvailableException if all the hosts are offline
517
+	 * @throws ClientResponseException if the status code of response is 4xx
518
+	 * @throws ServerResponseException if the status code of response is 5xx
519
+	 *
520
+	 * @return Elasticsearch|Promise
521
+	 */
522
+	public function deleteTemplate(array $params = [])
523
+	{
524
+		$this->checkRequiredParameters(['name'], $params);
525
+		$url = '/_template/' . $this->encode($params['name']);
526
+		$method = 'DELETE';
527
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
528
+		$headers = ['Accept' => 'application/json'];
529
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
530
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.delete_template');
531
+		return $this->client->sendRequest($request);
532
+	}
533
+	/**
534
+	 * Analyzes the disk usage of each field of an index or data stream
535
+	 *
536
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html
537
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
538
+	 *
539
+	 * @param array{
540
+	 *     index: string, // (REQUIRED) Comma-separated list of indices or data streams to analyze the disk usage
541
+	 *     run_expensive_tasks: boolean, // Must be set to [true] in order for the task to be performed. Defaults to false.
542
+	 *     flush: boolean, // Whether flush or not before analyzing the index disk usage. Defaults to true
543
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
544
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
545
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
546
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
547
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
548
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
549
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
550
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
551
+	 * } $params
552
+	 *
553
+	 * @throws MissingParameterException if a required parameter is missing
554
+	 * @throws NoNodeAvailableException if all the hosts are offline
555
+	 * @throws ClientResponseException if the status code of response is 4xx
556
+	 * @throws ServerResponseException if the status code of response is 5xx
557
+	 *
558
+	 * @return Elasticsearch|Promise
559
+	 */
560
+	public function diskUsage(array $params = [])
561
+	{
562
+		$this->checkRequiredParameters(['index'], $params);
563
+		$url = '/' . $this->encode($params['index']) . '/_disk_usage';
564
+		$method = 'POST';
565
+		$url = $this->addQueryString($url, $params, ['run_expensive_tasks', 'flush', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
566
+		$headers = ['Accept' => 'application/json'];
567
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
568
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.disk_usage');
569
+		return $this->client->sendRequest($request);
570
+	}
571
+	/**
572
+	 * Downsample an index
573
+	 *
574
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html
575
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
576
+	 *
577
+	 * @param array{
578
+	 *     index: string, // (REQUIRED) The index to downsample
579
+	 *     target_index: string, // (REQUIRED) The name of the target index to store downsampled data
580
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
581
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
582
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
583
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
584
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
585
+	 *     body: array, // (REQUIRED) The downsampling configuration
586
+	 * } $params
587
+	 *
588
+	 * @throws MissingParameterException if a required parameter is missing
589
+	 * @throws NoNodeAvailableException if all the hosts are offline
590
+	 * @throws ClientResponseException if the status code of response is 4xx
591
+	 * @throws ServerResponseException if the status code of response is 5xx
592
+	 *
593
+	 * @return Elasticsearch|Promise
594
+	 */
595
+	public function downsample(array $params = [])
596
+	{
597
+		$this->checkRequiredParameters(['index', 'target_index', 'body'], $params);
598
+		$url = '/' . $this->encode($params['index']) . '/_downsample/' . $this->encode($params['target_index']);
599
+		$method = 'POST';
600
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
601
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
602
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
603
+		$request = $this->addOtelAttributes($params, ['index', 'target_index'], $request, 'indices.downsample');
604
+		return $this->client->sendRequest($request);
605
+	}
606
+	/**
607
+	 * Returns information about whether a particular index exists.
608
+	 *
609
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html
610
+	 *
611
+	 * @param array{
612
+	 *     index: list, // (REQUIRED) A comma-separated list of index names
613
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
614
+	 *     ignore_unavailable: boolean, // Ignore unavailable indexes (default: false)
615
+	 *     allow_no_indices: boolean, // Ignore if a wildcard expression resolves to no concrete indices (default: false)
616
+	 *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
617
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
618
+	 *     include_defaults: boolean, // Whether to return all default setting for each of the indices.
619
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
620
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
621
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
622
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
623
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
624
+	 * } $params
625
+	 *
626
+	 * @throws MissingParameterException if a required parameter is missing
627
+	 * @throws NoNodeAvailableException if all the hosts are offline
628
+	 * @throws ClientResponseException if the status code of response is 4xx
629
+	 * @throws ServerResponseException if the status code of response is 5xx
630
+	 *
631
+	 * @return Elasticsearch|Promise
632
+	 */
633
+	public function exists(array $params = [])
634
+	{
635
+		$this->checkRequiredParameters(['index'], $params);
636
+		$url = '/' . $this->encode($params['index']);
637
+		$method = 'HEAD';
638
+		$url = $this->addQueryString($url, $params, ['local', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'flat_settings', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
639
+		$headers = ['Accept' => 'application/json'];
640
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
641
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.exists');
642
+		return $this->client->sendRequest($request);
643
+	}
644
+	/**
645
+	 * Returns information about whether a particular alias exists.
646
+	 *
647
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
648
+	 *
649
+	 * @param array{
650
+	 *     name: list, // (REQUIRED) A comma-separated list of alias names to return
651
+	 *     index: list, //  A comma-separated list of index names to filter aliases
652
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
653
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
654
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
655
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
656
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
657
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
658
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
659
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
660
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
661
+	 * } $params
662
+	 *
663
+	 * @throws MissingParameterException if a required parameter is missing
664
+	 * @throws NoNodeAvailableException if all the hosts are offline
665
+	 * @throws ClientResponseException if the status code of response is 4xx
666
+	 * @throws ServerResponseException if the status code of response is 5xx
667
+	 *
668
+	 * @return Elasticsearch|Promise
669
+	 */
670
+	public function existsAlias(array $params = [])
671
+	{
672
+		$this->checkRequiredParameters(['name'], $params);
673
+		if (isset($params['index'])) {
674
+			$url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
675
+			$method = 'HEAD';
676
+		} else {
677
+			$url = '/_alias/' . $this->encode($params['name']);
678
+			$method = 'HEAD';
679
+		}
680
+		$url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
681
+		$headers = ['Accept' => 'application/json'];
682
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
683
+		$request = $this->addOtelAttributes($params, ['name', 'index'], $request, 'indices.exists_alias');
684
+		return $this->client->sendRequest($request);
685
+	}
686
+	/**
687
+	 * Returns information about whether a particular index template exists.
688
+	 *
689
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html
690
+	 *
691
+	 * @param array{
692
+	 *     name: string, // (REQUIRED) The name of the template
693
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
694
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
695
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
696
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
697
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
698
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
699
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
700
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
701
+	 * } $params
702
+	 *
703
+	 * @throws MissingParameterException if a required parameter is missing
704
+	 * @throws NoNodeAvailableException if all the hosts are offline
705
+	 * @throws ClientResponseException if the status code of response is 4xx
706
+	 * @throws ServerResponseException if the status code of response is 5xx
707
+	 *
708
+	 * @return Elasticsearch|Promise
709
+	 */
710
+	public function existsIndexTemplate(array $params = [])
711
+	{
712
+		$this->checkRequiredParameters(['name'], $params);
713
+		$url = '/_index_template/' . $this->encode($params['name']);
714
+		$method = 'HEAD';
715
+		$url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
716
+		$headers = ['Accept' => 'application/json'];
717
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
718
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.exists_index_template');
719
+		return $this->client->sendRequest($request);
720
+	}
721
+	/**
722
+	 * Returns information about whether a particular index template exists.
723
+	 *
724
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-template-exists-v1.html
725
+	 *
726
+	 * @param array{
727
+	 *     name: list, // (REQUIRED) The comma separated names of the index templates
728
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
729
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
730
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
731
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
732
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
733
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
734
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
735
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
736
+	 * } $params
737
+	 *
738
+	 * @throws MissingParameterException if a required parameter is missing
739
+	 * @throws NoNodeAvailableException if all the hosts are offline
740
+	 * @throws ClientResponseException if the status code of response is 4xx
741
+	 * @throws ServerResponseException if the status code of response is 5xx
742
+	 *
743
+	 * @return Elasticsearch|Promise
744
+	 */
745
+	public function existsTemplate(array $params = [])
746
+	{
747
+		$this->checkRequiredParameters(['name'], $params);
748
+		$url = '/_template/' . $this->encode($params['name']);
749
+		$method = 'HEAD';
750
+		$url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
751
+		$headers = ['Accept' => 'application/json'];
752
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
753
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.exists_template');
754
+		return $this->client->sendRequest($request);
755
+	}
756
+	/**
757
+	 * Retrieves information about the index's current data stream lifecycle, such as any potential encountered error, time since creation etc.
758
+	 *
759
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams-explain-lifecycle.html
760
+	 *
761
+	 * @param array{
762
+	 *     index: string, // (REQUIRED) The name of the index to explain
763
+	 *     include_defaults: boolean, // indicates if the API should return the default values the system uses for the index's lifecycle
764
+	 *     master_timeout: time, // Specify timeout for connection to master
765
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
766
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
767
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
768
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
769
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
770
+	 * } $params
771
+	 *
772
+	 * @throws MissingParameterException if a required parameter is missing
773
+	 * @throws NoNodeAvailableException if all the hosts are offline
774
+	 * @throws ClientResponseException if the status code of response is 4xx
775
+	 * @throws ServerResponseException if the status code of response is 5xx
776
+	 *
777
+	 * @return Elasticsearch|Promise
778
+	 */
779
+	public function explainDataLifecycle(array $params = [])
780
+	{
781
+		$this->checkRequiredParameters(['index'], $params);
782
+		$url = '/' . $this->encode($params['index']) . '/_lifecycle/explain';
783
+		$method = 'GET';
784
+		$url = $this->addQueryString($url, $params, ['include_defaults', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
785
+		$headers = ['Accept' => 'application/json'];
786
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
787
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.explain_data_lifecycle');
788
+		return $this->client->sendRequest($request);
789
+	}
790
+	/**
791
+	 * Returns the field usage stats for each field of an index
792
+	 *
793
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/field-usage-stats.html
794
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
795
+	 *
796
+	 * @param array{
797
+	 *     index: string, // (REQUIRED) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
798
+	 *     fields: list, // A comma-separated list of fields to include in the stats if only a subset of fields should be returned (supports wildcards)
799
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
800
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
801
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
802
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
803
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
804
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
805
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
806
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
807
+	 * } $params
808
+	 *
809
+	 * @throws MissingParameterException if a required parameter is missing
810
+	 * @throws NoNodeAvailableException if all the hosts are offline
811
+	 * @throws ClientResponseException if the status code of response is 4xx
812
+	 * @throws ServerResponseException if the status code of response is 5xx
813
+	 *
814
+	 * @return Elasticsearch|Promise
815
+	 */
816
+	public function fieldUsageStats(array $params = [])
817
+	{
818
+		$this->checkRequiredParameters(['index'], $params);
819
+		$url = '/' . $this->encode($params['index']) . '/_field_usage_stats';
820
+		$method = 'GET';
821
+		$url = $this->addQueryString($url, $params, ['fields', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
822
+		$headers = ['Accept' => 'application/json'];
823
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
824
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.field_usage_stats');
825
+		return $this->client->sendRequest($request);
826
+	}
827
+	/**
828
+	 * Performs the flush operation on one or more indices.
829
+	 *
830
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html
831
+	 *
832
+	 * @param array{
833
+	 *     index: list, //  A comma-separated list of index names; use `_all` or empty string for all indices
834
+	 *     force: boolean, // Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
835
+	 *     wait_if_ongoing: boolean, // If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
836
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
837
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
838
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
839
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
840
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
841
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
842
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
843
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
844
+	 * } $params
845
+	 *
846
+	 * @throws NoNodeAvailableException if all the hosts are offline
847
+	 * @throws ClientResponseException if the status code of response is 4xx
848
+	 * @throws ServerResponseException if the status code of response is 5xx
849
+	 *
850
+	 * @return Elasticsearch|Promise
851
+	 */
852
+	public function flush(array $params = [])
853
+	{
854
+		if (isset($params['index'])) {
855
+			$url = '/' . $this->encode($params['index']) . '/_flush';
856
+			$method = empty($params['body']) ? 'GET' : 'POST';
857
+		} else {
858
+			$url = '/_flush';
859
+			$method = empty($params['body']) ? 'GET' : 'POST';
860
+		}
861
+		$url = $this->addQueryString($url, $params, ['force', 'wait_if_ongoing', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
862
+		$headers = ['Accept' => 'application/json'];
863
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
864
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.flush');
865
+		return $this->client->sendRequest($request);
866
+	}
867
+	/**
868
+	 * Performs the force merge operation on one or more indices.
869
+	 *
870
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html
871
+	 *
872
+	 * @param array{
873
+	 *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
874
+	 *     flush: boolean, // Specify whether the index should be flushed after performing the operation (default: true)
875
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
876
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
877
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
878
+	 *     max_num_segments: number, // The number of segments the index should be merged into (default: dynamic)
879
+	 *     only_expunge_deletes: boolean, // Specify whether the operation should only expunge deleted documents
880
+	 *     wait_for_completion: boolean, // Should the request wait until the force merge is completed.
881
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
882
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
883
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
884
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
885
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
886
+	 * } $params
887
+	 *
888
+	 * @throws NoNodeAvailableException if all the hosts are offline
889
+	 * @throws ClientResponseException if the status code of response is 4xx
890
+	 * @throws ServerResponseException if the status code of response is 5xx
891
+	 *
892
+	 * @return Elasticsearch|Promise
893
+	 */
894
+	public function forcemerge(array $params = [])
895
+	{
896
+		if (isset($params['index'])) {
897
+			$url = '/' . $this->encode($params['index']) . '/_forcemerge';
898
+			$method = 'POST';
899
+		} else {
900
+			$url = '/_forcemerge';
901
+			$method = 'POST';
902
+		}
903
+		$url = $this->addQueryString($url, $params, ['flush', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'max_num_segments', 'only_expunge_deletes', 'wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
904
+		$headers = ['Accept' => 'application/json'];
905
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
906
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.forcemerge');
907
+		return $this->client->sendRequest($request);
908
+	}
909
+	/**
910
+	 * Returns information about one or more indices.
911
+	 *
912
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html
913
+	 *
914
+	 * @param array{
915
+	 *     index: list, // (REQUIRED) A comma-separated list of index names
916
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
917
+	 *     ignore_unavailable: boolean, // Ignore unavailable indexes (default: false)
918
+	 *     allow_no_indices: boolean, // Ignore if a wildcard expression resolves to no concrete indices (default: false)
919
+	 *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
920
+	 *     features: enum, // Return only information on specified index features
921
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
922
+	 *     include_defaults: boolean, // Whether to return all default setting for each of the indices.
923
+	 *     master_timeout: time, // Specify timeout for connection to master
924
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
925
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
926
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
927
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
928
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
929
+	 * } $params
930
+	 *
931
+	 * @throws MissingParameterException if a required parameter is missing
932
+	 * @throws NoNodeAvailableException if all the hosts are offline
933
+	 * @throws ClientResponseException if the status code of response is 4xx
934
+	 * @throws ServerResponseException if the status code of response is 5xx
935
+	 *
936
+	 * @return Elasticsearch|Promise
937
+	 */
938
+	public function get(array $params = [])
939
+	{
940
+		$this->checkRequiredParameters(['index'], $params);
941
+		$url = '/' . $this->encode($params['index']);
942
+		$method = 'GET';
943
+		$url = $this->addQueryString($url, $params, ['local', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'features', 'flat_settings', 'include_defaults', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
944
+		$headers = ['Accept' => 'application/json'];
945
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
946
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.get');
947
+		return $this->client->sendRequest($request);
948
+	}
949
+	/**
950
+	 * Returns an alias.
951
+	 *
952
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
953
+	 *
954
+	 * @param array{
955
+	 *     name: list, //  A comma-separated list of alias names to return
956
+	 *     index: list, //  A comma-separated list of index names to filter aliases
957
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
958
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
959
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
960
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
961
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
962
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
963
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
964
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
965
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
966
+	 * } $params
967
+	 *
968
+	 * @throws NoNodeAvailableException if all the hosts are offline
969
+	 * @throws ClientResponseException if the status code of response is 4xx
970
+	 * @throws ServerResponseException if the status code of response is 5xx
971
+	 *
972
+	 * @return Elasticsearch|Promise
973
+	 */
974
+	public function getAlias(array $params = [])
975
+	{
976
+		if (isset($params['index']) && isset($params['name'])) {
977
+			$url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
978
+			$method = 'GET';
979
+		} elseif (isset($params['name'])) {
980
+			$url = '/_alias/' . $this->encode($params['name']);
981
+			$method = 'GET';
982
+		} elseif (isset($params['index'])) {
983
+			$url = '/' . $this->encode($params['index']) . '/_alias';
984
+			$method = 'GET';
985
+		} else {
986
+			$url = '/_alias';
987
+			$method = 'GET';
988
+		}
989
+		$url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
990
+		$headers = ['Accept' => 'application/json'];
991
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
992
+		$request = $this->addOtelAttributes($params, ['name', 'index'], $request, 'indices.get_alias');
993
+		return $this->client->sendRequest($request);
994
+	}
995
+	/**
996
+	 * Returns the data stream lifecycle of the selected data streams.
997
+	 *
998
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle.html
999
+	 *
1000
+	 * @param array{
1001
+	 *     name: list, // (REQUIRED) A comma-separated list of data streams to get; use `*` to get all data streams
1002
+	 *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1003
+	 *     include_defaults: boolean, // Return all relevant default configurations for the data stream (default: false)
1004
+	 *     master_timeout: time, // Specify timeout for connection to master
1005
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1006
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1007
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1008
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1009
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1010
+	 * } $params
1011
+	 *
1012
+	 * @throws MissingParameterException if a required parameter is missing
1013
+	 * @throws NoNodeAvailableException if all the hosts are offline
1014
+	 * @throws ClientResponseException if the status code of response is 4xx
1015
+	 * @throws ServerResponseException if the status code of response is 5xx
1016
+	 *
1017
+	 * @return Elasticsearch|Promise
1018
+	 */
1019
+	public function getDataLifecycle(array $params = [])
1020
+	{
1021
+		$this->checkRequiredParameters(['name'], $params);
1022
+		$url = '/_data_stream/' . $this->encode($params['name']) . '/_lifecycle';
1023
+		$method = 'GET';
1024
+		$url = $this->addQueryString($url, $params, ['expand_wildcards', 'include_defaults', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1025
+		$headers = ['Accept' => 'application/json'];
1026
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1027
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.get_data_lifecycle');
1028
+		return $this->client->sendRequest($request);
1029
+	}
1030
+	/**
1031
+	 * Returns data streams.
1032
+	 *
1033
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
1034
+	 *
1035
+	 * @param array{
1036
+	 *     name: list, //  A comma-separated list of data streams to get; use `*` to get all data streams
1037
+	 *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1038
+	 *     include_defaults: boolean, // Return all relevant default configurations for the data stream (default: false)
1039
+	 *     master_timeout: time, // Specify timeout for connection to master
1040
+	 *     verbose: boolean, // Whether the maximum timestamp for each data stream should be calculated and returned (default: false)
1041
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1042
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1043
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1044
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1045
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1046
+	 * } $params
1047
+	 *
1048
+	 * @throws NoNodeAvailableException if all the hosts are offline
1049
+	 * @throws ClientResponseException if the status code of response is 4xx
1050
+	 * @throws ServerResponseException if the status code of response is 5xx
1051
+	 *
1052
+	 * @return Elasticsearch|Promise
1053
+	 */
1054
+	public function getDataStream(array $params = [])
1055
+	{
1056
+		if (isset($params['name'])) {
1057
+			$url = '/_data_stream/' . $this->encode($params['name']);
1058
+			$method = 'GET';
1059
+		} else {
1060
+			$url = '/_data_stream';
1061
+			$method = 'GET';
1062
+		}
1063
+		$url = $this->addQueryString($url, $params, ['expand_wildcards', 'include_defaults', 'master_timeout', 'verbose', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1064
+		$headers = ['Accept' => 'application/json'];
1065
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1066
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.get_data_stream');
1067
+		return $this->client->sendRequest($request);
1068
+	}
1069
+	/**
1070
+	 * Returns mapping for one or more fields.
1071
+	 *
1072
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html
1073
+	 *
1074
+	 * @param array{
1075
+	 *     fields: list, // (REQUIRED) A comma-separated list of fields
1076
+	 *     index: list, //  A comma-separated list of index names
1077
+	 *     include_defaults: boolean, // Whether the default mapping values should be returned as well
1078
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1079
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1080
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1081
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1082
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1083
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1084
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1085
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1086
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1087
+	 * } $params
1088
+	 *
1089
+	 * @throws MissingParameterException if a required parameter is missing
1090
+	 * @throws NoNodeAvailableException if all the hosts are offline
1091
+	 * @throws ClientResponseException if the status code of response is 4xx
1092
+	 * @throws ServerResponseException if the status code of response is 5xx
1093
+	 *
1094
+	 * @return Elasticsearch|Promise
1095
+	 */
1096
+	public function getFieldMapping(array $params = [])
1097
+	{
1098
+		$this->checkRequiredParameters(['fields'], $params);
1099
+		if (isset($params['index'])) {
1100
+			$url = '/' . $this->encode($params['index']) . '/_mapping/field/' . $this->encode($params['fields']);
1101
+			$method = 'GET';
1102
+		} else {
1103
+			$url = '/_mapping/field/' . $this->encode($params['fields']);
1104
+			$method = 'GET';
1105
+		}
1106
+		$url = $this->addQueryString($url, $params, ['include_defaults', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1107
+		$headers = ['Accept' => 'application/json'];
1108
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1109
+		$request = $this->addOtelAttributes($params, ['fields', 'index'], $request, 'indices.get_field_mapping');
1110
+		return $this->client->sendRequest($request);
1111
+	}
1112
+	/**
1113
+	 * Returns an index template.
1114
+	 *
1115
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html
1116
+	 *
1117
+	 * @param array{
1118
+	 *     name: string, //  A pattern that returned template names must match
1119
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
1120
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
1121
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1122
+	 *     include_defaults: boolean, // Return all relevant default configurations for the index template (default: false)
1123
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1124
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1125
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1126
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1127
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1128
+	 * } $params
1129
+	 *
1130
+	 * @throws NoNodeAvailableException if all the hosts are offline
1131
+	 * @throws ClientResponseException if the status code of response is 4xx
1132
+	 * @throws ServerResponseException if the status code of response is 5xx
1133
+	 *
1134
+	 * @return Elasticsearch|Promise
1135
+	 */
1136
+	public function getIndexTemplate(array $params = [])
1137
+	{
1138
+		if (isset($params['name'])) {
1139
+			$url = '/_index_template/' . $this->encode($params['name']);
1140
+			$method = 'GET';
1141
+		} else {
1142
+			$url = '/_index_template';
1143
+			$method = 'GET';
1144
+		}
1145
+		$url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'local', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1146
+		$headers = ['Accept' => 'application/json'];
1147
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1148
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.get_index_template');
1149
+		return $this->client->sendRequest($request);
1150
+	}
1151
+	/**
1152
+	 * Returns mappings for one or more indices.
1153
+	 *
1154
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
1155
+	 *
1156
+	 * @param array{
1157
+	 *     index: list, //  A comma-separated list of index names
1158
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1159
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1160
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1161
+	 *     master_timeout: time, // Specify timeout for connection to master
1162
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1163
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1164
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1165
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1166
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1167
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1168
+	 * } $params
1169
+	 *
1170
+	 * @throws NoNodeAvailableException if all the hosts are offline
1171
+	 * @throws ClientResponseException if the status code of response is 4xx
1172
+	 * @throws ServerResponseException if the status code of response is 5xx
1173
+	 *
1174
+	 * @return Elasticsearch|Promise
1175
+	 */
1176
+	public function getMapping(array $params = [])
1177
+	{
1178
+		if (isset($params['index'])) {
1179
+			$url = '/' . $this->encode($params['index']) . '/_mapping';
1180
+			$method = 'GET';
1181
+		} else {
1182
+			$url = '/_mapping';
1183
+			$method = 'GET';
1184
+		}
1185
+		$url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1186
+		$headers = ['Accept' => 'application/json'];
1187
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1188
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.get_mapping');
1189
+		return $this->client->sendRequest($request);
1190
+	}
1191
+	/**
1192
+	 * Returns settings for one or more indices.
1193
+	 *
1194
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html
1195
+	 *
1196
+	 * @param array{
1197
+	 *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1198
+	 *     name: list, //  The name of the settings that should be included
1199
+	 *     master_timeout: time, // Specify timeout for connection to master
1200
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1201
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1202
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1203
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
1204
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1205
+	 *     include_defaults: boolean, // Whether to return all default setting for each of the indices.
1206
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1207
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1208
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1209
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1210
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1211
+	 * } $params
1212
+	 *
1213
+	 * @throws NoNodeAvailableException if all the hosts are offline
1214
+	 * @throws ClientResponseException if the status code of response is 4xx
1215
+	 * @throws ServerResponseException if the status code of response is 5xx
1216
+	 *
1217
+	 * @return Elasticsearch|Promise
1218
+	 */
1219
+	public function getSettings(array $params = [])
1220
+	{
1221
+		if (isset($params['index']) && isset($params['name'])) {
1222
+			$url = '/' . $this->encode($params['index']) . '/_settings/' . $this->encode($params['name']);
1223
+			$method = 'GET';
1224
+		} elseif (isset($params['index'])) {
1225
+			$url = '/' . $this->encode($params['index']) . '/_settings';
1226
+			$method = 'GET';
1227
+		} elseif (isset($params['name'])) {
1228
+			$url = '/_settings/' . $this->encode($params['name']);
1229
+			$method = 'GET';
1230
+		} else {
1231
+			$url = '/_settings';
1232
+			$method = 'GET';
1233
+		}
1234
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'flat_settings', 'local', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1235
+		$headers = ['Accept' => 'application/json'];
1236
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1237
+		$request = $this->addOtelAttributes($params, ['index', 'name'], $request, 'indices.get_settings');
1238
+		return $this->client->sendRequest($request);
1239
+	}
1240
+	/**
1241
+	 * Returns an index template.
1242
+	 *
1243
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template-v1.html
1244
+	 *
1245
+	 * @param array{
1246
+	 *     name: list, //  The comma separated names of the index templates
1247
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
1248
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
1249
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1250
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1251
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1252
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1253
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1254
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1255
+	 * } $params
1256
+	 *
1257
+	 * @throws NoNodeAvailableException if all the hosts are offline
1258
+	 * @throws ClientResponseException if the status code of response is 4xx
1259
+	 * @throws ServerResponseException if the status code of response is 5xx
1260
+	 *
1261
+	 * @return Elasticsearch|Promise
1262
+	 */
1263
+	public function getTemplate(array $params = [])
1264
+	{
1265
+		if (isset($params['name'])) {
1266
+			$url = '/_template/' . $this->encode($params['name']);
1267
+			$method = 'GET';
1268
+		} else {
1269
+			$url = '/_template';
1270
+			$method = 'GET';
1271
+		}
1272
+		$url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1273
+		$headers = ['Accept' => 'application/json'];
1274
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1275
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.get_template');
1276
+		return $this->client->sendRequest($request);
1277
+	}
1278
+	/**
1279
+	 * Migrates an alias to a data stream
1280
+	 *
1281
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
1282
+	 *
1283
+	 * @param array{
1284
+	 *     name: string, // (REQUIRED) The name of the alias to migrate
1285
+	 *     timeout: time, // Specify timeout for acknowledging the cluster state update
1286
+	 *     master_timeout: time, // Specify timeout for connection to master
1287
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1288
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1289
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1290
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1291
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1292
+	 * } $params
1293
+	 *
1294
+	 * @throws MissingParameterException if a required parameter is missing
1295
+	 * @throws NoNodeAvailableException if all the hosts are offline
1296
+	 * @throws ClientResponseException if the status code of response is 4xx
1297
+	 * @throws ServerResponseException if the status code of response is 5xx
1298
+	 *
1299
+	 * @return Elasticsearch|Promise
1300
+	 */
1301
+	public function migrateToDataStream(array $params = [])
1302
+	{
1303
+		$this->checkRequiredParameters(['name'], $params);
1304
+		$url = '/_data_stream/_migrate/' . $this->encode($params['name']);
1305
+		$method = 'POST';
1306
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1307
+		$headers = ['Accept' => 'application/json'];
1308
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1309
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.migrate_to_data_stream');
1310
+		return $this->client->sendRequest($request);
1311
+	}
1312
+	/**
1313
+	 * Modifies a data stream
1314
+	 *
1315
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
1316
+	 *
1317
+	 * @param array{
1318
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1319
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1320
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1321
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1322
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1323
+	 *     body: array, // (REQUIRED) The data stream modifications
1324
+	 * } $params
1325
+	 *
1326
+	 * @throws NoNodeAvailableException if all the hosts are offline
1327
+	 * @throws ClientResponseException if the status code of response is 4xx
1328
+	 * @throws ServerResponseException if the status code of response is 5xx
1329
+	 *
1330
+	 * @return Elasticsearch|Promise
1331
+	 */
1332
+	public function modifyDataStream(array $params = [])
1333
+	{
1334
+		$this->checkRequiredParameters(['body'], $params);
1335
+		$url = '/_data_stream/_modify';
1336
+		$method = 'POST';
1337
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
1338
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1339
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1340
+		$request = $this->addOtelAttributes($params, [], $request, 'indices.modify_data_stream');
1341
+		return $this->client->sendRequest($request);
1342
+	}
1343
+	/**
1344
+	 * Opens an index.
1345
+	 *
1346
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
1347
+	 *
1348
+	 * @param array{
1349
+	 *     index: list, // (REQUIRED) A comma separated list of indices to open
1350
+	 *     timeout: time, // Explicit operation timeout
1351
+	 *     master_timeout: time, // Specify timeout for connection to master
1352
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1353
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1354
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1355
+	 *     wait_for_active_shards: string, // Sets the number of active shards to wait for before the operation returns.
1356
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1357
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1358
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1359
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1360
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1361
+	 * } $params
1362
+	 *
1363
+	 * @throws MissingParameterException if a required parameter is missing
1364
+	 * @throws NoNodeAvailableException if all the hosts are offline
1365
+	 * @throws ClientResponseException if the status code of response is 4xx
1366
+	 * @throws ServerResponseException if the status code of response is 5xx
1367
+	 *
1368
+	 * @return Elasticsearch|Promise
1369
+	 */
1370
+	public function open(array $params = [])
1371
+	{
1372
+		$this->checkRequiredParameters(['index'], $params);
1373
+		$url = '/' . $this->encode($params['index']) . '/_open';
1374
+		$method = 'POST';
1375
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1376
+		$headers = ['Accept' => 'application/json'];
1377
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1378
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.open');
1379
+		return $this->client->sendRequest($request);
1380
+	}
1381
+	/**
1382
+	 * Promotes a data stream from a replicated data stream managed by CCR to a regular data stream
1383
+	 *
1384
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
1385
+	 *
1386
+	 * @param array{
1387
+	 *     name: string, // (REQUIRED) The name of the data stream
1388
+	 *     master_timeout: time, // Specify timeout for connection to master
1389
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1390
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1391
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1392
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1393
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1394
+	 * } $params
1395
+	 *
1396
+	 * @throws MissingParameterException if a required parameter is missing
1397
+	 * @throws NoNodeAvailableException if all the hosts are offline
1398
+	 * @throws ClientResponseException if the status code of response is 4xx
1399
+	 * @throws ServerResponseException if the status code of response is 5xx
1400
+	 *
1401
+	 * @return Elasticsearch|Promise
1402
+	 */
1403
+	public function promoteDataStream(array $params = [])
1404
+	{
1405
+		$this->checkRequiredParameters(['name'], $params);
1406
+		$url = '/_data_stream/_promote/' . $this->encode($params['name']);
1407
+		$method = 'POST';
1408
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1409
+		$headers = ['Accept' => 'application/json'];
1410
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1411
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.promote_data_stream');
1412
+		return $this->client->sendRequest($request);
1413
+	}
1414
+	/**
1415
+	 * Creates or updates an alias.
1416
+	 *
1417
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
1418
+	 *
1419
+	 * @param array{
1420
+	 *     index: list, // (REQUIRED) A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
1421
+	 *     name: string, // (REQUIRED) The name of the alias to be created or updated
1422
+	 *     timeout: time, // Explicit timestamp for the document
1423
+	 *     master_timeout: time, // Specify timeout for connection to master
1424
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1425
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1426
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1427
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1428
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1429
+	 *     body: array, //  The settings for the alias, such as `routing` or `filter`
1430
+	 * } $params
1431
+	 *
1432
+	 * @throws MissingParameterException if a required parameter is missing
1433
+	 * @throws NoNodeAvailableException if all the hosts are offline
1434
+	 * @throws ClientResponseException if the status code of response is 4xx
1435
+	 * @throws ServerResponseException if the status code of response is 5xx
1436
+	 *
1437
+	 * @return Elasticsearch|Promise
1438
+	 */
1439
+	public function putAlias(array $params = [])
1440
+	{
1441
+		$this->checkRequiredParameters(['index', 'name'], $params);
1442
+		$url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
1443
+		$method = 'PUT';
1444
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1445
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1446
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1447
+		$request = $this->addOtelAttributes($params, ['index', 'name'], $request, 'indices.put_alias');
1448
+		return $this->client->sendRequest($request);
1449
+	}
1450
+	/**
1451
+	 * Updates the data stream lifecycle of the selected data streams.
1452
+	 *
1453
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html
1454
+	 *
1455
+	 * @param array{
1456
+	 *     name: list, // (REQUIRED) A comma-separated list of data streams whose lifecycle will be updated; use `*` to set the lifecycle to all data streams
1457
+	 *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1458
+	 *     timeout: time, // Explicit timestamp for the document
1459
+	 *     master_timeout: time, // Specify timeout for connection to master
1460
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1461
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1462
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1463
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1464
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1465
+	 *     body: array, //  The data stream lifecycle configuration that consist of the data retention
1466
+	 * } $params
1467
+	 *
1468
+	 * @throws MissingParameterException if a required parameter is missing
1469
+	 * @throws NoNodeAvailableException if all the hosts are offline
1470
+	 * @throws ClientResponseException if the status code of response is 4xx
1471
+	 * @throws ServerResponseException if the status code of response is 5xx
1472
+	 *
1473
+	 * @return Elasticsearch|Promise
1474
+	 */
1475
+	public function putDataLifecycle(array $params = [])
1476
+	{
1477
+		$this->checkRequiredParameters(['name'], $params);
1478
+		$url = '/_data_stream/' . $this->encode($params['name']) . '/_lifecycle';
1479
+		$method = 'PUT';
1480
+		$url = $this->addQueryString($url, $params, ['expand_wildcards', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1481
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1482
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1483
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.put_data_lifecycle');
1484
+		return $this->client->sendRequest($request);
1485
+	}
1486
+	/**
1487
+	 * Creates or updates an index template.
1488
+	 *
1489
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html
1490
+	 *
1491
+	 * @param array{
1492
+	 *     name: string, // (REQUIRED) The name of the template
1493
+	 *     create: boolean, // Whether the index template should only be added if new or can also replace an existing one
1494
+	 *     cause: string, // User defined reason for creating/updating the index template
1495
+	 *     master_timeout: time, // Specify timeout for connection to master
1496
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1497
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1498
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1499
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1500
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1501
+	 *     body: array, // (REQUIRED) The template definition
1502
+	 * } $params
1503
+	 *
1504
+	 * @throws MissingParameterException if a required parameter is missing
1505
+	 * @throws NoNodeAvailableException if all the hosts are offline
1506
+	 * @throws ClientResponseException if the status code of response is 4xx
1507
+	 * @throws ServerResponseException if the status code of response is 5xx
1508
+	 *
1509
+	 * @return Elasticsearch|Promise
1510
+	 */
1511
+	public function putIndexTemplate(array $params = [])
1512
+	{
1513
+		$this->checkRequiredParameters(['name', 'body'], $params);
1514
+		$url = '/_index_template/' . $this->encode($params['name']);
1515
+		$method = 'PUT';
1516
+		$url = $this->addQueryString($url, $params, ['create', 'cause', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1517
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1518
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1519
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.put_index_template');
1520
+		return $this->client->sendRequest($request);
1521
+	}
1522
+	/**
1523
+	 * Updates the index mappings.
1524
+	 *
1525
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html
1526
+	 *
1527
+	 * @param array{
1528
+	 *     index: list, // (REQUIRED) A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
1529
+	 *     timeout: time, // Explicit operation timeout
1530
+	 *     master_timeout: time, // Specify timeout for connection to master
1531
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1532
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1533
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1534
+	 *     write_index_only: boolean, // When true, applies mappings only to the write index of an alias or data stream
1535
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1536
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1537
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1538
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1539
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1540
+	 *     body: array, // (REQUIRED) The mapping definition
1541
+	 * } $params
1542
+	 *
1543
+	 * @throws MissingParameterException if a required parameter is missing
1544
+	 * @throws NoNodeAvailableException if all the hosts are offline
1545
+	 * @throws ClientResponseException if the status code of response is 4xx
1546
+	 * @throws ServerResponseException if the status code of response is 5xx
1547
+	 *
1548
+	 * @return Elasticsearch|Promise
1549
+	 */
1550
+	public function putMapping(array $params = [])
1551
+	{
1552
+		$this->checkRequiredParameters(['index', 'body'], $params);
1553
+		$url = '/' . $this->encode($params['index']) . '/_mapping';
1554
+		$method = 'PUT';
1555
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'write_index_only', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1556
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1557
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1558
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.put_mapping');
1559
+		return $this->client->sendRequest($request);
1560
+	}
1561
+	/**
1562
+	 * Updates the index settings.
1563
+	 *
1564
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html
1565
+	 *
1566
+	 * @param array{
1567
+	 *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1568
+	 *     master_timeout: time, // Specify timeout for connection to master
1569
+	 *     timeout: time, // Explicit operation timeout
1570
+	 *     preserve_existing: boolean, // Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`
1571
+	 *     reopen: boolean, // Whether to close and reopen the index to apply non-dynamic settings. If set to `true` the indices to which the settings are being applied will be closed temporarily and then reopened in order to apply the changes. The default is `false`
1572
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1573
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1574
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1575
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
1576
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1577
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1578
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1579
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1580
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1581
+	 *     body: array, // (REQUIRED) The index settings to be updated
1582
+	 * } $params
1583
+	 *
1584
+	 * @throws NoNodeAvailableException if all the hosts are offline
1585
+	 * @throws ClientResponseException if the status code of response is 4xx
1586
+	 * @throws ServerResponseException if the status code of response is 5xx
1587
+	 *
1588
+	 * @return Elasticsearch|Promise
1589
+	 */
1590
+	public function putSettings(array $params = [])
1591
+	{
1592
+		$this->checkRequiredParameters(['body'], $params);
1593
+		if (isset($params['index'])) {
1594
+			$url = '/' . $this->encode($params['index']) . '/_settings';
1595
+			$method = 'PUT';
1596
+		} else {
1597
+			$url = '/_settings';
1598
+			$method = 'PUT';
1599
+		}
1600
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'preserve_existing', 'reopen', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'flat_settings', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1601
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1602
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1603
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.put_settings');
1604
+		return $this->client->sendRequest($request);
1605
+	}
1606
+	/**
1607
+	 * Creates or updates an index template.
1608
+	 *
1609
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html
1610
+	 *
1611
+	 * @param array{
1612
+	 *     name: string, // (REQUIRED) The name of the template
1613
+	 *     order: number, // The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
1614
+	 *     create: boolean, // Whether the index template should only be added if new or can also replace an existing one
1615
+	 *     master_timeout: time, // Specify timeout for connection to master
1616
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1617
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1618
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1619
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1620
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1621
+	 *     body: array, // (REQUIRED) The template definition
1622
+	 * } $params
1623
+	 *
1624
+	 * @throws MissingParameterException if a required parameter is missing
1625
+	 * @throws NoNodeAvailableException if all the hosts are offline
1626
+	 * @throws ClientResponseException if the status code of response is 4xx
1627
+	 * @throws ServerResponseException if the status code of response is 5xx
1628
+	 *
1629
+	 * @return Elasticsearch|Promise
1630
+	 */
1631
+	public function putTemplate(array $params = [])
1632
+	{
1633
+		$this->checkRequiredParameters(['name', 'body'], $params);
1634
+		$url = '/_template/' . $this->encode($params['name']);
1635
+		$method = 'PUT';
1636
+		$url = $this->addQueryString($url, $params, ['order', 'create', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1637
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1638
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1639
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.put_template');
1640
+		return $this->client->sendRequest($request);
1641
+	}
1642
+	/**
1643
+	 * Returns information about ongoing index shard recoveries.
1644
+	 *
1645
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html
1646
+	 *
1647
+	 * @param array{
1648
+	 *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1649
+	 *     detailed: boolean, // Whether to display detailed information about shard recovery
1650
+	 *     active_only: boolean, // Display only those recoveries that are currently on-going
1651
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1652
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1653
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1654
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1655
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1656
+	 * } $params
1657
+	 *
1658
+	 * @throws NoNodeAvailableException if all the hosts are offline
1659
+	 * @throws ClientResponseException if the status code of response is 4xx
1660
+	 * @throws ServerResponseException if the status code of response is 5xx
1661
+	 *
1662
+	 * @return Elasticsearch|Promise
1663
+	 */
1664
+	public function recovery(array $params = [])
1665
+	{
1666
+		if (isset($params['index'])) {
1667
+			$url = '/' . $this->encode($params['index']) . '/_recovery';
1668
+			$method = 'GET';
1669
+		} else {
1670
+			$url = '/_recovery';
1671
+			$method = 'GET';
1672
+		}
1673
+		$url = $this->addQueryString($url, $params, ['detailed', 'active_only', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1674
+		$headers = ['Accept' => 'application/json'];
1675
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1676
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.recovery');
1677
+		return $this->client->sendRequest($request);
1678
+	}
1679
+	/**
1680
+	 * Performs the refresh operation in one or more indices.
1681
+	 *
1682
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html
1683
+	 *
1684
+	 * @param array{
1685
+	 *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1686
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1687
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1688
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1689
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1690
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1691
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1692
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1693
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1694
+	 * } $params
1695
+	 *
1696
+	 * @throws NoNodeAvailableException if all the hosts are offline
1697
+	 * @throws ClientResponseException if the status code of response is 4xx
1698
+	 * @throws ServerResponseException if the status code of response is 5xx
1699
+	 *
1700
+	 * @return Elasticsearch|Promise
1701
+	 */
1702
+	public function refresh(array $params = [])
1703
+	{
1704
+		if (isset($params['index'])) {
1705
+			$url = '/' . $this->encode($params['index']) . '/_refresh';
1706
+			$method = empty($params['body']) ? 'GET' : 'POST';
1707
+		} else {
1708
+			$url = '/_refresh';
1709
+			$method = empty($params['body']) ? 'GET' : 'POST';
1710
+		}
1711
+		$url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1712
+		$headers = ['Accept' => 'application/json'];
1713
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1714
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.refresh');
1715
+		return $this->client->sendRequest($request);
1716
+	}
1717
+	/**
1718
+	 * Reloads an index's search analyzers and their resources.
1719
+	 *
1720
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-reload-analyzers.html
1721
+	 *
1722
+	 * @param array{
1723
+	 *     index: list, // (REQUIRED) A comma-separated list of index names to reload analyzers for
1724
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1725
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1726
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1727
+	 *     resource: string, // changed resource to reload analyzers from if applicable
1728
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1729
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1730
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1731
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1732
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1733
+	 * } $params
1734
+	 *
1735
+	 * @throws MissingParameterException if a required parameter is missing
1736
+	 * @throws NoNodeAvailableException if all the hosts are offline
1737
+	 * @throws ClientResponseException if the status code of response is 4xx
1738
+	 * @throws ServerResponseException if the status code of response is 5xx
1739
+	 *
1740
+	 * @return Elasticsearch|Promise
1741
+	 */
1742
+	public function reloadSearchAnalyzers(array $params = [])
1743
+	{
1744
+		$this->checkRequiredParameters(['index'], $params);
1745
+		$url = '/' . $this->encode($params['index']) . '/_reload_search_analyzers';
1746
+		$method = empty($params['body']) ? 'GET' : 'POST';
1747
+		$url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'resource', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1748
+		$headers = ['Accept' => 'application/json'];
1749
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1750
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.reload_search_analyzers');
1751
+		return $this->client->sendRequest($request);
1752
+	}
1753
+	/**
1754
+	 * Resolves the specified index expressions to return information about each cluster, including the local cluster, if included.
1755
+	 *
1756
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-cluster-api.html
1757
+	 *
1758
+	 * @param array{
1759
+	 *     name: list, // (REQUIRED) A comma-separated list of cluster:index names or wildcard expressions
1760
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1761
+	 *     ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
1762
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1763
+	 *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1764
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1765
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1766
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1767
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1768
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1769
+	 * } $params
1770
+	 *
1771
+	 * @throws MissingParameterException if a required parameter is missing
1772
+	 * @throws NoNodeAvailableException if all the hosts are offline
1773
+	 * @throws ClientResponseException if the status code of response is 4xx
1774
+	 * @throws ServerResponseException if the status code of response is 5xx
1775
+	 *
1776
+	 * @return Elasticsearch|Promise
1777
+	 */
1778
+	public function resolveCluster(array $params = [])
1779
+	{
1780
+		$this->checkRequiredParameters(['name'], $params);
1781
+		$url = '/_resolve/cluster/' . $this->encode($params['name']);
1782
+		$method = 'GET';
1783
+		$url = $this->addQueryString($url, $params, ['ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1784
+		$headers = ['Accept' => 'application/json'];
1785
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1786
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.resolve_cluster');
1787
+		return $this->client->sendRequest($request);
1788
+	}
1789
+	/**
1790
+	 * Returns information about any matching indices, aliases, and data streams
1791
+	 *
1792
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html
1793
+	 *
1794
+	 * @param array{
1795
+	 *     name: list, // (REQUIRED) A comma-separated list of names or wildcard expressions
1796
+	 *     expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1797
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1798
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1799
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1800
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1801
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1802
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1803
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1804
+	 * } $params
1805
+	 *
1806
+	 * @throws MissingParameterException if a required parameter is missing
1807
+	 * @throws NoNodeAvailableException if all the hosts are offline
1808
+	 * @throws ClientResponseException if the status code of response is 4xx
1809
+	 * @throws ServerResponseException if the status code of response is 5xx
1810
+	 *
1811
+	 * @return Elasticsearch|Promise
1812
+	 */
1813
+	public function resolveIndex(array $params = [])
1814
+	{
1815
+		$this->checkRequiredParameters(['name'], $params);
1816
+		$url = '/_resolve/index/' . $this->encode($params['name']);
1817
+		$method = 'GET';
1818
+		$url = $this->addQueryString($url, $params, ['expand_wildcards', 'ignore_unavailable', 'allow_no_indices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1819
+		$headers = ['Accept' => 'application/json'];
1820
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1821
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.resolve_index');
1822
+		return $this->client->sendRequest($request);
1823
+	}
1824
+	/**
1825
+	 * Updates an alias to point to a new index when the existing index
1826
+	 * is considered to be too large or too old.
1827
+	 *
1828
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html
1829
+	 *
1830
+	 * @param array{
1831
+	 *     alias: string, // (REQUIRED) The name of the alias to rollover
1832
+	 *     new_index: string, //  The name of the rollover index
1833
+	 *     timeout: time, // Explicit operation timeout
1834
+	 *     dry_run: boolean, // If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false
1835
+	 *     master_timeout: time, // Specify timeout for connection to master
1836
+	 *     wait_for_active_shards: string, // Set the number of active shards to wait for on the newly created rollover index before the operation returns.
1837
+	 *     lazy: boolean, // If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams.
1838
+	 *     target_failure_store: boolean, // If set to true, the rollover action will be applied on the failure store of the data stream.
1839
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1840
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1841
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1842
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1843
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1844
+	 *     body: array, //  The conditions that needs to be met for executing rollover
1845
+	 * } $params
1846
+	 *
1847
+	 * @throws MissingParameterException if a required parameter is missing
1848
+	 * @throws NoNodeAvailableException if all the hosts are offline
1849
+	 * @throws ClientResponseException if the status code of response is 4xx
1850
+	 * @throws ServerResponseException if the status code of response is 5xx
1851
+	 *
1852
+	 * @return Elasticsearch|Promise
1853
+	 */
1854
+	public function rollover(array $params = [])
1855
+	{
1856
+		$this->checkRequiredParameters(['alias'], $params);
1857
+		if (isset($params['new_index'])) {
1858
+			$url = '/' . $this->encode($params['alias']) . '/_rollover/' . $this->encode($params['new_index']);
1859
+			$method = 'POST';
1860
+		} else {
1861
+			$url = '/' . $this->encode($params['alias']) . '/_rollover';
1862
+			$method = 'POST';
1863
+		}
1864
+		$url = $this->addQueryString($url, $params, ['timeout', 'dry_run', 'master_timeout', 'wait_for_active_shards', 'lazy', 'target_failure_store', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1865
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1866
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1867
+		$request = $this->addOtelAttributes($params, ['alias', 'new_index'], $request, 'indices.rollover');
1868
+		return $this->client->sendRequest($request);
1869
+	}
1870
+	/**
1871
+	 * Provides low-level information about segments in a Lucene index.
1872
+	 *
1873
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html
1874
+	 *
1875
+	 * @param array{
1876
+	 *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1877
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1878
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1879
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1880
+	 *     verbose: boolean, // Includes detailed memory usage by Lucene.
1881
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1882
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1883
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1884
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1885
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1886
+	 * } $params
1887
+	 *
1888
+	 * @throws NoNodeAvailableException if all the hosts are offline
1889
+	 * @throws ClientResponseException if the status code of response is 4xx
1890
+	 * @throws ServerResponseException if the status code of response is 5xx
1891
+	 *
1892
+	 * @return Elasticsearch|Promise
1893
+	 */
1894
+	public function segments(array $params = [])
1895
+	{
1896
+		if (isset($params['index'])) {
1897
+			$url = '/' . $this->encode($params['index']) . '/_segments';
1898
+			$method = 'GET';
1899
+		} else {
1900
+			$url = '/_segments';
1901
+			$method = 'GET';
1902
+		}
1903
+		$url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'verbose', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1904
+		$headers = ['Accept' => 'application/json'];
1905
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1906
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.segments');
1907
+		return $this->client->sendRequest($request);
1908
+	}
1909
+	/**
1910
+	 * Provides store information for shard copies of indices.
1911
+	 *
1912
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html
1913
+	 *
1914
+	 * @param array{
1915
+	 *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
1916
+	 *     status: list, // A comma-separated list of statuses used to filter on shards to get store information for
1917
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
1918
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
1919
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1920
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1921
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1922
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1923
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1924
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1925
+	 * } $params
1926
+	 *
1927
+	 * @throws NoNodeAvailableException if all the hosts are offline
1928
+	 * @throws ClientResponseException if the status code of response is 4xx
1929
+	 * @throws ServerResponseException if the status code of response is 5xx
1930
+	 *
1931
+	 * @return Elasticsearch|Promise
1932
+	 */
1933
+	public function shardStores(array $params = [])
1934
+	{
1935
+		if (isset($params['index'])) {
1936
+			$url = '/' . $this->encode($params['index']) . '/_shard_stores';
1937
+			$method = 'GET';
1938
+		} else {
1939
+			$url = '/_shard_stores';
1940
+			$method = 'GET';
1941
+		}
1942
+		$url = $this->addQueryString($url, $params, ['status', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1943
+		$headers = ['Accept' => 'application/json'];
1944
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1945
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.shard_stores');
1946
+		return $this->client->sendRequest($request);
1947
+	}
1948
+	/**
1949
+	 * Allow to shrink an existing index into a new index with fewer primary shards.
1950
+	 *
1951
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html
1952
+	 *
1953
+	 * @param array{
1954
+	 *     index: string, // (REQUIRED) The name of the source index to shrink
1955
+	 *     target: string, // (REQUIRED) The name of the target index to shrink into
1956
+	 *     timeout: time, // Explicit operation timeout
1957
+	 *     master_timeout: time, // Specify timeout for connection to master
1958
+	 *     wait_for_active_shards: string, // Set the number of active shards to wait for on the shrunken index before the operation returns.
1959
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1960
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1961
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1962
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1963
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1964
+	 *     body: array, //  The configuration for the target index (`settings` and `aliases`)
1965
+	 * } $params
1966
+	 *
1967
+	 * @throws MissingParameterException if a required parameter is missing
1968
+	 * @throws NoNodeAvailableException if all the hosts are offline
1969
+	 * @throws ClientResponseException if the status code of response is 4xx
1970
+	 * @throws ServerResponseException if the status code of response is 5xx
1971
+	 *
1972
+	 * @return Elasticsearch|Promise
1973
+	 */
1974
+	public function shrink(array $params = [])
1975
+	{
1976
+		$this->checkRequiredParameters(['index', 'target'], $params);
1977
+		$url = '/' . $this->encode($params['index']) . '/_shrink/' . $this->encode($params['target']);
1978
+		$method = 'PUT';
1979
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1980
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
1981
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1982
+		$request = $this->addOtelAttributes($params, ['index', 'target'], $request, 'indices.shrink');
1983
+		return $this->client->sendRequest($request);
1984
+	}
1985
+	/**
1986
+	 * Simulate matching the given index name against the index templates in the system
1987
+	 *
1988
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html
1989
+	 *
1990
+	 * @param array{
1991
+	 *     name: string, // (REQUIRED) The name of the index (it must be a concrete index name)
1992
+	 *     create: boolean, // Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
1993
+	 *     cause: string, // User defined reason for dry-run creating the new template for simulation purposes
1994
+	 *     master_timeout: time, // Specify timeout for connection to master
1995
+	 *     include_defaults: boolean, // Return all relevant default configurations for this index template simulation (default: false)
1996
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1997
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1998
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1999
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2000
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2001
+	 *     body: array, //  New index template definition, which will be included in the simulation, as if it already exists in the system
2002
+	 * } $params
2003
+	 *
2004
+	 * @throws MissingParameterException if a required parameter is missing
2005
+	 * @throws NoNodeAvailableException if all the hosts are offline
2006
+	 * @throws ClientResponseException if the status code of response is 4xx
2007
+	 * @throws ServerResponseException if the status code of response is 5xx
2008
+	 *
2009
+	 * @return Elasticsearch|Promise
2010
+	 */
2011
+	public function simulateIndexTemplate(array $params = [])
2012
+	{
2013
+		$this->checkRequiredParameters(['name'], $params);
2014
+		$url = '/_index_template/_simulate_index/' . $this->encode($params['name']);
2015
+		$method = 'POST';
2016
+		$url = $this->addQueryString($url, $params, ['create', 'cause', 'master_timeout', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2017
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
2018
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2019
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.simulate_index_template');
2020
+		return $this->client->sendRequest($request);
2021
+	}
2022
+	/**
2023
+	 * Simulate resolving the given template name or body
2024
+	 *
2025
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html
2026
+	 *
2027
+	 * @param array{
2028
+	 *     name: string, //  The name of the index template
2029
+	 *     create: boolean, // Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
2030
+	 *     cause: string, // User defined reason for dry-run creating the new template for simulation purposes
2031
+	 *     master_timeout: time, // Specify timeout for connection to master
2032
+	 *     include_defaults: boolean, // Return all relevant default configurations for this template simulation (default: false)
2033
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2034
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2035
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2036
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2037
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2038
+	 *     body: array, //  New index template definition to be simulated, if no index template name is specified
2039
+	 * } $params
2040
+	 *
2041
+	 * @throws NoNodeAvailableException if all the hosts are offline
2042
+	 * @throws ClientResponseException if the status code of response is 4xx
2043
+	 * @throws ServerResponseException if the status code of response is 5xx
2044
+	 *
2045
+	 * @return Elasticsearch|Promise
2046
+	 */
2047
+	public function simulateTemplate(array $params = [])
2048
+	{
2049
+		if (isset($params['name'])) {
2050
+			$url = '/_index_template/_simulate/' . $this->encode($params['name']);
2051
+			$method = 'POST';
2052
+		} else {
2053
+			$url = '/_index_template/_simulate';
2054
+			$method = 'POST';
2055
+		}
2056
+		$url = $this->addQueryString($url, $params, ['create', 'cause', 'master_timeout', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2057
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
2058
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2059
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'indices.simulate_template');
2060
+		return $this->client->sendRequest($request);
2061
+	}
2062
+	/**
2063
+	 * Allows you to split an existing index into a new index with more primary shards.
2064
+	 *
2065
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html
2066
+	 *
2067
+	 * @param array{
2068
+	 *     index: string, // (REQUIRED) The name of the source index to split
2069
+	 *     target: string, // (REQUIRED) The name of the target index to split into
2070
+	 *     timeout: time, // Explicit operation timeout
2071
+	 *     master_timeout: time, // Specify timeout for connection to master
2072
+	 *     wait_for_active_shards: string, // Set the number of active shards to wait for on the shrunken index before the operation returns.
2073
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2074
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2075
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2076
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2077
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2078
+	 *     body: array, //  The configuration for the target index (`settings` and `aliases`)
2079
+	 * } $params
2080
+	 *
2081
+	 * @throws MissingParameterException if a required parameter is missing
2082
+	 * @throws NoNodeAvailableException if all the hosts are offline
2083
+	 * @throws ClientResponseException if the status code of response is 4xx
2084
+	 * @throws ServerResponseException if the status code of response is 5xx
2085
+	 *
2086
+	 * @return Elasticsearch|Promise
2087
+	 */
2088
+	public function split(array $params = [])
2089
+	{
2090
+		$this->checkRequiredParameters(['index', 'target'], $params);
2091
+		$url = '/' . $this->encode($params['index']) . '/_split/' . $this->encode($params['target']);
2092
+		$method = 'PUT';
2093
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2094
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
2095
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2096
+		$request = $this->addOtelAttributes($params, ['index', 'target'], $request, 'indices.split');
2097
+		return $this->client->sendRequest($request);
2098
+	}
2099
+	/**
2100
+	 * Provides statistics on operations happening in an index.
2101
+	 *
2102
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html
2103
+	 *
2104
+	 * @param array{
2105
+	 *     metric: list, //  Limit the information returned the specific metrics.
2106
+	 *     index: list, //  A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
2107
+	 *     completion_fields: list, // A comma-separated list of fields for the `completion` index metric (supports wildcards)
2108
+	 *     fielddata_fields: list, // A comma-separated list of fields for the `fielddata` index metric (supports wildcards)
2109
+	 *     fields: list, // A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
2110
+	 *     groups: list, // A comma-separated list of search groups for `search` index metric
2111
+	 *     level: enum, // Return stats aggregated at cluster, index or shard level
2112
+	 *     include_segment_file_sizes: boolean, // Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
2113
+	 *     include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
2114
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
2115
+	 *     forbid_closed_indices: boolean, // If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices
2116
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2117
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2118
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2119
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2120
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2121
+	 * } $params
2122
+	 *
2123
+	 * @throws NoNodeAvailableException if all the hosts are offline
2124
+	 * @throws ClientResponseException if the status code of response is 4xx
2125
+	 * @throws ServerResponseException if the status code of response is 5xx
2126
+	 *
2127
+	 * @return Elasticsearch|Promise
2128
+	 */
2129
+	public function stats(array $params = [])
2130
+	{
2131
+		if (isset($params['index']) && isset($params['metric'])) {
2132
+			$url = '/' . $this->encode($params['index']) . '/_stats/' . $this->encode($params['metric']);
2133
+			$method = 'GET';
2134
+		} elseif (isset($params['metric'])) {
2135
+			$url = '/_stats/' . $this->encode($params['metric']);
2136
+			$method = 'GET';
2137
+		} elseif (isset($params['index'])) {
2138
+			$url = '/' . $this->encode($params['index']) . '/_stats';
2139
+			$method = 'GET';
2140
+		} else {
2141
+			$url = '/_stats';
2142
+			$method = 'GET';
2143
+		}
2144
+		$url = $this->addQueryString($url, $params, ['completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'include_segment_file_sizes', 'include_unloaded_segments', 'expand_wildcards', 'forbid_closed_indices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2145
+		$headers = ['Accept' => 'application/json'];
2146
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2147
+		$request = $this->addOtelAttributes($params, ['metric', 'index'], $request, 'indices.stats');
2148
+		return $this->client->sendRequest($request);
2149
+	}
2150
+	/**
2151
+	 * Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.
2152
+	 *
2153
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html
2154
+	 *
2155
+	 * @param array{
2156
+	 *     index: string, // (REQUIRED) The name of the index to unfreeze
2157
+	 *     timeout: time, // Explicit operation timeout
2158
+	 *     master_timeout: time, // Specify timeout for connection to master
2159
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
2160
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
2161
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
2162
+	 *     wait_for_active_shards: string, // Sets the number of active shards to wait for before the operation returns.
2163
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2164
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2165
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2166
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2167
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2168
+	 * } $params
2169
+	 *
2170
+	 * @throws MissingParameterException if a required parameter is missing
2171
+	 * @throws NoNodeAvailableException if all the hosts are offline
2172
+	 * @throws ClientResponseException if the status code of response is 4xx
2173
+	 * @throws ServerResponseException if the status code of response is 5xx
2174
+	 *
2175
+	 * @return Elasticsearch|Promise
2176
+	 */
2177
+	public function unfreeze(array $params = [])
2178
+	{
2179
+		$this->checkRequiredParameters(['index'], $params);
2180
+		$url = '/' . $this->encode($params['index']) . '/_unfreeze';
2181
+		$method = 'POST';
2182
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2183
+		$headers = ['Accept' => 'application/json'];
2184
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2185
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.unfreeze');
2186
+		return $this->client->sendRequest($request);
2187
+	}
2188
+	/**
2189
+	 * Updates index aliases.
2190
+	 *
2191
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
2192
+	 *
2193
+	 * @param array{
2194
+	 *     timeout: time, // Request timeout
2195
+	 *     master_timeout: time, // Specify timeout for connection to master
2196
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2197
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2198
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2199
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2200
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2201
+	 *     body: array, // (REQUIRED) The definition of `actions` to perform
2202
+	 * } $params
2203
+	 *
2204
+	 * @throws NoNodeAvailableException if all the hosts are offline
2205
+	 * @throws ClientResponseException if the status code of response is 4xx
2206
+	 * @throws ServerResponseException if the status code of response is 5xx
2207
+	 *
2208
+	 * @return Elasticsearch|Promise
2209
+	 */
2210
+	public function updateAliases(array $params = [])
2211
+	{
2212
+		$this->checkRequiredParameters(['body'], $params);
2213
+		$url = '/_aliases';
2214
+		$method = 'POST';
2215
+		$url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2216
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
2217
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2218
+		$request = $this->addOtelAttributes($params, [], $request, 'indices.update_aliases');
2219
+		return $this->client->sendRequest($request);
2220
+	}
2221
+	/**
2222
+	 * Allows a user to validate a potentially expensive query without executing it.
2223
+	 *
2224
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html
2225
+	 *
2226
+	 * @param array{
2227
+	 *     index: list, //  A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
2228
+	 *     explain: boolean, // Return detailed information about the error
2229
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
2230
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
2231
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
2232
+	 *     q: string, // Query in the Lucene query string syntax
2233
+	 *     analyzer: string, // The analyzer to use for the query string
2234
+	 *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
2235
+	 *     default_operator: enum, // The default operator for query string query (AND or OR)
2236
+	 *     df: string, // The field to use as default where no field prefix is given in the query string
2237
+	 *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
2238
+	 *     rewrite: boolean, // Provide a more detailed explanation showing the actual Lucene query that will be executed.
2239
+	 *     all_shards: boolean, // Execute validation on all shards instead of one random shard per index
2240
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2241
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2242
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2243
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2244
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
2245
+	 *     body: array, //  The query definition specified with the Query DSL
2246
+	 * } $params
2247
+	 *
2248
+	 * @throws NoNodeAvailableException if all the hosts are offline
2249
+	 * @throws ClientResponseException if the status code of response is 4xx
2250
+	 * @throws ServerResponseException if the status code of response is 5xx
2251
+	 *
2252
+	 * @return Elasticsearch|Promise
2253
+	 */
2254
+	public function validateQuery(array $params = [])
2255
+	{
2256
+		if (isset($params['index'])) {
2257
+			$url = '/' . $this->encode($params['index']) . '/_validate/query';
2258
+			$method = empty($params['body']) ? 'GET' : 'POST';
2259
+		} else {
2260
+			$url = '/_validate/query';
2261
+			$method = empty($params['body']) ? 'GET' : 'POST';
2262
+		}
2263
+		$url = $this->addQueryString($url, $params, ['explain', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'q', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'lenient', 'rewrite', 'all_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2264
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
2265
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
2266
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'indices.validate_query');
2267
+		return $this->client->sendRequest($request);
2268
+	}
2269 2269
 }
Please login to merge, or discard this patch.
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function addBlock(array $params = [])
56 56
     {
57 57
         $this->checkRequiredParameters(['index', 'block'], $params);
58
-        $url = '/' . $this->encode($params['index']) . '/_block/' . $this->encode($params['block']);
58
+        $url = '/'.$this->encode($params['index']).'/_block/'.$this->encode($params['block']);
59 59
         $method = 'PUT';
60 60
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
61 61
         $headers = ['Accept' => 'application/json'];
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     public function analyze(array $params = [])
88 88
     {
89 89
         if (isset($params['index'])) {
90
-            $url = '/' . $this->encode($params['index']) . '/_analyze';
90
+            $url = '/'.$this->encode($params['index']).'/_analyze';
91 91
             $method = empty($params['body']) ? 'GET' : 'POST';
92 92
         } else {
93 93
             $url = '/_analyze';
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     public function clearCache(array $params = [])
130 130
     {
131 131
         if (isset($params['index'])) {
132
-            $url = '/' . $this->encode($params['index']) . '/_cache/clear';
132
+            $url = '/'.$this->encode($params['index']).'/_cache/clear';
133 133
             $method = 'POST';
134 134
         } else {
135 135
             $url = '/_cache/clear';
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     public function clone(array $params = [])
171 171
     {
172 172
         $this->checkRequiredParameters(['index', 'target'], $params);
173
-        $url = '/' . $this->encode($params['index']) . '/_clone/' . $this->encode($params['target']);
173
+        $url = '/'.$this->encode($params['index']).'/_clone/'.$this->encode($params['target']);
174 174
         $method = 'PUT';
175 175
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
176 176
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     public function close(array $params = [])
209 209
     {
210 210
         $this->checkRequiredParameters(['index'], $params);
211
-        $url = '/' . $this->encode($params['index']) . '/_close';
211
+        $url = '/'.$this->encode($params['index']).'/_close';
212 212
         $method = 'POST';
213 213
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
214 214
         $headers = ['Accept' => 'application/json'];
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     public function create(array $params = [])
245 245
     {
246 246
         $this->checkRequiredParameters(['index'], $params);
247
-        $url = '/' . $this->encode($params['index']);
247
+        $url = '/'.$this->encode($params['index']);
248 248
         $method = 'PUT';
249 249
         $url = $this->addQueryString($url, $params, ['wait_for_active_shards', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
250 250
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
     public function createDataStream(array $params = [])
279 279
     {
280 280
         $this->checkRequiredParameters(['name'], $params);
281
-        $url = '/_data_stream/' . $this->encode($params['name']);
281
+        $url = '/_data_stream/'.$this->encode($params['name']);
282 282
         $method = 'PUT';
283 283
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
284 284
         $headers = ['Accept' => 'application/json'];
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
     public function dataStreamsStats(array $params = [])
310 310
     {
311 311
         if (isset($params['name'])) {
312
-            $url = '/_data_stream/' . $this->encode($params['name']) . '/_stats';
312
+            $url = '/_data_stream/'.$this->encode($params['name']).'/_stats';
313 313
             $method = 'GET';
314 314
         } else {
315 315
             $url = '/_data_stream/_stats';
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
     public function delete(array $params = [])
351 351
     {
352 352
         $this->checkRequiredParameters(['index'], $params);
353
-        $url = '/' . $this->encode($params['index']);
353
+        $url = '/'.$this->encode($params['index']);
354 354
         $method = 'DELETE';
355 355
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
356 356
         $headers = ['Accept' => 'application/json'];
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
     public function deleteAlias(array $params = [])
386 386
     {
387 387
         $this->checkRequiredParameters(['index', 'name'], $params);
388
-        $url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
388
+        $url = '/'.$this->encode($params['index']).'/_alias/'.$this->encode($params['name']);
389 389
         $method = 'DELETE';
390 390
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
391 391
         $headers = ['Accept' => 'application/json'];
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
     public function deleteDataLifecycle(array $params = [])
421 421
     {
422 422
         $this->checkRequiredParameters(['name'], $params);
423
-        $url = '/_data_stream/' . $this->encode($params['name']) . '/_lifecycle';
423
+        $url = '/_data_stream/'.$this->encode($params['name']).'/_lifecycle';
424 424
         $method = 'DELETE';
425 425
         $url = $this->addQueryString($url, $params, ['expand_wildcards', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
426 426
         $headers = ['Accept' => 'application/json'];
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
     public function deleteDataStream(array $params = [])
455 455
     {
456 456
         $this->checkRequiredParameters(['name'], $params);
457
-        $url = '/_data_stream/' . $this->encode($params['name']);
457
+        $url = '/_data_stream/'.$this->encode($params['name']);
458 458
         $method = 'DELETE';
459 459
         $url = $this->addQueryString($url, $params, ['expand_wildcards', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
460 460
         $headers = ['Accept' => 'application/json'];
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
     public function deleteIndexTemplate(array $params = [])
489 489
     {
490 490
         $this->checkRequiredParameters(['name'], $params);
491
-        $url = '/_index_template/' . $this->encode($params['name']);
491
+        $url = '/_index_template/'.$this->encode($params['name']);
492 492
         $method = 'DELETE';
493 493
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
494 494
         $headers = ['Accept' => 'application/json'];
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
     public function deleteTemplate(array $params = [])
523 523
     {
524 524
         $this->checkRequiredParameters(['name'], $params);
525
-        $url = '/_template/' . $this->encode($params['name']);
525
+        $url = '/_template/'.$this->encode($params['name']);
526 526
         $method = 'DELETE';
527 527
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
528 528
         $headers = ['Accept' => 'application/json'];
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
     public function diskUsage(array $params = [])
561 561
     {
562 562
         $this->checkRequiredParameters(['index'], $params);
563
-        $url = '/' . $this->encode($params['index']) . '/_disk_usage';
563
+        $url = '/'.$this->encode($params['index']).'/_disk_usage';
564 564
         $method = 'POST';
565 565
         $url = $this->addQueryString($url, $params, ['run_expensive_tasks', 'flush', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
566 566
         $headers = ['Accept' => 'application/json'];
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
     public function downsample(array $params = [])
596 596
     {
597 597
         $this->checkRequiredParameters(['index', 'target_index', 'body'], $params);
598
-        $url = '/' . $this->encode($params['index']) . '/_downsample/' . $this->encode($params['target_index']);
598
+        $url = '/'.$this->encode($params['index']).'/_downsample/'.$this->encode($params['target_index']);
599 599
         $method = 'POST';
600 600
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
601 601
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
     public function exists(array $params = [])
634 634
     {
635 635
         $this->checkRequiredParameters(['index'], $params);
636
-        $url = '/' . $this->encode($params['index']);
636
+        $url = '/'.$this->encode($params['index']);
637 637
         $method = 'HEAD';
638 638
         $url = $this->addQueryString($url, $params, ['local', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'flat_settings', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
639 639
         $headers = ['Accept' => 'application/json'];
@@ -671,10 +671,10 @@  discard block
 block discarded – undo
671 671
     {
672 672
         $this->checkRequiredParameters(['name'], $params);
673 673
         if (isset($params['index'])) {
674
-            $url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
674
+            $url = '/'.$this->encode($params['index']).'/_alias/'.$this->encode($params['name']);
675 675
             $method = 'HEAD';
676 676
         } else {
677
-            $url = '/_alias/' . $this->encode($params['name']);
677
+            $url = '/_alias/'.$this->encode($params['name']);
678 678
             $method = 'HEAD';
679 679
         }
680 680
         $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
     public function existsIndexTemplate(array $params = [])
711 711
     {
712 712
         $this->checkRequiredParameters(['name'], $params);
713
-        $url = '/_index_template/' . $this->encode($params['name']);
713
+        $url = '/_index_template/'.$this->encode($params['name']);
714 714
         $method = 'HEAD';
715 715
         $url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
716 716
         $headers = ['Accept' => 'application/json'];
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
     public function existsTemplate(array $params = [])
746 746
     {
747 747
         $this->checkRequiredParameters(['name'], $params);
748
-        $url = '/_template/' . $this->encode($params['name']);
748
+        $url = '/_template/'.$this->encode($params['name']);
749 749
         $method = 'HEAD';
750 750
         $url = $this->addQueryString($url, $params, ['flat_settings', 'master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
751 751
         $headers = ['Accept' => 'application/json'];
@@ -779,7 +779,7 @@  discard block
 block discarded – undo
779 779
     public function explainDataLifecycle(array $params = [])
780 780
     {
781 781
         $this->checkRequiredParameters(['index'], $params);
782
-        $url = '/' . $this->encode($params['index']) . '/_lifecycle/explain';
782
+        $url = '/'.$this->encode($params['index']).'/_lifecycle/explain';
783 783
         $method = 'GET';
784 784
         $url = $this->addQueryString($url, $params, ['include_defaults', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
785 785
         $headers = ['Accept' => 'application/json'];
@@ -816,7 +816,7 @@  discard block
 block discarded – undo
816 816
     public function fieldUsageStats(array $params = [])
817 817
     {
818 818
         $this->checkRequiredParameters(['index'], $params);
819
-        $url = '/' . $this->encode($params['index']) . '/_field_usage_stats';
819
+        $url = '/'.$this->encode($params['index']).'/_field_usage_stats';
820 820
         $method = 'GET';
821 821
         $url = $this->addQueryString($url, $params, ['fields', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
822 822
         $headers = ['Accept' => 'application/json'];
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
     public function flush(array $params = [])
853 853
     {
854 854
         if (isset($params['index'])) {
855
-            $url = '/' . $this->encode($params['index']) . '/_flush';
855
+            $url = '/'.$this->encode($params['index']).'/_flush';
856 856
             $method = empty($params['body']) ? 'GET' : 'POST';
857 857
         } else {
858 858
             $url = '/_flush';
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
     public function forcemerge(array $params = [])
895 895
     {
896 896
         if (isset($params['index'])) {
897
-            $url = '/' . $this->encode($params['index']) . '/_forcemerge';
897
+            $url = '/'.$this->encode($params['index']).'/_forcemerge';
898 898
             $method = 'POST';
899 899
         } else {
900 900
             $url = '/_forcemerge';
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
     public function get(array $params = [])
939 939
     {
940 940
         $this->checkRequiredParameters(['index'], $params);
941
-        $url = '/' . $this->encode($params['index']);
941
+        $url = '/'.$this->encode($params['index']);
942 942
         $method = 'GET';
943 943
         $url = $this->addQueryString($url, $params, ['local', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'features', 'flat_settings', 'include_defaults', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
944 944
         $headers = ['Accept' => 'application/json'];
@@ -974,13 +974,13 @@  discard block
 block discarded – undo
974 974
     public function getAlias(array $params = [])
975 975
     {
976 976
         if (isset($params['index']) && isset($params['name'])) {
977
-            $url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
977
+            $url = '/'.$this->encode($params['index']).'/_alias/'.$this->encode($params['name']);
978 978
             $method = 'GET';
979 979
         } elseif (isset($params['name'])) {
980
-            $url = '/_alias/' . $this->encode($params['name']);
980
+            $url = '/_alias/'.$this->encode($params['name']);
981 981
             $method = 'GET';
982 982
         } elseif (isset($params['index'])) {
983
-            $url = '/' . $this->encode($params['index']) . '/_alias';
983
+            $url = '/'.$this->encode($params['index']).'/_alias';
984 984
             $method = 'GET';
985 985
         } else {
986 986
             $url = '/_alias';
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
     public function getDataLifecycle(array $params = [])
1020 1020
     {
1021 1021
         $this->checkRequiredParameters(['name'], $params);
1022
-        $url = '/_data_stream/' . $this->encode($params['name']) . '/_lifecycle';
1022
+        $url = '/_data_stream/'.$this->encode($params['name']).'/_lifecycle';
1023 1023
         $method = 'GET';
1024 1024
         $url = $this->addQueryString($url, $params, ['expand_wildcards', 'include_defaults', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1025 1025
         $headers = ['Accept' => 'application/json'];
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
     public function getDataStream(array $params = [])
1055 1055
     {
1056 1056
         if (isset($params['name'])) {
1057
-            $url = '/_data_stream/' . $this->encode($params['name']);
1057
+            $url = '/_data_stream/'.$this->encode($params['name']);
1058 1058
             $method = 'GET';
1059 1059
         } else {
1060 1060
             $url = '/_data_stream';
@@ -1097,10 +1097,10 @@  discard block
 block discarded – undo
1097 1097
     {
1098 1098
         $this->checkRequiredParameters(['fields'], $params);
1099 1099
         if (isset($params['index'])) {
1100
-            $url = '/' . $this->encode($params['index']) . '/_mapping/field/' . $this->encode($params['fields']);
1100
+            $url = '/'.$this->encode($params['index']).'/_mapping/field/'.$this->encode($params['fields']);
1101 1101
             $method = 'GET';
1102 1102
         } else {
1103
-            $url = '/_mapping/field/' . $this->encode($params['fields']);
1103
+            $url = '/_mapping/field/'.$this->encode($params['fields']);
1104 1104
             $method = 'GET';
1105 1105
         }
1106 1106
         $url = $this->addQueryString($url, $params, ['include_defaults', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
     public function getIndexTemplate(array $params = [])
1137 1137
     {
1138 1138
         if (isset($params['name'])) {
1139
-            $url = '/_index_template/' . $this->encode($params['name']);
1139
+            $url = '/_index_template/'.$this->encode($params['name']);
1140 1140
             $method = 'GET';
1141 1141
         } else {
1142 1142
             $url = '/_index_template';
@@ -1176,7 +1176,7 @@  discard block
 block discarded – undo
1176 1176
     public function getMapping(array $params = [])
1177 1177
     {
1178 1178
         if (isset($params['index'])) {
1179
-            $url = '/' . $this->encode($params['index']) . '/_mapping';
1179
+            $url = '/'.$this->encode($params['index']).'/_mapping';
1180 1180
             $method = 'GET';
1181 1181
         } else {
1182 1182
             $url = '/_mapping';
@@ -1219,13 +1219,13 @@  discard block
 block discarded – undo
1219 1219
     public function getSettings(array $params = [])
1220 1220
     {
1221 1221
         if (isset($params['index']) && isset($params['name'])) {
1222
-            $url = '/' . $this->encode($params['index']) . '/_settings/' . $this->encode($params['name']);
1222
+            $url = '/'.$this->encode($params['index']).'/_settings/'.$this->encode($params['name']);
1223 1223
             $method = 'GET';
1224 1224
         } elseif (isset($params['index'])) {
1225
-            $url = '/' . $this->encode($params['index']) . '/_settings';
1225
+            $url = '/'.$this->encode($params['index']).'/_settings';
1226 1226
             $method = 'GET';
1227 1227
         } elseif (isset($params['name'])) {
1228
-            $url = '/_settings/' . $this->encode($params['name']);
1228
+            $url = '/_settings/'.$this->encode($params['name']);
1229 1229
             $method = 'GET';
1230 1230
         } else {
1231 1231
             $url = '/_settings';
@@ -1263,7 +1263,7 @@  discard block
 block discarded – undo
1263 1263
     public function getTemplate(array $params = [])
1264 1264
     {
1265 1265
         if (isset($params['name'])) {
1266
-            $url = '/_template/' . $this->encode($params['name']);
1266
+            $url = '/_template/'.$this->encode($params['name']);
1267 1267
             $method = 'GET';
1268 1268
         } else {
1269 1269
             $url = '/_template';
@@ -1301,7 +1301,7 @@  discard block
 block discarded – undo
1301 1301
     public function migrateToDataStream(array $params = [])
1302 1302
     {
1303 1303
         $this->checkRequiredParameters(['name'], $params);
1304
-        $url = '/_data_stream/_migrate/' . $this->encode($params['name']);
1304
+        $url = '/_data_stream/_migrate/'.$this->encode($params['name']);
1305 1305
         $method = 'POST';
1306 1306
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1307 1307
         $headers = ['Accept' => 'application/json'];
@@ -1370,7 +1370,7 @@  discard block
 block discarded – undo
1370 1370
     public function open(array $params = [])
1371 1371
     {
1372 1372
         $this->checkRequiredParameters(['index'], $params);
1373
-        $url = '/' . $this->encode($params['index']) . '/_open';
1373
+        $url = '/'.$this->encode($params['index']).'/_open';
1374 1374
         $method = 'POST';
1375 1375
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1376 1376
         $headers = ['Accept' => 'application/json'];
@@ -1403,7 +1403,7 @@  discard block
 block discarded – undo
1403 1403
     public function promoteDataStream(array $params = [])
1404 1404
     {
1405 1405
         $this->checkRequiredParameters(['name'], $params);
1406
-        $url = '/_data_stream/_promote/' . $this->encode($params['name']);
1406
+        $url = '/_data_stream/_promote/'.$this->encode($params['name']);
1407 1407
         $method = 'POST';
1408 1408
         $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1409 1409
         $headers = ['Accept' => 'application/json'];
@@ -1439,7 +1439,7 @@  discard block
 block discarded – undo
1439 1439
     public function putAlias(array $params = [])
1440 1440
     {
1441 1441
         $this->checkRequiredParameters(['index', 'name'], $params);
1442
-        $url = '/' . $this->encode($params['index']) . '/_alias/' . $this->encode($params['name']);
1442
+        $url = '/'.$this->encode($params['index']).'/_alias/'.$this->encode($params['name']);
1443 1443
         $method = 'PUT';
1444 1444
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1445 1445
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -1475,7 +1475,7 @@  discard block
 block discarded – undo
1475 1475
     public function putDataLifecycle(array $params = [])
1476 1476
     {
1477 1477
         $this->checkRequiredParameters(['name'], $params);
1478
-        $url = '/_data_stream/' . $this->encode($params['name']) . '/_lifecycle';
1478
+        $url = '/_data_stream/'.$this->encode($params['name']).'/_lifecycle';
1479 1479
         $method = 'PUT';
1480 1480
         $url = $this->addQueryString($url, $params, ['expand_wildcards', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1481 1481
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -1511,7 +1511,7 @@  discard block
 block discarded – undo
1511 1511
     public function putIndexTemplate(array $params = [])
1512 1512
     {
1513 1513
         $this->checkRequiredParameters(['name', 'body'], $params);
1514
-        $url = '/_index_template/' . $this->encode($params['name']);
1514
+        $url = '/_index_template/'.$this->encode($params['name']);
1515 1515
         $method = 'PUT';
1516 1516
         $url = $this->addQueryString($url, $params, ['create', 'cause', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1517 1517
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -1550,7 +1550,7 @@  discard block
 block discarded – undo
1550 1550
     public function putMapping(array $params = [])
1551 1551
     {
1552 1552
         $this->checkRequiredParameters(['index', 'body'], $params);
1553
-        $url = '/' . $this->encode($params['index']) . '/_mapping';
1553
+        $url = '/'.$this->encode($params['index']).'/_mapping';
1554 1554
         $method = 'PUT';
1555 1555
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'write_index_only', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1556 1556
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -1591,7 +1591,7 @@  discard block
 block discarded – undo
1591 1591
     {
1592 1592
         $this->checkRequiredParameters(['body'], $params);
1593 1593
         if (isset($params['index'])) {
1594
-            $url = '/' . $this->encode($params['index']) . '/_settings';
1594
+            $url = '/'.$this->encode($params['index']).'/_settings';
1595 1595
             $method = 'PUT';
1596 1596
         } else {
1597 1597
             $url = '/_settings';
@@ -1631,7 +1631,7 @@  discard block
 block discarded – undo
1631 1631
     public function putTemplate(array $params = [])
1632 1632
     {
1633 1633
         $this->checkRequiredParameters(['name', 'body'], $params);
1634
-        $url = '/_template/' . $this->encode($params['name']);
1634
+        $url = '/_template/'.$this->encode($params['name']);
1635 1635
         $method = 'PUT';
1636 1636
         $url = $this->addQueryString($url, $params, ['order', 'create', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1637 1637
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -1664,7 +1664,7 @@  discard block
 block discarded – undo
1664 1664
     public function recovery(array $params = [])
1665 1665
     {
1666 1666
         if (isset($params['index'])) {
1667
-            $url = '/' . $this->encode($params['index']) . '/_recovery';
1667
+            $url = '/'.$this->encode($params['index']).'/_recovery';
1668 1668
             $method = 'GET';
1669 1669
         } else {
1670 1670
             $url = '/_recovery';
@@ -1702,7 +1702,7 @@  discard block
 block discarded – undo
1702 1702
     public function refresh(array $params = [])
1703 1703
     {
1704 1704
         if (isset($params['index'])) {
1705
-            $url = '/' . $this->encode($params['index']) . '/_refresh';
1705
+            $url = '/'.$this->encode($params['index']).'/_refresh';
1706 1706
             $method = empty($params['body']) ? 'GET' : 'POST';
1707 1707
         } else {
1708 1708
             $url = '/_refresh';
@@ -1742,7 +1742,7 @@  discard block
 block discarded – undo
1742 1742
     public function reloadSearchAnalyzers(array $params = [])
1743 1743
     {
1744 1744
         $this->checkRequiredParameters(['index'], $params);
1745
-        $url = '/' . $this->encode($params['index']) . '/_reload_search_analyzers';
1745
+        $url = '/'.$this->encode($params['index']).'/_reload_search_analyzers';
1746 1746
         $method = empty($params['body']) ? 'GET' : 'POST';
1747 1747
         $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'resource', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1748 1748
         $headers = ['Accept' => 'application/json'];
@@ -1778,7 +1778,7 @@  discard block
 block discarded – undo
1778 1778
     public function resolveCluster(array $params = [])
1779 1779
     {
1780 1780
         $this->checkRequiredParameters(['name'], $params);
1781
-        $url = '/_resolve/cluster/' . $this->encode($params['name']);
1781
+        $url = '/_resolve/cluster/'.$this->encode($params['name']);
1782 1782
         $method = 'GET';
1783 1783
         $url = $this->addQueryString($url, $params, ['ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1784 1784
         $headers = ['Accept' => 'application/json'];
@@ -1813,7 +1813,7 @@  discard block
 block discarded – undo
1813 1813
     public function resolveIndex(array $params = [])
1814 1814
     {
1815 1815
         $this->checkRequiredParameters(['name'], $params);
1816
-        $url = '/_resolve/index/' . $this->encode($params['name']);
1816
+        $url = '/_resolve/index/'.$this->encode($params['name']);
1817 1817
         $method = 'GET';
1818 1818
         $url = $this->addQueryString($url, $params, ['expand_wildcards', 'ignore_unavailable', 'allow_no_indices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1819 1819
         $headers = ['Accept' => 'application/json'];
@@ -1855,10 +1855,10 @@  discard block
 block discarded – undo
1855 1855
     {
1856 1856
         $this->checkRequiredParameters(['alias'], $params);
1857 1857
         if (isset($params['new_index'])) {
1858
-            $url = '/' . $this->encode($params['alias']) . '/_rollover/' . $this->encode($params['new_index']);
1858
+            $url = '/'.$this->encode($params['alias']).'/_rollover/'.$this->encode($params['new_index']);
1859 1859
             $method = 'POST';
1860 1860
         } else {
1861
-            $url = '/' . $this->encode($params['alias']) . '/_rollover';
1861
+            $url = '/'.$this->encode($params['alias']).'/_rollover';
1862 1862
             $method = 'POST';
1863 1863
         }
1864 1864
         $url = $this->addQueryString($url, $params, ['timeout', 'dry_run', 'master_timeout', 'wait_for_active_shards', 'lazy', 'target_failure_store', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
@@ -1894,7 +1894,7 @@  discard block
 block discarded – undo
1894 1894
     public function segments(array $params = [])
1895 1895
     {
1896 1896
         if (isset($params['index'])) {
1897
-            $url = '/' . $this->encode($params['index']) . '/_segments';
1897
+            $url = '/'.$this->encode($params['index']).'/_segments';
1898 1898
             $method = 'GET';
1899 1899
         } else {
1900 1900
             $url = '/_segments';
@@ -1933,7 +1933,7 @@  discard block
 block discarded – undo
1933 1933
     public function shardStores(array $params = [])
1934 1934
     {
1935 1935
         if (isset($params['index'])) {
1936
-            $url = '/' . $this->encode($params['index']) . '/_shard_stores';
1936
+            $url = '/'.$this->encode($params['index']).'/_shard_stores';
1937 1937
             $method = 'GET';
1938 1938
         } else {
1939 1939
             $url = '/_shard_stores';
@@ -1974,7 +1974,7 @@  discard block
 block discarded – undo
1974 1974
     public function shrink(array $params = [])
1975 1975
     {
1976 1976
         $this->checkRequiredParameters(['index', 'target'], $params);
1977
-        $url = '/' . $this->encode($params['index']) . '/_shrink/' . $this->encode($params['target']);
1977
+        $url = '/'.$this->encode($params['index']).'/_shrink/'.$this->encode($params['target']);
1978 1978
         $method = 'PUT';
1979 1979
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1980 1980
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -2011,7 +2011,7 @@  discard block
 block discarded – undo
2011 2011
     public function simulateIndexTemplate(array $params = [])
2012 2012
     {
2013 2013
         $this->checkRequiredParameters(['name'], $params);
2014
-        $url = '/_index_template/_simulate_index/' . $this->encode($params['name']);
2014
+        $url = '/_index_template/_simulate_index/'.$this->encode($params['name']);
2015 2015
         $method = 'POST';
2016 2016
         $url = $this->addQueryString($url, $params, ['create', 'cause', 'master_timeout', 'include_defaults', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2017 2017
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -2047,7 +2047,7 @@  discard block
 block discarded – undo
2047 2047
     public function simulateTemplate(array $params = [])
2048 2048
     {
2049 2049
         if (isset($params['name'])) {
2050
-            $url = '/_index_template/_simulate/' . $this->encode($params['name']);
2050
+            $url = '/_index_template/_simulate/'.$this->encode($params['name']);
2051 2051
             $method = 'POST';
2052 2052
         } else {
2053 2053
             $url = '/_index_template/_simulate';
@@ -2088,7 +2088,7 @@  discard block
 block discarded – undo
2088 2088
     public function split(array $params = [])
2089 2089
     {
2090 2090
         $this->checkRequiredParameters(['index', 'target'], $params);
2091
-        $url = '/' . $this->encode($params['index']) . '/_split/' . $this->encode($params['target']);
2091
+        $url = '/'.$this->encode($params['index']).'/_split/'.$this->encode($params['target']);
2092 2092
         $method = 'PUT';
2093 2093
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2094 2094
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -2129,13 +2129,13 @@  discard block
 block discarded – undo
2129 2129
     public function stats(array $params = [])
2130 2130
     {
2131 2131
         if (isset($params['index']) && isset($params['metric'])) {
2132
-            $url = '/' . $this->encode($params['index']) . '/_stats/' . $this->encode($params['metric']);
2132
+            $url = '/'.$this->encode($params['index']).'/_stats/'.$this->encode($params['metric']);
2133 2133
             $method = 'GET';
2134 2134
         } elseif (isset($params['metric'])) {
2135
-            $url = '/_stats/' . $this->encode($params['metric']);
2135
+            $url = '/_stats/'.$this->encode($params['metric']);
2136 2136
             $method = 'GET';
2137 2137
         } elseif (isset($params['index'])) {
2138
-            $url = '/' . $this->encode($params['index']) . '/_stats';
2138
+            $url = '/'.$this->encode($params['index']).'/_stats';
2139 2139
             $method = 'GET';
2140 2140
         } else {
2141 2141
             $url = '/_stats';
@@ -2177,7 +2177,7 @@  discard block
 block discarded – undo
2177 2177
     public function unfreeze(array $params = [])
2178 2178
     {
2179 2179
         $this->checkRequiredParameters(['index'], $params);
2180
-        $url = '/' . $this->encode($params['index']) . '/_unfreeze';
2180
+        $url = '/'.$this->encode($params['index']).'/_unfreeze';
2181 2181
         $method = 'POST';
2182 2182
         $url = $this->addQueryString($url, $params, ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'wait_for_active_shards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
2183 2183
         $headers = ['Accept' => 'application/json'];
@@ -2254,7 +2254,7 @@  discard block
 block discarded – undo
2254 2254
     public function validateQuery(array $params = [])
2255 2255
     {
2256 2256
         if (isset($params['index'])) {
2257
-            $url = '/' . $this->encode($params['index']) . '/_validate/query';
2257
+            $url = '/'.$this->encode($params['index']).'/_validate/query';
2258 2258
             $method = empty($params['body']) ? 'GET' : 'POST';
2259 2259
         } else {
2260 2260
             $url = '/_validate/query';
Please login to merge, or discard this patch.