1<?php
2
3declare(strict_types = 1);
4
5namespace Elasticsearch\Endpoints\Tasks;
6
7use Elasticsearch\Common\Exceptions;
8use Elasticsearch\Endpoints\AbstractEndpoint;
9
10/**
11 * Class List
12 *
13 * @category Elasticsearch
14 * @package  Elasticsearch\Endpoints\Tasks
15 * @author   Zachary Tong <zach@elastic.co>
16 * @license  http://www.apache.org/licenses/LICENSE-2.0 Apache2
17 * @link     http://elastic.co
18 */
19class TasksList extends AbstractEndpoint
20{
21
22    /**
23     * @throws \Elasticsearch\Common\Exceptions\RuntimeException
24     */
25    public function getURI(): string
26    {
27        return "/_tasks";
28    }
29
30    public function getParamWhitelist(): array
31    {
32        return [
33            'nodes',
34            'actions',
35            'detailed',
36            'parent_task_id',
37            'wait_for_completion',
38            'group_by',
39            'timeout'
40        ];
41    }
42
43    public function getMethod(): string
44    {
45        return 'GET';
46    }
47}
48