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