1<?php
2
3declare(strict_types = 1);
4
5namespace Elasticsearch\Endpoints\Cluster\Nodes;
6
7/**
8 * Class ReloadSecureSettings
9 *
10 * @category Elasticsearch
11 * @package  Elasticsearch\Endpoints\Cluster\Nodes
12 * @author   Zachary Tong <zach@elastic.co>
13 * @license  http://www.apache.org/licenses/LICENSE-2.0 Apache2
14 * @link     http://elastic.co
15 */
16class ReloadSecureSettings extends AbstractNodesEndpoint
17{
18    public function getURI(): string
19    {
20        $nodeId = $this->nodeID ?? null;
21        if (isset($nodeId)) {
22            return "/_nodes/$nodeId/reload_secure_settings";
23        }
24        return "/_nodes/reload_secure_settings";
25    }
26
27    public function getParamWhitelist(): array
28    {
29        return [
30            'timeout'
31        ];
32    }
33
34    public function getMethod(): string
35    {
36        return 'POST';
37    }
38}
39