| 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\Endpoints\Ubi\Initialize; |
| 19: | |
| 20: | /** |
| 21: | * Class UbiNamespace |
| 22: | * |
| 23: | * NOTE: This file is autogenerated using util/GenerateEndpoints.php |
| 24: | */ |
| 25: | class UbiNamespace extends AbstractNamespace |
| 26: | { |
| 27: | /** |
| 28: | * Initializes the UBI indexes. |
| 29: | * |
| 30: | * $params['pretty'] = (boolean) Whether to pretty-format the returned JSON response. (Default = false) |
| 31: | * $params['human'] = (boolean) Whether to return human-readable values for statistics. (Default = false) |
| 32: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
| 33: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
| 34: | * $params['filter_path'] = (any) A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`. |
| 35: | * |
| 36: | * @param array $params Associative array of parameters |
| 37: | * @return array |
| 38: | */ |
| 39: | public function initialize(array $params = []) |
| 40: | { |
| 41: | $endpoint = $this->endpointFactory->getEndpoint(Initialize::class); |
| 42: | $endpoint->setParams($params); |
| 43: | |
| 44: | return $this->performRequest($endpoint); |
| 45: | } |
| 46: | |
| 47: | } |
| 48: |