File manager - Edit - /var/www/payraty/helpdesk/vendor/elasticsearch/elasticsearch/src/Endpoints/Ingest.php
Back
<?php /** * Elasticsearch PHP Client * * @link https://github.com/elastic/elasticsearch-php * @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co) * @license https://opensource.org/licenses/MIT MIT License * * Licensed to Elasticsearch B.V under one or more agreements. * Elasticsearch B.V licenses this file to you under the MIT License. * See the LICENSE file in the project root for more information. */ declare(strict_types=1); namespace Elastic\Elasticsearch\Endpoints; use Elastic\Elasticsearch\Exception\ClientResponseException; use Elastic\Elasticsearch\Exception\MissingParameterException; use Elastic\Elasticsearch\Exception\ServerResponseException; use Elastic\Elasticsearch\Response\Elasticsearch; use Elastic\Transport\Exception\NoNodeAvailableException; use Http\Promise\Promise; /** * @generated This file is generated, please do not edit */ class Ingest extends AbstractEndpoint { /** * Deletes a geoip database configuration * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html * * @param array{ * id: list, // (REQUIRED) A comma-separated list of geoip database configurations to delete * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function deleteGeoipDatabase(array $params = []) { $this->checkRequiredParameters(['id'], $params); $url = '/_ingest/geoip/database/' . $this->encode($params['id']); $method = 'DELETE'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['id'], $request, 'ingest.delete_geoip_database'); return $this->client->sendRequest($request); } /** * Deletes a pipeline. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html * * @param array{ * id: string, // (REQUIRED) Pipeline ID * master_timeout: time, // Explicit operation timeout for connection to master node * timeout: time, // Explicit operation timeout * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function deletePipeline(array $params = []) { $this->checkRequiredParameters(['id'], $params); $url = '/_ingest/pipeline/' . $this->encode($params['id']); $method = 'DELETE'; $url = $this->addQueryString($url, $params, ['master_timeout','timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['id'], $request, 'ingest.delete_pipeline'); return $this->client->sendRequest($request); } /** * Returns statistical information about geoip databases * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-stats-api.html * * @param array{ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function geoIpStats(array $params = []) { $url = '/_ingest/geoip/stats'; $method = 'GET'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, [], $request, 'ingest.geo_ip_stats'); return $this->client->sendRequest($request); } /** * Returns geoip database configuration. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html * * @param array{ * id: list, // A comma-separated list of geoip database configurations to get; use `*` to get all geoip database configurations * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function getGeoipDatabase(array $params = []) { if (isset($params['id'])) { $url = '/_ingest/geoip/database/' . $this->encode($params['id']); $method = 'GET'; } else { $url = '/_ingest/geoip/database'; $method = 'GET'; } $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['id'], $request, 'ingest.get_geoip_database'); return $this->client->sendRequest($request); } /** * Returns a pipeline. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html * * @param array{ * id: string, // Comma separated list of pipeline ids. Wildcards supported * summary: boolean, // Return pipelines without their definitions (default: false) * master_timeout: time, // Explicit operation timeout for connection to master node * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function getPipeline(array $params = []) { if (isset($params['id'])) { $url = '/_ingest/pipeline/' . $this->encode($params['id']); $method = 'GET'; } else { $url = '/_ingest/pipeline'; $method = 'GET'; } $url = $this->addQueryString($url, $params, ['summary','master_timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['id'], $request, 'ingest.get_pipeline'); return $this->client->sendRequest($request); } /** * Returns a list of the built-in patterns. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get * * @param array{ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function processorGrok(array $params = []) { $url = '/_ingest/processor/grok'; $method = 'GET'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, [], $request, 'ingest.processor_grok'); return $this->client->sendRequest($request); } /** * Puts the configuration for a geoip database to be downloaded * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html * * @param array{ * id: string, // (REQUIRED) The id of the database configuration * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) The database configuration definition * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function putGeoipDatabase(array $params = []) { $this->checkRequiredParameters(['id','body'], $params); $url = '/_ingest/geoip/database/' . $this->encode($params['id']); $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['id'], $request, 'ingest.put_geoip_database'); return $this->client->sendRequest($request); } /** * Creates or updates a pipeline. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html * * @param array{ * id: string, // (REQUIRED) Pipeline ID * if_version: int, // Required version for optimistic concurrency control for pipeline updates * master_timeout: time, // Explicit operation timeout for connection to master node * timeout: time, // Explicit operation timeout * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) The ingest definition * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function putPipeline(array $params = []) { $this->checkRequiredParameters(['id','body'], $params); $url = '/_ingest/pipeline/' . $this->encode($params['id']); $method = 'PUT'; $url = $this->addQueryString($url, $params, ['if_version','master_timeout','timeout','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['id'], $request, 'ingest.put_pipeline'); return $this->client->sendRequest($request); } /** * Allows to simulate a pipeline with example documents. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html * * @param array{ * id: string, // Pipeline ID * verbose: boolean, // Verbose mode. Display data output for each processor in executed pipeline * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) The simulate definition * } $params * * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function simulate(array $params = []) { $this->checkRequiredParameters(['body'], $params); if (isset($params['id'])) { $url = '/_ingest/pipeline/' . $this->encode($params['id']) . '/_simulate'; $method = empty($params['body']) ? 'GET' : 'POST'; } else { $url = '/_ingest/pipeline/_simulate'; $method = empty($params['body']) ? 'GET' : 'POST'; } $url = $this->addQueryString($url, $params, ['verbose','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['id'], $request, 'ingest.simulate'); return $this->client->sendRequest($request); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings