1: | <?php |
2: | |
3: | declare(strict_types=1); |
4: | |
5: | |
6: | |
7: | |
8: | |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | |
15: | |
16: | |
17: | |
18: | |
19: | |
20: | |
21: | |
22: | namespace OpenSearch\Endpoints\Indices; |
23: | |
24: | use OpenSearch\Endpoints\AbstractEndpoint; |
25: | |
26: | |
27: | |
28: | |
29: | class UpdateAliases extends AbstractEndpoint |
30: | { |
31: | public function getURI(): string |
32: | { |
33: | return "/_aliases"; |
34: | } |
35: | |
36: | public function getParamWhitelist(): array |
37: | { |
38: | return [ |
39: | 'cluster_manager_timeout', |
40: | 'master_timeout', |
41: | 'timeout', |
42: | 'pretty', |
43: | 'human', |
44: | 'error_trace', |
45: | 'source', |
46: | 'filter_path' |
47: | ]; |
48: | } |
49: | |
50: | public function getMethod(): string |
51: | { |
52: | return 'POST'; |
53: | } |
54: | |
55: | public function setBody($body): static |
56: | { |
57: | if (is_null($body)) { |
58: | return $this; |
59: | } |
60: | $this->body = $body; |
61: | |
62: | return $this; |
63: | } |
64: | |
65: | protected function getParamDeprecation(): array |
66: | { |
67: | return ['master_timeout' => 'cluster_manager_timeout']; |
68: | } |
69: | } |
70: | |