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 RemoteStoreNamespace |
22: | * |
23: | * NOTE: This file is autogenerated using util/GenerateEndpoints.php |
24: | */ |
25: | class RemoteStoreNamespace extends AbstractNamespace |
26: | { |
27: | /** |
28: | * Restores from remote store. |
29: | * |
30: | * $params['cluster_manager_timeout'] = (string) Operation timeout for connection to cluster-manager node. |
31: | * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning. (Default = false) |
32: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
33: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
34: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
35: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
36: | * $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 "-". |
37: | * $params['body'] = (array) Comma-separated list of index IDs (Required) |
38: | * |
39: | * @param array $params Associative array of parameters |
40: | * @return array |
41: | */ |
42: | public function restore(array $params = []) |
43: | { |
44: | $body = $this->extractArgument($params, 'body'); |
45: | |
46: | $endpoint = $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\RemoteStore\Restore::class); |
47: | $endpoint->setParams($params); |
48: | $endpoint->setBody($body); |
49: | |
50: | return $this->performRequest($endpoint); |
51: | } |
52: | |
53: | } |
54: |