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\Ingest; |
23: | |
24: | use OpenSearch\Endpoints\AbstractEndpoint; |
25: | |
26: | |
27: | |
28: | |
29: | class GetPipeline extends AbstractEndpoint |
30: | { |
31: | public function getURI(): string |
32: | { |
33: | $id = $this->id ?? null; |
34: | if (isset($id)) { |
35: | return "/_ingest/pipeline/$id"; |
36: | } |
37: | return "/_ingest/pipeline"; |
38: | } |
39: | |
40: | public function getParamWhitelist(): array |
41: | { |
42: | return [ |
43: | 'cluster_manager_timeout', |
44: | 'master_timeout', |
45: | 'pretty', |
46: | 'human', |
47: | 'error_trace', |
48: | 'source', |
49: | 'filter_path' |
50: | ]; |
51: | } |
52: | |
53: | public function getMethod(): string |
54: | { |
55: | return 'GET'; |
56: | } |
57: | |
58: | protected function getParamDeprecation(): array |
59: | { |
60: | return ['master_timeout' => 'cluster_manager_timeout']; |
61: | } |
62: | } |
63: | |