1: | <?php |
2: | |
3: | declare(strict_types=1); |
4: | |
5: | /** |
6: | * SPDX-License-Identifier: Apache-2.0 |
7: | * |
8: | * The OpenSearch Contributors require contributions made to |
9: | * this file be licensed under the Apache-2.0 license or a |
10: | * compatible open source license. |
11: | * |
12: | * Modifications Copyright OpenSearch Contributors. See |
13: | * GitHub history for details. |
14: | */ |
15: | |
16: | namespace OpenSearch\Namespaces; |
17: | |
18: | use OpenSearch\Namespaces\AbstractNamespace; |
19: | |
20: | /** |
21: | * Class RollupsNamespace |
22: | * |
23: | * NOTE: This file is autogenerated using util/GenerateEndpoints.php |
24: | */ |
25: | class RollupsNamespace extends AbstractNamespace |
26: | { |
27: | /** |
28: | * Delete index rollup. |
29: | * |
30: | * $params['id'] = (string) Rollup to access (Required) |
31: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
32: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
33: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
34: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
35: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
36: | * |
37: | * @param array $params Associative array of parameters |
38: | * @return array |
39: | */ |
40: | public function delete(array $params = []) |
41: | { |
42: | $id = $this->extractArgument($params, 'id'); |
43: | |
44: | $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Rollups\Delete::class); |
45: | $endpoint->setParams($params); |
46: | $endpoint->setId($id); |
47: | |
48: | return $this->performRequest($endpoint); |
49: | } |
50: | |
51: | /** |
52: | * Get a rollup's current status. |
53: | * |
54: | * $params['id'] = (string) Rollup to access (Required) |
55: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
56: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
57: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
58: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
59: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
60: | * |
61: | * @param array $params Associative array of parameters |
62: | * @return array |
63: | */ |
64: | public function explain(array $params = []) |
65: | { |
66: | $id = $this->extractArgument($params, 'id'); |
67: | |
68: | $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Rollups\Explain::class); |
69: | $endpoint->setParams($params); |
70: | $endpoint->setId($id); |
71: | |
72: | return $this->performRequest($endpoint); |
73: | } |
74: | |
75: | /** |
76: | * Get an index rollup. |
77: | * |
78: | * $params['id'] = (string) Rollup to access (Required) |
79: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
80: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
81: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
82: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
83: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
84: | * |
85: | * @param array $params Associative array of parameters |
86: | * @return array |
87: | */ |
88: | public function get(array $params = []) |
89: | { |
90: | $id = $this->extractArgument($params, 'id'); |
91: | |
92: | $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Rollups\Get::class); |
93: | $endpoint->setParams($params); |
94: | $endpoint->setId($id); |
95: | |
96: | return $this->performRequest($endpoint); |
97: | } |
98: | |
99: | /** |
100: | * Create or update index rollup. |
101: | * |
102: | * $params['id'] = (string) Rollup to access (Required) |
103: | * $params['if_primary_term'] = (number) Only perform the operation if the document has this primary term. |
104: | * $params['if_seq_no'] = (integer) Only perform the operation if the document has this sequence number. |
105: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
106: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
107: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
108: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
109: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
110: | * |
111: | * @param array $params Associative array of parameters |
112: | * @return array |
113: | */ |
114: | public function put(array $params = []) |
115: | { |
116: | $id = $this->extractArgument($params, 'id'); |
117: | $body = $this->extractArgument($params, 'body'); |
118: | |
119: | $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Rollups\Put::class); |
120: | $endpoint->setParams($params); |
121: | $endpoint->setId($id); |
122: | $endpoint->setBody($body); |
123: | |
124: | return $this->performRequest($endpoint); |
125: | } |
126: | |
127: | /** |
128: | * Start rollup. |
129: | * |
130: | * $params['id'] = (string) Rollup to access (Required) |
131: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
132: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
133: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
134: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
135: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
136: | * |
137: | * @param array $params Associative array of parameters |
138: | * @return array |
139: | */ |
140: | public function start(array $params = []) |
141: | { |
142: | $id = $this->extractArgument($params, 'id'); |
143: | |
144: | $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Rollups\Start::class); |
145: | $endpoint->setParams($params); |
146: | $endpoint->setId($id); |
147: | |
148: | return $this->performRequest($endpoint); |
149: | } |
150: | |
151: | /** |
152: | * Stop rollup. |
153: | * |
154: | * $params['id'] = (string) Rollup to access (Required) |
155: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
156: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
157: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
158: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
159: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
160: | * |
161: | * @param array $params Associative array of parameters |
162: | * @return array |
163: | */ |
164: | public function stop(array $params = []) |
165: | { |
166: | $id = $this->extractArgument($params, 'id'); |
167: | |
168: | $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Rollups\Stop::class); |
169: | $endpoint->setParams($params); |
170: | $endpoint->setId($id); |
171: | |
172: | return $this->performRequest($endpoint); |
173: | } |
174: | |
175: | } |
176: |