1: | <?php |
2: | |
3: | declare(strict_types=1); |
4: | |
5: | |
6: | |
7: | |
8: | |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | |
15: | |
16: | namespace OpenSearch\Endpoints\Cat; |
17: | |
18: | use OpenSearch\Endpoints\AbstractEndpoint; |
19: | |
20: | |
21: | |
22: | |
23: | class SegmentReplication extends AbstractEndpoint |
24: | { |
25: | public function getURI(): string |
26: | { |
27: | $index = $this->index ?? null; |
28: | if (isset($index)) { |
29: | return "/_cat/segment_replication/$index"; |
30: | } |
31: | return "/_cat/segment_replication"; |
32: | } |
33: | |
34: | public function getParamWhitelist(): array |
35: | { |
36: | return [ |
37: | 'active_only', |
38: | 'allow_no_indices', |
39: | 'bytes', |
40: | 'completed_only', |
41: | 'detailed', |
42: | 'expand_wildcards', |
43: | 'format', |
44: | 'h', |
45: | 'help', |
46: | 'ignore_throttled', |
47: | 'ignore_unavailable', |
48: | 'index', |
49: | 's', |
50: | 'shards', |
51: | 'time', |
52: | 'timeout', |
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: | |