1: | <?php |
2: | |
3: | declare(strict_types=1); |
4: | |
5: | |
6: | |
7: | |
8: | |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | |
15: | |
16: | namespace OpenSearch\Endpoints\List; |
17: | |
18: | use OpenSearch\Endpoints\AbstractEndpoint; |
19: | |
20: | |
21: | |
22: | |
23: | class Indices extends AbstractEndpoint |
24: | { |
25: | public function getURI(): string |
26: | { |
27: | $index = $this->index ?? null; |
28: | if (isset($index)) { |
29: | return "/_list/indices/$index"; |
30: | } |
31: | return "/_list/indices"; |
32: | } |
33: | |
34: | public function getParamWhitelist(): array |
35: | { |
36: | return [ |
37: | 'bytes', |
38: | 'cluster_manager_timeout', |
39: | 'expand_wildcards', |
40: | 'format', |
41: | 'h', |
42: | 'health', |
43: | 'help', |
44: | 'include_unloaded_segments', |
45: | 'local', |
46: | 'master_timeout', |
47: | 'next_token', |
48: | 'pri', |
49: | 's', |
50: | 'size', |
51: | 'sort', |
52: | 'time', |
53: | 'v', |
54: | 'pretty', |
55: | 'human', |
56: | 'error_trace', |
57: | 'source', |
58: | 'filter_path' |
59: | ]; |
60: | } |
61: | |
62: | public function getMethod(): string |
63: | { |
64: | return 'GET'; |
65: | } |
66: | |
67: | protected function getParamDeprecation(): array |
68: | { |
69: | return ['master_timeout' => 'cluster_manager_timeout']; |
70: | } |
71: | } |
72: | |