Completed
Push — master ( 8e973a...811a95 )
by
unknown
03:40 queued 01:04
created
lib/Vendor/Elastic/Elasticsearch/Endpoints/Cat.php 3 patches
Indentation   +1005 added lines, -1005 removed lines patch added patch discarded remove patch
@@ -25,1009 +25,1009 @@
 block discarded – undo
25 25
  */
26 26
 class Cat extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Shows information about currently configured aliases to indices including filter and routing infos.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html
32
-     *
33
-     * @param array{
34
-     *     name: list, //  A comma-separated list of alias names to return
35
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
36
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
37
-     *     h: list, // Comma-separated list of column names to display
38
-     *     help: boolean, // Return help information
39
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
40
-     *     v: boolean, // Verbose mode. Display column headers
41
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
42
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
43
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
44
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
45
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
46
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
47
-     * } $params
48
-     *
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 aliases(array $params = [])
56
-    {
57
-        if (isset($params['name'])) {
58
-            $url = '/_cat/aliases/' . $this->encode($params['name']);
59
-            $method = 'GET';
60
-        } else {
61
-            $url = '/_cat/aliases';
62
-            $method = 'GET';
63
-        }
64
-        $url = $this->addQueryString($url, $params, ['format', 'local', 'h', 'help', 's', 'v', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
65
-        $headers = ['Accept' => 'text/plain,application/json'];
66
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
67
-    }
68
-    /**
69
-     * Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.
70
-     *
71
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html
72
-     *
73
-     * @param array{
74
-     *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information
75
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
76
-     *     bytes: enum, // The unit in which to display byte values
77
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
78
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
79
-     *     h: list, // Comma-separated list of column names to display
80
-     *     help: boolean, // Return help information
81
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
82
-     *     v: boolean, // Verbose mode. Display column headers
83
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
84
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
85
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
86
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
87
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
88
-     * } $params
89
-     *
90
-     * @throws NoNodeAvailableException if all the hosts are offline
91
-     * @throws ClientResponseException if the status code of response is 4xx
92
-     * @throws ServerResponseException if the status code of response is 5xx
93
-     *
94
-     * @return Elasticsearch|Promise
95
-     */
96
-    public function allocation(array $params = [])
97
-    {
98
-        if (isset($params['node_id'])) {
99
-            $url = '/_cat/allocation/' . $this->encode($params['node_id']);
100
-            $method = 'GET';
101
-        } else {
102
-            $url = '/_cat/allocation';
103
-            $method = 'GET';
104
-        }
105
-        $url = $this->addQueryString($url, $params, ['format', 'bytes', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
106
-        $headers = ['Accept' => 'text/plain,application/json'];
107
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
108
-    }
109
-    /**
110
-     * Returns information about existing component_templates templates.
111
-     *
112
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-component-templates.html
113
-     *
114
-     * @param array{
115
-     *     name: string, //  A pattern that returned component template names must match
116
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
117
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
118
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
119
-     *     h: list, // Comma-separated list of column names to display
120
-     *     help: boolean, // Return help information
121
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
122
-     *     v: boolean, // Verbose mode. Display column headers
123
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
124
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
125
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
126
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
127
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
128
-     * } $params
129
-     *
130
-     * @throws NoNodeAvailableException if all the hosts are offline
131
-     * @throws ClientResponseException if the status code of response is 4xx
132
-     * @throws ServerResponseException if the status code of response is 5xx
133
-     *
134
-     * @return Elasticsearch|Promise
135
-     */
136
-    public function componentTemplates(array $params = [])
137
-    {
138
-        if (isset($params['name'])) {
139
-            $url = '/_cat/component_templates/' . $this->encode($params['name']);
140
-            $method = 'GET';
141
-        } else {
142
-            $url = '/_cat/component_templates';
143
-            $method = 'GET';
144
-        }
145
-        $url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
146
-        $headers = ['Accept' => 'text/plain,application/json'];
147
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
148
-    }
149
-    /**
150
-     * Provides quick access to the document count of the entire cluster, or individual indices.
151
-     *
152
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html
153
-     *
154
-     * @param array{
155
-     *     index: list, //  A comma-separated list of index names to limit the returned information
156
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
157
-     *     h: list, // Comma-separated list of column names to display
158
-     *     help: boolean, // Return help information
159
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
160
-     *     v: boolean, // Verbose mode. Display column headers
161
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
162
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
163
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
164
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
165
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
166
-     * } $params
167
-     *
168
-     * @throws NoNodeAvailableException if all the hosts are offline
169
-     * @throws ClientResponseException if the status code of response is 4xx
170
-     * @throws ServerResponseException if the status code of response is 5xx
171
-     *
172
-     * @return Elasticsearch|Promise
173
-     */
174
-    public function count(array $params = [])
175
-    {
176
-        if (isset($params['index'])) {
177
-            $url = '/_cat/count/' . $this->encode($params['index']);
178
-            $method = 'GET';
179
-        } else {
180
-            $url = '/_cat/count';
181
-            $method = 'GET';
182
-        }
183
-        $url = $this->addQueryString($url, $params, ['format', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
184
-        $headers = ['Accept' => 'text/plain,application/json'];
185
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
186
-    }
187
-    /**
188
-     * Shows how much heap memory is currently being used by fielddata on every data node in the cluster.
189
-     *
190
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html
191
-     *
192
-     * @param array{
193
-     *     fields: list, //  A comma-separated list of fields to return the fielddata size
194
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
195
-     *     bytes: enum, // The unit in which to display byte values
196
-     *     h: list, // Comma-separated list of column names to display
197
-     *     help: boolean, // Return help information
198
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
199
-     *     v: boolean, // Verbose mode. Display column headers
200
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
201
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
202
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
203
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
204
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
205
-     * } $params
206
-     *
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 fielddata(array $params = [])
214
-    {
215
-        if (isset($params['fields'])) {
216
-            $url = '/_cat/fielddata/' . $this->encode($params['fields']);
217
-            $method = 'GET';
218
-        } else {
219
-            $url = '/_cat/fielddata';
220
-            $method = 'GET';
221
-        }
222
-        $url = $this->addQueryString($url, $params, ['format', 'bytes', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
223
-        $headers = ['Accept' => 'text/plain,application/json'];
224
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
225
-    }
226
-    /**
227
-     * Returns a concise representation of the cluster health.
228
-     *
229
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html
230
-     *
231
-     * @param array{
232
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
233
-     *     h: list, // Comma-separated list of column names to display
234
-     *     help: boolean, // Return help information
235
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
236
-     *     time: enum, // The unit in which to display time values
237
-     *     ts: boolean, // Set to false to disable timestamping
238
-     *     v: boolean, // Verbose mode. Display column headers
239
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
240
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
241
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
242
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
243
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
244
-     * } $params
245
-     *
246
-     * @throws NoNodeAvailableException if all the hosts are offline
247
-     * @throws ClientResponseException if the status code of response is 4xx
248
-     * @throws ServerResponseException if the status code of response is 5xx
249
-     *
250
-     * @return Elasticsearch|Promise
251
-     */
252
-    public function health(array $params = [])
253
-    {
254
-        $url = '/_cat/health';
255
-        $method = 'GET';
256
-        $url = $this->addQueryString($url, $params, ['format', 'h', 'help', 's', 'time', 'ts', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
257
-        $headers = ['Accept' => 'text/plain,application/json'];
258
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
259
-    }
260
-    /**
261
-     * Returns help for the Cat APIs.
262
-     *
263
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html
264
-     *
265
-     * @param array{
266
-     *     help: boolean, // Return help information
267
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
268
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
269
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
270
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
271
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
272
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
273
-     * } $params
274
-     *
275
-     * @throws NoNodeAvailableException if all the hosts are offline
276
-     * @throws ClientResponseException if the status code of response is 4xx
277
-     * @throws ServerResponseException if the status code of response is 5xx
278
-     *
279
-     * @return Elasticsearch|Promise
280
-     */
281
-    public function help(array $params = [])
282
-    {
283
-        $url = '/_cat';
284
-        $method = 'GET';
285
-        $url = $this->addQueryString($url, $params, ['help', 's', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
286
-        $headers = ['Accept' => 'text/plain'];
287
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
288
-    }
289
-    /**
290
-     * Returns information about indices: number of primaries and replicas, document counts, disk size, ...
291
-     *
292
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html
293
-     *
294
-     * @param array{
295
-     *     index: list, //  A comma-separated list of index names to limit the returned information
296
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
297
-     *     bytes: enum, // The unit in which to display byte values
298
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
299
-     *     h: list, // Comma-separated list of column names to display
300
-     *     health: enum, // A health status ("green", "yellow", or "red" to filter only indices matching the specified health status
301
-     *     help: boolean, // Return help information
302
-     *     pri: boolean, // Set to true to return stats only for primary shards
303
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
304
-     *     time: enum, // The unit in which to display time values
305
-     *     v: boolean, // Verbose mode. Display column headers
306
-     *     include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
307
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
308
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
309
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
310
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
311
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
312
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
313
-     * } $params
314
-     *
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 indices(array $params = [])
322
-    {
323
-        if (isset($params['index'])) {
324
-            $url = '/_cat/indices/' . $this->encode($params['index']);
325
-            $method = 'GET';
326
-        } else {
327
-            $url = '/_cat/indices';
328
-            $method = 'GET';
329
-        }
330
-        $url = $this->addQueryString($url, $params, ['format', 'bytes', 'master_timeout', 'h', 'health', 'help', 'pri', 's', 'time', 'v', 'include_unloaded_segments', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
331
-        $headers = ['Accept' => 'text/plain,application/json'];
332
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
333
-    }
334
-    /**
335
-     * Returns information about the master node.
336
-     *
337
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html
338
-     *
339
-     * @param array{
340
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
341
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
342
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
343
-     *     h: list, // Comma-separated list of column names to display
344
-     *     help: boolean, // Return help information
345
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
346
-     *     v: boolean, // Verbose mode. Display column headers
347
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
348
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
349
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
350
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
351
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
352
-     * } $params
353
-     *
354
-     * @throws NoNodeAvailableException if all the hosts are offline
355
-     * @throws ClientResponseException if the status code of response is 4xx
356
-     * @throws ServerResponseException if the status code of response is 5xx
357
-     *
358
-     * @return Elasticsearch|Promise
359
-     */
360
-    public function master(array $params = [])
361
-    {
362
-        $url = '/_cat/master';
363
-        $method = 'GET';
364
-        $url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
365
-        $headers = ['Accept' => 'text/plain,application/json'];
366
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
367
-    }
368
-    /**
369
-     * Gets configuration and usage information about data frame analytics jobs.
370
-     *
371
-     * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html
372
-     *
373
-     * @param array{
374
-     *     id: string, //  The ID of the data frame analytics to fetch
375
-     *     allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified)
376
-     *     bytes: enum, // The unit in which to display byte values
377
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
378
-     *     h: list, // Comma-separated list of column names to display
379
-     *     help: boolean, // Return help information
380
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
381
-     *     time: enum, // The unit in which to display time values
382
-     *     v: boolean, // Verbose mode. Display column headers
383
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
384
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
385
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
386
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
387
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
388
-     * } $params
389
-     *
390
-     * @throws NoNodeAvailableException if all the hosts are offline
391
-     * @throws ClientResponseException if the status code of response is 4xx
392
-     * @throws ServerResponseException if the status code of response is 5xx
393
-     *
394
-     * @return Elasticsearch|Promise
395
-     */
396
-    public function mlDataFrameAnalytics(array $params = [])
397
-    {
398
-        if (isset($params['id'])) {
399
-            $url = '/_cat/ml/data_frame/analytics/' . $this->encode($params['id']);
400
-            $method = 'GET';
401
-        } else {
402
-            $url = '/_cat/ml/data_frame/analytics';
403
-            $method = 'GET';
404
-        }
405
-        $url = $this->addQueryString($url, $params, ['allow_no_match', 'bytes', 'format', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
406
-        $headers = ['Accept' => 'text/plain,application/json'];
407
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
408
-    }
409
-    /**
410
-     * Gets configuration and usage information about datafeeds.
411
-     *
412
-     * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html
413
-     *
414
-     * @param array{
415
-     *     datafeed_id: string, //  The ID of the datafeeds stats to fetch
416
-     *     allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
417
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
418
-     *     h: list, // Comma-separated list of column names to display
419
-     *     help: boolean, // Return help information
420
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
421
-     *     time: enum, // The unit in which to display time values
422
-     *     v: boolean, // Verbose mode. Display column headers
423
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
424
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
425
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
426
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
427
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
428
-     * } $params
429
-     *
430
-     * @throws NoNodeAvailableException if all the hosts are offline
431
-     * @throws ClientResponseException if the status code of response is 4xx
432
-     * @throws ServerResponseException if the status code of response is 5xx
433
-     *
434
-     * @return Elasticsearch|Promise
435
-     */
436
-    public function mlDatafeeds(array $params = [])
437
-    {
438
-        if (isset($params['datafeed_id'])) {
439
-            $url = '/_cat/ml/datafeeds/' . $this->encode($params['datafeed_id']);
440
-            $method = 'GET';
441
-        } else {
442
-            $url = '/_cat/ml/datafeeds';
443
-            $method = 'GET';
444
-        }
445
-        $url = $this->addQueryString($url, $params, ['allow_no_match', 'format', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
446
-        $headers = ['Accept' => 'text/plain,application/json'];
447
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
448
-    }
449
-    /**
450
-     * Gets configuration and usage information about anomaly detection jobs.
451
-     *
452
-     * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html
453
-     *
454
-     * @param array{
455
-     *     job_id: string, //  The ID of the jobs stats to fetch
456
-     *     allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
457
-     *     bytes: enum, // The unit in which to display byte values
458
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
459
-     *     h: list, // Comma-separated list of column names to display
460
-     *     help: boolean, // Return help information
461
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
462
-     *     time: enum, // The unit in which to display time values
463
-     *     v: boolean, // Verbose mode. Display column headers
464
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
465
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
466
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
467
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
468
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
469
-     * } $params
470
-     *
471
-     * @throws NoNodeAvailableException if all the hosts are offline
472
-     * @throws ClientResponseException if the status code of response is 4xx
473
-     * @throws ServerResponseException if the status code of response is 5xx
474
-     *
475
-     * @return Elasticsearch|Promise
476
-     */
477
-    public function mlJobs(array $params = [])
478
-    {
479
-        if (isset($params['job_id'])) {
480
-            $url = '/_cat/ml/anomaly_detectors/' . $this->encode($params['job_id']);
481
-            $method = 'GET';
482
-        } else {
483
-            $url = '/_cat/ml/anomaly_detectors';
484
-            $method = 'GET';
485
-        }
486
-        $url = $this->addQueryString($url, $params, ['allow_no_match', 'bytes', 'format', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
487
-        $headers = ['Accept' => 'text/plain,application/json'];
488
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
489
-    }
490
-    /**
491
-     * Gets configuration and usage information about inference trained models.
492
-     *
493
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html
494
-     *
495
-     * @param array{
496
-     *     model_id: string, //  The ID of the trained models stats to fetch
497
-     *     allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified)
498
-     *     from: int, // skips a number of trained models
499
-     *     size: int, // specifies a max number of trained models to get
500
-     *     bytes: enum, // The unit in which to display byte values
501
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
502
-     *     h: list, // Comma-separated list of column names to display
503
-     *     help: boolean, // Return help information
504
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
505
-     *     time: enum, // The unit in which to display time values
506
-     *     v: boolean, // Verbose mode. Display column headers
507
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
508
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
509
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
510
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
511
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
512
-     * } $params
513
-     *
514
-     * @throws NoNodeAvailableException if all the hosts are offline
515
-     * @throws ClientResponseException if the status code of response is 4xx
516
-     * @throws ServerResponseException if the status code of response is 5xx
517
-     *
518
-     * @return Elasticsearch|Promise
519
-     */
520
-    public function mlTrainedModels(array $params = [])
521
-    {
522
-        if (isset($params['model_id'])) {
523
-            $url = '/_cat/ml/trained_models/' . $this->encode($params['model_id']);
524
-            $method = 'GET';
525
-        } else {
526
-            $url = '/_cat/ml/trained_models';
527
-            $method = 'GET';
528
-        }
529
-        $url = $this->addQueryString($url, $params, ['allow_no_match', 'from', 'size', 'bytes', 'format', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
530
-        $headers = ['Accept' => 'text/plain,application/json'];
531
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
532
-    }
533
-    /**
534
-     * Returns information about custom node attributes.
535
-     *
536
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html
537
-     *
538
-     * @param array{
539
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
540
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
541
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
542
-     *     h: list, // Comma-separated list of column names to display
543
-     *     help: boolean, // Return help information
544
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
545
-     *     v: boolean, // Verbose mode. Display column headers
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 NoNodeAvailableException if all the hosts are offline
554
-     * @throws ClientResponseException if the status code of response is 4xx
555
-     * @throws ServerResponseException if the status code of response is 5xx
556
-     *
557
-     * @return Elasticsearch|Promise
558
-     */
559
-    public function nodeattrs(array $params = [])
560
-    {
561
-        $url = '/_cat/nodeattrs';
562
-        $method = 'GET';
563
-        $url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
564
-        $headers = ['Accept' => 'text/plain,application/json'];
565
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
566
-    }
567
-    /**
568
-     * Returns basic statistics about performance of cluster nodes.
569
-     *
570
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html
571
-     *
572
-     * @param array{
573
-     *     bytes: enum, // The unit in which to display byte values
574
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
575
-     *     full_id: boolean, // Return the full node ID instead of the shortened version (default: false)
576
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
577
-     *     h: list, // Comma-separated list of column names to display
578
-     *     help: boolean, // Return help information
579
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
580
-     *     time: enum, // The unit in which to display time values
581
-     *     v: boolean, // Verbose mode. Display column headers
582
-     *     include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
583
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
584
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
585
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
586
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
587
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
588
-     * } $params
589
-     *
590
-     * @throws NoNodeAvailableException if all the hosts are offline
591
-     * @throws ClientResponseException if the status code of response is 4xx
592
-     * @throws ServerResponseException if the status code of response is 5xx
593
-     *
594
-     * @return Elasticsearch|Promise
595
-     */
596
-    public function nodes(array $params = [])
597
-    {
598
-        $url = '/_cat/nodes';
599
-        $method = 'GET';
600
-        $url = $this->addQueryString($url, $params, ['bytes', 'format', 'full_id', 'master_timeout', 'h', 'help', 's', 'time', 'v', 'include_unloaded_segments', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
601
-        $headers = ['Accept' => 'text/plain,application/json'];
602
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
603
-    }
604
-    /**
605
-     * Returns a concise representation of the cluster pending tasks.
606
-     *
607
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html
608
-     *
609
-     * @param array{
610
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
611
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
612
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
613
-     *     h: list, // Comma-separated list of column names to display
614
-     *     help: boolean, // Return help information
615
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
616
-     *     time: enum, // The unit in which to display time values
617
-     *     v: boolean, // Verbose mode. Display column headers
618
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
619
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
620
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
621
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
622
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
623
-     * } $params
624
-     *
625
-     * @throws NoNodeAvailableException if all the hosts are offline
626
-     * @throws ClientResponseException if the status code of response is 4xx
627
-     * @throws ServerResponseException if the status code of response is 5xx
628
-     *
629
-     * @return Elasticsearch|Promise
630
-     */
631
-    public function pendingTasks(array $params = [])
632
-    {
633
-        $url = '/_cat/pending_tasks';
634
-        $method = 'GET';
635
-        $url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
636
-        $headers = ['Accept' => 'text/plain,application/json'];
637
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
638
-    }
639
-    /**
640
-     * Returns information about installed plugins across nodes node.
641
-     *
642
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html
643
-     *
644
-     * @param array{
645
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
646
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
647
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
648
-     *     h: list, // Comma-separated list of column names to display
649
-     *     help: boolean, // Return help information
650
-     *     include_bootstrap: boolean, // Include bootstrap plugins in the response
651
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
652
-     *     v: boolean, // Verbose mode. Display column headers
653
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
654
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
655
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
656
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
657
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
658
-     * } $params
659
-     *
660
-     * @throws NoNodeAvailableException if all the hosts are offline
661
-     * @throws ClientResponseException if the status code of response is 4xx
662
-     * @throws ServerResponseException if the status code of response is 5xx
663
-     *
664
-     * @return Elasticsearch|Promise
665
-     */
666
-    public function plugins(array $params = [])
667
-    {
668
-        $url = '/_cat/plugins';
669
-        $method = 'GET';
670
-        $url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 'include_bootstrap', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
671
-        $headers = ['Accept' => 'text/plain,application/json'];
672
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
673
-    }
674
-    /**
675
-     * Returns information about index shard recoveries, both on-going completed.
676
-     *
677
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html
678
-     *
679
-     * @param array{
680
-     *     index: list, //  Comma-separated list or wildcard expression of index names to limit the returned information
681
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
682
-     *     active_only: boolean, // If `true`, the response only includes ongoing shard recoveries
683
-     *     bytes: enum, // The unit in which to display byte values
684
-     *     detailed: boolean, // If `true`, the response includes detailed information about shard recoveries
685
-     *     h: list, // Comma-separated list of column names to display
686
-     *     help: boolean, // Return help information
687
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
688
-     *     time: enum, // The unit in which to display time values
689
-     *     v: boolean, // Verbose mode. Display column headers
690
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
691
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
692
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
693
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
694
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
695
-     * } $params
696
-     *
697
-     * @throws NoNodeAvailableException if all the hosts are offline
698
-     * @throws ClientResponseException if the status code of response is 4xx
699
-     * @throws ServerResponseException if the status code of response is 5xx
700
-     *
701
-     * @return Elasticsearch|Promise
702
-     */
703
-    public function recovery(array $params = [])
704
-    {
705
-        if (isset($params['index'])) {
706
-            $url = '/_cat/recovery/' . $this->encode($params['index']);
707
-            $method = 'GET';
708
-        } else {
709
-            $url = '/_cat/recovery';
710
-            $method = 'GET';
711
-        }
712
-        $url = $this->addQueryString($url, $params, ['format', 'active_only', 'bytes', 'detailed', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
713
-        $headers = ['Accept' => 'text/plain,application/json'];
714
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
715
-    }
716
-    /**
717
-     * Returns information about snapshot repositories registered in the cluster.
718
-     *
719
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html
720
-     *
721
-     * @param array{
722
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
723
-     *     local: boolean, // Return local information, do not retrieve the state from master node
724
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
725
-     *     h: list, // Comma-separated list of column names to display
726
-     *     help: boolean, // Return help information
727
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
728
-     *     v: boolean, // Verbose mode. Display column headers
729
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
730
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
731
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
732
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
733
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
734
-     * } $params
735
-     *
736
-     * @throws NoNodeAvailableException if all the hosts are offline
737
-     * @throws ClientResponseException if the status code of response is 4xx
738
-     * @throws ServerResponseException if the status code of response is 5xx
739
-     *
740
-     * @return Elasticsearch|Promise
741
-     */
742
-    public function repositories(array $params = [])
743
-    {
744
-        $url = '/_cat/repositories';
745
-        $method = 'GET';
746
-        $url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
747
-        $headers = ['Accept' => 'text/plain,application/json'];
748
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
749
-    }
750
-    /**
751
-     * Provides low-level information about the segments in the shards of an index.
752
-     *
753
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html
754
-     *
755
-     * @param array{
756
-     *     index: list, //  A comma-separated list of index names to limit the returned information
757
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
758
-     *     bytes: enum, // The unit in which to display byte values
759
-     *     h: list, // Comma-separated list of column names to display
760
-     *     help: boolean, // Return help information
761
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
762
-     *     v: boolean, // Verbose mode. Display column headers
763
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
764
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
765
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
766
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
767
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
768
-     * } $params
769
-     *
770
-     * @throws NoNodeAvailableException if all the hosts are offline
771
-     * @throws ClientResponseException if the status code of response is 4xx
772
-     * @throws ServerResponseException if the status code of response is 5xx
773
-     *
774
-     * @return Elasticsearch|Promise
775
-     */
776
-    public function segments(array $params = [])
777
-    {
778
-        if (isset($params['index'])) {
779
-            $url = '/_cat/segments/' . $this->encode($params['index']);
780
-            $method = 'GET';
781
-        } else {
782
-            $url = '/_cat/segments';
783
-            $method = 'GET';
784
-        }
785
-        $url = $this->addQueryString($url, $params, ['format', 'bytes', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
786
-        $headers = ['Accept' => 'text/plain,application/json'];
787
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
788
-    }
789
-    /**
790
-     * Provides a detailed view of shard allocation on nodes.
791
-     *
792
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html
793
-     *
794
-     * @param array{
795
-     *     index: list, //  A comma-separated list of index names to limit the returned information
796
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
797
-     *     bytes: enum, // The unit in which to display byte values
798
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
799
-     *     h: list, // Comma-separated list of column names to display
800
-     *     help: boolean, // Return help information
801
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
802
-     *     time: enum, // The unit in which to display time values
803
-     *     v: boolean, // Verbose mode. Display column headers
804
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
805
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
806
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
807
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
808
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
809
-     * } $params
810
-     *
811
-     * @throws NoNodeAvailableException if all the hosts are offline
812
-     * @throws ClientResponseException if the status code of response is 4xx
813
-     * @throws ServerResponseException if the status code of response is 5xx
814
-     *
815
-     * @return Elasticsearch|Promise
816
-     */
817
-    public function shards(array $params = [])
818
-    {
819
-        if (isset($params['index'])) {
820
-            $url = '/_cat/shards/' . $this->encode($params['index']);
821
-            $method = 'GET';
822
-        } else {
823
-            $url = '/_cat/shards';
824
-            $method = 'GET';
825
-        }
826
-        $url = $this->addQueryString($url, $params, ['format', 'bytes', 'master_timeout', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
827
-        $headers = ['Accept' => 'text/plain,application/json'];
828
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
829
-    }
830
-    /**
831
-     * Returns all snapshots in a specific repository.
832
-     *
833
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html
834
-     *
835
-     * @param array{
836
-     *     repository: list, //  Name of repository from which to fetch the snapshot information
837
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
838
-     *     ignore_unavailable: boolean, // Set to true to ignore unavailable snapshots
839
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
840
-     *     h: list, // Comma-separated list of column names to display
841
-     *     help: boolean, // Return help information
842
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
843
-     *     time: enum, // The unit in which to display time values
844
-     *     v: boolean, // Verbose mode. Display column headers
845
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
846
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
847
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
848
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
849
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
850
-     * } $params
851
-     *
852
-     * @throws NoNodeAvailableException if all the hosts are offline
853
-     * @throws ClientResponseException if the status code of response is 4xx
854
-     * @throws ServerResponseException if the status code of response is 5xx
855
-     *
856
-     * @return Elasticsearch|Promise
857
-     */
858
-    public function snapshots(array $params = [])
859
-    {
860
-        if (isset($params['repository'])) {
861
-            $url = '/_cat/snapshots/' . $this->encode($params['repository']);
862
-            $method = 'GET';
863
-        } else {
864
-            $url = '/_cat/snapshots';
865
-            $method = 'GET';
866
-        }
867
-        $url = $this->addQueryString($url, $params, ['format', 'ignore_unavailable', 'master_timeout', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
868
-        $headers = ['Accept' => 'text/plain,application/json'];
869
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
870
-    }
871
-    /**
872
-     * Returns information about the tasks currently executing on one or more nodes in the cluster.
873
-     *
874
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
875
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
876
-     *
877
-     * @param array{
878
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
879
-     *     nodes: 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
880
-     *     actions: list, // A comma-separated list of actions that should be returned. Leave empty to return all.
881
-     *     detailed: boolean, // Return detailed task information (default: false)
882
-     *     parent_task_id: string, // Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
883
-     *     h: list, // Comma-separated list of column names to display
884
-     *     help: boolean, // Return help information
885
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
886
-     *     time: enum, // The unit in which to display time values
887
-     *     v: boolean, // Verbose mode. Display column headers
888
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
889
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
890
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
891
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
892
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
893
-     * } $params
894
-     *
895
-     * @throws NoNodeAvailableException if all the hosts are offline
896
-     * @throws ClientResponseException if the status code of response is 4xx
897
-     * @throws ServerResponseException if the status code of response is 5xx
898
-     *
899
-     * @return Elasticsearch|Promise
900
-     */
901
-    public function tasks(array $params = [])
902
-    {
903
-        $url = '/_cat/tasks';
904
-        $method = 'GET';
905
-        $url = $this->addQueryString($url, $params, ['format', 'nodes', 'actions', 'detailed', 'parent_task_id', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
906
-        $headers = ['Accept' => 'text/plain,application/json'];
907
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
908
-    }
909
-    /**
910
-     * Returns information about existing templates.
911
-     *
912
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html
913
-     *
914
-     * @param array{
915
-     *     name: string, //  A pattern that returned template names must match
916
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
917
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
918
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
919
-     *     h: list, // Comma-separated list of column names to display
920
-     *     help: boolean, // Return help information
921
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
922
-     *     v: boolean, // Verbose mode. Display column headers
923
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
924
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
925
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
926
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
927
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
928
-     * } $params
929
-     *
930
-     * @throws NoNodeAvailableException if all the hosts are offline
931
-     * @throws ClientResponseException if the status code of response is 4xx
932
-     * @throws ServerResponseException if the status code of response is 5xx
933
-     *
934
-     * @return Elasticsearch|Promise
935
-     */
936
-    public function templates(array $params = [])
937
-    {
938
-        if (isset($params['name'])) {
939
-            $url = '/_cat/templates/' . $this->encode($params['name']);
940
-            $method = 'GET';
941
-        } else {
942
-            $url = '/_cat/templates';
943
-            $method = 'GET';
944
-        }
945
-        $url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
946
-        $headers = ['Accept' => 'text/plain,application/json'];
947
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
948
-    }
949
-    /**
950
-     * Returns cluster-wide thread pool statistics per node.
951
-     * By default the active, queue and rejected statistics are returned for all thread pools.
952
-     *
953
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html
954
-     *
955
-     * @param array{
956
-     *     thread_pool_patterns: list, //  A comma-separated list of regular-expressions to filter the thread pools in the output
957
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
958
-     *     time: enum, // The unit in which to display time values
959
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
960
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
961
-     *     h: list, // Comma-separated list of column names to display
962
-     *     help: boolean, // Return help information
963
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
964
-     *     v: boolean, // Verbose mode. Display column headers
965
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
966
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
967
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
968
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
969
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
970
-     * } $params
971
-     *
972
-     * @throws NoNodeAvailableException if all the hosts are offline
973
-     * @throws ClientResponseException if the status code of response is 4xx
974
-     * @throws ServerResponseException if the status code of response is 5xx
975
-     *
976
-     * @return Elasticsearch|Promise
977
-     */
978
-    public function threadPool(array $params = [])
979
-    {
980
-        if (isset($params['thread_pool_patterns'])) {
981
-            $url = '/_cat/thread_pool/' . $this->encode($params['thread_pool_patterns']);
982
-            $method = 'GET';
983
-        } else {
984
-            $url = '/_cat/thread_pool';
985
-            $method = 'GET';
986
-        }
987
-        $url = $this->addQueryString($url, $params, ['format', 'time', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
988
-        $headers = ['Accept' => 'text/plain,application/json'];
989
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
990
-    }
991
-    /**
992
-     * Gets configuration and usage information about transforms.
993
-     *
994
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html
995
-     *
996
-     * @param array{
997
-     *     transform_id: string, //  The id of the transform for which to get stats. '_all' or '*' implies all transforms
998
-     *     from: int, // skips a number of transform configs, defaults to 0
999
-     *     size: int, // specifies a max number of transforms to get, defaults to 100
1000
-     *     allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
1001
-     *     format: string, // a short version of the Accept header, e.g. json, yaml
1002
-     *     h: list, // Comma-separated list of column names to display
1003
-     *     help: boolean, // Return help information
1004
-     *     s: list, // Comma-separated list of column names or column aliases to sort by
1005
-     *     time: enum, // The unit in which to display time values
1006
-     *     v: boolean, // Verbose mode. Display column headers
1007
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1008
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1009
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1010
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1011
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1012
-     * } $params
1013
-     *
1014
-     * @throws NoNodeAvailableException if all the hosts are offline
1015
-     * @throws ClientResponseException if the status code of response is 4xx
1016
-     * @throws ServerResponseException if the status code of response is 5xx
1017
-     *
1018
-     * @return Elasticsearch|Promise
1019
-     */
1020
-    public function transforms(array $params = [])
1021
-    {
1022
-        if (isset($params['transform_id'])) {
1023
-            $url = '/_cat/transforms/' . $this->encode($params['transform_id']);
1024
-            $method = 'GET';
1025
-        } else {
1026
-            $url = '/_cat/transforms';
1027
-            $method = 'GET';
1028
-        }
1029
-        $url = $this->addQueryString($url, $params, ['from', 'size', 'allow_no_match', 'format', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1030
-        $headers = ['Accept' => 'text/plain,application/json'];
1031
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
1032
-    }
28
+	/**
29
+	 * Shows information about currently configured aliases to indices including filter and routing infos.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html
32
+	 *
33
+	 * @param array{
34
+	 *     name: list, //  A comma-separated list of alias names to return
35
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
36
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
37
+	 *     h: list, // Comma-separated list of column names to display
38
+	 *     help: boolean, // Return help information
39
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
40
+	 *     v: boolean, // Verbose mode. Display column headers
41
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
42
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
43
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
44
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
45
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
46
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
47
+	 * } $params
48
+	 *
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 aliases(array $params = [])
56
+	{
57
+		if (isset($params['name'])) {
58
+			$url = '/_cat/aliases/' . $this->encode($params['name']);
59
+			$method = 'GET';
60
+		} else {
61
+			$url = '/_cat/aliases';
62
+			$method = 'GET';
63
+		}
64
+		$url = $this->addQueryString($url, $params, ['format', 'local', 'h', 'help', 's', 'v', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
65
+		$headers = ['Accept' => 'text/plain,application/json'];
66
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
67
+	}
68
+	/**
69
+	 * Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.
70
+	 *
71
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html
72
+	 *
73
+	 * @param array{
74
+	 *     node_id: list, //  A comma-separated list of node IDs or names to limit the returned information
75
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
76
+	 *     bytes: enum, // The unit in which to display byte values
77
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
78
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
79
+	 *     h: list, // Comma-separated list of column names to display
80
+	 *     help: boolean, // Return help information
81
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
82
+	 *     v: boolean, // Verbose mode. Display column headers
83
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
84
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
85
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
86
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
87
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
88
+	 * } $params
89
+	 *
90
+	 * @throws NoNodeAvailableException if all the hosts are offline
91
+	 * @throws ClientResponseException if the status code of response is 4xx
92
+	 * @throws ServerResponseException if the status code of response is 5xx
93
+	 *
94
+	 * @return Elasticsearch|Promise
95
+	 */
96
+	public function allocation(array $params = [])
97
+	{
98
+		if (isset($params['node_id'])) {
99
+			$url = '/_cat/allocation/' . $this->encode($params['node_id']);
100
+			$method = 'GET';
101
+		} else {
102
+			$url = '/_cat/allocation';
103
+			$method = 'GET';
104
+		}
105
+		$url = $this->addQueryString($url, $params, ['format', 'bytes', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
106
+		$headers = ['Accept' => 'text/plain,application/json'];
107
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
108
+	}
109
+	/**
110
+	 * Returns information about existing component_templates templates.
111
+	 *
112
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-component-templates.html
113
+	 *
114
+	 * @param array{
115
+	 *     name: string, //  A pattern that returned component template names must match
116
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
117
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
118
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
119
+	 *     h: list, // Comma-separated list of column names to display
120
+	 *     help: boolean, // Return help information
121
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
122
+	 *     v: boolean, // Verbose mode. Display column headers
123
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
124
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
125
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
126
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
127
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
128
+	 * } $params
129
+	 *
130
+	 * @throws NoNodeAvailableException if all the hosts are offline
131
+	 * @throws ClientResponseException if the status code of response is 4xx
132
+	 * @throws ServerResponseException if the status code of response is 5xx
133
+	 *
134
+	 * @return Elasticsearch|Promise
135
+	 */
136
+	public function componentTemplates(array $params = [])
137
+	{
138
+		if (isset($params['name'])) {
139
+			$url = '/_cat/component_templates/' . $this->encode($params['name']);
140
+			$method = 'GET';
141
+		} else {
142
+			$url = '/_cat/component_templates';
143
+			$method = 'GET';
144
+		}
145
+		$url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
146
+		$headers = ['Accept' => 'text/plain,application/json'];
147
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
148
+	}
149
+	/**
150
+	 * Provides quick access to the document count of the entire cluster, or individual indices.
151
+	 *
152
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html
153
+	 *
154
+	 * @param array{
155
+	 *     index: list, //  A comma-separated list of index names to limit the returned information
156
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
157
+	 *     h: list, // Comma-separated list of column names to display
158
+	 *     help: boolean, // Return help information
159
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
160
+	 *     v: boolean, // Verbose mode. Display column headers
161
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
162
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
163
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
164
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
165
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
166
+	 * } $params
167
+	 *
168
+	 * @throws NoNodeAvailableException if all the hosts are offline
169
+	 * @throws ClientResponseException if the status code of response is 4xx
170
+	 * @throws ServerResponseException if the status code of response is 5xx
171
+	 *
172
+	 * @return Elasticsearch|Promise
173
+	 */
174
+	public function count(array $params = [])
175
+	{
176
+		if (isset($params['index'])) {
177
+			$url = '/_cat/count/' . $this->encode($params['index']);
178
+			$method = 'GET';
179
+		} else {
180
+			$url = '/_cat/count';
181
+			$method = 'GET';
182
+		}
183
+		$url = $this->addQueryString($url, $params, ['format', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
184
+		$headers = ['Accept' => 'text/plain,application/json'];
185
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
186
+	}
187
+	/**
188
+	 * Shows how much heap memory is currently being used by fielddata on every data node in the cluster.
189
+	 *
190
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html
191
+	 *
192
+	 * @param array{
193
+	 *     fields: list, //  A comma-separated list of fields to return the fielddata size
194
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
195
+	 *     bytes: enum, // The unit in which to display byte values
196
+	 *     h: list, // Comma-separated list of column names to display
197
+	 *     help: boolean, // Return help information
198
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
199
+	 *     v: boolean, // Verbose mode. Display column headers
200
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
201
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
202
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
203
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
204
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
205
+	 * } $params
206
+	 *
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 fielddata(array $params = [])
214
+	{
215
+		if (isset($params['fields'])) {
216
+			$url = '/_cat/fielddata/' . $this->encode($params['fields']);
217
+			$method = 'GET';
218
+		} else {
219
+			$url = '/_cat/fielddata';
220
+			$method = 'GET';
221
+		}
222
+		$url = $this->addQueryString($url, $params, ['format', 'bytes', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
223
+		$headers = ['Accept' => 'text/plain,application/json'];
224
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
225
+	}
226
+	/**
227
+	 * Returns a concise representation of the cluster health.
228
+	 *
229
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html
230
+	 *
231
+	 * @param array{
232
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
233
+	 *     h: list, // Comma-separated list of column names to display
234
+	 *     help: boolean, // Return help information
235
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
236
+	 *     time: enum, // The unit in which to display time values
237
+	 *     ts: boolean, // Set to false to disable timestamping
238
+	 *     v: boolean, // Verbose mode. Display column headers
239
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
240
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
241
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
242
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
243
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
244
+	 * } $params
245
+	 *
246
+	 * @throws NoNodeAvailableException if all the hosts are offline
247
+	 * @throws ClientResponseException if the status code of response is 4xx
248
+	 * @throws ServerResponseException if the status code of response is 5xx
249
+	 *
250
+	 * @return Elasticsearch|Promise
251
+	 */
252
+	public function health(array $params = [])
253
+	{
254
+		$url = '/_cat/health';
255
+		$method = 'GET';
256
+		$url = $this->addQueryString($url, $params, ['format', 'h', 'help', 's', 'time', 'ts', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
257
+		$headers = ['Accept' => 'text/plain,application/json'];
258
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
259
+	}
260
+	/**
261
+	 * Returns help for the Cat APIs.
262
+	 *
263
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html
264
+	 *
265
+	 * @param array{
266
+	 *     help: boolean, // Return help information
267
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
268
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
269
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
270
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
271
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
272
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
273
+	 * } $params
274
+	 *
275
+	 * @throws NoNodeAvailableException if all the hosts are offline
276
+	 * @throws ClientResponseException if the status code of response is 4xx
277
+	 * @throws ServerResponseException if the status code of response is 5xx
278
+	 *
279
+	 * @return Elasticsearch|Promise
280
+	 */
281
+	public function help(array $params = [])
282
+	{
283
+		$url = '/_cat';
284
+		$method = 'GET';
285
+		$url = $this->addQueryString($url, $params, ['help', 's', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
286
+		$headers = ['Accept' => 'text/plain'];
287
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
288
+	}
289
+	/**
290
+	 * Returns information about indices: number of primaries and replicas, document counts, disk size, ...
291
+	 *
292
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html
293
+	 *
294
+	 * @param array{
295
+	 *     index: list, //  A comma-separated list of index names to limit the returned information
296
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
297
+	 *     bytes: enum, // The unit in which to display byte values
298
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
299
+	 *     h: list, // Comma-separated list of column names to display
300
+	 *     health: enum, // A health status ("green", "yellow", or "red" to filter only indices matching the specified health status
301
+	 *     help: boolean, // Return help information
302
+	 *     pri: boolean, // Set to true to return stats only for primary shards
303
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
304
+	 *     time: enum, // The unit in which to display time values
305
+	 *     v: boolean, // Verbose mode. Display column headers
306
+	 *     include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
307
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
308
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
309
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
310
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
311
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
312
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
313
+	 * } $params
314
+	 *
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 indices(array $params = [])
322
+	{
323
+		if (isset($params['index'])) {
324
+			$url = '/_cat/indices/' . $this->encode($params['index']);
325
+			$method = 'GET';
326
+		} else {
327
+			$url = '/_cat/indices';
328
+			$method = 'GET';
329
+		}
330
+		$url = $this->addQueryString($url, $params, ['format', 'bytes', 'master_timeout', 'h', 'health', 'help', 'pri', 's', 'time', 'v', 'include_unloaded_segments', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
331
+		$headers = ['Accept' => 'text/plain,application/json'];
332
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
333
+	}
334
+	/**
335
+	 * Returns information about the master node.
336
+	 *
337
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html
338
+	 *
339
+	 * @param array{
340
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
341
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
342
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
343
+	 *     h: list, // Comma-separated list of column names to display
344
+	 *     help: boolean, // Return help information
345
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
346
+	 *     v: boolean, // Verbose mode. Display column headers
347
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
348
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
349
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
350
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
351
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
352
+	 * } $params
353
+	 *
354
+	 * @throws NoNodeAvailableException if all the hosts are offline
355
+	 * @throws ClientResponseException if the status code of response is 4xx
356
+	 * @throws ServerResponseException if the status code of response is 5xx
357
+	 *
358
+	 * @return Elasticsearch|Promise
359
+	 */
360
+	public function master(array $params = [])
361
+	{
362
+		$url = '/_cat/master';
363
+		$method = 'GET';
364
+		$url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
365
+		$headers = ['Accept' => 'text/plain,application/json'];
366
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
367
+	}
368
+	/**
369
+	 * Gets configuration and usage information about data frame analytics jobs.
370
+	 *
371
+	 * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html
372
+	 *
373
+	 * @param array{
374
+	 *     id: string, //  The ID of the data frame analytics to fetch
375
+	 *     allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified)
376
+	 *     bytes: enum, // The unit in which to display byte values
377
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
378
+	 *     h: list, // Comma-separated list of column names to display
379
+	 *     help: boolean, // Return help information
380
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
381
+	 *     time: enum, // The unit in which to display time values
382
+	 *     v: boolean, // Verbose mode. Display column headers
383
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
384
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
385
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
386
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
387
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
388
+	 * } $params
389
+	 *
390
+	 * @throws NoNodeAvailableException if all the hosts are offline
391
+	 * @throws ClientResponseException if the status code of response is 4xx
392
+	 * @throws ServerResponseException if the status code of response is 5xx
393
+	 *
394
+	 * @return Elasticsearch|Promise
395
+	 */
396
+	public function mlDataFrameAnalytics(array $params = [])
397
+	{
398
+		if (isset($params['id'])) {
399
+			$url = '/_cat/ml/data_frame/analytics/' . $this->encode($params['id']);
400
+			$method = 'GET';
401
+		} else {
402
+			$url = '/_cat/ml/data_frame/analytics';
403
+			$method = 'GET';
404
+		}
405
+		$url = $this->addQueryString($url, $params, ['allow_no_match', 'bytes', 'format', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
406
+		$headers = ['Accept' => 'text/plain,application/json'];
407
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
408
+	}
409
+	/**
410
+	 * Gets configuration and usage information about datafeeds.
411
+	 *
412
+	 * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html
413
+	 *
414
+	 * @param array{
415
+	 *     datafeed_id: string, //  The ID of the datafeeds stats to fetch
416
+	 *     allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
417
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
418
+	 *     h: list, // Comma-separated list of column names to display
419
+	 *     help: boolean, // Return help information
420
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
421
+	 *     time: enum, // The unit in which to display time values
422
+	 *     v: boolean, // Verbose mode. Display column headers
423
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
424
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
425
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
426
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
427
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
428
+	 * } $params
429
+	 *
430
+	 * @throws NoNodeAvailableException if all the hosts are offline
431
+	 * @throws ClientResponseException if the status code of response is 4xx
432
+	 * @throws ServerResponseException if the status code of response is 5xx
433
+	 *
434
+	 * @return Elasticsearch|Promise
435
+	 */
436
+	public function mlDatafeeds(array $params = [])
437
+	{
438
+		if (isset($params['datafeed_id'])) {
439
+			$url = '/_cat/ml/datafeeds/' . $this->encode($params['datafeed_id']);
440
+			$method = 'GET';
441
+		} else {
442
+			$url = '/_cat/ml/datafeeds';
443
+			$method = 'GET';
444
+		}
445
+		$url = $this->addQueryString($url, $params, ['allow_no_match', 'format', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
446
+		$headers = ['Accept' => 'text/plain,application/json'];
447
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
448
+	}
449
+	/**
450
+	 * Gets configuration and usage information about anomaly detection jobs.
451
+	 *
452
+	 * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html
453
+	 *
454
+	 * @param array{
455
+	 *     job_id: string, //  The ID of the jobs stats to fetch
456
+	 *     allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
457
+	 *     bytes: enum, // The unit in which to display byte values
458
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
459
+	 *     h: list, // Comma-separated list of column names to display
460
+	 *     help: boolean, // Return help information
461
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
462
+	 *     time: enum, // The unit in which to display time values
463
+	 *     v: boolean, // Verbose mode. Display column headers
464
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
465
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
466
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
467
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
468
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
469
+	 * } $params
470
+	 *
471
+	 * @throws NoNodeAvailableException if all the hosts are offline
472
+	 * @throws ClientResponseException if the status code of response is 4xx
473
+	 * @throws ServerResponseException if the status code of response is 5xx
474
+	 *
475
+	 * @return Elasticsearch|Promise
476
+	 */
477
+	public function mlJobs(array $params = [])
478
+	{
479
+		if (isset($params['job_id'])) {
480
+			$url = '/_cat/ml/anomaly_detectors/' . $this->encode($params['job_id']);
481
+			$method = 'GET';
482
+		} else {
483
+			$url = '/_cat/ml/anomaly_detectors';
484
+			$method = 'GET';
485
+		}
486
+		$url = $this->addQueryString($url, $params, ['allow_no_match', 'bytes', 'format', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
487
+		$headers = ['Accept' => 'text/plain,application/json'];
488
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
489
+	}
490
+	/**
491
+	 * Gets configuration and usage information about inference trained models.
492
+	 *
493
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html
494
+	 *
495
+	 * @param array{
496
+	 *     model_id: string, //  The ID of the trained models stats to fetch
497
+	 *     allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified)
498
+	 *     from: int, // skips a number of trained models
499
+	 *     size: int, // specifies a max number of trained models to get
500
+	 *     bytes: enum, // The unit in which to display byte values
501
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
502
+	 *     h: list, // Comma-separated list of column names to display
503
+	 *     help: boolean, // Return help information
504
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
505
+	 *     time: enum, // The unit in which to display time values
506
+	 *     v: boolean, // Verbose mode. Display column headers
507
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
508
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
509
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
510
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
511
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
512
+	 * } $params
513
+	 *
514
+	 * @throws NoNodeAvailableException if all the hosts are offline
515
+	 * @throws ClientResponseException if the status code of response is 4xx
516
+	 * @throws ServerResponseException if the status code of response is 5xx
517
+	 *
518
+	 * @return Elasticsearch|Promise
519
+	 */
520
+	public function mlTrainedModels(array $params = [])
521
+	{
522
+		if (isset($params['model_id'])) {
523
+			$url = '/_cat/ml/trained_models/' . $this->encode($params['model_id']);
524
+			$method = 'GET';
525
+		} else {
526
+			$url = '/_cat/ml/trained_models';
527
+			$method = 'GET';
528
+		}
529
+		$url = $this->addQueryString($url, $params, ['allow_no_match', 'from', 'size', 'bytes', 'format', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
530
+		$headers = ['Accept' => 'text/plain,application/json'];
531
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
532
+	}
533
+	/**
534
+	 * Returns information about custom node attributes.
535
+	 *
536
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html
537
+	 *
538
+	 * @param array{
539
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
540
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
541
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
542
+	 *     h: list, // Comma-separated list of column names to display
543
+	 *     help: boolean, // Return help information
544
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
545
+	 *     v: boolean, // Verbose mode. Display column headers
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 NoNodeAvailableException if all the hosts are offline
554
+	 * @throws ClientResponseException if the status code of response is 4xx
555
+	 * @throws ServerResponseException if the status code of response is 5xx
556
+	 *
557
+	 * @return Elasticsearch|Promise
558
+	 */
559
+	public function nodeattrs(array $params = [])
560
+	{
561
+		$url = '/_cat/nodeattrs';
562
+		$method = 'GET';
563
+		$url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
564
+		$headers = ['Accept' => 'text/plain,application/json'];
565
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
566
+	}
567
+	/**
568
+	 * Returns basic statistics about performance of cluster nodes.
569
+	 *
570
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html
571
+	 *
572
+	 * @param array{
573
+	 *     bytes: enum, // The unit in which to display byte values
574
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
575
+	 *     full_id: boolean, // Return the full node ID instead of the shortened version (default: false)
576
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
577
+	 *     h: list, // Comma-separated list of column names to display
578
+	 *     help: boolean, // Return help information
579
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
580
+	 *     time: enum, // The unit in which to display time values
581
+	 *     v: boolean, // Verbose mode. Display column headers
582
+	 *     include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
583
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
584
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
585
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
586
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
587
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
588
+	 * } $params
589
+	 *
590
+	 * @throws NoNodeAvailableException if all the hosts are offline
591
+	 * @throws ClientResponseException if the status code of response is 4xx
592
+	 * @throws ServerResponseException if the status code of response is 5xx
593
+	 *
594
+	 * @return Elasticsearch|Promise
595
+	 */
596
+	public function nodes(array $params = [])
597
+	{
598
+		$url = '/_cat/nodes';
599
+		$method = 'GET';
600
+		$url = $this->addQueryString($url, $params, ['bytes', 'format', 'full_id', 'master_timeout', 'h', 'help', 's', 'time', 'v', 'include_unloaded_segments', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
601
+		$headers = ['Accept' => 'text/plain,application/json'];
602
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
603
+	}
604
+	/**
605
+	 * Returns a concise representation of the cluster pending tasks.
606
+	 *
607
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html
608
+	 *
609
+	 * @param array{
610
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
611
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
612
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
613
+	 *     h: list, // Comma-separated list of column names to display
614
+	 *     help: boolean, // Return help information
615
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
616
+	 *     time: enum, // The unit in which to display time values
617
+	 *     v: boolean, // Verbose mode. Display column headers
618
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
619
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
620
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
621
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
622
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
623
+	 * } $params
624
+	 *
625
+	 * @throws NoNodeAvailableException if all the hosts are offline
626
+	 * @throws ClientResponseException if the status code of response is 4xx
627
+	 * @throws ServerResponseException if the status code of response is 5xx
628
+	 *
629
+	 * @return Elasticsearch|Promise
630
+	 */
631
+	public function pendingTasks(array $params = [])
632
+	{
633
+		$url = '/_cat/pending_tasks';
634
+		$method = 'GET';
635
+		$url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
636
+		$headers = ['Accept' => 'text/plain,application/json'];
637
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
638
+	}
639
+	/**
640
+	 * Returns information about installed plugins across nodes node.
641
+	 *
642
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html
643
+	 *
644
+	 * @param array{
645
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
646
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
647
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
648
+	 *     h: list, // Comma-separated list of column names to display
649
+	 *     help: boolean, // Return help information
650
+	 *     include_bootstrap: boolean, // Include bootstrap plugins in the response
651
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
652
+	 *     v: boolean, // Verbose mode. Display column headers
653
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
654
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
655
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
656
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
657
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
658
+	 * } $params
659
+	 *
660
+	 * @throws NoNodeAvailableException if all the hosts are offline
661
+	 * @throws ClientResponseException if the status code of response is 4xx
662
+	 * @throws ServerResponseException if the status code of response is 5xx
663
+	 *
664
+	 * @return Elasticsearch|Promise
665
+	 */
666
+	public function plugins(array $params = [])
667
+	{
668
+		$url = '/_cat/plugins';
669
+		$method = 'GET';
670
+		$url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 'include_bootstrap', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
671
+		$headers = ['Accept' => 'text/plain,application/json'];
672
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
673
+	}
674
+	/**
675
+	 * Returns information about index shard recoveries, both on-going completed.
676
+	 *
677
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html
678
+	 *
679
+	 * @param array{
680
+	 *     index: list, //  Comma-separated list or wildcard expression of index names to limit the returned information
681
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
682
+	 *     active_only: boolean, // If `true`, the response only includes ongoing shard recoveries
683
+	 *     bytes: enum, // The unit in which to display byte values
684
+	 *     detailed: boolean, // If `true`, the response includes detailed information about shard recoveries
685
+	 *     h: list, // Comma-separated list of column names to display
686
+	 *     help: boolean, // Return help information
687
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
688
+	 *     time: enum, // The unit in which to display time values
689
+	 *     v: boolean, // Verbose mode. Display column headers
690
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
691
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
692
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
693
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
694
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
695
+	 * } $params
696
+	 *
697
+	 * @throws NoNodeAvailableException if all the hosts are offline
698
+	 * @throws ClientResponseException if the status code of response is 4xx
699
+	 * @throws ServerResponseException if the status code of response is 5xx
700
+	 *
701
+	 * @return Elasticsearch|Promise
702
+	 */
703
+	public function recovery(array $params = [])
704
+	{
705
+		if (isset($params['index'])) {
706
+			$url = '/_cat/recovery/' . $this->encode($params['index']);
707
+			$method = 'GET';
708
+		} else {
709
+			$url = '/_cat/recovery';
710
+			$method = 'GET';
711
+		}
712
+		$url = $this->addQueryString($url, $params, ['format', 'active_only', 'bytes', 'detailed', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
713
+		$headers = ['Accept' => 'text/plain,application/json'];
714
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
715
+	}
716
+	/**
717
+	 * Returns information about snapshot repositories registered in the cluster.
718
+	 *
719
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html
720
+	 *
721
+	 * @param array{
722
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
723
+	 *     local: boolean, // Return local information, do not retrieve the state from master node
724
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
725
+	 *     h: list, // Comma-separated list of column names to display
726
+	 *     help: boolean, // Return help information
727
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
728
+	 *     v: boolean, // Verbose mode. Display column headers
729
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
730
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
731
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
732
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
733
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
734
+	 * } $params
735
+	 *
736
+	 * @throws NoNodeAvailableException if all the hosts are offline
737
+	 * @throws ClientResponseException if the status code of response is 4xx
738
+	 * @throws ServerResponseException if the status code of response is 5xx
739
+	 *
740
+	 * @return Elasticsearch|Promise
741
+	 */
742
+	public function repositories(array $params = [])
743
+	{
744
+		$url = '/_cat/repositories';
745
+		$method = 'GET';
746
+		$url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
747
+		$headers = ['Accept' => 'text/plain,application/json'];
748
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
749
+	}
750
+	/**
751
+	 * Provides low-level information about the segments in the shards of an index.
752
+	 *
753
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html
754
+	 *
755
+	 * @param array{
756
+	 *     index: list, //  A comma-separated list of index names to limit the returned information
757
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
758
+	 *     bytes: enum, // The unit in which to display byte values
759
+	 *     h: list, // Comma-separated list of column names to display
760
+	 *     help: boolean, // Return help information
761
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
762
+	 *     v: boolean, // Verbose mode. Display column headers
763
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
764
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
765
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
766
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
767
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
768
+	 * } $params
769
+	 *
770
+	 * @throws NoNodeAvailableException if all the hosts are offline
771
+	 * @throws ClientResponseException if the status code of response is 4xx
772
+	 * @throws ServerResponseException if the status code of response is 5xx
773
+	 *
774
+	 * @return Elasticsearch|Promise
775
+	 */
776
+	public function segments(array $params = [])
777
+	{
778
+		if (isset($params['index'])) {
779
+			$url = '/_cat/segments/' . $this->encode($params['index']);
780
+			$method = 'GET';
781
+		} else {
782
+			$url = '/_cat/segments';
783
+			$method = 'GET';
784
+		}
785
+		$url = $this->addQueryString($url, $params, ['format', 'bytes', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
786
+		$headers = ['Accept' => 'text/plain,application/json'];
787
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
788
+	}
789
+	/**
790
+	 * Provides a detailed view of shard allocation on nodes.
791
+	 *
792
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html
793
+	 *
794
+	 * @param array{
795
+	 *     index: list, //  A comma-separated list of index names to limit the returned information
796
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
797
+	 *     bytes: enum, // The unit in which to display byte values
798
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
799
+	 *     h: list, // Comma-separated list of column names to display
800
+	 *     help: boolean, // Return help information
801
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
802
+	 *     time: enum, // The unit in which to display time values
803
+	 *     v: boolean, // Verbose mode. Display column headers
804
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
805
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
806
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
807
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
808
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
809
+	 * } $params
810
+	 *
811
+	 * @throws NoNodeAvailableException if all the hosts are offline
812
+	 * @throws ClientResponseException if the status code of response is 4xx
813
+	 * @throws ServerResponseException if the status code of response is 5xx
814
+	 *
815
+	 * @return Elasticsearch|Promise
816
+	 */
817
+	public function shards(array $params = [])
818
+	{
819
+		if (isset($params['index'])) {
820
+			$url = '/_cat/shards/' . $this->encode($params['index']);
821
+			$method = 'GET';
822
+		} else {
823
+			$url = '/_cat/shards';
824
+			$method = 'GET';
825
+		}
826
+		$url = $this->addQueryString($url, $params, ['format', 'bytes', 'master_timeout', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
827
+		$headers = ['Accept' => 'text/plain,application/json'];
828
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
829
+	}
830
+	/**
831
+	 * Returns all snapshots in a specific repository.
832
+	 *
833
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html
834
+	 *
835
+	 * @param array{
836
+	 *     repository: list, //  Name of repository from which to fetch the snapshot information
837
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
838
+	 *     ignore_unavailable: boolean, // Set to true to ignore unavailable snapshots
839
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
840
+	 *     h: list, // Comma-separated list of column names to display
841
+	 *     help: boolean, // Return help information
842
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
843
+	 *     time: enum, // The unit in which to display time values
844
+	 *     v: boolean, // Verbose mode. Display column headers
845
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
846
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
847
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
848
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
849
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
850
+	 * } $params
851
+	 *
852
+	 * @throws NoNodeAvailableException if all the hosts are offline
853
+	 * @throws ClientResponseException if the status code of response is 4xx
854
+	 * @throws ServerResponseException if the status code of response is 5xx
855
+	 *
856
+	 * @return Elasticsearch|Promise
857
+	 */
858
+	public function snapshots(array $params = [])
859
+	{
860
+		if (isset($params['repository'])) {
861
+			$url = '/_cat/snapshots/' . $this->encode($params['repository']);
862
+			$method = 'GET';
863
+		} else {
864
+			$url = '/_cat/snapshots';
865
+			$method = 'GET';
866
+		}
867
+		$url = $this->addQueryString($url, $params, ['format', 'ignore_unavailable', 'master_timeout', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
868
+		$headers = ['Accept' => 'text/plain,application/json'];
869
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
870
+	}
871
+	/**
872
+	 * Returns information about the tasks currently executing on one or more nodes in the cluster.
873
+	 *
874
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
875
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
876
+	 *
877
+	 * @param array{
878
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
879
+	 *     nodes: 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
880
+	 *     actions: list, // A comma-separated list of actions that should be returned. Leave empty to return all.
881
+	 *     detailed: boolean, // Return detailed task information (default: false)
882
+	 *     parent_task_id: string, // Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
883
+	 *     h: list, // Comma-separated list of column names to display
884
+	 *     help: boolean, // Return help information
885
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
886
+	 *     time: enum, // The unit in which to display time values
887
+	 *     v: boolean, // Verbose mode. Display column headers
888
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
889
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
890
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
891
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
892
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
893
+	 * } $params
894
+	 *
895
+	 * @throws NoNodeAvailableException if all the hosts are offline
896
+	 * @throws ClientResponseException if the status code of response is 4xx
897
+	 * @throws ServerResponseException if the status code of response is 5xx
898
+	 *
899
+	 * @return Elasticsearch|Promise
900
+	 */
901
+	public function tasks(array $params = [])
902
+	{
903
+		$url = '/_cat/tasks';
904
+		$method = 'GET';
905
+		$url = $this->addQueryString($url, $params, ['format', 'nodes', 'actions', 'detailed', 'parent_task_id', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
906
+		$headers = ['Accept' => 'text/plain,application/json'];
907
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
908
+	}
909
+	/**
910
+	 * Returns information about existing templates.
911
+	 *
912
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html
913
+	 *
914
+	 * @param array{
915
+	 *     name: string, //  A pattern that returned template names must match
916
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
917
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
918
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
919
+	 *     h: list, // Comma-separated list of column names to display
920
+	 *     help: boolean, // Return help information
921
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
922
+	 *     v: boolean, // Verbose mode. Display column headers
923
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
924
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
925
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
926
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
927
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
928
+	 * } $params
929
+	 *
930
+	 * @throws NoNodeAvailableException if all the hosts are offline
931
+	 * @throws ClientResponseException if the status code of response is 4xx
932
+	 * @throws ServerResponseException if the status code of response is 5xx
933
+	 *
934
+	 * @return Elasticsearch|Promise
935
+	 */
936
+	public function templates(array $params = [])
937
+	{
938
+		if (isset($params['name'])) {
939
+			$url = '/_cat/templates/' . $this->encode($params['name']);
940
+			$method = 'GET';
941
+		} else {
942
+			$url = '/_cat/templates';
943
+			$method = 'GET';
944
+		}
945
+		$url = $this->addQueryString($url, $params, ['format', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
946
+		$headers = ['Accept' => 'text/plain,application/json'];
947
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
948
+	}
949
+	/**
950
+	 * Returns cluster-wide thread pool statistics per node.
951
+	 * By default the active, queue and rejected statistics are returned for all thread pools.
952
+	 *
953
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html
954
+	 *
955
+	 * @param array{
956
+	 *     thread_pool_patterns: list, //  A comma-separated list of regular-expressions to filter the thread pools in the output
957
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
958
+	 *     time: enum, // The unit in which to display time values
959
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
960
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
961
+	 *     h: list, // Comma-separated list of column names to display
962
+	 *     help: boolean, // Return help information
963
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
964
+	 *     v: boolean, // Verbose mode. Display column headers
965
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
966
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
967
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
968
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
969
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
970
+	 * } $params
971
+	 *
972
+	 * @throws NoNodeAvailableException if all the hosts are offline
973
+	 * @throws ClientResponseException if the status code of response is 4xx
974
+	 * @throws ServerResponseException if the status code of response is 5xx
975
+	 *
976
+	 * @return Elasticsearch|Promise
977
+	 */
978
+	public function threadPool(array $params = [])
979
+	{
980
+		if (isset($params['thread_pool_patterns'])) {
981
+			$url = '/_cat/thread_pool/' . $this->encode($params['thread_pool_patterns']);
982
+			$method = 'GET';
983
+		} else {
984
+			$url = '/_cat/thread_pool';
985
+			$method = 'GET';
986
+		}
987
+		$url = $this->addQueryString($url, $params, ['format', 'time', 'local', 'master_timeout', 'h', 'help', 's', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
988
+		$headers = ['Accept' => 'text/plain,application/json'];
989
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
990
+	}
991
+	/**
992
+	 * Gets configuration and usage information about transforms.
993
+	 *
994
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html
995
+	 *
996
+	 * @param array{
997
+	 *     transform_id: string, //  The id of the transform for which to get stats. '_all' or '*' implies all transforms
998
+	 *     from: int, // skips a number of transform configs, defaults to 0
999
+	 *     size: int, // specifies a max number of transforms to get, defaults to 100
1000
+	 *     allow_no_match: boolean, // Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
1001
+	 *     format: string, // a short version of the Accept header, e.g. json, yaml
1002
+	 *     h: list, // Comma-separated list of column names to display
1003
+	 *     help: boolean, // Return help information
1004
+	 *     s: list, // Comma-separated list of column names or column aliases to sort by
1005
+	 *     time: enum, // The unit in which to display time values
1006
+	 *     v: boolean, // Verbose mode. Display column headers
1007
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1008
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1009
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1010
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1011
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
1012
+	 * } $params
1013
+	 *
1014
+	 * @throws NoNodeAvailableException if all the hosts are offline
1015
+	 * @throws ClientResponseException if the status code of response is 4xx
1016
+	 * @throws ServerResponseException if the status code of response is 5xx
1017
+	 *
1018
+	 * @return Elasticsearch|Promise
1019
+	 */
1020
+	public function transforms(array $params = [])
1021
+	{
1022
+		if (isset($params['transform_id'])) {
1023
+			$url = '/_cat/transforms/' . $this->encode($params['transform_id']);
1024
+			$method = 'GET';
1025
+		} else {
1026
+			$url = '/_cat/transforms';
1027
+			$method = 'GET';
1028
+		}
1029
+		$url = $this->addQueryString($url, $params, ['from', 'size', 'allow_no_match', 'format', 'h', 'help', 's', 'time', 'v', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
1030
+		$headers = ['Accept' => 'text/plain,application/json'];
1031
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
1032
+	}
1033 1033
 }
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 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 aliases(array $params = [])
56 56
     {
57 57
         if (isset($params['name'])) {
58
-            $url = '/_cat/aliases/' . $this->encode($params['name']);
58
+            $url = '/_cat/aliases/'.$this->encode($params['name']);
59 59
             $method = 'GET';
60 60
         } else {
61 61
             $url = '/_cat/aliases';
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     public function allocation(array $params = [])
97 97
     {
98 98
         if (isset($params['node_id'])) {
99
-            $url = '/_cat/allocation/' . $this->encode($params['node_id']);
99
+            $url = '/_cat/allocation/'.$this->encode($params['node_id']);
100 100
             $method = 'GET';
101 101
         } else {
102 102
             $url = '/_cat/allocation';
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     public function componentTemplates(array $params = [])
137 137
     {
138 138
         if (isset($params['name'])) {
139
-            $url = '/_cat/component_templates/' . $this->encode($params['name']);
139
+            $url = '/_cat/component_templates/'.$this->encode($params['name']);
140 140
             $method = 'GET';
141 141
         } else {
142 142
             $url = '/_cat/component_templates';
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     public function count(array $params = [])
175 175
     {
176 176
         if (isset($params['index'])) {
177
-            $url = '/_cat/count/' . $this->encode($params['index']);
177
+            $url = '/_cat/count/'.$this->encode($params['index']);
178 178
             $method = 'GET';
179 179
         } else {
180 180
             $url = '/_cat/count';
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     public function fielddata(array $params = [])
214 214
     {
215 215
         if (isset($params['fields'])) {
216
-            $url = '/_cat/fielddata/' . $this->encode($params['fields']);
216
+            $url = '/_cat/fielddata/'.$this->encode($params['fields']);
217 217
             $method = 'GET';
218 218
         } else {
219 219
             $url = '/_cat/fielddata';
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     public function indices(array $params = [])
322 322
     {
323 323
         if (isset($params['index'])) {
324
-            $url = '/_cat/indices/' . $this->encode($params['index']);
324
+            $url = '/_cat/indices/'.$this->encode($params['index']);
325 325
             $method = 'GET';
326 326
         } else {
327 327
             $url = '/_cat/indices';
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
     public function mlDataFrameAnalytics(array $params = [])
397 397
     {
398 398
         if (isset($params['id'])) {
399
-            $url = '/_cat/ml/data_frame/analytics/' . $this->encode($params['id']);
399
+            $url = '/_cat/ml/data_frame/analytics/'.$this->encode($params['id']);
400 400
             $method = 'GET';
401 401
         } else {
402 402
             $url = '/_cat/ml/data_frame/analytics';
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     public function mlDatafeeds(array $params = [])
437 437
     {
438 438
         if (isset($params['datafeed_id'])) {
439
-            $url = '/_cat/ml/datafeeds/' . $this->encode($params['datafeed_id']);
439
+            $url = '/_cat/ml/datafeeds/'.$this->encode($params['datafeed_id']);
440 440
             $method = 'GET';
441 441
         } else {
442 442
             $url = '/_cat/ml/datafeeds';
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
     public function mlJobs(array $params = [])
478 478
     {
479 479
         if (isset($params['job_id'])) {
480
-            $url = '/_cat/ml/anomaly_detectors/' . $this->encode($params['job_id']);
480
+            $url = '/_cat/ml/anomaly_detectors/'.$this->encode($params['job_id']);
481 481
             $method = 'GET';
482 482
         } else {
483 483
             $url = '/_cat/ml/anomaly_detectors';
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
     public function mlTrainedModels(array $params = [])
521 521
     {
522 522
         if (isset($params['model_id'])) {
523
-            $url = '/_cat/ml/trained_models/' . $this->encode($params['model_id']);
523
+            $url = '/_cat/ml/trained_models/'.$this->encode($params['model_id']);
524 524
             $method = 'GET';
525 525
         } else {
526 526
             $url = '/_cat/ml/trained_models';
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
     public function recovery(array $params = [])
704 704
     {
705 705
         if (isset($params['index'])) {
706
-            $url = '/_cat/recovery/' . $this->encode($params['index']);
706
+            $url = '/_cat/recovery/'.$this->encode($params['index']);
707 707
             $method = 'GET';
708 708
         } else {
709 709
             $url = '/_cat/recovery';
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
     public function segments(array $params = [])
777 777
     {
778 778
         if (isset($params['index'])) {
779
-            $url = '/_cat/segments/' . $this->encode($params['index']);
779
+            $url = '/_cat/segments/'.$this->encode($params['index']);
780 780
             $method = 'GET';
781 781
         } else {
782 782
             $url = '/_cat/segments';
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
     public function shards(array $params = [])
818 818
     {
819 819
         if (isset($params['index'])) {
820
-            $url = '/_cat/shards/' . $this->encode($params['index']);
820
+            $url = '/_cat/shards/'.$this->encode($params['index']);
821 821
             $method = 'GET';
822 822
         } else {
823 823
             $url = '/_cat/shards';
@@ -858,7 +858,7 @@  discard block
 block discarded – undo
858 858
     public function snapshots(array $params = [])
859 859
     {
860 860
         if (isset($params['repository'])) {
861
-            $url = '/_cat/snapshots/' . $this->encode($params['repository']);
861
+            $url = '/_cat/snapshots/'.$this->encode($params['repository']);
862 862
             $method = 'GET';
863 863
         } else {
864 864
             $url = '/_cat/snapshots';
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
     public function templates(array $params = [])
937 937
     {
938 938
         if (isset($params['name'])) {
939
-            $url = '/_cat/templates/' . $this->encode($params['name']);
939
+            $url = '/_cat/templates/'.$this->encode($params['name']);
940 940
             $method = 'GET';
941 941
         } else {
942 942
             $url = '/_cat/templates';
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
     public function threadPool(array $params = [])
979 979
     {
980 980
         if (isset($params['thread_pool_patterns'])) {
981
-            $url = '/_cat/thread_pool/' . $this->encode($params['thread_pool_patterns']);
981
+            $url = '/_cat/thread_pool/'.$this->encode($params['thread_pool_patterns']);
982 982
             $method = 'GET';
983 983
         } else {
984 984
             $url = '/_cat/thread_pool';
@@ -1020,7 +1020,7 @@  discard block
 block discarded – undo
1020 1020
     public function transforms(array $params = [])
1021 1021
     {
1022 1022
         if (isset($params['transform_id'])) {
1023
-            $url = '/_cat/transforms/' . $this->encode($params['transform_id']);
1023
+            $url = '/_cat/transforms/'.$this->encode($params['transform_id']);
1024 1024
             $method = 'GET';
1025 1025
         } else {
1026 1026
             $url = '/_cat/transforms';
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 Cat extends AbstractEndpoint
27
-{
26
+class Cat extends AbstractEndpoint {
28 27
     /**
29 28
      * Shows information about currently configured aliases to indices including filter and routing infos.
30 29
      *
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Enrich.php 3 patches
Indentation   +152 added lines, -152 removed lines patch added patch discarded remove patch
@@ -25,156 +25,156 @@
 block discarded – undo
25 25
  */
26 26
 class Enrich extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Deletes an existing enrich policy and its enrich index.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html
32
-     *
33
-     * @param array{
34
-     *     name: string, // (REQUIRED) The name of the enrich 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 deletePolicy(array $params = [])
50
-    {
51
-        $this->checkRequiredParameters(['name'], $params);
52
-        $url = '/_enrich/policy/' . $this->encode($params['name']);
53
-        $method = 'DELETE';
54
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55
-        $headers = ['Accept' => 'application/json'];
56
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
57
-    }
58
-    /**
59
-     * Creates the enrich index for an existing enrich policy.
60
-     *
61
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html
62
-     *
63
-     * @param array{
64
-     *     name: string, // (REQUIRED) The name of the enrich policy
65
-     *     wait_for_completion: boolean, // Should the request should block until the execution is complete.
66
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
67
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
68
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
69
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
70
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
71
-     * } $params
72
-     *
73
-     * @throws MissingParameterException if a required parameter is missing
74
-     * @throws NoNodeAvailableException if all the hosts are offline
75
-     * @throws ClientResponseException if the status code of response is 4xx
76
-     * @throws ServerResponseException if the status code of response is 5xx
77
-     *
78
-     * @return Elasticsearch|Promise
79
-     */
80
-    public function executePolicy(array $params = [])
81
-    {
82
-        $this->checkRequiredParameters(['name'], $params);
83
-        $url = '/_enrich/policy/' . $this->encode($params['name']) . '/_execute';
84
-        $method = 'PUT';
85
-        $url = $this->addQueryString($url, $params, ['wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
86
-        $headers = ['Accept' => 'application/json'];
87
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
88
-    }
89
-    /**
90
-     * Gets information about an enrich policy.
91
-     *
92
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html
93
-     *
94
-     * @param array{
95
-     *     name: list, //  A comma-separated list of enrich policy names
96
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
97
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
98
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
99
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
100
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
101
-     * } $params
102
-     *
103
-     * @throws NoNodeAvailableException if all the hosts are offline
104
-     * @throws ClientResponseException if the status code of response is 4xx
105
-     * @throws ServerResponseException if the status code of response is 5xx
106
-     *
107
-     * @return Elasticsearch|Promise
108
-     */
109
-    public function getPolicy(array $params = [])
110
-    {
111
-        if (isset($params['name'])) {
112
-            $url = '/_enrich/policy/' . $this->encode($params['name']);
113
-            $method = 'GET';
114
-        } else {
115
-            $url = '/_enrich/policy';
116
-            $method = 'GET';
117
-        }
118
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
119
-        $headers = ['Accept' => 'application/json'];
120
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
121
-    }
122
-    /**
123
-     * Creates a new enrich policy.
124
-     *
125
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html
126
-     *
127
-     * @param array{
128
-     *     name: string, // (REQUIRED) The name of the enrich policy
129
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
130
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
131
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
132
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
133
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
134
-     *     body: array, // (REQUIRED) The enrich policy to register
135
-     * } $params
136
-     *
137
-     * @throws MissingParameterException if a required parameter is missing
138
-     * @throws NoNodeAvailableException if all the hosts are offline
139
-     * @throws ClientResponseException if the status code of response is 4xx
140
-     * @throws ServerResponseException if the status code of response is 5xx
141
-     *
142
-     * @return Elasticsearch|Promise
143
-     */
144
-    public function putPolicy(array $params = [])
145
-    {
146
-        $this->checkRequiredParameters(['name', 'body'], $params);
147
-        $url = '/_enrich/policy/' . $this->encode($params['name']);
148
-        $method = 'PUT';
149
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
150
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
151
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
152
-    }
153
-    /**
154
-     * Gets enrich coordinator statistics and information about enrich policies that are currently executing.
155
-     *
156
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html
157
-     *
158
-     * @param array{
159
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
160
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
161
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
162
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
163
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
164
-     * } $params
165
-     *
166
-     * @throws NoNodeAvailableException if all the hosts are offline
167
-     * @throws ClientResponseException if the status code of response is 4xx
168
-     * @throws ServerResponseException if the status code of response is 5xx
169
-     *
170
-     * @return Elasticsearch|Promise
171
-     */
172
-    public function stats(array $params = [])
173
-    {
174
-        $url = '/_enrich/_stats';
175
-        $method = 'GET';
176
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
177
-        $headers = ['Accept' => 'application/json'];
178
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
179
-    }
28
+	/**
29
+	 * Deletes an existing enrich policy and its enrich index.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-enrich-policy-api.html
32
+	 *
33
+	 * @param array{
34
+	 *     name: string, // (REQUIRED) The name of the enrich 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 deletePolicy(array $params = [])
50
+	{
51
+		$this->checkRequiredParameters(['name'], $params);
52
+		$url = '/_enrich/policy/' . $this->encode($params['name']);
53
+		$method = 'DELETE';
54
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55
+		$headers = ['Accept' => 'application/json'];
56
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
57
+	}
58
+	/**
59
+	 * Creates the enrich index for an existing enrich policy.
60
+	 *
61
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/execute-enrich-policy-api.html
62
+	 *
63
+	 * @param array{
64
+	 *     name: string, // (REQUIRED) The name of the enrich policy
65
+	 *     wait_for_completion: boolean, // Should the request should block until the execution is complete.
66
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
67
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
68
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
69
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
70
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
71
+	 * } $params
72
+	 *
73
+	 * @throws MissingParameterException if a required parameter is missing
74
+	 * @throws NoNodeAvailableException if all the hosts are offline
75
+	 * @throws ClientResponseException if the status code of response is 4xx
76
+	 * @throws ServerResponseException if the status code of response is 5xx
77
+	 *
78
+	 * @return Elasticsearch|Promise
79
+	 */
80
+	public function executePolicy(array $params = [])
81
+	{
82
+		$this->checkRequiredParameters(['name'], $params);
83
+		$url = '/_enrich/policy/' . $this->encode($params['name']) . '/_execute';
84
+		$method = 'PUT';
85
+		$url = $this->addQueryString($url, $params, ['wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
86
+		$headers = ['Accept' => 'application/json'];
87
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
88
+	}
89
+	/**
90
+	 * Gets information about an enrich policy.
91
+	 *
92
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-enrich-policy-api.html
93
+	 *
94
+	 * @param array{
95
+	 *     name: list, //  A comma-separated list of enrich policy names
96
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
97
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
98
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
99
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
100
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
101
+	 * } $params
102
+	 *
103
+	 * @throws NoNodeAvailableException if all the hosts are offline
104
+	 * @throws ClientResponseException if the status code of response is 4xx
105
+	 * @throws ServerResponseException if the status code of response is 5xx
106
+	 *
107
+	 * @return Elasticsearch|Promise
108
+	 */
109
+	public function getPolicy(array $params = [])
110
+	{
111
+		if (isset($params['name'])) {
112
+			$url = '/_enrich/policy/' . $this->encode($params['name']);
113
+			$method = 'GET';
114
+		} else {
115
+			$url = '/_enrich/policy';
116
+			$method = 'GET';
117
+		}
118
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
119
+		$headers = ['Accept' => 'application/json'];
120
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
121
+	}
122
+	/**
123
+	 * Creates a new enrich policy.
124
+	 *
125
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-enrich-policy-api.html
126
+	 *
127
+	 * @param array{
128
+	 *     name: string, // (REQUIRED) The name of the enrich policy
129
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
130
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
131
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
132
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
133
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
134
+	 *     body: array, // (REQUIRED) The enrich policy to register
135
+	 * } $params
136
+	 *
137
+	 * @throws MissingParameterException if a required parameter is missing
138
+	 * @throws NoNodeAvailableException if all the hosts are offline
139
+	 * @throws ClientResponseException if the status code of response is 4xx
140
+	 * @throws ServerResponseException if the status code of response is 5xx
141
+	 *
142
+	 * @return Elasticsearch|Promise
143
+	 */
144
+	public function putPolicy(array $params = [])
145
+	{
146
+		$this->checkRequiredParameters(['name', 'body'], $params);
147
+		$url = '/_enrich/policy/' . $this->encode($params['name']);
148
+		$method = 'PUT';
149
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
150
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
151
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
152
+	}
153
+	/**
154
+	 * Gets enrich coordinator statistics and information about enrich policies that are currently executing.
155
+	 *
156
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html
157
+	 *
158
+	 * @param array{
159
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
160
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
161
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
162
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
163
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
164
+	 * } $params
165
+	 *
166
+	 * @throws NoNodeAvailableException if all the hosts are offline
167
+	 * @throws ClientResponseException if the status code of response is 4xx
168
+	 * @throws ServerResponseException if the status code of response is 5xx
169
+	 *
170
+	 * @return Elasticsearch|Promise
171
+	 */
172
+	public function stats(array $params = [])
173
+	{
174
+		$url = '/_enrich/_stats';
175
+		$method = 'GET';
176
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
177
+		$headers = ['Accept' => 'application/json'];
178
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
179
+	}
180 180
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 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 deletePolicy(array $params = [])
50 50
     {
51 51
         $this->checkRequiredParameters(['name'], $params);
52
-        $url = '/_enrich/policy/' . $this->encode($params['name']);
52
+        $url = '/_enrich/policy/'.$this->encode($params['name']);
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 executePolicy(array $params = [])
81 81
     {
82 82
         $this->checkRequiredParameters(['name'], $params);
83
-        $url = '/_enrich/policy/' . $this->encode($params['name']) . '/_execute';
83
+        $url = '/_enrich/policy/'.$this->encode($params['name']).'/_execute';
84 84
         $method = 'PUT';
85 85
         $url = $this->addQueryString($url, $params, ['wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
86 86
         $headers = ['Accept' => 'application/json'];
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     public function getPolicy(array $params = [])
110 110
     {
111 111
         if (isset($params['name'])) {
112
-            $url = '/_enrich/policy/' . $this->encode($params['name']);
112
+            $url = '/_enrich/policy/'.$this->encode($params['name']);
113 113
             $method = 'GET';
114 114
         } else {
115 115
             $url = '/_enrich/policy';
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     public function putPolicy(array $params = [])
145 145
     {
146 146
         $this->checkRequiredParameters(['name', 'body'], $params);
147
-        $url = '/_enrich/policy/' . $this->encode($params['name']);
147
+        $url = '/_enrich/policy/'.$this->encode($params['name']);
148 148
         $method = 'PUT';
149 149
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
150 150
         $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 Enrich extends AbstractEndpoint
27
-{
26
+class Enrich extends AbstractEndpoint {
28 27
     /**
29 28
      * Deletes an existing enrich policy and its enrich index.
30 29
      *
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/License.php 3 patches
Indentation   +196 added lines, -196 removed lines patch added patch discarded remove patch
@@ -25,200 +25,200 @@
 block discarded – undo
25 25
  */
26 26
 class License extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Deletes licensing information for the cluster
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html
32
-     *
33
-     * @param array{
34
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
35
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
36
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
37
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
38
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
39
-     * } $params
40
-     *
41
-     * @throws NoNodeAvailableException if all the hosts are offline
42
-     * @throws ClientResponseException if the status code of response is 4xx
43
-     * @throws ServerResponseException if the status code of response is 5xx
44
-     *
45
-     * @return Elasticsearch|Promise
46
-     */
47
-    public function delete(array $params = [])
48
-    {
49
-        $url = '/_license';
50
-        $method = 'DELETE';
51
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
52
-        $headers = ['Accept' => 'application/json'];
53
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
54
-    }
55
-    /**
56
-     * Retrieves licensing information for the cluster
57
-     *
58
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html
59
-     *
60
-     * @param array{
61
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
62
-     *     accept_enterprise: boolean, // Supported for backwards compatibility with 7.x. If this param is used it must be set to true
63
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
64
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
65
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
66
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
67
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
68
-     * } $params
69
-     *
70
-     * @throws NoNodeAvailableException if all the hosts are offline
71
-     * @throws ClientResponseException if the status code of response is 4xx
72
-     * @throws ServerResponseException if the status code of response is 5xx
73
-     *
74
-     * @return Elasticsearch|Promise
75
-     */
76
-    public function get(array $params = [])
77
-    {
78
-        $url = '/_license';
79
-        $method = 'GET';
80
-        $url = $this->addQueryString($url, $params, ['local', 'accept_enterprise', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
81
-        $headers = ['Accept' => 'application/json'];
82
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
83
-    }
84
-    /**
85
-     * Retrieves information about the status of the basic license.
86
-     *
87
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html
88
-     *
89
-     * @param array{
90
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
91
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
92
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
93
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
94
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
95
-     * } $params
96
-     *
97
-     * @throws NoNodeAvailableException if all the hosts are offline
98
-     * @throws ClientResponseException if the status code of response is 4xx
99
-     * @throws ServerResponseException if the status code of response is 5xx
100
-     *
101
-     * @return Elasticsearch|Promise
102
-     */
103
-    public function getBasicStatus(array $params = [])
104
-    {
105
-        $url = '/_license/basic_status';
106
-        $method = 'GET';
107
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
108
-        $headers = ['Accept' => 'application/json'];
109
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
110
-    }
111
-    /**
112
-     * Retrieves information about the status of the trial license.
113
-     *
114
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html
115
-     *
116
-     * @param array{
117
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
118
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
119
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
120
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
121
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
122
-     * } $params
123
-     *
124
-     * @throws NoNodeAvailableException if all the hosts are offline
125
-     * @throws ClientResponseException if the status code of response is 4xx
126
-     * @throws ServerResponseException if the status code of response is 5xx
127
-     *
128
-     * @return Elasticsearch|Promise
129
-     */
130
-    public function getTrialStatus(array $params = [])
131
-    {
132
-        $url = '/_license/trial_status';
133
-        $method = 'GET';
134
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
135
-        $headers = ['Accept' => 'application/json'];
136
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
137
-    }
138
-    /**
139
-     * Updates the license for the cluster.
140
-     *
141
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html
142
-     *
143
-     * @param array{
144
-     *     acknowledge: boolean, // whether the user has acknowledged acknowledge messages (default: false)
145
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
146
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
147
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
148
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
149
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
150
-     *     body: array, //  licenses to be installed
151
-     * } $params
152
-     *
153
-     * @throws NoNodeAvailableException if all the hosts are offline
154
-     * @throws ClientResponseException if the status code of response is 4xx
155
-     * @throws ServerResponseException if the status code of response is 5xx
156
-     *
157
-     * @return Elasticsearch|Promise
158
-     */
159
-    public function post(array $params = [])
160
-    {
161
-        $url = '/_license';
162
-        $method = 'PUT';
163
-        $url = $this->addQueryString($url, $params, ['acknowledge', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
164
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
165
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
166
-    }
167
-    /**
168
-     * Starts an indefinite basic license.
169
-     *
170
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html
171
-     *
172
-     * @param array{
173
-     *     acknowledge: boolean, // whether the user has acknowledged acknowledge messages (default: false)
174
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
175
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
176
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
177
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
178
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
179
-     * } $params
180
-     *
181
-     * @throws NoNodeAvailableException if all the hosts are offline
182
-     * @throws ClientResponseException if the status code of response is 4xx
183
-     * @throws ServerResponseException if the status code of response is 5xx
184
-     *
185
-     * @return Elasticsearch|Promise
186
-     */
187
-    public function postStartBasic(array $params = [])
188
-    {
189
-        $url = '/_license/start_basic';
190
-        $method = 'POST';
191
-        $url = $this->addQueryString($url, $params, ['acknowledge', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
192
-        $headers = ['Accept' => 'application/json'];
193
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
194
-    }
195
-    /**
196
-     * starts a limited time trial license.
197
-     *
198
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html
199
-     *
200
-     * @param array{
201
-     *     type: string, // The type of trial license to generate (default: "trial")
202
-     *     acknowledge: boolean, // whether the user has acknowledged acknowledge messages (default: false)
203
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
204
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
205
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
206
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
207
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
208
-     * } $params
209
-     *
210
-     * @throws NoNodeAvailableException if all the hosts are offline
211
-     * @throws ClientResponseException if the status code of response is 4xx
212
-     * @throws ServerResponseException if the status code of response is 5xx
213
-     *
214
-     * @return Elasticsearch|Promise
215
-     */
216
-    public function postStartTrial(array $params = [])
217
-    {
218
-        $url = '/_license/start_trial';
219
-        $method = 'POST';
220
-        $url = $this->addQueryString($url, $params, ['type', 'acknowledge', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
221
-        $headers = ['Accept' => 'application/json'];
222
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
223
-    }
28
+	/**
29
+	 * Deletes licensing information for the cluster
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html
32
+	 *
33
+	 * @param array{
34
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
35
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
36
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
37
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
38
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
39
+	 * } $params
40
+	 *
41
+	 * @throws NoNodeAvailableException if all the hosts are offline
42
+	 * @throws ClientResponseException if the status code of response is 4xx
43
+	 * @throws ServerResponseException if the status code of response is 5xx
44
+	 *
45
+	 * @return Elasticsearch|Promise
46
+	 */
47
+	public function delete(array $params = [])
48
+	{
49
+		$url = '/_license';
50
+		$method = 'DELETE';
51
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
52
+		$headers = ['Accept' => 'application/json'];
53
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
54
+	}
55
+	/**
56
+	 * Retrieves licensing information for the cluster
57
+	 *
58
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html
59
+	 *
60
+	 * @param array{
61
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
62
+	 *     accept_enterprise: boolean, // Supported for backwards compatibility with 7.x. If this param is used it must be set to true
63
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
64
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
65
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
66
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
67
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
68
+	 * } $params
69
+	 *
70
+	 * @throws NoNodeAvailableException if all the hosts are offline
71
+	 * @throws ClientResponseException if the status code of response is 4xx
72
+	 * @throws ServerResponseException if the status code of response is 5xx
73
+	 *
74
+	 * @return Elasticsearch|Promise
75
+	 */
76
+	public function get(array $params = [])
77
+	{
78
+		$url = '/_license';
79
+		$method = 'GET';
80
+		$url = $this->addQueryString($url, $params, ['local', 'accept_enterprise', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
81
+		$headers = ['Accept' => 'application/json'];
82
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
83
+	}
84
+	/**
85
+	 * Retrieves information about the status of the basic license.
86
+	 *
87
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html
88
+	 *
89
+	 * @param array{
90
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
91
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
92
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
93
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
94
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
95
+	 * } $params
96
+	 *
97
+	 * @throws NoNodeAvailableException if all the hosts are offline
98
+	 * @throws ClientResponseException if the status code of response is 4xx
99
+	 * @throws ServerResponseException if the status code of response is 5xx
100
+	 *
101
+	 * @return Elasticsearch|Promise
102
+	 */
103
+	public function getBasicStatus(array $params = [])
104
+	{
105
+		$url = '/_license/basic_status';
106
+		$method = 'GET';
107
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
108
+		$headers = ['Accept' => 'application/json'];
109
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
110
+	}
111
+	/**
112
+	 * Retrieves information about the status of the trial license.
113
+	 *
114
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html
115
+	 *
116
+	 * @param array{
117
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
118
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
119
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
120
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
121
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
122
+	 * } $params
123
+	 *
124
+	 * @throws NoNodeAvailableException if all the hosts are offline
125
+	 * @throws ClientResponseException if the status code of response is 4xx
126
+	 * @throws ServerResponseException if the status code of response is 5xx
127
+	 *
128
+	 * @return Elasticsearch|Promise
129
+	 */
130
+	public function getTrialStatus(array $params = [])
131
+	{
132
+		$url = '/_license/trial_status';
133
+		$method = 'GET';
134
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
135
+		$headers = ['Accept' => 'application/json'];
136
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
137
+	}
138
+	/**
139
+	 * Updates the license for the cluster.
140
+	 *
141
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html
142
+	 *
143
+	 * @param array{
144
+	 *     acknowledge: boolean, // whether the user has acknowledged acknowledge messages (default: false)
145
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
146
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
147
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
148
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
149
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
150
+	 *     body: array, //  licenses to be installed
151
+	 * } $params
152
+	 *
153
+	 * @throws NoNodeAvailableException if all the hosts are offline
154
+	 * @throws ClientResponseException if the status code of response is 4xx
155
+	 * @throws ServerResponseException if the status code of response is 5xx
156
+	 *
157
+	 * @return Elasticsearch|Promise
158
+	 */
159
+	public function post(array $params = [])
160
+	{
161
+		$url = '/_license';
162
+		$method = 'PUT';
163
+		$url = $this->addQueryString($url, $params, ['acknowledge', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
164
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
165
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
166
+	}
167
+	/**
168
+	 * Starts an indefinite basic license.
169
+	 *
170
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html
171
+	 *
172
+	 * @param array{
173
+	 *     acknowledge: boolean, // whether the user has acknowledged acknowledge messages (default: false)
174
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
175
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
176
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
177
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
178
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
179
+	 * } $params
180
+	 *
181
+	 * @throws NoNodeAvailableException if all the hosts are offline
182
+	 * @throws ClientResponseException if the status code of response is 4xx
183
+	 * @throws ServerResponseException if the status code of response is 5xx
184
+	 *
185
+	 * @return Elasticsearch|Promise
186
+	 */
187
+	public function postStartBasic(array $params = [])
188
+	{
189
+		$url = '/_license/start_basic';
190
+		$method = 'POST';
191
+		$url = $this->addQueryString($url, $params, ['acknowledge', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
192
+		$headers = ['Accept' => 'application/json'];
193
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
194
+	}
195
+	/**
196
+	 * starts a limited time trial license.
197
+	 *
198
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html
199
+	 *
200
+	 * @param array{
201
+	 *     type: string, // The type of trial license to generate (default: "trial")
202
+	 *     acknowledge: boolean, // whether the user has acknowledged acknowledge messages (default: false)
203
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
204
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
205
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
206
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
207
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
208
+	 * } $params
209
+	 *
210
+	 * @throws NoNodeAvailableException if all the hosts are offline
211
+	 * @throws ClientResponseException if the status code of response is 4xx
212
+	 * @throws ServerResponseException if the status code of response is 5xx
213
+	 *
214
+	 * @return Elasticsearch|Promise
215
+	 */
216
+	public function postStartTrial(array $params = [])
217
+	{
218
+		$url = '/_license/start_trial';
219
+		$method = 'POST';
220
+		$url = $this->addQueryString($url, $params, ['type', 'acknowledge', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
221
+		$headers = ['Accept' => 'application/json'];
222
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
223
+	}
224 224
 }
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 License extends AbstractEndpoint
27
-{
26
+class License extends AbstractEndpoint {
28 27
     /**
29 28
      * Deletes licensing information for the cluster
30 29
      *
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 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;
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Logstash.php 3 patches
Indentation   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -25,98 +25,98 @@
 block discarded – undo
25 25
  */
26 26
 class Logstash extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Deletes Logstash Pipelines used by Central Management
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html
32
-     *
33
-     * @param array{
34
-     *     id: string, // (REQUIRED) The ID of the Pipeline
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 deletePipeline(array $params = [])
50
-    {
51
-        $this->checkRequiredParameters(['id'], $params);
52
-        $url = '/_logstash/pipeline/' . $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
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
57
-    }
58
-    /**
59
-     * Retrieves Logstash Pipelines used by Central Management
60
-     *
61
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html
62
-     *
63
-     * @param array{
64
-     *     id: string, //  A comma-separated list of Pipeline IDs
65
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
66
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
67
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
68
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
69
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
70
-     * } $params
71
-     *
72
-     * @throws NoNodeAvailableException if all the hosts are offline
73
-     * @throws ClientResponseException if the status code of response is 4xx
74
-     * @throws ServerResponseException if the status code of response is 5xx
75
-     *
76
-     * @return Elasticsearch|Promise
77
-     */
78
-    public function getPipeline(array $params = [])
79
-    {
80
-        if (isset($params['id'])) {
81
-            $url = '/_logstash/pipeline/' . $this->encode($params['id']);
82
-            $method = 'GET';
83
-        } else {
84
-            $url = '/_logstash/pipeline';
85
-            $method = 'GET';
86
-        }
87
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
88
-        $headers = ['Accept' => 'application/json'];
89
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
90
-    }
91
-    /**
92
-     * Adds and updates Logstash Pipelines used for Central Management
93
-     *
94
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html
95
-     *
96
-     * @param array{
97
-     *     id: string, // (REQUIRED) The ID of the Pipeline
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
-     *     body: array, // (REQUIRED) The Pipeline to add or update
104
-     * } $params
105
-     *
106
-     * @throws MissingParameterException if a required parameter is missing
107
-     * @throws NoNodeAvailableException if all the hosts are offline
108
-     * @throws ClientResponseException if the status code of response is 4xx
109
-     * @throws ServerResponseException if the status code of response is 5xx
110
-     *
111
-     * @return Elasticsearch|Promise
112
-     */
113
-    public function putPipeline(array $params = [])
114
-    {
115
-        $this->checkRequiredParameters(['id', 'body'], $params);
116
-        $url = '/_logstash/pipeline/' . $this->encode($params['id']);
117
-        $method = 'PUT';
118
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
119
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
120
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
121
-    }
28
+	/**
29
+	 * Deletes Logstash Pipelines used by Central Management
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-delete-pipeline.html
32
+	 *
33
+	 * @param array{
34
+	 *     id: string, // (REQUIRED) The ID of the Pipeline
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 deletePipeline(array $params = [])
50
+	{
51
+		$this->checkRequiredParameters(['id'], $params);
52
+		$url = '/_logstash/pipeline/' . $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
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
57
+	}
58
+	/**
59
+	 * Retrieves Logstash Pipelines used by Central Management
60
+	 *
61
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-get-pipeline.html
62
+	 *
63
+	 * @param array{
64
+	 *     id: string, //  A comma-separated list of Pipeline IDs
65
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
66
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
67
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
68
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
69
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
70
+	 * } $params
71
+	 *
72
+	 * @throws NoNodeAvailableException if all the hosts are offline
73
+	 * @throws ClientResponseException if the status code of response is 4xx
74
+	 * @throws ServerResponseException if the status code of response is 5xx
75
+	 *
76
+	 * @return Elasticsearch|Promise
77
+	 */
78
+	public function getPipeline(array $params = [])
79
+	{
80
+		if (isset($params['id'])) {
81
+			$url = '/_logstash/pipeline/' . $this->encode($params['id']);
82
+			$method = 'GET';
83
+		} else {
84
+			$url = '/_logstash/pipeline';
85
+			$method = 'GET';
86
+		}
87
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
88
+		$headers = ['Accept' => 'application/json'];
89
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
90
+	}
91
+	/**
92
+	 * Adds and updates Logstash Pipelines used for Central Management
93
+	 *
94
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/logstash-api-put-pipeline.html
95
+	 *
96
+	 * @param array{
97
+	 *     id: string, // (REQUIRED) The ID of the Pipeline
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
+	 *     body: array, // (REQUIRED) The Pipeline to add or update
104
+	 * } $params
105
+	 *
106
+	 * @throws MissingParameterException if a required parameter is missing
107
+	 * @throws NoNodeAvailableException if all the hosts are offline
108
+	 * @throws ClientResponseException if the status code of response is 4xx
109
+	 * @throws ServerResponseException if the status code of response is 5xx
110
+	 *
111
+	 * @return Elasticsearch|Promise
112
+	 */
113
+	public function putPipeline(array $params = [])
114
+	{
115
+		$this->checkRequiredParameters(['id', 'body'], $params);
116
+		$url = '/_logstash/pipeline/' . $this->encode($params['id']);
117
+		$method = 'PUT';
118
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
119
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
120
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
121
+	}
122 122
 }
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;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function deletePipeline(array $params = [])
50 50
     {
51 51
         $this->checkRequiredParameters(['id'], $params);
52
-        $url = '/_logstash/pipeline/' . $this->encode($params['id']);
52
+        $url = '/_logstash/pipeline/'.$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'];
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     public function getPipeline(array $params = [])
79 79
     {
80 80
         if (isset($params['id'])) {
81
-            $url = '/_logstash/pipeline/' . $this->encode($params['id']);
81
+            $url = '/_logstash/pipeline/'.$this->encode($params['id']);
82 82
             $method = 'GET';
83 83
         } else {
84 84
             $url = '/_logstash/pipeline';
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function putPipeline(array $params = [])
114 114
     {
115 115
         $this->checkRequiredParameters(['id', 'body'], $params);
116
-        $url = '/_logstash/pipeline/' . $this->encode($params['id']);
116
+        $url = '/_logstash/pipeline/'.$this->encode($params['id']);
117 117
         $method = 'PUT';
118 118
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
119 119
         $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 Logstash extends AbstractEndpoint
27
-{
26
+class Logstash extends AbstractEndpoint {
28 27
     /**
29 28
      * Deletes Logstash Pipelines used by Central Management
30 29
      *
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Rollup.php 3 patches
Indentation   +260 added lines, -260 removed lines patch added patch discarded remove patch
@@ -25,264 +25,264 @@
 block discarded – undo
25 25
  */
26 26
 class Rollup extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Deletes an existing rollup job.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-delete-job.html
32
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
33
-     *
34
-     * @param array{
35
-     *     id: string, // (REQUIRED) The ID of the job to delete
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 deleteJob(array $params = [])
51
-    {
52
-        $this->checkRequiredParameters(['id'], $params);
53
-        $url = '/_rollup/job/' . $this->encode($params['id']);
54
-        $method = 'DELETE';
55
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56
-        $headers = ['Accept' => 'application/json'];
57
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
58
-    }
59
-    /**
60
-     * Retrieves the configuration, stats, and status of rollup jobs.
61
-     *
62
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-job.html
63
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
64
-     *
65
-     * @param array{
66
-     *     id: string, //  The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs
67
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
68
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
69
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
70
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
71
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
72
-     * } $params
73
-     *
74
-     * @throws NoNodeAvailableException if all the hosts are offline
75
-     * @throws ClientResponseException if the status code of response is 4xx
76
-     * @throws ServerResponseException if the status code of response is 5xx
77
-     *
78
-     * @return Elasticsearch|Promise
79
-     */
80
-    public function getJobs(array $params = [])
81
-    {
82
-        if (isset($params['id'])) {
83
-            $url = '/_rollup/job/' . $this->encode($params['id']);
84
-            $method = 'GET';
85
-        } else {
86
-            $url = '/_rollup/job/';
87
-            $method = 'GET';
88
-        }
89
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
90
-        $headers = ['Accept' => 'application/json'];
91
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
92
-    }
93
-    /**
94
-     * Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern.
95
-     *
96
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-caps.html
97
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
98
-     *
99
-     * @param array{
100
-     *     id: string, //  The ID of the index to check rollup capabilities on, or left blank for all jobs
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 getRollupCaps(array $params = [])
115
-    {
116
-        if (isset($params['id'])) {
117
-            $url = '/_rollup/data/' . $this->encode($params['id']);
118
-            $method = 'GET';
119
-        } else {
120
-            $url = '/_rollup/data/';
121
-            $method = 'GET';
122
-        }
123
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
124
-        $headers = ['Accept' => 'application/json'];
125
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
126
-    }
127
-    /**
128
-     * Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the index where rollup data is stored).
129
-     *
130
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-index-caps.html
131
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
132
-     *
133
-     * @param array{
134
-     *     index: string, // (REQUIRED) The rollup index or index pattern to obtain rollup capabilities from.
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 getRollupIndexCaps(array $params = [])
150
-    {
151
-        $this->checkRequiredParameters(['index'], $params);
152
-        $url = '/' . $this->encode($params['index']) . '/_rollup/data';
153
-        $method = 'GET';
154
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
155
-        $headers = ['Accept' => 'application/json'];
156
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
157
-    }
158
-    /**
159
-     * Creates a rollup job.
160
-     *
161
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-put-job.html
162
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
163
-     *
164
-     * @param array{
165
-     *     id: string, // (REQUIRED) The ID of the job to create
166
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
167
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
168
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
169
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
170
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
171
-     *     body: array, // (REQUIRED) The job configuration
172
-     * } $params
173
-     *
174
-     * @throws MissingParameterException if a required parameter is missing
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 putJob(array $params = [])
182
-    {
183
-        $this->checkRequiredParameters(['id', 'body'], $params);
184
-        $url = '/_rollup/job/' . $this->encode($params['id']);
185
-        $method = 'PUT';
186
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
187
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
188
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
189
-    }
190
-    /**
191
-     * Enables searching rolled-up data using the standard query DSL.
192
-     *
193
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-search.html
194
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
195
-     *
196
-     * @param array{
197
-     *     index: list, // (REQUIRED) The indices or index-pattern(s) (containing rollup or regular data) that should be searched
198
-     *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
199
-     *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
200
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
201
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
202
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
203
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
204
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
205
-     *     body: array, // (REQUIRED) The search request body
206
-     * } $params
207
-     *
208
-     * @throws MissingParameterException if a required parameter is missing
209
-     * @throws NoNodeAvailableException if all the hosts are offline
210
-     * @throws ClientResponseException if the status code of response is 4xx
211
-     * @throws ServerResponseException if the status code of response is 5xx
212
-     *
213
-     * @return Elasticsearch|Promise
214
-     */
215
-    public function rollupSearch(array $params = [])
216
-    {
217
-        $this->checkRequiredParameters(['index', 'body'], $params);
218
-        $url = '/' . $this->encode($params['index']) . '/_rollup_search';
219
-        $method = empty($params['body']) ? 'GET' : 'POST';
220
-        $url = $this->addQueryString($url, $params, ['typed_keys', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
221
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
222
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
223
-    }
224
-    /**
225
-     * Starts an existing, stopped rollup job.
226
-     *
227
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-start-job.html
228
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
229
-     *
230
-     * @param array{
231
-     *     id: string, // (REQUIRED) The ID of the job to start
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
-     * } $params
238
-     *
239
-     * @throws MissingParameterException if a required parameter is missing
240
-     * @throws NoNodeAvailableException if all the hosts are offline
241
-     * @throws ClientResponseException if the status code of response is 4xx
242
-     * @throws ServerResponseException if the status code of response is 5xx
243
-     *
244
-     * @return Elasticsearch|Promise
245
-     */
246
-    public function startJob(array $params = [])
247
-    {
248
-        $this->checkRequiredParameters(['id'], $params);
249
-        $url = '/_rollup/job/' . $this->encode($params['id']) . '/_start';
250
-        $method = 'POST';
251
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
252
-        $headers = ['Accept' => 'application/json'];
253
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
254
-    }
255
-    /**
256
-     * Stops an existing, started rollup job.
257
-     *
258
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-stop-job.html
259
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
260
-     *
261
-     * @param array{
262
-     *     id: string, // (REQUIRED) The ID of the job to stop
263
-     *     wait_for_completion: boolean, // True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false.
264
-     *     timeout: time, // Block for (at maximum) the specified duration while waiting for the job to stop.  Defaults to 30s.
265
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
266
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
267
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
268
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
269
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
270
-     * } $params
271
-     *
272
-     * @throws MissingParameterException if a required parameter is missing
273
-     * @throws NoNodeAvailableException if all the hosts are offline
274
-     * @throws ClientResponseException if the status code of response is 4xx
275
-     * @throws ServerResponseException if the status code of response is 5xx
276
-     *
277
-     * @return Elasticsearch|Promise
278
-     */
279
-    public function stopJob(array $params = [])
280
-    {
281
-        $this->checkRequiredParameters(['id'], $params);
282
-        $url = '/_rollup/job/' . $this->encode($params['id']) . '/_stop';
283
-        $method = 'POST';
284
-        $url = $this->addQueryString($url, $params, ['wait_for_completion', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
285
-        $headers = ['Accept' => 'application/json'];
286
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
287
-    }
28
+	/**
29
+	 * Deletes an existing rollup job.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-delete-job.html
32
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
33
+	 *
34
+	 * @param array{
35
+	 *     id: string, // (REQUIRED) The ID of the job to delete
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 deleteJob(array $params = [])
51
+	{
52
+		$this->checkRequiredParameters(['id'], $params);
53
+		$url = '/_rollup/job/' . $this->encode($params['id']);
54
+		$method = 'DELETE';
55
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56
+		$headers = ['Accept' => 'application/json'];
57
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
58
+	}
59
+	/**
60
+	 * Retrieves the configuration, stats, and status of rollup jobs.
61
+	 *
62
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-job.html
63
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
64
+	 *
65
+	 * @param array{
66
+	 *     id: string, //  The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs
67
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
68
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
69
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
70
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
71
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
72
+	 * } $params
73
+	 *
74
+	 * @throws NoNodeAvailableException if all the hosts are offline
75
+	 * @throws ClientResponseException if the status code of response is 4xx
76
+	 * @throws ServerResponseException if the status code of response is 5xx
77
+	 *
78
+	 * @return Elasticsearch|Promise
79
+	 */
80
+	public function getJobs(array $params = [])
81
+	{
82
+		if (isset($params['id'])) {
83
+			$url = '/_rollup/job/' . $this->encode($params['id']);
84
+			$method = 'GET';
85
+		} else {
86
+			$url = '/_rollup/job/';
87
+			$method = 'GET';
88
+		}
89
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
90
+		$headers = ['Accept' => 'application/json'];
91
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
92
+	}
93
+	/**
94
+	 * Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern.
95
+	 *
96
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-caps.html
97
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
98
+	 *
99
+	 * @param array{
100
+	 *     id: string, //  The ID of the index to check rollup capabilities on, or left blank for all jobs
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 getRollupCaps(array $params = [])
115
+	{
116
+		if (isset($params['id'])) {
117
+			$url = '/_rollup/data/' . $this->encode($params['id']);
118
+			$method = 'GET';
119
+		} else {
120
+			$url = '/_rollup/data/';
121
+			$method = 'GET';
122
+		}
123
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
124
+		$headers = ['Accept' => 'application/json'];
125
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
126
+	}
127
+	/**
128
+	 * Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the index where rollup data is stored).
129
+	 *
130
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-get-rollup-index-caps.html
131
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
132
+	 *
133
+	 * @param array{
134
+	 *     index: string, // (REQUIRED) The rollup index or index pattern to obtain rollup capabilities from.
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 getRollupIndexCaps(array $params = [])
150
+	{
151
+		$this->checkRequiredParameters(['index'], $params);
152
+		$url = '/' . $this->encode($params['index']) . '/_rollup/data';
153
+		$method = 'GET';
154
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
155
+		$headers = ['Accept' => 'application/json'];
156
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
157
+	}
158
+	/**
159
+	 * Creates a rollup job.
160
+	 *
161
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-put-job.html
162
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
163
+	 *
164
+	 * @param array{
165
+	 *     id: string, // (REQUIRED) The ID of the job to create
166
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
167
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
168
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
169
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
170
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
171
+	 *     body: array, // (REQUIRED) The job configuration
172
+	 * } $params
173
+	 *
174
+	 * @throws MissingParameterException if a required parameter is missing
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 putJob(array $params = [])
182
+	{
183
+		$this->checkRequiredParameters(['id', 'body'], $params);
184
+		$url = '/_rollup/job/' . $this->encode($params['id']);
185
+		$method = 'PUT';
186
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
187
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
188
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
189
+	}
190
+	/**
191
+	 * Enables searching rolled-up data using the standard query DSL.
192
+	 *
193
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-search.html
194
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
195
+	 *
196
+	 * @param array{
197
+	 *     index: list, // (REQUIRED) The indices or index-pattern(s) (containing rollup or regular data) that should be searched
198
+	 *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
199
+	 *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
200
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
201
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
202
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
203
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
204
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
205
+	 *     body: array, // (REQUIRED) The search request body
206
+	 * } $params
207
+	 *
208
+	 * @throws MissingParameterException if a required parameter is missing
209
+	 * @throws NoNodeAvailableException if all the hosts are offline
210
+	 * @throws ClientResponseException if the status code of response is 4xx
211
+	 * @throws ServerResponseException if the status code of response is 5xx
212
+	 *
213
+	 * @return Elasticsearch|Promise
214
+	 */
215
+	public function rollupSearch(array $params = [])
216
+	{
217
+		$this->checkRequiredParameters(['index', 'body'], $params);
218
+		$url = '/' . $this->encode($params['index']) . '/_rollup_search';
219
+		$method = empty($params['body']) ? 'GET' : 'POST';
220
+		$url = $this->addQueryString($url, $params, ['typed_keys', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
221
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
222
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
223
+	}
224
+	/**
225
+	 * Starts an existing, stopped rollup job.
226
+	 *
227
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-start-job.html
228
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
229
+	 *
230
+	 * @param array{
231
+	 *     id: string, // (REQUIRED) The ID of the job to start
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
+	 * } $params
238
+	 *
239
+	 * @throws MissingParameterException if a required parameter is missing
240
+	 * @throws NoNodeAvailableException if all the hosts are offline
241
+	 * @throws ClientResponseException if the status code of response is 4xx
242
+	 * @throws ServerResponseException if the status code of response is 5xx
243
+	 *
244
+	 * @return Elasticsearch|Promise
245
+	 */
246
+	public function startJob(array $params = [])
247
+	{
248
+		$this->checkRequiredParameters(['id'], $params);
249
+		$url = '/_rollup/job/' . $this->encode($params['id']) . '/_start';
250
+		$method = 'POST';
251
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
252
+		$headers = ['Accept' => 'application/json'];
253
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
254
+	}
255
+	/**
256
+	 * Stops an existing, started rollup job.
257
+	 *
258
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-stop-job.html
259
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
260
+	 *
261
+	 * @param array{
262
+	 *     id: string, // (REQUIRED) The ID of the job to stop
263
+	 *     wait_for_completion: boolean, // True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false.
264
+	 *     timeout: time, // Block for (at maximum) the specified duration while waiting for the job to stop.  Defaults to 30s.
265
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
266
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
267
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
268
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
269
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
270
+	 * } $params
271
+	 *
272
+	 * @throws MissingParameterException if a required parameter is missing
273
+	 * @throws NoNodeAvailableException if all the hosts are offline
274
+	 * @throws ClientResponseException if the status code of response is 4xx
275
+	 * @throws ServerResponseException if the status code of response is 5xx
276
+	 *
277
+	 * @return Elasticsearch|Promise
278
+	 */
279
+	public function stopJob(array $params = [])
280
+	{
281
+		$this->checkRequiredParameters(['id'], $params);
282
+		$url = '/_rollup/job/' . $this->encode($params['id']) . '/_stop';
283
+		$method = 'POST';
284
+		$url = $this->addQueryString($url, $params, ['wait_for_completion', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
285
+		$headers = ['Accept' => 'application/json'];
286
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
287
+	}
288 288
 }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 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 deleteJob(array $params = [])
51 51
     {
52 52
         $this->checkRequiredParameters(['id'], $params);
53
-        $url = '/_rollup/job/' . $this->encode($params['id']);
53
+        $url = '/_rollup/job/'.$this->encode($params['id']);
54 54
         $method = 'DELETE';
55 55
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56 56
         $headers = ['Accept' => 'application/json'];
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function getJobs(array $params = [])
81 81
     {
82 82
         if (isset($params['id'])) {
83
-            $url = '/_rollup/job/' . $this->encode($params['id']);
83
+            $url = '/_rollup/job/'.$this->encode($params['id']);
84 84
             $method = 'GET';
85 85
         } else {
86 86
             $url = '/_rollup/job/';
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     public function getRollupCaps(array $params = [])
115 115
     {
116 116
         if (isset($params['id'])) {
117
-            $url = '/_rollup/data/' . $this->encode($params['id']);
117
+            $url = '/_rollup/data/'.$this->encode($params['id']);
118 118
             $method = 'GET';
119 119
         } else {
120 120
             $url = '/_rollup/data/';
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     public function getRollupIndexCaps(array $params = [])
150 150
     {
151 151
         $this->checkRequiredParameters(['index'], $params);
152
-        $url = '/' . $this->encode($params['index']) . '/_rollup/data';
152
+        $url = '/'.$this->encode($params['index']).'/_rollup/data';
153 153
         $method = 'GET';
154 154
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
155 155
         $headers = ['Accept' => 'application/json'];
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     public function putJob(array $params = [])
182 182
     {
183 183
         $this->checkRequiredParameters(['id', 'body'], $params);
184
-        $url = '/_rollup/job/' . $this->encode($params['id']);
184
+        $url = '/_rollup/job/'.$this->encode($params['id']);
185 185
         $method = 'PUT';
186 186
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
187 187
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     public function rollupSearch(array $params = [])
216 216
     {
217 217
         $this->checkRequiredParameters(['index', 'body'], $params);
218
-        $url = '/' . $this->encode($params['index']) . '/_rollup_search';
218
+        $url = '/'.$this->encode($params['index']).'/_rollup_search';
219 219
         $method = empty($params['body']) ? 'GET' : 'POST';
220 220
         $url = $this->addQueryString($url, $params, ['typed_keys', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
221 221
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     public function startJob(array $params = [])
247 247
     {
248 248
         $this->checkRequiredParameters(['id'], $params);
249
-        $url = '/_rollup/job/' . $this->encode($params['id']) . '/_start';
249
+        $url = '/_rollup/job/'.$this->encode($params['id']).'/_start';
250 250
         $method = 'POST';
251 251
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
252 252
         $headers = ['Accept' => 'application/json'];
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
     public function stopJob(array $params = [])
280 280
     {
281 281
         $this->checkRequiredParameters(['id'], $params);
282
-        $url = '/_rollup/job/' . $this->encode($params['id']) . '/_stop';
282
+        $url = '/_rollup/job/'.$this->encode($params['id']).'/_stop';
283 283
         $method = 'POST';
284 284
         $url = $this->addQueryString($url, $params, ['wait_for_completion', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
285 285
         $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 Rollup extends AbstractEndpoint
27
-{
26
+class Rollup extends AbstractEndpoint {
28 27
     /**
29 28
      * Deletes an existing rollup job.
30 29
      *
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Nodes.php 3 patches
Indentation   +277 added lines, -277 removed lines patch added patch discarded remove patch
@@ -25,281 +25,281 @@
 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
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
59
-    }
60
-    /**
61
-     * Returns cluster repositories metering information.
62
-     *
63
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html
64
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
65
-     *
66
-     * @param array{
67
-     *     node_id: list, // (REQUIRED) A comma-separated list of node IDs or names to limit the returned information.
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 getRepositoriesMeteringInfo(array $params = [])
83
-    {
84
-        $this->checkRequiredParameters(['node_id'], $params);
85
-        $url = '/_nodes/' . $this->encode($params['node_id']) . '/_repositories_metering';
86
-        $method = 'GET';
87
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
88
-        $headers = ['Accept' => 'application/json'];
89
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
90
-    }
91
-    /**
92
-     * Returns information about hot threads on each node in the cluster.
93
-     *
94
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html
95
-     *
96
-     * @param array{
97
-     *     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
98
-     *     interval: time, // The interval for the second sampling of threads
99
-     *     snapshots: number, // Number of samples of thread stacktrace (default: 10)
100
-     *     threads: number, // Specify the number of threads to provide information for (default: 3)
101
-     *     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)
102
-     *     type: enum, // The type to sample (default: cpu)
103
-     *     sort: enum, // The sort order for 'cpu' type (default: total)
104
-     *     timeout: time, // Explicit operation timeout
105
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
106
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
107
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
108
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
109
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
110
-     * } $params
111
-     *
112
-     * @throws NoNodeAvailableException if all the hosts are offline
113
-     * @throws ClientResponseException if the status code of response is 4xx
114
-     * @throws ServerResponseException if the status code of response is 5xx
115
-     *
116
-     * @return Elasticsearch|Promise
117
-     */
118
-    public function hotThreads(array $params = [])
119
-    {
120
-        if (isset($params['node_id'])) {
121
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/hot_threads';
122
-            $method = 'GET';
123
-        } else {
124
-            $url = '/_nodes/hot_threads';
125
-            $method = 'GET';
126
-        }
127
-        $url = $this->addQueryString($url, $params, ['interval', 'snapshots', 'threads', 'ignore_idle_threads', 'type', 'sort', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
128
-        $headers = ['Accept' => 'text/plain'];
129
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
130
-    }
131
-    /**
132
-     * Returns information about nodes in the cluster.
133
-     *
134
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html
135
-     *
136
-     * @param array{
137
-     *     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
138
-     *     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.
139
-     *     flat_settings: boolean, // Return settings in flat format (default: false)
140
-     *     timeout: time, // Explicit operation timeout
141
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
142
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
143
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
144
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
145
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
146
-     * } $params
147
-     *
148
-     * @throws NoNodeAvailableException if all the hosts are offline
149
-     * @throws ClientResponseException if the status code of response is 4xx
150
-     * @throws ServerResponseException if the status code of response is 5xx
151
-     *
152
-     * @return Elasticsearch|Promise
153
-     */
154
-    public function info(array $params = [])
155
-    {
156
-        if (isset($params['node_id']) && isset($params['metric'])) {
157
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/' . $this->encode($params['metric']);
158
-            $method = 'GET';
159
-        } elseif (isset($params['node_id'])) {
160
-            $url = '/_nodes/' . $this->encode($params['node_id']);
161
-            $method = 'GET';
162
-        } elseif (isset($params['metric'])) {
163
-            $url = '/_nodes/' . $this->encode($params['metric']);
164
-            $method = 'GET';
165
-        } else {
166
-            $url = '/_nodes';
167
-            $method = 'GET';
168
-        }
169
-        $url = $this->addQueryString($url, $params, ['flat_settings', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
170
-        $headers = ['Accept' => 'application/json'];
171
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
172
-    }
173
-    /**
174
-     * Reloads secure settings.
175
-     *
176
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings
177
-     *
178
-     * @param array{
179
-     *     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.
180
-     *     timeout: time, // Explicit operation timeout
181
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
182
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
183
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
184
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
185
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
186
-     *     body: array, //  An object containing the password for the elasticsearch keystore
187
-     * } $params
188
-     *
189
-     * @throws NoNodeAvailableException if all the hosts are offline
190
-     * @throws ClientResponseException if the status code of response is 4xx
191
-     * @throws ServerResponseException if the status code of response is 5xx
192
-     *
193
-     * @return Elasticsearch|Promise
194
-     */
195
-    public function reloadSecureSettings(array $params = [])
196
-    {
197
-        if (isset($params['node_id'])) {
198
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/reload_secure_settings';
199
-            $method = 'POST';
200
-        } else {
201
-            $url = '/_nodes/reload_secure_settings';
202
-            $method = 'POST';
203
-        }
204
-        $url = $this->addQueryString($url, $params, ['timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
205
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
206
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
207
-    }
208
-    /**
209
-     * Returns statistical information about nodes in the cluster.
210
-     *
211
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html
212
-     *
213
-     * @param array{
214
-     *     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
215
-     *     metric: list, //  Limit the information returned to the specified metrics
216
-     *     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.
217
-     *     completion_fields: list, // A comma-separated list of fields for the `completion` index metric (supports wildcards)
218
-     *     fielddata_fields: list, // A comma-separated list of fields for the `fielddata` index metric (supports wildcards)
219
-     *     fields: list, // A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
220
-     *     groups: boolean, // A comma-separated list of search groups for `search` index metric
221
-     *     level: enum, // Return indices stats aggregated at index, node or shard level
222
-     *     types: list, // A comma-separated list of document types for the `indexing` index metric
223
-     *     timeout: time, // Explicit operation timeout
224
-     *     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)
225
-     *     include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
226
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
227
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
228
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
229
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
230
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
231
-     * } $params
232
-     *
233
-     * @throws NoNodeAvailableException if all the hosts are offline
234
-     * @throws ClientResponseException if the status code of response is 4xx
235
-     * @throws ServerResponseException if the status code of response is 5xx
236
-     *
237
-     * @return Elasticsearch|Promise
238
-     */
239
-    public function stats(array $params = [])
240
-    {
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']);
243
-            $method = 'GET';
244
-        } elseif (isset($params['metric']) && isset($params['node_id'])) {
245
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/stats/' . $this->encode($params['metric']);
246
-            $method = 'GET';
247
-        } elseif (isset($params['metric']) && isset($params['index_metric'])) {
248
-            $url = '/_nodes/stats/' . $this->encode($params['metric']) . '/' . $this->encode($params['index_metric']);
249
-            $method = 'GET';
250
-        } elseif (isset($params['node_id'])) {
251
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/stats';
252
-            $method = 'GET';
253
-        } elseif (isset($params['metric'])) {
254
-            $url = '/_nodes/stats/' . $this->encode($params['metric']);
255
-            $method = 'GET';
256
-        } else {
257
-            $url = '/_nodes/stats';
258
-            $method = 'GET';
259
-        }
260
-        $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']);
261
-        $headers = ['Accept' => 'application/json'];
262
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
263
-    }
264
-    /**
265
-     * Returns low-level information about REST actions usage on nodes.
266
-     *
267
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html
268
-     *
269
-     * @param array{
270
-     *     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
271
-     *     metric: list, //  Limit the information returned to the specified metrics
272
-     *     timeout: time, // Explicit operation timeout
273
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
274
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
275
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
276
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
277
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
278
-     * } $params
279
-     *
280
-     * @throws NoNodeAvailableException if all the hosts are offline
281
-     * @throws ClientResponseException if the status code of response is 4xx
282
-     * @throws ServerResponseException if the status code of response is 5xx
283
-     *
284
-     * @return Elasticsearch|Promise
285
-     */
286
-    public function usage(array $params = [])
287
-    {
288
-        if (isset($params['metric']) && isset($params['node_id'])) {
289
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/usage/' . $this->encode($params['metric']);
290
-            $method = 'GET';
291
-        } elseif (isset($params['node_id'])) {
292
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/usage';
293
-            $method = 'GET';
294
-        } elseif (isset($params['metric'])) {
295
-            $url = '/_nodes/usage/' . $this->encode($params['metric']);
296
-            $method = 'GET';
297
-        } else {
298
-            $url = '/_nodes/usage';
299
-            $method = 'GET';
300
-        }
301
-        $url = $this->addQueryString($url, $params, ['timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
302
-        $headers = ['Accept' => 'application/json'];
303
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
304
-    }
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
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
59
+	}
60
+	/**
61
+	 * Returns cluster repositories metering information.
62
+	 *
63
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html
64
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
65
+	 *
66
+	 * @param array{
67
+	 *     node_id: list, // (REQUIRED) A comma-separated list of node IDs or names to limit the returned information.
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 getRepositoriesMeteringInfo(array $params = [])
83
+	{
84
+		$this->checkRequiredParameters(['node_id'], $params);
85
+		$url = '/_nodes/' . $this->encode($params['node_id']) . '/_repositories_metering';
86
+		$method = 'GET';
87
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
88
+		$headers = ['Accept' => 'application/json'];
89
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
90
+	}
91
+	/**
92
+	 * Returns information about hot threads on each node in the cluster.
93
+	 *
94
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html
95
+	 *
96
+	 * @param array{
97
+	 *     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
98
+	 *     interval: time, // The interval for the second sampling of threads
99
+	 *     snapshots: number, // Number of samples of thread stacktrace (default: 10)
100
+	 *     threads: number, // Specify the number of threads to provide information for (default: 3)
101
+	 *     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)
102
+	 *     type: enum, // The type to sample (default: cpu)
103
+	 *     sort: enum, // The sort order for 'cpu' type (default: total)
104
+	 *     timeout: time, // Explicit operation timeout
105
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
106
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
107
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
108
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
109
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
110
+	 * } $params
111
+	 *
112
+	 * @throws NoNodeAvailableException if all the hosts are offline
113
+	 * @throws ClientResponseException if the status code of response is 4xx
114
+	 * @throws ServerResponseException if the status code of response is 5xx
115
+	 *
116
+	 * @return Elasticsearch|Promise
117
+	 */
118
+	public function hotThreads(array $params = [])
119
+	{
120
+		if (isset($params['node_id'])) {
121
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/hot_threads';
122
+			$method = 'GET';
123
+		} else {
124
+			$url = '/_nodes/hot_threads';
125
+			$method = 'GET';
126
+		}
127
+		$url = $this->addQueryString($url, $params, ['interval', 'snapshots', 'threads', 'ignore_idle_threads', 'type', 'sort', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
128
+		$headers = ['Accept' => 'text/plain'];
129
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
130
+	}
131
+	/**
132
+	 * Returns information about nodes in the cluster.
133
+	 *
134
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html
135
+	 *
136
+	 * @param array{
137
+	 *     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
138
+	 *     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.
139
+	 *     flat_settings: boolean, // Return settings in flat format (default: false)
140
+	 *     timeout: time, // Explicit operation timeout
141
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
142
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
143
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
144
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
145
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
146
+	 * } $params
147
+	 *
148
+	 * @throws NoNodeAvailableException if all the hosts are offline
149
+	 * @throws ClientResponseException if the status code of response is 4xx
150
+	 * @throws ServerResponseException if the status code of response is 5xx
151
+	 *
152
+	 * @return Elasticsearch|Promise
153
+	 */
154
+	public function info(array $params = [])
155
+	{
156
+		if (isset($params['node_id']) && isset($params['metric'])) {
157
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/' . $this->encode($params['metric']);
158
+			$method = 'GET';
159
+		} elseif (isset($params['node_id'])) {
160
+			$url = '/_nodes/' . $this->encode($params['node_id']);
161
+			$method = 'GET';
162
+		} elseif (isset($params['metric'])) {
163
+			$url = '/_nodes/' . $this->encode($params['metric']);
164
+			$method = 'GET';
165
+		} else {
166
+			$url = '/_nodes';
167
+			$method = 'GET';
168
+		}
169
+		$url = $this->addQueryString($url, $params, ['flat_settings', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
170
+		$headers = ['Accept' => 'application/json'];
171
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
172
+	}
173
+	/**
174
+	 * Reloads secure settings.
175
+	 *
176
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings
177
+	 *
178
+	 * @param array{
179
+	 *     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.
180
+	 *     timeout: time, // Explicit operation timeout
181
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
182
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
183
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
184
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
185
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
186
+	 *     body: array, //  An object containing the password for the elasticsearch keystore
187
+	 * } $params
188
+	 *
189
+	 * @throws NoNodeAvailableException if all the hosts are offline
190
+	 * @throws ClientResponseException if the status code of response is 4xx
191
+	 * @throws ServerResponseException if the status code of response is 5xx
192
+	 *
193
+	 * @return Elasticsearch|Promise
194
+	 */
195
+	public function reloadSecureSettings(array $params = [])
196
+	{
197
+		if (isset($params['node_id'])) {
198
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/reload_secure_settings';
199
+			$method = 'POST';
200
+		} else {
201
+			$url = '/_nodes/reload_secure_settings';
202
+			$method = 'POST';
203
+		}
204
+		$url = $this->addQueryString($url, $params, ['timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
205
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
206
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
207
+	}
208
+	/**
209
+	 * Returns statistical information about nodes in the cluster.
210
+	 *
211
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html
212
+	 *
213
+	 * @param array{
214
+	 *     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
215
+	 *     metric: list, //  Limit the information returned to the specified metrics
216
+	 *     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.
217
+	 *     completion_fields: list, // A comma-separated list of fields for the `completion` index metric (supports wildcards)
218
+	 *     fielddata_fields: list, // A comma-separated list of fields for the `fielddata` index metric (supports wildcards)
219
+	 *     fields: list, // A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
220
+	 *     groups: boolean, // A comma-separated list of search groups for `search` index metric
221
+	 *     level: enum, // Return indices stats aggregated at index, node or shard level
222
+	 *     types: list, // A comma-separated list of document types for the `indexing` index metric
223
+	 *     timeout: time, // Explicit operation timeout
224
+	 *     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)
225
+	 *     include_unloaded_segments: boolean, // If set to true segment stats will include stats for segments that are not currently loaded into memory
226
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
227
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
228
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
229
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
230
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
231
+	 * } $params
232
+	 *
233
+	 * @throws NoNodeAvailableException if all the hosts are offline
234
+	 * @throws ClientResponseException if the status code of response is 4xx
235
+	 * @throws ServerResponseException if the status code of response is 5xx
236
+	 *
237
+	 * @return Elasticsearch|Promise
238
+	 */
239
+	public function stats(array $params = [])
240
+	{
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']);
243
+			$method = 'GET';
244
+		} elseif (isset($params['metric']) && isset($params['node_id'])) {
245
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/stats/' . $this->encode($params['metric']);
246
+			$method = 'GET';
247
+		} elseif (isset($params['metric']) && isset($params['index_metric'])) {
248
+			$url = '/_nodes/stats/' . $this->encode($params['metric']) . '/' . $this->encode($params['index_metric']);
249
+			$method = 'GET';
250
+		} elseif (isset($params['node_id'])) {
251
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/stats';
252
+			$method = 'GET';
253
+		} elseif (isset($params['metric'])) {
254
+			$url = '/_nodes/stats/' . $this->encode($params['metric']);
255
+			$method = 'GET';
256
+		} else {
257
+			$url = '/_nodes/stats';
258
+			$method = 'GET';
259
+		}
260
+		$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']);
261
+		$headers = ['Accept' => 'application/json'];
262
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
263
+	}
264
+	/**
265
+	 * Returns low-level information about REST actions usage on nodes.
266
+	 *
267
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html
268
+	 *
269
+	 * @param array{
270
+	 *     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
271
+	 *     metric: list, //  Limit the information returned to the specified metrics
272
+	 *     timeout: time, // Explicit operation timeout
273
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
274
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
275
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
276
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
277
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
278
+	 * } $params
279
+	 *
280
+	 * @throws NoNodeAvailableException if all the hosts are offline
281
+	 * @throws ClientResponseException if the status code of response is 4xx
282
+	 * @throws ServerResponseException if the status code of response is 5xx
283
+	 *
284
+	 * @return Elasticsearch|Promise
285
+	 */
286
+	public function usage(array $params = [])
287
+	{
288
+		if (isset($params['metric']) && isset($params['node_id'])) {
289
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/usage/' . $this->encode($params['metric']);
290
+			$method = 'GET';
291
+		} elseif (isset($params['node_id'])) {
292
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/usage';
293
+			$method = 'GET';
294
+		} elseif (isset($params['metric'])) {
295
+			$url = '/_nodes/usage/' . $this->encode($params['metric']);
296
+			$method = 'GET';
297
+		} else {
298
+			$url = '/_nodes/usage';
299
+			$method = 'GET';
300
+		}
301
+		$url = $this->addQueryString($url, $params, ['timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
302
+		$headers = ['Accept' => 'application/json'];
303
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
304
+	}
305 305
 }
Please login to merge, or discard this patch.
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.
lib/Vendor/Elastic/Elasticsearch/Endpoints/ConnectorSyncJob.php 3 patches
Indentation   +251 added lines, -251 removed lines patch added patch discarded remove patch
@@ -25,255 +25,255 @@
 block discarded – undo
25 25
  */
26 26
 class ConnectorSyncJob extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Cancels a connector sync job.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cancel-connector-sync-job-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_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be canceled
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 cancel(array $params = [])
51
-    {
52
-        $this->checkRequiredParameters(['connector_sync_job_id'], $params);
53
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_cancel';
54
-        $method = 'PUT';
55
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56
-        $headers = ['Accept' => 'application/json'];
57
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
58
-    }
59
-    /**
60
-     * Checks in a connector sync job (refreshes 'last_seen').
61
-     *
62
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-sync-job-api.html
63
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
64
-     *
65
-     * @param array{
66
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be checked in
67
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
68
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
69
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
70
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
71
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
72
-     * } $params
73
-     *
74
-     * @throws MissingParameterException if a required parameter is missing
75
-     * @throws NoNodeAvailableException if all the hosts are offline
76
-     * @throws ClientResponseException if the status code of response is 4xx
77
-     * @throws ServerResponseException if the status code of response is 5xx
78
-     *
79
-     * @return Elasticsearch|Promise
80
-     */
81
-    public function checkIn(array $params = [])
82
-    {
83
-        $this->checkRequiredParameters(['connector_sync_job_id'], $params);
84
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_check_in';
85
-        $method = 'PUT';
86
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
87
-        $headers = ['Accept' => 'application/json'];
88
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
89
-    }
90
-    /**
91
-     * Deletes a connector sync job.
92
-     *
93
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-sync-job-api.html
94
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
95
-     *
96
-     * @param array{
97
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be deleted.
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 MissingParameterException if a required parameter is missing
106
-     * @throws NoNodeAvailableException if all the hosts are offline
107
-     * @throws ClientResponseException if the status code of response is 4xx
108
-     * @throws ServerResponseException if the status code of response is 5xx
109
-     *
110
-     * @return Elasticsearch|Promise
111
-     */
112
-    public function delete(array $params = [])
113
-    {
114
-        $this->checkRequiredParameters(['connector_sync_job_id'], $params);
115
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
116
-        $method = 'DELETE';
117
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
118
-        $headers = ['Accept' => 'application/json'];
119
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
120
-    }
121
-    /**
122
-     * Sets an error for a connector sync job.
123
-     *
124
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-error-api.html
125
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
126
-     *
127
-     * @param array{
128
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to set an error for.
129
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
130
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
131
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
132
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
133
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
134
-     *     body: array, // (REQUIRED) The error to set in the connector sync job.
135
-     * } $params
136
-     *
137
-     * @throws MissingParameterException if a required parameter is missing
138
-     * @throws NoNodeAvailableException if all the hosts are offline
139
-     * @throws ClientResponseException if the status code of response is 4xx
140
-     * @throws ServerResponseException if the status code of response is 5xx
141
-     *
142
-     * @return Elasticsearch|Promise
143
-     */
144
-    public function error(array $params = [])
145
-    {
146
-        $this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
147
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_error';
148
-        $method = 'PUT';
149
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
150
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
151
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
152
-    }
153
-    /**
154
-     * Returns the details about a connector sync job.
155
-     *
156
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-sync-job-api.html
157
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
158
-     *
159
-     * @param array{
160
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be returned.
161
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
162
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
163
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
164
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
165
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
166
-     * } $params
167
-     *
168
-     * @throws MissingParameterException if a required parameter is missing
169
-     * @throws NoNodeAvailableException if all the hosts are offline
170
-     * @throws ClientResponseException if the status code of response is 4xx
171
-     * @throws ServerResponseException if the status code of response is 5xx
172
-     *
173
-     * @return Elasticsearch|Promise
174
-     */
175
-    public function get(array $params = [])
176
-    {
177
-        $this->checkRequiredParameters(['connector_sync_job_id'], $params);
178
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
179
-        $method = 'GET';
180
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
181
-        $headers = ['Accept' => 'application/json'];
182
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
183
-    }
184
-    /**
185
-     * Lists all connector sync jobs.
186
-     *
187
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-sync-jobs-api.html
188
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
189
-     *
190
-     * @param array{
191
-     *     from: int, // Starting offset (default: 0)
192
-     *     size: int, // specifies a max number of results to get (default: 100)
193
-     *     status: string, // Sync job status, which sync jobs are fetched for
194
-     *     connector_id: string, // Id of the connector to fetch the sync jobs for
195
-     *     job_type: list, // A comma-separated list of job types
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
-     * } $params
202
-     *
203
-     * @throws NoNodeAvailableException if all the hosts are offline
204
-     * @throws ClientResponseException if the status code of response is 4xx
205
-     * @throws ServerResponseException if the status code of response is 5xx
206
-     *
207
-     * @return Elasticsearch|Promise
208
-     */
209
-    public function list(array $params = [])
210
-    {
211
-        $url = '/_connector/_sync_job';
212
-        $method = 'GET';
213
-        $url = $this->addQueryString($url, $params, ['from', 'size', 'status', 'connector_id', 'job_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
214
-        $headers = ['Accept' => 'application/json'];
215
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
216
-    }
217
-    /**
218
-     * Creates a connector sync job.
219
-     *
220
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-sync-job-api.html
221
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
222
-     *
223
-     * @param array{
224
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
225
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
226
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
227
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
228
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
229
-     *     body: array, // (REQUIRED) The connector sync job data.
230
-     * } $params
231
-     *
232
-     * @throws NoNodeAvailableException if all the hosts are offline
233
-     * @throws ClientResponseException if the status code of response is 4xx
234
-     * @throws ServerResponseException if the status code of response is 5xx
235
-     *
236
-     * @return Elasticsearch|Promise
237
-     */
238
-    public function post(array $params = [])
239
-    {
240
-        $this->checkRequiredParameters(['body'], $params);
241
-        $url = '/_connector/_sync_job';
242
-        $method = 'POST';
243
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
244
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
245
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
246
-    }
247
-    /**
248
-     * Updates the stats fields in the connector sync job document.
249
-     *
250
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-stats-api.html
251
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
252
-     *
253
-     * @param array{
254
-     *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be updated.
255
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
256
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
257
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
258
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
259
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
260
-     *     body: array, // (REQUIRED) The stats to update for the connector sync job.
261
-     * } $params
262
-     *
263
-     * @throws MissingParameterException if a required parameter is missing
264
-     * @throws NoNodeAvailableException if all the hosts are offline
265
-     * @throws ClientResponseException if the status code of response is 4xx
266
-     * @throws ServerResponseException if the status code of response is 5xx
267
-     *
268
-     * @return Elasticsearch|Promise
269
-     */
270
-    public function updateStats(array $params = [])
271
-    {
272
-        $this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
273
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_stats';
274
-        $method = 'PUT';
275
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
276
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
277
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
278
-    }
28
+	/**
29
+	 * Cancels a connector sync job.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cancel-connector-sync-job-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_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be canceled
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 cancel(array $params = [])
51
+	{
52
+		$this->checkRequiredParameters(['connector_sync_job_id'], $params);
53
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_cancel';
54
+		$method = 'PUT';
55
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56
+		$headers = ['Accept' => 'application/json'];
57
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
58
+	}
59
+	/**
60
+	 * Checks in a connector sync job (refreshes 'last_seen').
61
+	 *
62
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-sync-job-api.html
63
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
64
+	 *
65
+	 * @param array{
66
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be checked in
67
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
68
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
69
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
70
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
71
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
72
+	 * } $params
73
+	 *
74
+	 * @throws MissingParameterException if a required parameter is missing
75
+	 * @throws NoNodeAvailableException if all the hosts are offline
76
+	 * @throws ClientResponseException if the status code of response is 4xx
77
+	 * @throws ServerResponseException if the status code of response is 5xx
78
+	 *
79
+	 * @return Elasticsearch|Promise
80
+	 */
81
+	public function checkIn(array $params = [])
82
+	{
83
+		$this->checkRequiredParameters(['connector_sync_job_id'], $params);
84
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_check_in';
85
+		$method = 'PUT';
86
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
87
+		$headers = ['Accept' => 'application/json'];
88
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
89
+	}
90
+	/**
91
+	 * Deletes a connector sync job.
92
+	 *
93
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-sync-job-api.html
94
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
95
+	 *
96
+	 * @param array{
97
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be deleted.
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 MissingParameterException if a required parameter is missing
106
+	 * @throws NoNodeAvailableException if all the hosts are offline
107
+	 * @throws ClientResponseException if the status code of response is 4xx
108
+	 * @throws ServerResponseException if the status code of response is 5xx
109
+	 *
110
+	 * @return Elasticsearch|Promise
111
+	 */
112
+	public function delete(array $params = [])
113
+	{
114
+		$this->checkRequiredParameters(['connector_sync_job_id'], $params);
115
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
116
+		$method = 'DELETE';
117
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
118
+		$headers = ['Accept' => 'application/json'];
119
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
120
+	}
121
+	/**
122
+	 * Sets an error for a connector sync job.
123
+	 *
124
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-error-api.html
125
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
126
+	 *
127
+	 * @param array{
128
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to set an error for.
129
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
130
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
131
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
132
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
133
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
134
+	 *     body: array, // (REQUIRED) The error to set in the connector sync job.
135
+	 * } $params
136
+	 *
137
+	 * @throws MissingParameterException if a required parameter is missing
138
+	 * @throws NoNodeAvailableException if all the hosts are offline
139
+	 * @throws ClientResponseException if the status code of response is 4xx
140
+	 * @throws ServerResponseException if the status code of response is 5xx
141
+	 *
142
+	 * @return Elasticsearch|Promise
143
+	 */
144
+	public function error(array $params = [])
145
+	{
146
+		$this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
147
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_error';
148
+		$method = 'PUT';
149
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
150
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
151
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
152
+	}
153
+	/**
154
+	 * Returns the details about a connector sync job.
155
+	 *
156
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-sync-job-api.html
157
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
158
+	 *
159
+	 * @param array{
160
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be returned.
161
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
162
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
163
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
164
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
165
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
166
+	 * } $params
167
+	 *
168
+	 * @throws MissingParameterException if a required parameter is missing
169
+	 * @throws NoNodeAvailableException if all the hosts are offline
170
+	 * @throws ClientResponseException if the status code of response is 4xx
171
+	 * @throws ServerResponseException if the status code of response is 5xx
172
+	 *
173
+	 * @return Elasticsearch|Promise
174
+	 */
175
+	public function get(array $params = [])
176
+	{
177
+		$this->checkRequiredParameters(['connector_sync_job_id'], $params);
178
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
179
+		$method = 'GET';
180
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
181
+		$headers = ['Accept' => 'application/json'];
182
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
183
+	}
184
+	/**
185
+	 * Lists all connector sync jobs.
186
+	 *
187
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-sync-jobs-api.html
188
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
189
+	 *
190
+	 * @param array{
191
+	 *     from: int, // Starting offset (default: 0)
192
+	 *     size: int, // specifies a max number of results to get (default: 100)
193
+	 *     status: string, // Sync job status, which sync jobs are fetched for
194
+	 *     connector_id: string, // Id of the connector to fetch the sync jobs for
195
+	 *     job_type: list, // A comma-separated list of job types
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
+	 * } $params
202
+	 *
203
+	 * @throws NoNodeAvailableException if all the hosts are offline
204
+	 * @throws ClientResponseException if the status code of response is 4xx
205
+	 * @throws ServerResponseException if the status code of response is 5xx
206
+	 *
207
+	 * @return Elasticsearch|Promise
208
+	 */
209
+	public function list(array $params = [])
210
+	{
211
+		$url = '/_connector/_sync_job';
212
+		$method = 'GET';
213
+		$url = $this->addQueryString($url, $params, ['from', 'size', 'status', 'connector_id', 'job_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
214
+		$headers = ['Accept' => 'application/json'];
215
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
216
+	}
217
+	/**
218
+	 * Creates a connector sync job.
219
+	 *
220
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-sync-job-api.html
221
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
222
+	 *
223
+	 * @param array{
224
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
225
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
226
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
227
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
228
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
229
+	 *     body: array, // (REQUIRED) The connector sync job data.
230
+	 * } $params
231
+	 *
232
+	 * @throws NoNodeAvailableException if all the hosts are offline
233
+	 * @throws ClientResponseException if the status code of response is 4xx
234
+	 * @throws ServerResponseException if the status code of response is 5xx
235
+	 *
236
+	 * @return Elasticsearch|Promise
237
+	 */
238
+	public function post(array $params = [])
239
+	{
240
+		$this->checkRequiredParameters(['body'], $params);
241
+		$url = '/_connector/_sync_job';
242
+		$method = 'POST';
243
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
244
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
245
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
246
+	}
247
+	/**
248
+	 * Updates the stats fields in the connector sync job document.
249
+	 *
250
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-stats-api.html
251
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
252
+	 *
253
+	 * @param array{
254
+	 *     connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be updated.
255
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
256
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
257
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
258
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
259
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
260
+	 *     body: array, // (REQUIRED) The stats to update for the connector sync job.
261
+	 * } $params
262
+	 *
263
+	 * @throws MissingParameterException if a required parameter is missing
264
+	 * @throws NoNodeAvailableException if all the hosts are offline
265
+	 * @throws ClientResponseException if the status code of response is 4xx
266
+	 * @throws ServerResponseException if the status code of response is 5xx
267
+	 *
268
+	 * @return Elasticsearch|Promise
269
+	 */
270
+	public function updateStats(array $params = [])
271
+	{
272
+		$this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
273
+		$url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_stats';
274
+		$method = 'PUT';
275
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
276
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
277
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
278
+	}
279 279
 }
Please login to merge, or discard this patch.
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;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function cancel(array $params = [])
51 51
     {
52 52
         $this->checkRequiredParameters(['connector_sync_job_id'], $params);
53
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_cancel';
53
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']).'/_cancel';
54 54
         $method = 'PUT';
55 55
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56 56
         $headers = ['Accept' => 'application/json'];
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public function checkIn(array $params = [])
82 82
     {
83 83
         $this->checkRequiredParameters(['connector_sync_job_id'], $params);
84
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_check_in';
84
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']).'/_check_in';
85 85
         $method = 'PUT';
86 86
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
87 87
         $headers = ['Accept' => 'application/json'];
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     public function delete(array $params = [])
113 113
     {
114 114
         $this->checkRequiredParameters(['connector_sync_job_id'], $params);
115
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
115
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']);
116 116
         $method = 'DELETE';
117 117
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
118 118
         $headers = ['Accept' => 'application/json'];
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     public function error(array $params = [])
145 145
     {
146 146
         $this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
147
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_error';
147
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']).'/_error';
148 148
         $method = 'PUT';
149 149
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
150 150
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     public function get(array $params = [])
176 176
     {
177 177
         $this->checkRequiredParameters(['connector_sync_job_id'], $params);
178
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']);
178
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']);
179 179
         $method = 'GET';
180 180
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
181 181
         $headers = ['Accept' => 'application/json'];
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     public function updateStats(array $params = [])
271 271
     {
272 272
         $this->checkRequiredParameters(['connector_sync_job_id', 'body'], $params);
273
-        $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_stats';
273
+        $url = '/_connector/_sync_job/'.$this->encode($params['connector_sync_job_id']).'/_stats';
274 274
         $method = 'PUT';
275 275
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
276 276
         $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 ConnectorSyncJob extends AbstractEndpoint
27
-{
26
+class ConnectorSyncJob extends AbstractEndpoint {
28 27
     /**
29 28
      * Cancels a connector sync job.
30 29
      *
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Simulate.php 3 patches
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -25,41 +25,41 @@
 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
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
64
-    }
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
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
64
+	}
65 65
 }
Please login to merge, or discard this patch.
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.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Synonyms.php 3 patches
Indentation   +216 added lines, -216 removed lines patch added patch discarded remove patch
@@ -25,220 +25,220 @@
 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
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
57
-    }
58
-    /**
59
-     * Deletes a synonym rule in a synonym set
60
-     *
61
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-synonym-rule.html
62
-     *
63
-     * @param array{
64
-     *     set_id: string, // (REQUIRED) The id of the synonym set to be updated
65
-     *     rule_id: string, // (REQUIRED) The id of the synonym rule to be deleted
66
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
67
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
68
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
69
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
70
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
71
-     * } $params
72
-     *
73
-     * @throws MissingParameterException if a required parameter is missing
74
-     * @throws NoNodeAvailableException if all the hosts are offline
75
-     * @throws ClientResponseException if the status code of response is 4xx
76
-     * @throws ServerResponseException if the status code of response is 5xx
77
-     *
78
-     * @return Elasticsearch|Promise
79
-     */
80
-    public function deleteSynonymRule(array $params = [])
81
-    {
82
-        $this->checkRequiredParameters(['set_id', 'rule_id'], $params);
83
-        $url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
84
-        $method = 'DELETE';
85
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
86
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
87
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
88
-    }
89
-    /**
90
-     * Retrieves a synonym set
91
-     *
92
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonyms-set.html
93
-     *
94
-     * @param array{
95
-     *     id: string, // (REQUIRED) The name of the synonyms set to be retrieved
96
-     *     from: int, // Starting offset
97
-     *     size: int, // specifies a max number of results to get
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 MissingParameterException if a required parameter is missing
106
-     * @throws NoNodeAvailableException if all the hosts are offline
107
-     * @throws ClientResponseException if the status code of response is 4xx
108
-     * @throws ServerResponseException if the status code of response is 5xx
109
-     *
110
-     * @return Elasticsearch|Promise
111
-     */
112
-    public function getSynonym(array $params = [])
113
-    {
114
-        $this->checkRequiredParameters(['id'], $params);
115
-        $url = '/_synonyms/' . $this->encode($params['id']);
116
-        $method = 'GET';
117
-        $url = $this->addQueryString($url, $params, ['from', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
118
-        $headers = ['Accept' => 'application/json'];
119
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
120
-    }
121
-    /**
122
-     * Retrieves a synonym rule from a synonym set
123
-     *
124
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonym-rule.html
125
-     *
126
-     * @param array{
127
-     *     set_id: string, // (REQUIRED) The id of the synonym set to retrieve the synonym rule from
128
-     *     rule_id: string, // (REQUIRED) The id of the synonym rule to retrieve
129
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
130
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
131
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
132
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
133
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
134
-     * } $params
135
-     *
136
-     * @throws MissingParameterException if a required parameter is missing
137
-     * @throws NoNodeAvailableException if all the hosts are offline
138
-     * @throws ClientResponseException if the status code of response is 4xx
139
-     * @throws ServerResponseException if the status code of response is 5xx
140
-     *
141
-     * @return Elasticsearch|Promise
142
-     */
143
-    public function getSynonymRule(array $params = [])
144
-    {
145
-        $this->checkRequiredParameters(['set_id', 'rule_id'], $params);
146
-        $url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
147
-        $method = 'GET';
148
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
149
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
150
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
151
-    }
152
-    /**
153
-     * Retrieves a summary of all defined synonym sets
154
-     *
155
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-synonyms-sets.html
156
-     *
157
-     * @param array{
158
-     *     from: int, // Starting offset
159
-     *     size: int, // specifies a max number of results to get
160
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
161
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
162
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
163
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
164
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
165
-     * } $params
166
-     *
167
-     * @throws NoNodeAvailableException if all the hosts are offline
168
-     * @throws ClientResponseException if the status code of response is 4xx
169
-     * @throws ServerResponseException if the status code of response is 5xx
170
-     *
171
-     * @return Elasticsearch|Promise
172
-     */
173
-    public function getSynonymsSets(array $params = [])
174
-    {
175
-        $url = '/_synonyms';
176
-        $method = 'GET';
177
-        $url = $this->addQueryString($url, $params, ['from', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
178
-        $headers = ['Accept' => 'application/json'];
179
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
180
-    }
181
-    /**
182
-     * Creates or updates a synonyms set
183
-     *
184
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonyms-set.html
185
-     *
186
-     * @param array{
187
-     *     id: string, // (REQUIRED) The id of the synonyms set to be created or updated
188
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
189
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
190
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
191
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
192
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
193
-     *     body: array, // (REQUIRED) Synonyms set rules
194
-     * } $params
195
-     *
196
-     * @throws MissingParameterException if a required parameter is missing
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 putSynonym(array $params = [])
204
-    {
205
-        $this->checkRequiredParameters(['id', 'body'], $params);
206
-        $url = '/_synonyms/' . $this->encode($params['id']);
207
-        $method = 'PUT';
208
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
209
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
210
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
211
-    }
212
-    /**
213
-     * Creates or updates a synonym rule in a synonym set
214
-     *
215
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonym-rule.html
216
-     *
217
-     * @param array{
218
-     *     set_id: string, // (REQUIRED) The id of the synonym set to be updated with the synonym rule
219
-     *     rule_id: string, // (REQUIRED) The id of the synonym rule to be updated or created
220
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
221
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
222
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
223
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
224
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
225
-     *     body: array, // (REQUIRED) Synonym rule
226
-     * } $params
227
-     *
228
-     * @throws MissingParameterException if a required parameter is missing
229
-     * @throws NoNodeAvailableException if all the hosts are offline
230
-     * @throws ClientResponseException if the status code of response is 4xx
231
-     * @throws ServerResponseException if the status code of response is 5xx
232
-     *
233
-     * @return Elasticsearch|Promise
234
-     */
235
-    public function putSynonymRule(array $params = [])
236
-    {
237
-        $this->checkRequiredParameters(['set_id', 'rule_id', 'body'], $params);
238
-        $url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
239
-        $method = 'PUT';
240
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
241
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
242
-        return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
243
-    }
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
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
57
+	}
58
+	/**
59
+	 * Deletes a synonym rule in a synonym set
60
+	 *
61
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-synonym-rule.html
62
+	 *
63
+	 * @param array{
64
+	 *     set_id: string, // (REQUIRED) The id of the synonym set to be updated
65
+	 *     rule_id: string, // (REQUIRED) The id of the synonym rule to be deleted
66
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
67
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
68
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
69
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
70
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
71
+	 * } $params
72
+	 *
73
+	 * @throws MissingParameterException if a required parameter is missing
74
+	 * @throws NoNodeAvailableException if all the hosts are offline
75
+	 * @throws ClientResponseException if the status code of response is 4xx
76
+	 * @throws ServerResponseException if the status code of response is 5xx
77
+	 *
78
+	 * @return Elasticsearch|Promise
79
+	 */
80
+	public function deleteSynonymRule(array $params = [])
81
+	{
82
+		$this->checkRequiredParameters(['set_id', 'rule_id'], $params);
83
+		$url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
84
+		$method = 'DELETE';
85
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
86
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
87
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
88
+	}
89
+	/**
90
+	 * Retrieves a synonym set
91
+	 *
92
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonyms-set.html
93
+	 *
94
+	 * @param array{
95
+	 *     id: string, // (REQUIRED) The name of the synonyms set to be retrieved
96
+	 *     from: int, // Starting offset
97
+	 *     size: int, // specifies a max number of results to get
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 MissingParameterException if a required parameter is missing
106
+	 * @throws NoNodeAvailableException if all the hosts are offline
107
+	 * @throws ClientResponseException if the status code of response is 4xx
108
+	 * @throws ServerResponseException if the status code of response is 5xx
109
+	 *
110
+	 * @return Elasticsearch|Promise
111
+	 */
112
+	public function getSynonym(array $params = [])
113
+	{
114
+		$this->checkRequiredParameters(['id'], $params);
115
+		$url = '/_synonyms/' . $this->encode($params['id']);
116
+		$method = 'GET';
117
+		$url = $this->addQueryString($url, $params, ['from', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
118
+		$headers = ['Accept' => 'application/json'];
119
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
120
+	}
121
+	/**
122
+	 * Retrieves a synonym rule from a synonym set
123
+	 *
124
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-synonym-rule.html
125
+	 *
126
+	 * @param array{
127
+	 *     set_id: string, // (REQUIRED) The id of the synonym set to retrieve the synonym rule from
128
+	 *     rule_id: string, // (REQUIRED) The id of the synonym rule to retrieve
129
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
130
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
131
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
132
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
133
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
134
+	 * } $params
135
+	 *
136
+	 * @throws MissingParameterException if a required parameter is missing
137
+	 * @throws NoNodeAvailableException if all the hosts are offline
138
+	 * @throws ClientResponseException if the status code of response is 4xx
139
+	 * @throws ServerResponseException if the status code of response is 5xx
140
+	 *
141
+	 * @return Elasticsearch|Promise
142
+	 */
143
+	public function getSynonymRule(array $params = [])
144
+	{
145
+		$this->checkRequiredParameters(['set_id', 'rule_id'], $params);
146
+		$url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
147
+		$method = 'GET';
148
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
149
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
150
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
151
+	}
152
+	/**
153
+	 * Retrieves a summary of all defined synonym sets
154
+	 *
155
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-synonyms-sets.html
156
+	 *
157
+	 * @param array{
158
+	 *     from: int, // Starting offset
159
+	 *     size: int, // specifies a max number of results to get
160
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
161
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
162
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
163
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
164
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
165
+	 * } $params
166
+	 *
167
+	 * @throws NoNodeAvailableException if all the hosts are offline
168
+	 * @throws ClientResponseException if the status code of response is 4xx
169
+	 * @throws ServerResponseException if the status code of response is 5xx
170
+	 *
171
+	 * @return Elasticsearch|Promise
172
+	 */
173
+	public function getSynonymsSets(array $params = [])
174
+	{
175
+		$url = '/_synonyms';
176
+		$method = 'GET';
177
+		$url = $this->addQueryString($url, $params, ['from', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
178
+		$headers = ['Accept' => 'application/json'];
179
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
180
+	}
181
+	/**
182
+	 * Creates or updates a synonyms set
183
+	 *
184
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonyms-set.html
185
+	 *
186
+	 * @param array{
187
+	 *     id: string, // (REQUIRED) The id of the synonyms set to be created or updated
188
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
189
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
190
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
191
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
192
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
193
+	 *     body: array, // (REQUIRED) Synonyms set rules
194
+	 * } $params
195
+	 *
196
+	 * @throws MissingParameterException if a required parameter is missing
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 putSynonym(array $params = [])
204
+	{
205
+		$this->checkRequiredParameters(['id', 'body'], $params);
206
+		$url = '/_synonyms/' . $this->encode($params['id']);
207
+		$method = 'PUT';
208
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
209
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
210
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
211
+	}
212
+	/**
213
+	 * Creates or updates a synonym rule in a synonym set
214
+	 *
215
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-synonym-rule.html
216
+	 *
217
+	 * @param array{
218
+	 *     set_id: string, // (REQUIRED) The id of the synonym set to be updated with the synonym rule
219
+	 *     rule_id: string, // (REQUIRED) The id of the synonym rule to be updated or created
220
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
221
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
222
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
223
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
224
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
225
+	 *     body: array, // (REQUIRED) Synonym rule
226
+	 * } $params
227
+	 *
228
+	 * @throws MissingParameterException if a required parameter is missing
229
+	 * @throws NoNodeAvailableException if all the hosts are offline
230
+	 * @throws ClientResponseException if the status code of response is 4xx
231
+	 * @throws ServerResponseException if the status code of response is 5xx
232
+	 *
233
+	 * @return Elasticsearch|Promise
234
+	 */
235
+	public function putSynonymRule(array $params = [])
236
+	{
237
+		$this->checkRequiredParameters(['set_id', 'rule_id', 'body'], $params);
238
+		$url = '/_synonyms/' . $this->encode($params['set_id']) . '/' . $this->encode($params['rule_id']);
239
+		$method = 'PUT';
240
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
241
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
242
+		return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
243
+	}
244 244
 }
Please login to merge, or discard this patch.
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.