Completed
Push — master ( 0675a5...c513b3 )
by Maxence
03:29 queued 14s
created
lib/Vendor/Elastic/Elasticsearch/Endpoints/Shutdown.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function deleteNode(array $params = [])
50 50
     {
51 51
         $this->checkRequiredParameters(['node_id'], $params);
52
-        $url = '/_nodes/' . $this->encode($params['node_id']) . '/shutdown';
52
+        $url = '/_nodes/'.$this->encode($params['node_id']).'/shutdown';
53 53
         $method = 'DELETE';
54 54
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55 55
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     public function getNode(array $params = [])
79 79
     {
80 80
         if (isset($params['node_id'])) {
81
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/shutdown';
81
+            $url = '/_nodes/'.$this->encode($params['node_id']).'/shutdown';
82 82
             $method = 'GET';
83 83
         } else {
84 84
             $url = '/_nodes/shutdown';
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function putNode(array $params = [])
114 114
     {
115 115
         $this->checkRequiredParameters(['node_id', 'body'], $params);
116
-        $url = '/_nodes/' . $this->encode($params['node_id']) . '/shutdown';
116
+        $url = '/_nodes/'.$this->encode($params['node_id']).'/shutdown';
117 117
         $method = 'PUT';
118 118
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
119 119
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Shutdown extends AbstractEndpoint
27
-{
26
+class Shutdown extends AbstractEndpoint {
28 27
     /**
29 28
      * Removes a node from the shutdown list. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +101 added lines, -101 removed lines patch added patch discarded remove patch
@@ -25,105 +25,105 @@
 block discarded – undo
25 25
  */
26 26
 class Shutdown extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Removes a node from the shutdown list. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current
32
-     *
33
-     * @param array{
34
-     *     node_id: string, // (REQUIRED) The node id of node to be removed from the shutdown state
35
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
-     * } $params
41
-     *
42
-     * @throws MissingParameterException if a required parameter is missing
43
-     * @throws NoNodeAvailableException if all the hosts are offline
44
-     * @throws ClientResponseException if the status code of response is 4xx
45
-     * @throws ServerResponseException if the status code of response is 5xx
46
-     *
47
-     * @return Elasticsearch|Promise
48
-     */
49
-    public function deleteNode(array $params = [])
50
-    {
51
-        $this->checkRequiredParameters(['node_id'], $params);
52
-        $url = '/_nodes/' . $this->encode($params['node_id']) . '/shutdown';
53
-        $method = 'DELETE';
54
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
56
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
57
-        $request = $this->addOtelAttributes($params, ['node_id'], $request, 'shutdown.delete_node');
58
-        return $this->client->sendRequest($request);
59
-    }
60
-    /**
61
-     * Retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
62
-     *
63
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current
64
-     *
65
-     * @param array{
66
-     *     node_id: string, //  Which node for which to retrieve the shutdown status
67
-     *     master_timeout: time, // Timeout for processing on master node
68
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
69
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
70
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
71
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
72
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
73
-     * } $params
74
-     *
75
-     * @throws NoNodeAvailableException if all the hosts are offline
76
-     * @throws ClientResponseException if the status code of response is 4xx
77
-     * @throws ServerResponseException if the status code of response is 5xx
78
-     *
79
-     * @return Elasticsearch|Promise
80
-     */
81
-    public function getNode(array $params = [])
82
-    {
83
-        if (isset($params['node_id'])) {
84
-            $url = '/_nodes/' . $this->encode($params['node_id']) . '/shutdown';
85
-            $method = 'GET';
86
-        } else {
87
-            $url = '/_nodes/shutdown';
88
-            $method = 'GET';
89
-        }
90
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
91
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
92
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
93
-        $request = $this->addOtelAttributes($params, ['node_id'], $request, 'shutdown.get_node');
94
-        return $this->client->sendRequest($request);
95
-    }
96
-    /**
97
-     * Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
98
-     *
99
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current
100
-     *
101
-     * @param array{
102
-     *     node_id: string, // (REQUIRED) The node id of node to be shut down
103
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
104
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
105
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
106
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
107
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
108
-     *     body: array, // (REQUIRED) The shutdown type definition to register
109
-     * } $params
110
-     *
111
-     * @throws MissingParameterException if a required parameter is missing
112
-     * @throws NoNodeAvailableException if all the hosts are offline
113
-     * @throws ClientResponseException if the status code of response is 4xx
114
-     * @throws ServerResponseException if the status code of response is 5xx
115
-     *
116
-     * @return Elasticsearch|Promise
117
-     */
118
-    public function putNode(array $params = [])
119
-    {
120
-        $this->checkRequiredParameters(['node_id', 'body'], $params);
121
-        $url = '/_nodes/' . $this->encode($params['node_id']) . '/shutdown';
122
-        $method = 'PUT';
123
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
124
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
125
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
126
-        $request = $this->addOtelAttributes($params, ['node_id'], $request, 'shutdown.put_node');
127
-        return $this->client->sendRequest($request);
128
-    }
28
+	/**
29
+	 * Removes a node from the shutdown list. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current
32
+	 *
33
+	 * @param array{
34
+	 *     node_id: string, // (REQUIRED) The node id of node to be removed from the shutdown state
35
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
+	 * } $params
41
+	 *
42
+	 * @throws MissingParameterException if a required parameter is missing
43
+	 * @throws NoNodeAvailableException if all the hosts are offline
44
+	 * @throws ClientResponseException if the status code of response is 4xx
45
+	 * @throws ServerResponseException if the status code of response is 5xx
46
+	 *
47
+	 * @return Elasticsearch|Promise
48
+	 */
49
+	public function deleteNode(array $params = [])
50
+	{
51
+		$this->checkRequiredParameters(['node_id'], $params);
52
+		$url = '/_nodes/' . $this->encode($params['node_id']) . '/shutdown';
53
+		$method = 'DELETE';
54
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
56
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
57
+		$request = $this->addOtelAttributes($params, ['node_id'], $request, 'shutdown.delete_node');
58
+		return $this->client->sendRequest($request);
59
+	}
60
+	/**
61
+	 * Retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
62
+	 *
63
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current
64
+	 *
65
+	 * @param array{
66
+	 *     node_id: string, //  Which node for which to retrieve the shutdown status
67
+	 *     master_timeout: time, // Timeout for processing on master node
68
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
69
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
70
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
71
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
72
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
73
+	 * } $params
74
+	 *
75
+	 * @throws NoNodeAvailableException if all the hosts are offline
76
+	 * @throws ClientResponseException if the status code of response is 4xx
77
+	 * @throws ServerResponseException if the status code of response is 5xx
78
+	 *
79
+	 * @return Elasticsearch|Promise
80
+	 */
81
+	public function getNode(array $params = [])
82
+	{
83
+		if (isset($params['node_id'])) {
84
+			$url = '/_nodes/' . $this->encode($params['node_id']) . '/shutdown';
85
+			$method = 'GET';
86
+		} else {
87
+			$url = '/_nodes/shutdown';
88
+			$method = 'GET';
89
+		}
90
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
91
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
92
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
93
+		$request = $this->addOtelAttributes($params, ['node_id'], $request, 'shutdown.get_node');
94
+		return $this->client->sendRequest($request);
95
+	}
96
+	/**
97
+	 * Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
98
+	 *
99
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current
100
+	 *
101
+	 * @param array{
102
+	 *     node_id: string, // (REQUIRED) The node id of node to be shut down
103
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
104
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
105
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
106
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
107
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
108
+	 *     body: array, // (REQUIRED) The shutdown type definition to register
109
+	 * } $params
110
+	 *
111
+	 * @throws MissingParameterException if a required parameter is missing
112
+	 * @throws NoNodeAvailableException if all the hosts are offline
113
+	 * @throws ClientResponseException if the status code of response is 4xx
114
+	 * @throws ServerResponseException if the status code of response is 5xx
115
+	 *
116
+	 * @return Elasticsearch|Promise
117
+	 */
118
+	public function putNode(array $params = [])
119
+	{
120
+		$this->checkRequiredParameters(['node_id', 'body'], $params);
121
+		$url = '/_nodes/' . $this->encode($params['node_id']) . '/shutdown';
122
+		$method = 'PUT';
123
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
124
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
125
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
126
+		$request = $this->addOtelAttributes($params, ['node_id'], $request, 'shutdown.put_node');
127
+		return $this->client->sendRequest($request);
128
+	}
129 129
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/TextStructure.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
Please login to merge, or discard this patch.
Indentation   +164 added lines, -164 removed lines patch added patch discarded remove patch
@@ -25,168 +25,168 @@
 block discarded – undo
25 25
  */
26 26
 class TextStructure extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Finds the structure of a text field in an index.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-field-structure.html
32
-     *
33
-     * @param array{
34
-     *     index: string, // The index containing the analyzed field
35
-     *     field: string, // The field that should be analyzed
36
-     *     documents_to_sample: int, // How many documents should be included in the analysis
37
-     *     timeout: time, // Timeout after which the analysis will be aborted
38
-     *     format: enum, // Optional parameter to specify the high level file format
39
-     *     column_names: list, // Optional parameter containing a comma separated list of the column names for a delimited file
40
-     *     delimiter: string, // Optional parameter to specify the delimiter character for a delimited file - must be a single character
41
-     *     quote: string, // Optional parameter to specify the quote character for a delimited file - must be a single character
42
-     *     should_trim_fields: boolean, // Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them
43
-     *     grok_pattern: string, // Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file
44
-     *     ecs_compatibility: string, // Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled'
45
-     *     timestamp_field: string, // Optional parameter to specify the timestamp field in the file
46
-     *     timestamp_format: string, // Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format
47
-     *     explain: boolean, // Whether to include a commentary on how the structure was derived
48
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
49
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
50
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
51
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
52
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
53
-     * } $params
54
-     *
55
-     * @throws NoNodeAvailableException if all the hosts are offline
56
-     * @throws ClientResponseException if the status code of response is 4xx
57
-     * @throws ServerResponseException if the status code of response is 5xx
58
-     *
59
-     * @return Elasticsearch|Promise
60
-     */
61
-    public function findFieldStructure(array $params = [])
62
-    {
63
-        $this->checkRequiredParameters(['index', 'field'], $params);
64
-        $url = '/_text_structure/find_field_structure';
65
-        $method = 'GET';
66
-        $url = $this->addQueryString($url, $params, ['index', 'field', 'documents_to_sample', 'timeout', 'format', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'ecs_compatibility', 'timestamp_field', 'timestamp_format', 'explain', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
67
-        $headers = ['Accept' => 'application/json'];
68
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
69
-        $request = $this->addOtelAttributes($params, [], $request, 'text_structure.find_field_structure');
70
-        return $this->client->sendRequest($request);
71
-    }
72
-    /**
73
-     * Finds the structure of a list of messages. The messages must contain data that is suitable to be ingested into Elasticsearch.
74
-     *
75
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-message-structure.html
76
-     *
77
-     * @param array{
78
-     *     timeout: time, // Timeout after which the analysis will be aborted
79
-     *     format: enum, // Optional parameter to specify the high level file format
80
-     *     column_names: list, // Optional parameter containing a comma separated list of the column names for a delimited file
81
-     *     delimiter: string, // Optional parameter to specify the delimiter character for a delimited file - must be a single character
82
-     *     quote: string, // Optional parameter to specify the quote character for a delimited file - must be a single character
83
-     *     should_trim_fields: boolean, // Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them
84
-     *     grok_pattern: string, // Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file
85
-     *     ecs_compatibility: string, // Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled'
86
-     *     timestamp_field: string, // Optional parameter to specify the timestamp field in the file
87
-     *     timestamp_format: string, // Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format
88
-     *     explain: boolean, // Whether to include a commentary on how the structure was derived
89
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
90
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
91
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
92
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
93
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
94
-     *     body: array, // (REQUIRED) JSON object with one field [messages], containing an array of messages to be analyzed
95
-     * } $params
96
-     *
97
-     * @throws NoNodeAvailableException if all the hosts are offline
98
-     * @throws ClientResponseException if the status code of response is 4xx
99
-     * @throws ServerResponseException if the status code of response is 5xx
100
-     *
101
-     * @return Elasticsearch|Promise
102
-     */
103
-    public function findMessageStructure(array $params = [])
104
-    {
105
-        $this->checkRequiredParameters(['body'], $params);
106
-        $url = '/_text_structure/find_message_structure';
107
-        $method = empty($params['body']) ? 'GET' : 'POST';
108
-        $url = $this->addQueryString($url, $params, ['timeout', 'format', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'ecs_compatibility', 'timestamp_field', 'timestamp_format', 'explain', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
109
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
110
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
111
-        $request = $this->addOtelAttributes($params, [], $request, 'text_structure.find_message_structure');
112
-        return $this->client->sendRequest($request);
113
-    }
114
-    /**
115
-     * Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch.
116
-     *
117
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html
118
-     *
119
-     * @param array{
120
-     *     lines_to_sample: int, // How many lines of the file should be included in the analysis
121
-     *     line_merge_size_limit: int, // Maximum number of characters permitted in a single message when lines are merged to create messages.
122
-     *     timeout: time, // Timeout after which the analysis will be aborted
123
-     *     charset: string, // Optional parameter to specify the character set of the file
124
-     *     format: enum, // Optional parameter to specify the high level file format
125
-     *     has_header_row: boolean, // Optional parameter to specify whether a delimited file includes the column names in its first row
126
-     *     column_names: list, // Optional parameter containing a comma separated list of the column names for a delimited file
127
-     *     delimiter: string, // Optional parameter to specify the delimiter character for a delimited file - must be a single character
128
-     *     quote: string, // Optional parameter to specify the quote character for a delimited file - must be a single character
129
-     *     should_trim_fields: boolean, // Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them
130
-     *     grok_pattern: string, // Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file
131
-     *     ecs_compatibility: string, // Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled'
132
-     *     timestamp_field: string, // Optional parameter to specify the timestamp field in the file
133
-     *     timestamp_format: string, // Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format
134
-     *     explain: boolean, // Whether to include a commentary on how the structure was derived
135
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
136
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
137
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
138
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
139
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
140
-     *     body: array, // (REQUIRED) The contents of the file to be analyzed
141
-     * } $params
142
-     *
143
-     * @throws NoNodeAvailableException if all the hosts are offline
144
-     * @throws ClientResponseException if the status code of response is 4xx
145
-     * @throws ServerResponseException if the status code of response is 5xx
146
-     *
147
-     * @return Elasticsearch|Promise
148
-     */
149
-    public function findStructure(array $params = [])
150
-    {
151
-        $this->checkRequiredParameters(['body'], $params);
152
-        $url = '/_text_structure/find_structure';
153
-        $method = 'POST';
154
-        $url = $this->addQueryString($url, $params, ['lines_to_sample', 'line_merge_size_limit', 'timeout', 'charset', 'format', 'has_header_row', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'ecs_compatibility', 'timestamp_field', 'timestamp_format', 'explain', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
155
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/x-ndjson'];
156
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
157
-        $request = $this->addOtelAttributes($params, [], $request, 'text_structure.find_structure');
158
-        return $this->client->sendRequest($request);
159
-    }
160
-    /**
161
-     * Tests a Grok pattern on some text.
162
-     *
163
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/test-grok-pattern.html
164
-     *
165
-     * @param array{
166
-     *     ecs_compatibility: string, // Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled'
167
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
168
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
169
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
170
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
171
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
172
-     *     body: array, // (REQUIRED) The Grok pattern and text.
173
-     * } $params
174
-     *
175
-     * @throws NoNodeAvailableException if all the hosts are offline
176
-     * @throws ClientResponseException if the status code of response is 4xx
177
-     * @throws ServerResponseException if the status code of response is 5xx
178
-     *
179
-     * @return Elasticsearch|Promise
180
-     */
181
-    public function testGrokPattern(array $params = [])
182
-    {
183
-        $this->checkRequiredParameters(['body'], $params);
184
-        $url = '/_text_structure/test_grok_pattern';
185
-        $method = empty($params['body']) ? 'GET' : 'POST';
186
-        $url = $this->addQueryString($url, $params, ['ecs_compatibility', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
187
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
188
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
189
-        $request = $this->addOtelAttributes($params, [], $request, 'text_structure.test_grok_pattern');
190
-        return $this->client->sendRequest($request);
191
-    }
28
+	/**
29
+	 * Finds the structure of a text field in an index.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-field-structure.html
32
+	 *
33
+	 * @param array{
34
+	 *     index: string, // The index containing the analyzed field
35
+	 *     field: string, // The field that should be analyzed
36
+	 *     documents_to_sample: int, // How many documents should be included in the analysis
37
+	 *     timeout: time, // Timeout after which the analysis will be aborted
38
+	 *     format: enum, // Optional parameter to specify the high level file format
39
+	 *     column_names: list, // Optional parameter containing a comma separated list of the column names for a delimited file
40
+	 *     delimiter: string, // Optional parameter to specify the delimiter character for a delimited file - must be a single character
41
+	 *     quote: string, // Optional parameter to specify the quote character for a delimited file - must be a single character
42
+	 *     should_trim_fields: boolean, // Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them
43
+	 *     grok_pattern: string, // Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file
44
+	 *     ecs_compatibility: string, // Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled'
45
+	 *     timestamp_field: string, // Optional parameter to specify the timestamp field in the file
46
+	 *     timestamp_format: string, // Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format
47
+	 *     explain: boolean, // Whether to include a commentary on how the structure was derived
48
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
49
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
50
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
51
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
52
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
53
+	 * } $params
54
+	 *
55
+	 * @throws NoNodeAvailableException if all the hosts are offline
56
+	 * @throws ClientResponseException if the status code of response is 4xx
57
+	 * @throws ServerResponseException if the status code of response is 5xx
58
+	 *
59
+	 * @return Elasticsearch|Promise
60
+	 */
61
+	public function findFieldStructure(array $params = [])
62
+	{
63
+		$this->checkRequiredParameters(['index', 'field'], $params);
64
+		$url = '/_text_structure/find_field_structure';
65
+		$method = 'GET';
66
+		$url = $this->addQueryString($url, $params, ['index', 'field', 'documents_to_sample', 'timeout', 'format', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'ecs_compatibility', 'timestamp_field', 'timestamp_format', 'explain', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
67
+		$headers = ['Accept' => 'application/json'];
68
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
69
+		$request = $this->addOtelAttributes($params, [], $request, 'text_structure.find_field_structure');
70
+		return $this->client->sendRequest($request);
71
+	}
72
+	/**
73
+	 * Finds the structure of a list of messages. The messages must contain data that is suitable to be ingested into Elasticsearch.
74
+	 *
75
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-message-structure.html
76
+	 *
77
+	 * @param array{
78
+	 *     timeout: time, // Timeout after which the analysis will be aborted
79
+	 *     format: enum, // Optional parameter to specify the high level file format
80
+	 *     column_names: list, // Optional parameter containing a comma separated list of the column names for a delimited file
81
+	 *     delimiter: string, // Optional parameter to specify the delimiter character for a delimited file - must be a single character
82
+	 *     quote: string, // Optional parameter to specify the quote character for a delimited file - must be a single character
83
+	 *     should_trim_fields: boolean, // Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them
84
+	 *     grok_pattern: string, // Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file
85
+	 *     ecs_compatibility: string, // Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled'
86
+	 *     timestamp_field: string, // Optional parameter to specify the timestamp field in the file
87
+	 *     timestamp_format: string, // Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format
88
+	 *     explain: boolean, // Whether to include a commentary on how the structure was derived
89
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
90
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
91
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
92
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
93
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
94
+	 *     body: array, // (REQUIRED) JSON object with one field [messages], containing an array of messages to be analyzed
95
+	 * } $params
96
+	 *
97
+	 * @throws NoNodeAvailableException if all the hosts are offline
98
+	 * @throws ClientResponseException if the status code of response is 4xx
99
+	 * @throws ServerResponseException if the status code of response is 5xx
100
+	 *
101
+	 * @return Elasticsearch|Promise
102
+	 */
103
+	public function findMessageStructure(array $params = [])
104
+	{
105
+		$this->checkRequiredParameters(['body'], $params);
106
+		$url = '/_text_structure/find_message_structure';
107
+		$method = empty($params['body']) ? 'GET' : 'POST';
108
+		$url = $this->addQueryString($url, $params, ['timeout', 'format', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'ecs_compatibility', 'timestamp_field', 'timestamp_format', 'explain', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
109
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
110
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
111
+		$request = $this->addOtelAttributes($params, [], $request, 'text_structure.find_message_structure');
112
+		return $this->client->sendRequest($request);
113
+	}
114
+	/**
115
+	 * Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch.
116
+	 *
117
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/find-structure.html
118
+	 *
119
+	 * @param array{
120
+	 *     lines_to_sample: int, // How many lines of the file should be included in the analysis
121
+	 *     line_merge_size_limit: int, // Maximum number of characters permitted in a single message when lines are merged to create messages.
122
+	 *     timeout: time, // Timeout after which the analysis will be aborted
123
+	 *     charset: string, // Optional parameter to specify the character set of the file
124
+	 *     format: enum, // Optional parameter to specify the high level file format
125
+	 *     has_header_row: boolean, // Optional parameter to specify whether a delimited file includes the column names in its first row
126
+	 *     column_names: list, // Optional parameter containing a comma separated list of the column names for a delimited file
127
+	 *     delimiter: string, // Optional parameter to specify the delimiter character for a delimited file - must be a single character
128
+	 *     quote: string, // Optional parameter to specify the quote character for a delimited file - must be a single character
129
+	 *     should_trim_fields: boolean, // Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them
130
+	 *     grok_pattern: string, // Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file
131
+	 *     ecs_compatibility: string, // Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled'
132
+	 *     timestamp_field: string, // Optional parameter to specify the timestamp field in the file
133
+	 *     timestamp_format: string, // Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format
134
+	 *     explain: boolean, // Whether to include a commentary on how the structure was derived
135
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
136
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
137
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
138
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
139
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
140
+	 *     body: array, // (REQUIRED) The contents of the file to be analyzed
141
+	 * } $params
142
+	 *
143
+	 * @throws NoNodeAvailableException if all the hosts are offline
144
+	 * @throws ClientResponseException if the status code of response is 4xx
145
+	 * @throws ServerResponseException if the status code of response is 5xx
146
+	 *
147
+	 * @return Elasticsearch|Promise
148
+	 */
149
+	public function findStructure(array $params = [])
150
+	{
151
+		$this->checkRequiredParameters(['body'], $params);
152
+		$url = '/_text_structure/find_structure';
153
+		$method = 'POST';
154
+		$url = $this->addQueryString($url, $params, ['lines_to_sample', 'line_merge_size_limit', 'timeout', 'charset', 'format', 'has_header_row', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'ecs_compatibility', 'timestamp_field', 'timestamp_format', 'explain', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
155
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/x-ndjson'];
156
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
157
+		$request = $this->addOtelAttributes($params, [], $request, 'text_structure.find_structure');
158
+		return $this->client->sendRequest($request);
159
+	}
160
+	/**
161
+	 * Tests a Grok pattern on some text.
162
+	 *
163
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/test-grok-pattern.html
164
+	 *
165
+	 * @param array{
166
+	 *     ecs_compatibility: string, // Optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled'
167
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
168
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
169
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
170
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
171
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
172
+	 *     body: array, // (REQUIRED) The Grok pattern and text.
173
+	 * } $params
174
+	 *
175
+	 * @throws NoNodeAvailableException if all the hosts are offline
176
+	 * @throws ClientResponseException if the status code of response is 4xx
177
+	 * @throws ServerResponseException if the status code of response is 5xx
178
+	 *
179
+	 * @return Elasticsearch|Promise
180
+	 */
181
+	public function testGrokPattern(array $params = [])
182
+	{
183
+		$this->checkRequiredParameters(['body'], $params);
184
+		$url = '/_text_structure/test_grok_pattern';
185
+		$method = empty($params['body']) ? 'GET' : 'POST';
186
+		$url = $this->addQueryString($url, $params, ['ecs_compatibility', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
187
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
188
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
189
+		$request = $this->addOtelAttributes($params, [], $request, 'text_structure.test_grok_pattern');
190
+		return $this->client->sendRequest($request);
191
+	}
192 192
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class TextStructure extends AbstractEndpoint
27
-{
26
+class TextStructure extends AbstractEndpoint {
28 27
     /**
29 28
      * Finds the structure of a text field in an index.
30 29
      *
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/SearchApplication.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class SearchApplication extends AbstractEndpoint
27
-{
26
+class SearchApplication extends AbstractEndpoint {
28 27
     /**
29 28
      * Deletes a search application.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +341 added lines, -341 removed lines patch added patch discarded remove patch
@@ -25,345 +25,345 @@
 block discarded – undo
25 25
  */
26 26
 class SearchApplication extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Deletes a search application.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html
32
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
33
-     *
34
-     * @param array{
35
-     *     name: string, // (REQUIRED) The name of the search application
36
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
37
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
38
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
39
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
40
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
41
-     * } $params
42
-     *
43
-     * @throws MissingParameterException if a required parameter is missing
44
-     * @throws NoNodeAvailableException if all the hosts are offline
45
-     * @throws ClientResponseException if the status code of response is 4xx
46
-     * @throws ServerResponseException if the status code of response is 5xx
47
-     *
48
-     * @return Elasticsearch|Promise
49
-     */
50
-    public function delete(array $params = [])
51
-    {
52
-        $this->checkRequiredParameters(['name'], $params);
53
-        $url = '/_application/search_application/' . $this->encode($params['name']);
54
-        $method = 'DELETE';
55
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56
-        $headers = ['Accept' => 'application/json'];
57
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
58
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.delete');
59
-        return $this->client->sendRequest($request);
60
-    }
61
-    /**
62
-     * Delete a behavioral analytics collection.
63
-     *
64
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html
65
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
66
-     *
67
-     * @param array{
68
-     *     name: string, // (REQUIRED) The name of the analytics collection to be deleted
69
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
70
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
71
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
72
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
73
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
74
-     * } $params
75
-     *
76
-     * @throws MissingParameterException if a required parameter is missing
77
-     * @throws NoNodeAvailableException if all the hosts are offline
78
-     * @throws ClientResponseException if the status code of response is 4xx
79
-     * @throws ServerResponseException if the status code of response is 5xx
80
-     *
81
-     * @return Elasticsearch|Promise
82
-     */
83
-    public function deleteBehavioralAnalytics(array $params = [])
84
-    {
85
-        $this->checkRequiredParameters(['name'], $params);
86
-        $url = '/_application/analytics/' . $this->encode($params['name']);
87
-        $method = 'DELETE';
88
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
89
-        $headers = ['Accept' => 'application/json'];
90
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
91
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.delete_behavioral_analytics');
92
-        return $this->client->sendRequest($request);
93
-    }
94
-    /**
95
-     * Returns the details about a search application.
96
-     *
97
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html
98
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
99
-     *
100
-     * @param array{
101
-     *     name: string, // (REQUIRED) The name of the search application
102
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
103
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
104
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
105
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
106
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
107
-     * } $params
108
-     *
109
-     * @throws MissingParameterException if a required parameter is missing
110
-     * @throws NoNodeAvailableException if all the hosts are offline
111
-     * @throws ClientResponseException if the status code of response is 4xx
112
-     * @throws ServerResponseException if the status code of response is 5xx
113
-     *
114
-     * @return Elasticsearch|Promise
115
-     */
116
-    public function get(array $params = [])
117
-    {
118
-        $this->checkRequiredParameters(['name'], $params);
119
-        $url = '/_application/search_application/' . $this->encode($params['name']);
120
-        $method = 'GET';
121
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
122
-        $headers = ['Accept' => 'application/json'];
123
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
124
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.get');
125
-        return $this->client->sendRequest($request);
126
-    }
127
-    /**
128
-     * Returns the existing behavioral analytics collections.
129
-     *
130
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html
131
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
132
-     *
133
-     * @param array{
134
-     *     name: list, //  A comma-separated list of analytics collections to limit the returned information
135
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
136
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
137
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
138
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
139
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
140
-     * } $params
141
-     *
142
-     * @throws NoNodeAvailableException if all the hosts are offline
143
-     * @throws ClientResponseException if the status code of response is 4xx
144
-     * @throws ServerResponseException if the status code of response is 5xx
145
-     *
146
-     * @return Elasticsearch|Promise
147
-     */
148
-    public function getBehavioralAnalytics(array $params = [])
149
-    {
150
-        if (isset($params['name'])) {
151
-            $url = '/_application/analytics/' . $this->encode($params['name']);
152
-            $method = 'GET';
153
-        } else {
154
-            $url = '/_application/analytics';
155
-            $method = 'GET';
156
-        }
157
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
158
-        $headers = ['Accept' => 'application/json'];
159
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
160
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.get_behavioral_analytics');
161
-        return $this->client->sendRequest($request);
162
-    }
163
-    /**
164
-     * Returns the existing search applications.
165
-     *
166
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html
167
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
168
-     *
169
-     * @param array{
170
-     *     q: string, // Query in the Lucene query string syntax
171
-     *     from: int, // Starting offset (default: 0)
172
-     *     size: int, // specifies a max number of results to get
173
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
174
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
175
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
176
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
177
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
178
-     * } $params
179
-     *
180
-     * @throws NoNodeAvailableException if all the hosts are offline
181
-     * @throws ClientResponseException if the status code of response is 4xx
182
-     * @throws ServerResponseException if the status code of response is 5xx
183
-     *
184
-     * @return Elasticsearch|Promise
185
-     */
186
-    public function list(array $params = [])
187
-    {
188
-        $url = '/_application/search_application';
189
-        $method = 'GET';
190
-        $url = $this->addQueryString($url, $params, ['q', 'from', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
191
-        $headers = ['Accept' => 'application/json'];
192
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
193
-        $request = $this->addOtelAttributes($params, [], $request, 'search_application.list');
194
-        return $this->client->sendRequest($request);
195
-    }
196
-    /**
197
-     * Creates a behavioral analytics event for existing collection.
198
-     *
199
-     * @see http://todo.com/tbd
200
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
201
-     *
202
-     * @param array{
203
-     *     collection_name: string, // (REQUIRED) The name of behavioral analytics collection
204
-     *     event_type: string, // (REQUIRED) Behavioral analytics event type. Available: page_view, search, search_click
205
-     *     debug: boolean, // If true, returns event information that will be stored
206
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
207
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
208
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
209
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
210
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
211
-     *     body: array, // (REQUIRED) The event definition
212
-     * } $params
213
-     *
214
-     * @throws MissingParameterException if a required parameter is missing
215
-     * @throws NoNodeAvailableException if all the hosts are offline
216
-     * @throws ClientResponseException if the status code of response is 4xx
217
-     * @throws ServerResponseException if the status code of response is 5xx
218
-     *
219
-     * @return Elasticsearch|Promise
220
-     */
221
-    public function postBehavioralAnalyticsEvent(array $params = [])
222
-    {
223
-        $this->checkRequiredParameters(['collection_name', 'event_type', 'body'], $params);
224
-        $url = '/_application/analytics/' . $this->encode($params['collection_name']) . '/event/' . $this->encode($params['event_type']);
225
-        $method = 'POST';
226
-        $url = $this->addQueryString($url, $params, ['debug', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
227
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
228
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
229
-        $request = $this->addOtelAttributes($params, ['collection_name', 'event_type'], $request, 'search_application.post_behavioral_analytics_event');
230
-        return $this->client->sendRequest($request);
231
-    }
232
-    /**
233
-     * Creates or updates a search application.
234
-     *
235
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html
236
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
237
-     *
238
-     * @param array{
239
-     *     name: string, // (REQUIRED) The name of the search application to be created or updated
240
-     *     create: boolean, // If true, requires that a search application with the specified resource_id does not already exist. (default: false)
241
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
242
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
243
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
244
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
245
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
246
-     *     body: array, // (REQUIRED) The search application configuration, including `indices`
247
-     * } $params
248
-     *
249
-     * @throws MissingParameterException if a required parameter is missing
250
-     * @throws NoNodeAvailableException if all the hosts are offline
251
-     * @throws ClientResponseException if the status code of response is 4xx
252
-     * @throws ServerResponseException if the status code of response is 5xx
253
-     *
254
-     * @return Elasticsearch|Promise
255
-     */
256
-    public function put(array $params = [])
257
-    {
258
-        $this->checkRequiredParameters(['name', 'body'], $params);
259
-        $url = '/_application/search_application/' . $this->encode($params['name']);
260
-        $method = 'PUT';
261
-        $url = $this->addQueryString($url, $params, ['create', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
262
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
263
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
264
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.put');
265
-        return $this->client->sendRequest($request);
266
-    }
267
-    /**
268
-     * Creates a behavioral analytics collection.
269
-     *
270
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html
271
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
272
-     *
273
-     * @param array{
274
-     *     name: string, // (REQUIRED) The name of the analytics collection to be created or updated
275
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
276
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
277
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
278
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
279
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
280
-     * } $params
281
-     *
282
-     * @throws MissingParameterException if a required parameter is missing
283
-     * @throws NoNodeAvailableException if all the hosts are offline
284
-     * @throws ClientResponseException if the status code of response is 4xx
285
-     * @throws ServerResponseException if the status code of response is 5xx
286
-     *
287
-     * @return Elasticsearch|Promise
288
-     */
289
-    public function putBehavioralAnalytics(array $params = [])
290
-    {
291
-        $this->checkRequiredParameters(['name'], $params);
292
-        $url = '/_application/analytics/' . $this->encode($params['name']);
293
-        $method = 'PUT';
294
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
295
-        $headers = ['Accept' => 'application/json'];
296
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
297
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.put_behavioral_analytics');
298
-        return $this->client->sendRequest($request);
299
-    }
300
-    /**
301
-     * Renders a query for given search application search parameters
302
-     *
303
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-render-query.html
304
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
305
-     *
306
-     * @param array{
307
-     *     name: string, // (REQUIRED) The name of the search application to render the query for
308
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
309
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
310
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
311
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
312
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
313
-     *     body: array, //  Search parameters, which will override any default search parameters defined in the search application template
314
-     * } $params
315
-     *
316
-     * @throws MissingParameterException if a required parameter is missing
317
-     * @throws NoNodeAvailableException if all the hosts are offline
318
-     * @throws ClientResponseException if the status code of response is 4xx
319
-     * @throws ServerResponseException if the status code of response is 5xx
320
-     *
321
-     * @return Elasticsearch|Promise
322
-     */
323
-    public function renderQuery(array $params = [])
324
-    {
325
-        $this->checkRequiredParameters(['name'], $params);
326
-        $url = '/_application/search_application/' . $this->encode($params['name']) . '/_render_query';
327
-        $method = 'POST';
328
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
329
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
330
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
331
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.render_query');
332
-        return $this->client->sendRequest($request);
333
-    }
334
-    /**
335
-     * Perform a search against a search application
336
-     *
337
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html
338
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
339
-     *
340
-     * @param array{
341
-     *     name: string, // (REQUIRED) The name of the search application to be searched
342
-     *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
343
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
344
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
345
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
346
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
347
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
348
-     *     body: array, //  Search parameters, including template parameters that override defaults
349
-     * } $params
350
-     *
351
-     * @throws MissingParameterException if a required parameter is missing
352
-     * @throws NoNodeAvailableException if all the hosts are offline
353
-     * @throws ClientResponseException if the status code of response is 4xx
354
-     * @throws ServerResponseException if the status code of response is 5xx
355
-     *
356
-     * @return Elasticsearch|Promise
357
-     */
358
-    public function search(array $params = [])
359
-    {
360
-        $this->checkRequiredParameters(['name'], $params);
361
-        $url = '/_application/search_application/' . $this->encode($params['name']) . '/_search';
362
-        $method = empty($params['body']) ? 'GET' : 'POST';
363
-        $url = $this->addQueryString($url, $params, ['typed_keys', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
364
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
365
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
366
-        $request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.search');
367
-        return $this->client->sendRequest($request);
368
-    }
28
+	/**
29
+	 * Deletes a search application.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html
32
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
33
+	 *
34
+	 * @param array{
35
+	 *     name: string, // (REQUIRED) The name of the search application
36
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
37
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
38
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
39
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
40
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
41
+	 * } $params
42
+	 *
43
+	 * @throws MissingParameterException if a required parameter is missing
44
+	 * @throws NoNodeAvailableException if all the hosts are offline
45
+	 * @throws ClientResponseException if the status code of response is 4xx
46
+	 * @throws ServerResponseException if the status code of response is 5xx
47
+	 *
48
+	 * @return Elasticsearch|Promise
49
+	 */
50
+	public function delete(array $params = [])
51
+	{
52
+		$this->checkRequiredParameters(['name'], $params);
53
+		$url = '/_application/search_application/' . $this->encode($params['name']);
54
+		$method = 'DELETE';
55
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56
+		$headers = ['Accept' => 'application/json'];
57
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
58
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.delete');
59
+		return $this->client->sendRequest($request);
60
+	}
61
+	/**
62
+	 * Delete a behavioral analytics collection.
63
+	 *
64
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html
65
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
66
+	 *
67
+	 * @param array{
68
+	 *     name: string, // (REQUIRED) The name of the analytics collection to be deleted
69
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
70
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
71
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
72
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
73
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
74
+	 * } $params
75
+	 *
76
+	 * @throws MissingParameterException if a required parameter is missing
77
+	 * @throws NoNodeAvailableException if all the hosts are offline
78
+	 * @throws ClientResponseException if the status code of response is 4xx
79
+	 * @throws ServerResponseException if the status code of response is 5xx
80
+	 *
81
+	 * @return Elasticsearch|Promise
82
+	 */
83
+	public function deleteBehavioralAnalytics(array $params = [])
84
+	{
85
+		$this->checkRequiredParameters(['name'], $params);
86
+		$url = '/_application/analytics/' . $this->encode($params['name']);
87
+		$method = 'DELETE';
88
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
89
+		$headers = ['Accept' => 'application/json'];
90
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
91
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.delete_behavioral_analytics');
92
+		return $this->client->sendRequest($request);
93
+	}
94
+	/**
95
+	 * Returns the details about a search application.
96
+	 *
97
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html
98
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
99
+	 *
100
+	 * @param array{
101
+	 *     name: string, // (REQUIRED) The name of the search application
102
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
103
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
104
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
105
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
106
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
107
+	 * } $params
108
+	 *
109
+	 * @throws MissingParameterException if a required parameter is missing
110
+	 * @throws NoNodeAvailableException if all the hosts are offline
111
+	 * @throws ClientResponseException if the status code of response is 4xx
112
+	 * @throws ServerResponseException if the status code of response is 5xx
113
+	 *
114
+	 * @return Elasticsearch|Promise
115
+	 */
116
+	public function get(array $params = [])
117
+	{
118
+		$this->checkRequiredParameters(['name'], $params);
119
+		$url = '/_application/search_application/' . $this->encode($params['name']);
120
+		$method = 'GET';
121
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
122
+		$headers = ['Accept' => 'application/json'];
123
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
124
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.get');
125
+		return $this->client->sendRequest($request);
126
+	}
127
+	/**
128
+	 * Returns the existing behavioral analytics collections.
129
+	 *
130
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html
131
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
132
+	 *
133
+	 * @param array{
134
+	 *     name: list, //  A comma-separated list of analytics collections to limit the returned information
135
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
136
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
137
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
138
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
139
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
140
+	 * } $params
141
+	 *
142
+	 * @throws NoNodeAvailableException if all the hosts are offline
143
+	 * @throws ClientResponseException if the status code of response is 4xx
144
+	 * @throws ServerResponseException if the status code of response is 5xx
145
+	 *
146
+	 * @return Elasticsearch|Promise
147
+	 */
148
+	public function getBehavioralAnalytics(array $params = [])
149
+	{
150
+		if (isset($params['name'])) {
151
+			$url = '/_application/analytics/' . $this->encode($params['name']);
152
+			$method = 'GET';
153
+		} else {
154
+			$url = '/_application/analytics';
155
+			$method = 'GET';
156
+		}
157
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
158
+		$headers = ['Accept' => 'application/json'];
159
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
160
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.get_behavioral_analytics');
161
+		return $this->client->sendRequest($request);
162
+	}
163
+	/**
164
+	 * Returns the existing search applications.
165
+	 *
166
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html
167
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
168
+	 *
169
+	 * @param array{
170
+	 *     q: string, // Query in the Lucene query string syntax
171
+	 *     from: int, // Starting offset (default: 0)
172
+	 *     size: int, // specifies a max number of results to get
173
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
174
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
175
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
176
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
177
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
178
+	 * } $params
179
+	 *
180
+	 * @throws NoNodeAvailableException if all the hosts are offline
181
+	 * @throws ClientResponseException if the status code of response is 4xx
182
+	 * @throws ServerResponseException if the status code of response is 5xx
183
+	 *
184
+	 * @return Elasticsearch|Promise
185
+	 */
186
+	public function list(array $params = [])
187
+	{
188
+		$url = '/_application/search_application';
189
+		$method = 'GET';
190
+		$url = $this->addQueryString($url, $params, ['q', 'from', 'size', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
191
+		$headers = ['Accept' => 'application/json'];
192
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
193
+		$request = $this->addOtelAttributes($params, [], $request, 'search_application.list');
194
+		return $this->client->sendRequest($request);
195
+	}
196
+	/**
197
+	 * Creates a behavioral analytics event for existing collection.
198
+	 *
199
+	 * @see http://todo.com/tbd
200
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
201
+	 *
202
+	 * @param array{
203
+	 *     collection_name: string, // (REQUIRED) The name of behavioral analytics collection
204
+	 *     event_type: string, // (REQUIRED) Behavioral analytics event type. Available: page_view, search, search_click
205
+	 *     debug: boolean, // If true, returns event information that will be stored
206
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
207
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
208
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
209
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
210
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
211
+	 *     body: array, // (REQUIRED) The event definition
212
+	 * } $params
213
+	 *
214
+	 * @throws MissingParameterException if a required parameter is missing
215
+	 * @throws NoNodeAvailableException if all the hosts are offline
216
+	 * @throws ClientResponseException if the status code of response is 4xx
217
+	 * @throws ServerResponseException if the status code of response is 5xx
218
+	 *
219
+	 * @return Elasticsearch|Promise
220
+	 */
221
+	public function postBehavioralAnalyticsEvent(array $params = [])
222
+	{
223
+		$this->checkRequiredParameters(['collection_name', 'event_type', 'body'], $params);
224
+		$url = '/_application/analytics/' . $this->encode($params['collection_name']) . '/event/' . $this->encode($params['event_type']);
225
+		$method = 'POST';
226
+		$url = $this->addQueryString($url, $params, ['debug', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
227
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
228
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
229
+		$request = $this->addOtelAttributes($params, ['collection_name', 'event_type'], $request, 'search_application.post_behavioral_analytics_event');
230
+		return $this->client->sendRequest($request);
231
+	}
232
+	/**
233
+	 * Creates or updates a search application.
234
+	 *
235
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html
236
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
237
+	 *
238
+	 * @param array{
239
+	 *     name: string, // (REQUIRED) The name of the search application to be created or updated
240
+	 *     create: boolean, // If true, requires that a search application with the specified resource_id does not already exist. (default: false)
241
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
242
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
243
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
244
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
245
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
246
+	 *     body: array, // (REQUIRED) The search application configuration, including `indices`
247
+	 * } $params
248
+	 *
249
+	 * @throws MissingParameterException if a required parameter is missing
250
+	 * @throws NoNodeAvailableException if all the hosts are offline
251
+	 * @throws ClientResponseException if the status code of response is 4xx
252
+	 * @throws ServerResponseException if the status code of response is 5xx
253
+	 *
254
+	 * @return Elasticsearch|Promise
255
+	 */
256
+	public function put(array $params = [])
257
+	{
258
+		$this->checkRequiredParameters(['name', 'body'], $params);
259
+		$url = '/_application/search_application/' . $this->encode($params['name']);
260
+		$method = 'PUT';
261
+		$url = $this->addQueryString($url, $params, ['create', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
262
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
263
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
264
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.put');
265
+		return $this->client->sendRequest($request);
266
+	}
267
+	/**
268
+	 * Creates a behavioral analytics collection.
269
+	 *
270
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html
271
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
272
+	 *
273
+	 * @param array{
274
+	 *     name: string, // (REQUIRED) The name of the analytics collection to be created or updated
275
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
276
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
277
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
278
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
279
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
280
+	 * } $params
281
+	 *
282
+	 * @throws MissingParameterException if a required parameter is missing
283
+	 * @throws NoNodeAvailableException if all the hosts are offline
284
+	 * @throws ClientResponseException if the status code of response is 4xx
285
+	 * @throws ServerResponseException if the status code of response is 5xx
286
+	 *
287
+	 * @return Elasticsearch|Promise
288
+	 */
289
+	public function putBehavioralAnalytics(array $params = [])
290
+	{
291
+		$this->checkRequiredParameters(['name'], $params);
292
+		$url = '/_application/analytics/' . $this->encode($params['name']);
293
+		$method = 'PUT';
294
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
295
+		$headers = ['Accept' => 'application/json'];
296
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
297
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.put_behavioral_analytics');
298
+		return $this->client->sendRequest($request);
299
+	}
300
+	/**
301
+	 * Renders a query for given search application search parameters
302
+	 *
303
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-render-query.html
304
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
305
+	 *
306
+	 * @param array{
307
+	 *     name: string, // (REQUIRED) The name of the search application to render the query for
308
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
309
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
310
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
311
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
312
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
313
+	 *     body: array, //  Search parameters, which will override any default search parameters defined in the search application template
314
+	 * } $params
315
+	 *
316
+	 * @throws MissingParameterException if a required parameter is missing
317
+	 * @throws NoNodeAvailableException if all the hosts are offline
318
+	 * @throws ClientResponseException if the status code of response is 4xx
319
+	 * @throws ServerResponseException if the status code of response is 5xx
320
+	 *
321
+	 * @return Elasticsearch|Promise
322
+	 */
323
+	public function renderQuery(array $params = [])
324
+	{
325
+		$this->checkRequiredParameters(['name'], $params);
326
+		$url = '/_application/search_application/' . $this->encode($params['name']) . '/_render_query';
327
+		$method = 'POST';
328
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
329
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
330
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
331
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.render_query');
332
+		return $this->client->sendRequest($request);
333
+	}
334
+	/**
335
+	 * Perform a search against a search application
336
+	 *
337
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html
338
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
339
+	 *
340
+	 * @param array{
341
+	 *     name: string, // (REQUIRED) The name of the search application to be searched
342
+	 *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
343
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
344
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
345
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
346
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
347
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
348
+	 *     body: array, //  Search parameters, including template parameters that override defaults
349
+	 * } $params
350
+	 *
351
+	 * @throws MissingParameterException if a required parameter is missing
352
+	 * @throws NoNodeAvailableException if all the hosts are offline
353
+	 * @throws ClientResponseException if the status code of response is 4xx
354
+	 * @throws ServerResponseException if the status code of response is 5xx
355
+	 *
356
+	 * @return Elasticsearch|Promise
357
+	 */
358
+	public function search(array $params = [])
359
+	{
360
+		$this->checkRequiredParameters(['name'], $params);
361
+		$url = '/_application/search_application/' . $this->encode($params['name']) . '/_search';
362
+		$method = empty($params['body']) ? 'GET' : 'POST';
363
+		$url = $this->addQueryString($url, $params, ['typed_keys', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
364
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
365
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
366
+		$request = $this->addOtelAttributes($params, ['name'], $request, 'search_application.search');
367
+		return $this->client->sendRequest($request);
368
+	}
369 369
 }
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function delete(array $params = [])
51 51
     {
52 52
         $this->checkRequiredParameters(['name'], $params);
53
-        $url = '/_application/search_application/' . $this->encode($params['name']);
53
+        $url = '/_application/search_application/'.$this->encode($params['name']);
54 54
         $method = 'DELETE';
55 55
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
56 56
         $headers = ['Accept' => 'application/json'];
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     public function deleteBehavioralAnalytics(array $params = [])
84 84
     {
85 85
         $this->checkRequiredParameters(['name'], $params);
86
-        $url = '/_application/analytics/' . $this->encode($params['name']);
86
+        $url = '/_application/analytics/'.$this->encode($params['name']);
87 87
         $method = 'DELETE';
88 88
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
89 89
         $headers = ['Accept' => 'application/json'];
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public function get(array $params = [])
117 117
     {
118 118
         $this->checkRequiredParameters(['name'], $params);
119
-        $url = '/_application/search_application/' . $this->encode($params['name']);
119
+        $url = '/_application/search_application/'.$this->encode($params['name']);
120 120
         $method = 'GET';
121 121
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
122 122
         $headers = ['Accept' => 'application/json'];
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     public function getBehavioralAnalytics(array $params = [])
149 149
     {
150 150
         if (isset($params['name'])) {
151
-            $url = '/_application/analytics/' . $this->encode($params['name']);
151
+            $url = '/_application/analytics/'.$this->encode($params['name']);
152 152
             $method = 'GET';
153 153
         } else {
154 154
             $url = '/_application/analytics';
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     public function postBehavioralAnalyticsEvent(array $params = [])
222 222
     {
223 223
         $this->checkRequiredParameters(['collection_name', 'event_type', 'body'], $params);
224
-        $url = '/_application/analytics/' . $this->encode($params['collection_name']) . '/event/' . $this->encode($params['event_type']);
224
+        $url = '/_application/analytics/'.$this->encode($params['collection_name']).'/event/'.$this->encode($params['event_type']);
225 225
         $method = 'POST';
226 226
         $url = $this->addQueryString($url, $params, ['debug', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
227 227
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     public function put(array $params = [])
257 257
     {
258 258
         $this->checkRequiredParameters(['name', 'body'], $params);
259
-        $url = '/_application/search_application/' . $this->encode($params['name']);
259
+        $url = '/_application/search_application/'.$this->encode($params['name']);
260 260
         $method = 'PUT';
261 261
         $url = $this->addQueryString($url, $params, ['create', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
262 262
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     public function putBehavioralAnalytics(array $params = [])
290 290
     {
291 291
         $this->checkRequiredParameters(['name'], $params);
292
-        $url = '/_application/analytics/' . $this->encode($params['name']);
292
+        $url = '/_application/analytics/'.$this->encode($params['name']);
293 293
         $method = 'PUT';
294 294
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
295 295
         $headers = ['Accept' => 'application/json'];
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
     public function renderQuery(array $params = [])
324 324
     {
325 325
         $this->checkRequiredParameters(['name'], $params);
326
-        $url = '/_application/search_application/' . $this->encode($params['name']) . '/_render_query';
326
+        $url = '/_application/search_application/'.$this->encode($params['name']).'/_render_query';
327 327
         $method = 'POST';
328 328
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
329 329
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
     public function search(array $params = [])
359 359
     {
360 360
         $this->checkRequiredParameters(['name'], $params);
361
-        $url = '/_application/search_application/' . $this->encode($params['name']) . '/_search';
361
+        $url = '/_application/search_application/'.$this->encode($params['name']).'/_search';
362 362
         $method = empty($params['body']) ? 'GET' : 'POST';
363 363
         $url = $this->addQueryString($url, $params, ['typed_keys', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
364 364
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/AsyncSearch.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function delete(array $params = [])
50 50
     {
51 51
         $this->checkRequiredParameters(['id'], $params);
52
-        $url = '/_async_search/' . $this->encode($params['id']);
52
+        $url = '/_async_search/'.$this->encode($params['id']);
53 53
         $method = 'DELETE';
54 54
         $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55 55
         $headers = ['Accept' => 'application/json'];
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     public function get(array $params = [])
83 83
     {
84 84
         $this->checkRequiredParameters(['id'], $params);
85
-        $url = '/_async_search/' . $this->encode($params['id']);
85
+        $url = '/_async_search/'.$this->encode($params['id']);
86 86
         $method = 'GET';
87 87
         $url = $this->addQueryString($url, $params, ['wait_for_completion_timeout', 'keep_alive', 'typed_keys', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
88 88
         $headers = ['Accept' => 'application/json'];
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function status(array $params = [])
114 114
     {
115 115
         $this->checkRequiredParameters(['id'], $params);
116
-        $url = '/_async_search/status/' . $this->encode($params['id']);
116
+        $url = '/_async_search/status/'.$this->encode($params['id']);
117 117
         $method = 'GET';
118 118
         $url = $this->addQueryString($url, $params, ['keep_alive', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
119 119
         $headers = ['Accept' => 'application/json'];
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     public function submit(array $params = [])
185 185
     {
186 186
         if (isset($params['index'])) {
187
-            $url = '/' . $this->encode($params['index']) . '/_async_search';
187
+            $url = '/'.$this->encode($params['index']).'/_async_search';
188 188
             $method = 'POST';
189 189
         } else {
190 190
             $url = '/_async_search';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class AsyncSearch extends AbstractEndpoint
27
-{
26
+class AsyncSearch extends AbstractEndpoint {
28 27
     /**
29 28
      * Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +178 added lines, -178 removed lines patch added patch discarded remove patch
@@ -25,182 +25,182 @@
 block discarded – undo
25 25
  */
26 26
 class AsyncSearch extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
32
-     *
33
-     * @param array{
34
-     *     id: string, // (REQUIRED) The async search ID
35
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
-     * } $params
41
-     *
42
-     * @throws MissingParameterException if a required parameter is missing
43
-     * @throws NoNodeAvailableException if all the hosts are offline
44
-     * @throws ClientResponseException if the status code of response is 4xx
45
-     * @throws ServerResponseException if the status code of response is 5xx
46
-     *
47
-     * @return Elasticsearch|Promise
48
-     */
49
-    public function delete(array $params = [])
50
-    {
51
-        $this->checkRequiredParameters(['id'], $params);
52
-        $url = '/_async_search/' . $this->encode($params['id']);
53
-        $method = 'DELETE';
54
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55
-        $headers = ['Accept' => 'application/json'];
56
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
57
-        $request = $this->addOtelAttributes($params, ['id'], $request, 'async_search.delete');
58
-        return $this->client->sendRequest($request);
59
-    }
60
-    /**
61
-     * Retrieves the results of a previously submitted async search request given its ID.
62
-     *
63
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
64
-     *
65
-     * @param array{
66
-     *     id: string, // (REQUIRED) The async search ID
67
-     *     wait_for_completion_timeout: time, // Specify the time that the request should block waiting for the final response
68
-     *     keep_alive: time, // Specify the time interval in which the results (partial or final) for this search will be available
69
-     *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
70
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
71
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
72
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
73
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
74
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
75
-     * } $params
76
-     *
77
-     * @throws MissingParameterException if a required parameter is missing
78
-     * @throws NoNodeAvailableException if all the hosts are offline
79
-     * @throws ClientResponseException if the status code of response is 4xx
80
-     * @throws ServerResponseException if the status code of response is 5xx
81
-     *
82
-     * @return Elasticsearch|Promise
83
-     */
84
-    public function get(array $params = [])
85
-    {
86
-        $this->checkRequiredParameters(['id'], $params);
87
-        $url = '/_async_search/' . $this->encode($params['id']);
88
-        $method = 'GET';
89
-        $url = $this->addQueryString($url, $params, ['wait_for_completion_timeout', 'keep_alive', 'typed_keys', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
90
-        $headers = ['Accept' => 'application/json'];
91
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
92
-        $request = $this->addOtelAttributes($params, ['id'], $request, 'async_search.get');
93
-        return $this->client->sendRequest($request);
94
-    }
95
-    /**
96
-     * Retrieves the status of a previously submitted async search request given its ID.
97
-     *
98
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
99
-     *
100
-     * @param array{
101
-     *     id: string, // (REQUIRED) The async search ID
102
-     *     keep_alive: time, // Specify the time interval in which the results (partial or final) for this search will be available
103
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
104
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
105
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
106
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
107
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
108
-     * } $params
109
-     *
110
-     * @throws MissingParameterException if a required parameter is missing
111
-     * @throws NoNodeAvailableException if all the hosts are offline
112
-     * @throws ClientResponseException if the status code of response is 4xx
113
-     * @throws ServerResponseException if the status code of response is 5xx
114
-     *
115
-     * @return Elasticsearch|Promise
116
-     */
117
-    public function status(array $params = [])
118
-    {
119
-        $this->checkRequiredParameters(['id'], $params);
120
-        $url = '/_async_search/status/' . $this->encode($params['id']);
121
-        $method = 'GET';
122
-        $url = $this->addQueryString($url, $params, ['keep_alive', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
123
-        $headers = ['Accept' => 'application/json'];
124
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
125
-        $request = $this->addOtelAttributes($params, ['id'], $request, 'async_search.status');
126
-        return $this->client->sendRequest($request);
127
-    }
128
-    /**
129
-     * Executes a search request asynchronously.
130
-     *
131
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
132
-     *
133
-     * @param array{
134
-     *     index: list, //  A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
135
-     *     wait_for_completion_timeout: time, // Specify the time that the request should block waiting for the final response
136
-     *     keep_on_completion: boolean, // Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)
137
-     *     batched_reduce_size: number, // The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available.
138
-     *     request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to true
139
-     *     analyzer: string, // The analyzer to use for the query string
140
-     *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
141
-     *     ccs_minimize_roundtrips: boolean, // When doing a cross-cluster search, setting it to true may improve overall search latency, particularly when searching clusters with a large number of shards. However, when set to true, the progress of searches on the remote clusters will not be received until the search finishes on all clusters.
142
-     *     default_operator: enum, // The default operator for query string query (AND or OR)
143
-     *     df: string, // The field to use as default where no field prefix is given in the query string
144
-     *     explain: boolean, // Specify whether to return detailed information about score computation as part of a hit
145
-     *     stored_fields: list, // A comma-separated list of stored fields to return as part of a hit
146
-     *     docvalue_fields: list, // A comma-separated list of fields to return as the docvalue representation of a field for each hit
147
-     *     from: number, // Starting offset (default: 0)
148
-     *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
149
-     *     ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
150
-     *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
151
-     *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
152
-     *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
153
-     *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
154
-     *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
155
-     *     q: string, // Query in the Lucene query string syntax
156
-     *     routing: list, // A comma-separated list of specific routing values
157
-     *     search_type: enum, // Search operation type
158
-     *     size: number, // Number of hits to return (default: 10)
159
-     *     sort: list, // A comma-separated list of <field>:<direction> pairs
160
-     *     _source: list, // True or false to return the _source field or not, or a list of fields to return
161
-     *     _source_excludes: list, // A list of fields to exclude from the returned _source field
162
-     *     _source_includes: list, // A list of fields to extract and return from the _source field
163
-     *     terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
164
-     *     stats: list, // Specific 'tag' of the request for logging and statistical purposes
165
-     *     suggest_field: string, // Specify which field to use for suggestions
166
-     *     suggest_mode: enum, // Specify suggest mode
167
-     *     suggest_size: number, // How many suggestions to return in response
168
-     *     suggest_text: string, // The source text for which the suggestions should be returned
169
-     *     timeout: time, // Explicit operation timeout
170
-     *     track_scores: boolean, // Whether to calculate and return scores even if they are not used for sorting
171
-     *     track_total_hits: boolean|long, // Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
172
-     *     allow_partial_search_results: boolean, // Indicate if an error should be returned if there is a partial search failure or timeout
173
-     *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
174
-     *     version: boolean, // Specify whether to return document version as part of a hit
175
-     *     seq_no_primary_term: boolean, // Specify whether to return sequence number and primary term of the last modification of each hit
176
-     *     max_concurrent_shard_requests: number, // The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
177
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
178
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
179
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
180
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
181
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
182
-     *     body: array, //  The search definition using the Query DSL
183
-     * } $params
184
-     *
185
-     * @throws NoNodeAvailableException if all the hosts are offline
186
-     * @throws ClientResponseException if the status code of response is 4xx
187
-     * @throws ServerResponseException if the status code of response is 5xx
188
-     *
189
-     * @return Elasticsearch|Promise
190
-     */
191
-    public function submit(array $params = [])
192
-    {
193
-        if (isset($params['index'])) {
194
-            $url = '/' . $this->encode($params['index']) . '/_async_search';
195
-            $method = 'POST';
196
-        } else {
197
-            $url = '/_async_search';
198
-            $method = 'POST';
199
-        }
200
-        $url = $this->addQueryString($url, $params, ['wait_for_completion_timeout', 'keep_on_completion', 'batched_reduce_size', 'request_cache', 'analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'rest_total_hits_as_int', 'q', 'routing', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'max_concurrent_shard_requests', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
201
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
202
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
203
-        $request = $this->addOtelAttributes($params, ['index'], $request, 'async_search.submit');
204
-        return $this->client->sendRequest($request);
205
-    }
28
+	/**
29
+	 * Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
32
+	 *
33
+	 * @param array{
34
+	 *     id: string, // (REQUIRED) The async search ID
35
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
+	 * } $params
41
+	 *
42
+	 * @throws MissingParameterException if a required parameter is missing
43
+	 * @throws NoNodeAvailableException if all the hosts are offline
44
+	 * @throws ClientResponseException if the status code of response is 4xx
45
+	 * @throws ServerResponseException if the status code of response is 5xx
46
+	 *
47
+	 * @return Elasticsearch|Promise
48
+	 */
49
+	public function delete(array $params = [])
50
+	{
51
+		$this->checkRequiredParameters(['id'], $params);
52
+		$url = '/_async_search/' . $this->encode($params['id']);
53
+		$method = 'DELETE';
54
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
55
+		$headers = ['Accept' => 'application/json'];
56
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
57
+		$request = $this->addOtelAttributes($params, ['id'], $request, 'async_search.delete');
58
+		return $this->client->sendRequest($request);
59
+	}
60
+	/**
61
+	 * Retrieves the results of a previously submitted async search request given its ID.
62
+	 *
63
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
64
+	 *
65
+	 * @param array{
66
+	 *     id: string, // (REQUIRED) The async search ID
67
+	 *     wait_for_completion_timeout: time, // Specify the time that the request should block waiting for the final response
68
+	 *     keep_alive: time, // Specify the time interval in which the results (partial or final) for this search will be available
69
+	 *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
70
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
71
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
72
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
73
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
74
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
75
+	 * } $params
76
+	 *
77
+	 * @throws MissingParameterException if a required parameter is missing
78
+	 * @throws NoNodeAvailableException if all the hosts are offline
79
+	 * @throws ClientResponseException if the status code of response is 4xx
80
+	 * @throws ServerResponseException if the status code of response is 5xx
81
+	 *
82
+	 * @return Elasticsearch|Promise
83
+	 */
84
+	public function get(array $params = [])
85
+	{
86
+		$this->checkRequiredParameters(['id'], $params);
87
+		$url = '/_async_search/' . $this->encode($params['id']);
88
+		$method = 'GET';
89
+		$url = $this->addQueryString($url, $params, ['wait_for_completion_timeout', 'keep_alive', 'typed_keys', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
90
+		$headers = ['Accept' => 'application/json'];
91
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
92
+		$request = $this->addOtelAttributes($params, ['id'], $request, 'async_search.get');
93
+		return $this->client->sendRequest($request);
94
+	}
95
+	/**
96
+	 * Retrieves the status of a previously submitted async search request given its ID.
97
+	 *
98
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
99
+	 *
100
+	 * @param array{
101
+	 *     id: string, // (REQUIRED) The async search ID
102
+	 *     keep_alive: time, // Specify the time interval in which the results (partial or final) for this search will be available
103
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
104
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
105
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
106
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
107
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
108
+	 * } $params
109
+	 *
110
+	 * @throws MissingParameterException if a required parameter is missing
111
+	 * @throws NoNodeAvailableException if all the hosts are offline
112
+	 * @throws ClientResponseException if the status code of response is 4xx
113
+	 * @throws ServerResponseException if the status code of response is 5xx
114
+	 *
115
+	 * @return Elasticsearch|Promise
116
+	 */
117
+	public function status(array $params = [])
118
+	{
119
+		$this->checkRequiredParameters(['id'], $params);
120
+		$url = '/_async_search/status/' . $this->encode($params['id']);
121
+		$method = 'GET';
122
+		$url = $this->addQueryString($url, $params, ['keep_alive', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
123
+		$headers = ['Accept' => 'application/json'];
124
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
125
+		$request = $this->addOtelAttributes($params, ['id'], $request, 'async_search.status');
126
+		return $this->client->sendRequest($request);
127
+	}
128
+	/**
129
+	 * Executes a search request asynchronously.
130
+	 *
131
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
132
+	 *
133
+	 * @param array{
134
+	 *     index: list, //  A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
135
+	 *     wait_for_completion_timeout: time, // Specify the time that the request should block waiting for the final response
136
+	 *     keep_on_completion: boolean, // Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)
137
+	 *     batched_reduce_size: number, // The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available.
138
+	 *     request_cache: boolean, // Specify if request cache should be used for this request or not, defaults to true
139
+	 *     analyzer: string, // The analyzer to use for the query string
140
+	 *     analyze_wildcard: boolean, // Specify whether wildcard and prefix queries should be analyzed (default: false)
141
+	 *     ccs_minimize_roundtrips: boolean, // When doing a cross-cluster search, setting it to true may improve overall search latency, particularly when searching clusters with a large number of shards. However, when set to true, the progress of searches on the remote clusters will not be received until the search finishes on all clusters.
142
+	 *     default_operator: enum, // The default operator for query string query (AND or OR)
143
+	 *     df: string, // The field to use as default where no field prefix is given in the query string
144
+	 *     explain: boolean, // Specify whether to return detailed information about score computation as part of a hit
145
+	 *     stored_fields: list, // A comma-separated list of stored fields to return as part of a hit
146
+	 *     docvalue_fields: list, // A comma-separated list of fields to return as the docvalue representation of a field for each hit
147
+	 *     from: number, // Starting offset (default: 0)
148
+	 *     ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
149
+	 *     ignore_throttled: boolean, // Whether specified concrete, expanded or aliased indices should be ignored when throttled
150
+	 *     allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
151
+	 *     expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
152
+	 *     lenient: boolean, // Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
153
+	 *     preference: string, // Specify the node or shard the operation should be performed on (default: random)
154
+	 *     rest_total_hits_as_int: boolean, // Indicates whether hits.total should be rendered as an integer or an object in the rest search response
155
+	 *     q: string, // Query in the Lucene query string syntax
156
+	 *     routing: list, // A comma-separated list of specific routing values
157
+	 *     search_type: enum, // Search operation type
158
+	 *     size: number, // Number of hits to return (default: 10)
159
+	 *     sort: list, // A comma-separated list of <field>:<direction> pairs
160
+	 *     _source: list, // True or false to return the _source field or not, or a list of fields to return
161
+	 *     _source_excludes: list, // A list of fields to exclude from the returned _source field
162
+	 *     _source_includes: list, // A list of fields to extract and return from the _source field
163
+	 *     terminate_after: number, // The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
164
+	 *     stats: list, // Specific 'tag' of the request for logging and statistical purposes
165
+	 *     suggest_field: string, // Specify which field to use for suggestions
166
+	 *     suggest_mode: enum, // Specify suggest mode
167
+	 *     suggest_size: number, // How many suggestions to return in response
168
+	 *     suggest_text: string, // The source text for which the suggestions should be returned
169
+	 *     timeout: time, // Explicit operation timeout
170
+	 *     track_scores: boolean, // Whether to calculate and return scores even if they are not used for sorting
171
+	 *     track_total_hits: boolean|long, // Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
172
+	 *     allow_partial_search_results: boolean, // Indicate if an error should be returned if there is a partial search failure or timeout
173
+	 *     typed_keys: boolean, // Specify whether aggregation and suggester names should be prefixed by their respective types in the response
174
+	 *     version: boolean, // Specify whether to return document version as part of a hit
175
+	 *     seq_no_primary_term: boolean, // Specify whether to return sequence number and primary term of the last modification of each hit
176
+	 *     max_concurrent_shard_requests: number, // The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
177
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
178
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
179
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
180
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
181
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
182
+	 *     body: array, //  The search definition using the Query DSL
183
+	 * } $params
184
+	 *
185
+	 * @throws NoNodeAvailableException if all the hosts are offline
186
+	 * @throws ClientResponseException if the status code of response is 4xx
187
+	 * @throws ServerResponseException if the status code of response is 5xx
188
+	 *
189
+	 * @return Elasticsearch|Promise
190
+	 */
191
+	public function submit(array $params = [])
192
+	{
193
+		if (isset($params['index'])) {
194
+			$url = '/' . $this->encode($params['index']) . '/_async_search';
195
+			$method = 'POST';
196
+		} else {
197
+			$url = '/_async_search';
198
+			$method = 'POST';
199
+		}
200
+		$url = $this->addQueryString($url, $params, ['wait_for_completion_timeout', 'keep_on_completion', 'batched_reduce_size', 'request_cache', 'analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'rest_total_hits_as_int', 'q', 'routing', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'max_concurrent_shard_requests', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
201
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
202
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
203
+		$request = $this->addOtelAttributes($params, ['index'], $request, 'async_search.submit');
204
+		return $this->client->sendRequest($request);
205
+	}
206 206
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Features.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Features extends AbstractEndpoint
27
-{
26
+class Features extends AbstractEndpoint {
28 27
     /**
29 28
      * Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
30 29
      *
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
Please login to merge, or discard this patch.
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -25,65 +25,65 @@
 block discarded – undo
25 25
  */
26 26
 class Features extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html
32
-     *
33
-     * @param array{
34
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
35
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
-     * } $params
41
-     *
42
-     * @throws NoNodeAvailableException if all the hosts are offline
43
-     * @throws ClientResponseException if the status code of response is 4xx
44
-     * @throws ServerResponseException if the status code of response is 5xx
45
-     *
46
-     * @return Elasticsearch|Promise
47
-     */
48
-    public function getFeatures(array $params = [])
49
-    {
50
-        $url = '/_features';
51
-        $method = 'GET';
52
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
53
-        $headers = ['Accept' => 'application/json'];
54
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
55
-        $request = $this->addOtelAttributes($params, [], $request, 'features.get_features');
56
-        return $this->client->sendRequest($request);
57
-    }
58
-    /**
59
-     * Resets the internal state of features, usually by deleting system indices
60
-     *
61
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
62
-     * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
63
-     *
64
-     * @param array{
65
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
66
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
67
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
68
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
69
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
70
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
71
-     * } $params
72
-     *
73
-     * @throws NoNodeAvailableException if all the hosts are offline
74
-     * @throws ClientResponseException if the status code of response is 4xx
75
-     * @throws ServerResponseException if the status code of response is 5xx
76
-     *
77
-     * @return Elasticsearch|Promise
78
-     */
79
-    public function resetFeatures(array $params = [])
80
-    {
81
-        $url = '/_features/_reset';
82
-        $method = 'POST';
83
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
84
-        $headers = ['Accept' => 'application/json'];
85
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
86
-        $request = $this->addOtelAttributes($params, [], $request, 'features.reset_features');
87
-        return $this->client->sendRequest($request);
88
-    }
28
+	/**
29
+	 * Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html
32
+	 *
33
+	 * @param array{
34
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
35
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
36
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
37
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
38
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
39
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
40
+	 * } $params
41
+	 *
42
+	 * @throws NoNodeAvailableException if all the hosts are offline
43
+	 * @throws ClientResponseException if the status code of response is 4xx
44
+	 * @throws ServerResponseException if the status code of response is 5xx
45
+	 *
46
+	 * @return Elasticsearch|Promise
47
+	 */
48
+	public function getFeatures(array $params = [])
49
+	{
50
+		$url = '/_features';
51
+		$method = 'GET';
52
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
53
+		$headers = ['Accept' => 'application/json'];
54
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
55
+		$request = $this->addOtelAttributes($params, [], $request, 'features.get_features');
56
+		return $this->client->sendRequest($request);
57
+	}
58
+	/**
59
+	 * Resets the internal state of features, usually by deleting system indices
60
+	 *
61
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
62
+	 * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
63
+	 *
64
+	 * @param array{
65
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
66
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
67
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
68
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
69
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
70
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
71
+	 * } $params
72
+	 *
73
+	 * @throws NoNodeAvailableException if all the hosts are offline
74
+	 * @throws ClientResponseException if the status code of response is 4xx
75
+	 * @throws ServerResponseException if the status code of response is 5xx
76
+	 *
77
+	 * @return Elasticsearch|Promise
78
+	 */
79
+	public function resetFeatures(array $params = [])
80
+	{
81
+		$url = '/_features/_reset';
82
+		$method = 'POST';
83
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
84
+		$headers = ['Accept' => 'application/json'];
85
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
86
+		$request = $this->addOtelAttributes($params, [], $request, 'features.reset_features');
87
+		return $this->client->sendRequest($request);
88
+	}
89 89
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Snapshot.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Snapshot extends AbstractEndpoint
27
-{
26
+class Snapshot extends AbstractEndpoint {
28 27
     /**
29 28
      * Removes stale data from repository.
30 29
      *
Please login to merge, or discard this patch.
Indentation   +448 added lines, -448 removed lines patch added patch discarded remove patch
@@ -25,452 +25,452 @@
 block discarded – undo
25 25
  */
26 26
 class Snapshot extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Removes stale data from repository.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/clean-up-snapshot-repo-api.html
32
-     *
33
-     * @param array{
34
-     *     repository: string, // (REQUIRED) A repository name
35
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
36
-     *     timeout: time, // Explicit operation timeout
37
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
38
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
39
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
40
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
41
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
42
-     * } $params
43
-     *
44
-     * @throws MissingParameterException if a required parameter is missing
45
-     * @throws NoNodeAvailableException if all the hosts are offline
46
-     * @throws ClientResponseException if the status code of response is 4xx
47
-     * @throws ServerResponseException if the status code of response is 5xx
48
-     *
49
-     * @return Elasticsearch|Promise
50
-     */
51
-    public function cleanupRepository(array $params = [])
52
-    {
53
-        $this->checkRequiredParameters(['repository'], $params);
54
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/_cleanup';
55
-        $method = 'POST';
56
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
57
-        $headers = ['Accept' => 'application/json'];
58
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
59
-        $request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.cleanup_repository');
60
-        return $this->client->sendRequest($request);
61
-    }
62
-    /**
63
-     * Clones indices from one snapshot into another snapshot in the same repository.
64
-     *
65
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
66
-     *
67
-     * @param array{
68
-     *     repository: string, // (REQUIRED) A repository name
69
-     *     snapshot: string, // (REQUIRED) The name of the snapshot to clone from
70
-     *     target_snapshot: string, // (REQUIRED) The name of the cloned snapshot to create
71
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
72
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
73
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
74
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
75
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
76
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
77
-     *     body: array, // (REQUIRED) The snapshot clone definition
78
-     * } $params
79
-     *
80
-     * @throws MissingParameterException if a required parameter is missing
81
-     * @throws NoNodeAvailableException if all the hosts are offline
82
-     * @throws ClientResponseException if the status code of response is 4xx
83
-     * @throws ServerResponseException if the status code of response is 5xx
84
-     *
85
-     * @return Elasticsearch|Promise
86
-     */
87
-    public function clone(array $params = [])
88
-    {
89
-        $this->checkRequiredParameters(['repository', 'snapshot', 'target_snapshot', 'body'], $params);
90
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']) . '/_clone/' . $this->encode($params['target_snapshot']);
91
-        $method = 'PUT';
92
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
93
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
94
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
95
-        $request = $this->addOtelAttributes($params, ['repository', 'snapshot', 'target_snapshot'], $request, 'snapshot.clone');
96
-        return $this->client->sendRequest($request);
97
-    }
98
-    /**
99
-     * Creates a snapshot in a repository.
100
-     *
101
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
102
-     *
103
-     * @param array{
104
-     *     repository: string, // (REQUIRED) A repository name
105
-     *     snapshot: string, // (REQUIRED) A snapshot name
106
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
107
-     *     wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
108
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
109
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
110
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
111
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
112
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
113
-     *     body: array, //  The snapshot definition
114
-     * } $params
115
-     *
116
-     * @throws MissingParameterException if a required parameter is missing
117
-     * @throws NoNodeAvailableException if all the hosts are offline
118
-     * @throws ClientResponseException if the status code of response is 4xx
119
-     * @throws ServerResponseException if the status code of response is 5xx
120
-     *
121
-     * @return Elasticsearch|Promise
122
-     */
123
-    public function create(array $params = [])
124
-    {
125
-        $this->checkRequiredParameters(['repository', 'snapshot'], $params);
126
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']);
127
-        $method = 'PUT';
128
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
129
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
130
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
131
-        $request = $this->addOtelAttributes($params, ['repository', 'snapshot'], $request, 'snapshot.create');
132
-        return $this->client->sendRequest($request);
133
-    }
134
-    /**
135
-     * Creates a repository.
136
-     *
137
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
138
-     *
139
-     * @param array{
140
-     *     repository: string, // (REQUIRED) A repository name
141
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
142
-     *     timeout: time, // Explicit operation timeout
143
-     *     verify: boolean, // Whether to verify the repository after creation
144
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
145
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
146
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
147
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
148
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
149
-     *     body: array, // (REQUIRED) The repository definition
150
-     * } $params
151
-     *
152
-     * @throws MissingParameterException if a required parameter is missing
153
-     * @throws NoNodeAvailableException if all the hosts are offline
154
-     * @throws ClientResponseException if the status code of response is 4xx
155
-     * @throws ServerResponseException if the status code of response is 5xx
156
-     *
157
-     * @return Elasticsearch|Promise
158
-     */
159
-    public function createRepository(array $params = [])
160
-    {
161
-        $this->checkRequiredParameters(['repository', 'body'], $params);
162
-        $url = '/_snapshot/' . $this->encode($params['repository']);
163
-        $method = 'PUT';
164
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'verify', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
165
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
166
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
167
-        $request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.create_repository');
168
-        return $this->client->sendRequest($request);
169
-    }
170
-    /**
171
-     * Deletes one or more snapshots.
172
-     *
173
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
174
-     *
175
-     * @param array{
176
-     *     repository: string, // (REQUIRED) A repository name
177
-     *     snapshot: list, // (REQUIRED) A comma-separated list of snapshot names
178
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
179
-     *     wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
180
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
181
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
182
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
183
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
184
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
185
-     * } $params
186
-     *
187
-     * @throws MissingParameterException if a required parameter is missing
188
-     * @throws NoNodeAvailableException if all the hosts are offline
189
-     * @throws ClientResponseException if the status code of response is 4xx
190
-     * @throws ServerResponseException if the status code of response is 5xx
191
-     *
192
-     * @return Elasticsearch|Promise
193
-     */
194
-    public function delete(array $params = [])
195
-    {
196
-        $this->checkRequiredParameters(['repository', 'snapshot'], $params);
197
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']);
198
-        $method = 'DELETE';
199
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
200
-        $headers = ['Accept' => 'application/json'];
201
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
202
-        $request = $this->addOtelAttributes($params, ['repository', 'snapshot'], $request, 'snapshot.delete');
203
-        return $this->client->sendRequest($request);
204
-    }
205
-    /**
206
-     * Deletes a repository.
207
-     *
208
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
209
-     *
210
-     * @param array{
211
-     *     repository: list, // (REQUIRED) Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported.
212
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
213
-     *     timeout: time, // Explicit operation timeout
214
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
215
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
216
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
217
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
218
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
219
-     * } $params
220
-     *
221
-     * @throws MissingParameterException if a required parameter is missing
222
-     * @throws NoNodeAvailableException if all the hosts are offline
223
-     * @throws ClientResponseException if the status code of response is 4xx
224
-     * @throws ServerResponseException if the status code of response is 5xx
225
-     *
226
-     * @return Elasticsearch|Promise
227
-     */
228
-    public function deleteRepository(array $params = [])
229
-    {
230
-        $this->checkRequiredParameters(['repository'], $params);
231
-        $url = '/_snapshot/' . $this->encode($params['repository']);
232
-        $method = 'DELETE';
233
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
234
-        $headers = ['Accept' => 'application/json'];
235
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
236
-        $request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.delete_repository');
237
-        return $this->client->sendRequest($request);
238
-    }
239
-    /**
240
-     * Returns information about a snapshot.
241
-     *
242
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
243
-     *
244
-     * @param array{
245
-     *     repository: string, // (REQUIRED) A repository name
246
-     *     snapshot: list, // (REQUIRED) A comma-separated list of snapshot names
247
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
248
-     *     ignore_unavailable: boolean, // Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
249
-     *     index_names: boolean, // Whether to include the name of each index in the snapshot. Defaults to true.
250
-     *     index_details: boolean, // Whether to include details of each index in the snapshot, if those details are available. Defaults to false.
251
-     *     include_repository: boolean, // Whether to include the repository name in the snapshot info. Defaults to true.
252
-     *     sort: enum, // Allows setting a sort order for the result. Defaults to start_time
253
-     *     size: integer, // Maximum number of snapshots to return. Defaults to 0 which means return all that match without limit.
254
-     *     order: enum, // Sort order
255
-     *     from_sort_value: string, // Value of the current sort column at which to start retrieval.
256
-     *     after: string, // Offset identifier to start pagination from as returned by the 'next' field in the response body.
257
-     *     offset: integer, // Numeric offset to start pagination based on the snapshots matching the request. Defaults to 0
258
-     *     slm_policy_filter: string, // Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Accepts wildcards. Use the special pattern '_none' to match snapshots without an SLM policy
259
-     *     verbose: boolean, // Whether to show verbose snapshot info or only show the basic info found in the repository index blob
260
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
261
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
262
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
263
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
264
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
265
-     * } $params
266
-     *
267
-     * @throws MissingParameterException if a required parameter is missing
268
-     * @throws NoNodeAvailableException if all the hosts are offline
269
-     * @throws ClientResponseException if the status code of response is 4xx
270
-     * @throws ServerResponseException if the status code of response is 5xx
271
-     *
272
-     * @return Elasticsearch|Promise
273
-     */
274
-    public function get(array $params = [])
275
-    {
276
-        $this->checkRequiredParameters(['repository', 'snapshot'], $params);
277
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']);
278
-        $method = 'GET';
279
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'ignore_unavailable', 'index_names', 'index_details', 'include_repository', 'sort', 'size', 'order', 'from_sort_value', 'after', 'offset', 'slm_policy_filter', 'verbose', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
280
-        $headers = ['Accept' => 'application/json'];
281
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
282
-        $request = $this->addOtelAttributes($params, ['repository', 'snapshot'], $request, 'snapshot.get');
283
-        return $this->client->sendRequest($request);
284
-    }
285
-    /**
286
-     * Returns information about a repository.
287
-     *
288
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
289
-     *
290
-     * @param array{
291
-     *     repository: list, //  A comma-separated list of repository names
292
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
293
-     *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
294
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
295
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
296
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
297
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
298
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
299
-     * } $params
300
-     *
301
-     * @throws NoNodeAvailableException if all the hosts are offline
302
-     * @throws ClientResponseException if the status code of response is 4xx
303
-     * @throws ServerResponseException if the status code of response is 5xx
304
-     *
305
-     * @return Elasticsearch|Promise
306
-     */
307
-    public function getRepository(array $params = [])
308
-    {
309
-        if (isset($params['repository'])) {
310
-            $url = '/_snapshot/' . $this->encode($params['repository']);
311
-            $method = 'GET';
312
-        } else {
313
-            $url = '/_snapshot';
314
-            $method = 'GET';
315
-        }
316
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
317
-        $headers = ['Accept' => 'application/json'];
318
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
319
-        $request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.get_repository');
320
-        return $this->client->sendRequest($request);
321
-    }
322
-    /**
323
-     * Analyzes a repository for correctness and performance
324
-     *
325
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
326
-     *
327
-     * @param array{
328
-     *     repository: string, // (REQUIRED) A repository name
329
-     *     blob_count: number, // Number of blobs to create during the test. Defaults to 100.
330
-     *     concurrency: number, // Number of operations to run concurrently during the test. Defaults to 10.
331
-     *     read_node_count: number, // Number of nodes on which to read a blob after writing. Defaults to 10.
332
-     *     early_read_node_count: number, // Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2.
333
-     *     seed: number, // Seed for the random number generator used to create the test workload. Defaults to a random value.
334
-     *     rare_action_probability: number, // Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02.
335
-     *     max_blob_size: string, // Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'.
336
-     *     max_total_data_size: string, // Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'.
337
-     *     timeout: time, // Explicit operation timeout. Defaults to '30s'.
338
-     *     detailed: boolean, // Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned.
339
-     *     rarely_abort_writes: boolean, // Whether to rarely abort writes before they complete. Defaults to 'true'.
340
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
341
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
342
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
343
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
344
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
345
-     * } $params
346
-     *
347
-     * @throws MissingParameterException if a required parameter is missing
348
-     * @throws NoNodeAvailableException if all the hosts are offline
349
-     * @throws ClientResponseException if the status code of response is 4xx
350
-     * @throws ServerResponseException if the status code of response is 5xx
351
-     *
352
-     * @return Elasticsearch|Promise
353
-     */
354
-    public function repositoryAnalyze(array $params = [])
355
-    {
356
-        $this->checkRequiredParameters(['repository'], $params);
357
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/_analyze';
358
-        $method = 'POST';
359
-        $url = $this->addQueryString($url, $params, ['blob_count', 'concurrency', 'read_node_count', 'early_read_node_count', 'seed', 'rare_action_probability', 'max_blob_size', 'max_total_data_size', 'timeout', 'detailed', 'rarely_abort_writes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
360
-        $headers = ['Accept' => 'application/json'];
361
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
362
-        $request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.repository_analyze');
363
-        return $this->client->sendRequest($request);
364
-    }
365
-    /**
366
-     * Restores a snapshot.
367
-     *
368
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
369
-     *
370
-     * @param array{
371
-     *     repository: string, // (REQUIRED) A repository name
372
-     *     snapshot: string, // (REQUIRED) A snapshot name
373
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
374
-     *     wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
375
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
376
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
377
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
378
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
379
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
380
-     *     body: array, //  Details of what to restore
381
-     * } $params
382
-     *
383
-     * @throws MissingParameterException if a required parameter is missing
384
-     * @throws NoNodeAvailableException if all the hosts are offline
385
-     * @throws ClientResponseException if the status code of response is 4xx
386
-     * @throws ServerResponseException if the status code of response is 5xx
387
-     *
388
-     * @return Elasticsearch|Promise
389
-     */
390
-    public function restore(array $params = [])
391
-    {
392
-        $this->checkRequiredParameters(['repository', 'snapshot'], $params);
393
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']) . '/_restore';
394
-        $method = 'POST';
395
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
396
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
397
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
398
-        $request = $this->addOtelAttributes($params, ['repository', 'snapshot'], $request, 'snapshot.restore');
399
-        return $this->client->sendRequest($request);
400
-    }
401
-    /**
402
-     * Returns information about the status of a snapshot.
403
-     *
404
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
405
-     *
406
-     * @param array{
407
-     *     repository: string, //  A repository name
408
-     *     snapshot: list, //  A comma-separated list of snapshot names
409
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
410
-     *     ignore_unavailable: boolean, // Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
411
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
412
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
413
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
414
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
415
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
416
-     * } $params
417
-     *
418
-     * @throws NoNodeAvailableException if all the hosts are offline
419
-     * @throws ClientResponseException if the status code of response is 4xx
420
-     * @throws ServerResponseException if the status code of response is 5xx
421
-     *
422
-     * @return Elasticsearch|Promise
423
-     */
424
-    public function status(array $params = [])
425
-    {
426
-        if (isset($params['repository']) && isset($params['snapshot'])) {
427
-            $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']) . '/_status';
428
-            $method = 'GET';
429
-        } elseif (isset($params['repository'])) {
430
-            $url = '/_snapshot/' . $this->encode($params['repository']) . '/_status';
431
-            $method = 'GET';
432
-        } else {
433
-            $url = '/_snapshot/_status';
434
-            $method = 'GET';
435
-        }
436
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'ignore_unavailable', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
437
-        $headers = ['Accept' => 'application/json'];
438
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
439
-        $request = $this->addOtelAttributes($params, ['repository', 'snapshot'], $request, 'snapshot.status');
440
-        return $this->client->sendRequest($request);
441
-    }
442
-    /**
443
-     * Verifies a repository.
444
-     *
445
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
446
-     *
447
-     * @param array{
448
-     *     repository: string, // (REQUIRED) A repository name
449
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
450
-     *     timeout: time, // Explicit operation timeout
451
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
452
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
453
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
454
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
455
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
456
-     * } $params
457
-     *
458
-     * @throws MissingParameterException if a required parameter is missing
459
-     * @throws NoNodeAvailableException if all the hosts are offline
460
-     * @throws ClientResponseException if the status code of response is 4xx
461
-     * @throws ServerResponseException if the status code of response is 5xx
462
-     *
463
-     * @return Elasticsearch|Promise
464
-     */
465
-    public function verifyRepository(array $params = [])
466
-    {
467
-        $this->checkRequiredParameters(['repository'], $params);
468
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/_verify';
469
-        $method = 'POST';
470
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
471
-        $headers = ['Accept' => 'application/json'];
472
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
473
-        $request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.verify_repository');
474
-        return $this->client->sendRequest($request);
475
-    }
28
+	/**
29
+	 * Removes stale data from repository.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/clean-up-snapshot-repo-api.html
32
+	 *
33
+	 * @param array{
34
+	 *     repository: string, // (REQUIRED) A repository name
35
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
36
+	 *     timeout: time, // Explicit operation timeout
37
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
38
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
39
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
40
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
41
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
42
+	 * } $params
43
+	 *
44
+	 * @throws MissingParameterException if a required parameter is missing
45
+	 * @throws NoNodeAvailableException if all the hosts are offline
46
+	 * @throws ClientResponseException if the status code of response is 4xx
47
+	 * @throws ServerResponseException if the status code of response is 5xx
48
+	 *
49
+	 * @return Elasticsearch|Promise
50
+	 */
51
+	public function cleanupRepository(array $params = [])
52
+	{
53
+		$this->checkRequiredParameters(['repository'], $params);
54
+		$url = '/_snapshot/' . $this->encode($params['repository']) . '/_cleanup';
55
+		$method = 'POST';
56
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
57
+		$headers = ['Accept' => 'application/json'];
58
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
59
+		$request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.cleanup_repository');
60
+		return $this->client->sendRequest($request);
61
+	}
62
+	/**
63
+	 * Clones indices from one snapshot into another snapshot in the same repository.
64
+	 *
65
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
66
+	 *
67
+	 * @param array{
68
+	 *     repository: string, // (REQUIRED) A repository name
69
+	 *     snapshot: string, // (REQUIRED) The name of the snapshot to clone from
70
+	 *     target_snapshot: string, // (REQUIRED) The name of the cloned snapshot to create
71
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
72
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
73
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
74
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
75
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
76
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
77
+	 *     body: array, // (REQUIRED) The snapshot clone definition
78
+	 * } $params
79
+	 *
80
+	 * @throws MissingParameterException if a required parameter is missing
81
+	 * @throws NoNodeAvailableException if all the hosts are offline
82
+	 * @throws ClientResponseException if the status code of response is 4xx
83
+	 * @throws ServerResponseException if the status code of response is 5xx
84
+	 *
85
+	 * @return Elasticsearch|Promise
86
+	 */
87
+	public function clone(array $params = [])
88
+	{
89
+		$this->checkRequiredParameters(['repository', 'snapshot', 'target_snapshot', 'body'], $params);
90
+		$url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']) . '/_clone/' . $this->encode($params['target_snapshot']);
91
+		$method = 'PUT';
92
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
93
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
94
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
95
+		$request = $this->addOtelAttributes($params, ['repository', 'snapshot', 'target_snapshot'], $request, 'snapshot.clone');
96
+		return $this->client->sendRequest($request);
97
+	}
98
+	/**
99
+	 * Creates a snapshot in a repository.
100
+	 *
101
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
102
+	 *
103
+	 * @param array{
104
+	 *     repository: string, // (REQUIRED) A repository name
105
+	 *     snapshot: string, // (REQUIRED) A snapshot name
106
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
107
+	 *     wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
108
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
109
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
110
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
111
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
112
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
113
+	 *     body: array, //  The snapshot definition
114
+	 * } $params
115
+	 *
116
+	 * @throws MissingParameterException if a required parameter is missing
117
+	 * @throws NoNodeAvailableException if all the hosts are offline
118
+	 * @throws ClientResponseException if the status code of response is 4xx
119
+	 * @throws ServerResponseException if the status code of response is 5xx
120
+	 *
121
+	 * @return Elasticsearch|Promise
122
+	 */
123
+	public function create(array $params = [])
124
+	{
125
+		$this->checkRequiredParameters(['repository', 'snapshot'], $params);
126
+		$url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']);
127
+		$method = 'PUT';
128
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
129
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
130
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
131
+		$request = $this->addOtelAttributes($params, ['repository', 'snapshot'], $request, 'snapshot.create');
132
+		return $this->client->sendRequest($request);
133
+	}
134
+	/**
135
+	 * Creates a repository.
136
+	 *
137
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
138
+	 *
139
+	 * @param array{
140
+	 *     repository: string, // (REQUIRED) A repository name
141
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
142
+	 *     timeout: time, // Explicit operation timeout
143
+	 *     verify: boolean, // Whether to verify the repository after creation
144
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
145
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
146
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
147
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
148
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
149
+	 *     body: array, // (REQUIRED) The repository definition
150
+	 * } $params
151
+	 *
152
+	 * @throws MissingParameterException if a required parameter is missing
153
+	 * @throws NoNodeAvailableException if all the hosts are offline
154
+	 * @throws ClientResponseException if the status code of response is 4xx
155
+	 * @throws ServerResponseException if the status code of response is 5xx
156
+	 *
157
+	 * @return Elasticsearch|Promise
158
+	 */
159
+	public function createRepository(array $params = [])
160
+	{
161
+		$this->checkRequiredParameters(['repository', 'body'], $params);
162
+		$url = '/_snapshot/' . $this->encode($params['repository']);
163
+		$method = 'PUT';
164
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'verify', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
165
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
166
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
167
+		$request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.create_repository');
168
+		return $this->client->sendRequest($request);
169
+	}
170
+	/**
171
+	 * Deletes one or more snapshots.
172
+	 *
173
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
174
+	 *
175
+	 * @param array{
176
+	 *     repository: string, // (REQUIRED) A repository name
177
+	 *     snapshot: list, // (REQUIRED) A comma-separated list of snapshot names
178
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
179
+	 *     wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
180
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
181
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
182
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
183
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
184
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
185
+	 * } $params
186
+	 *
187
+	 * @throws MissingParameterException if a required parameter is missing
188
+	 * @throws NoNodeAvailableException if all the hosts are offline
189
+	 * @throws ClientResponseException if the status code of response is 4xx
190
+	 * @throws ServerResponseException if the status code of response is 5xx
191
+	 *
192
+	 * @return Elasticsearch|Promise
193
+	 */
194
+	public function delete(array $params = [])
195
+	{
196
+		$this->checkRequiredParameters(['repository', 'snapshot'], $params);
197
+		$url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']);
198
+		$method = 'DELETE';
199
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
200
+		$headers = ['Accept' => 'application/json'];
201
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
202
+		$request = $this->addOtelAttributes($params, ['repository', 'snapshot'], $request, 'snapshot.delete');
203
+		return $this->client->sendRequest($request);
204
+	}
205
+	/**
206
+	 * Deletes a repository.
207
+	 *
208
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
209
+	 *
210
+	 * @param array{
211
+	 *     repository: list, // (REQUIRED) Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported.
212
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
213
+	 *     timeout: time, // Explicit operation timeout
214
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
215
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
216
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
217
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
218
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
219
+	 * } $params
220
+	 *
221
+	 * @throws MissingParameterException if a required parameter is missing
222
+	 * @throws NoNodeAvailableException if all the hosts are offline
223
+	 * @throws ClientResponseException if the status code of response is 4xx
224
+	 * @throws ServerResponseException if the status code of response is 5xx
225
+	 *
226
+	 * @return Elasticsearch|Promise
227
+	 */
228
+	public function deleteRepository(array $params = [])
229
+	{
230
+		$this->checkRequiredParameters(['repository'], $params);
231
+		$url = '/_snapshot/' . $this->encode($params['repository']);
232
+		$method = 'DELETE';
233
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
234
+		$headers = ['Accept' => 'application/json'];
235
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
236
+		$request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.delete_repository');
237
+		return $this->client->sendRequest($request);
238
+	}
239
+	/**
240
+	 * Returns information about a snapshot.
241
+	 *
242
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
243
+	 *
244
+	 * @param array{
245
+	 *     repository: string, // (REQUIRED) A repository name
246
+	 *     snapshot: list, // (REQUIRED) A comma-separated list of snapshot names
247
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
248
+	 *     ignore_unavailable: boolean, // Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
249
+	 *     index_names: boolean, // Whether to include the name of each index in the snapshot. Defaults to true.
250
+	 *     index_details: boolean, // Whether to include details of each index in the snapshot, if those details are available. Defaults to false.
251
+	 *     include_repository: boolean, // Whether to include the repository name in the snapshot info. Defaults to true.
252
+	 *     sort: enum, // Allows setting a sort order for the result. Defaults to start_time
253
+	 *     size: integer, // Maximum number of snapshots to return. Defaults to 0 which means return all that match without limit.
254
+	 *     order: enum, // Sort order
255
+	 *     from_sort_value: string, // Value of the current sort column at which to start retrieval.
256
+	 *     after: string, // Offset identifier to start pagination from as returned by the 'next' field in the response body.
257
+	 *     offset: integer, // Numeric offset to start pagination based on the snapshots matching the request. Defaults to 0
258
+	 *     slm_policy_filter: string, // Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Accepts wildcards. Use the special pattern '_none' to match snapshots without an SLM policy
259
+	 *     verbose: boolean, // Whether to show verbose snapshot info or only show the basic info found in the repository index blob
260
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
261
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
262
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
263
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
264
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
265
+	 * } $params
266
+	 *
267
+	 * @throws MissingParameterException if a required parameter is missing
268
+	 * @throws NoNodeAvailableException if all the hosts are offline
269
+	 * @throws ClientResponseException if the status code of response is 4xx
270
+	 * @throws ServerResponseException if the status code of response is 5xx
271
+	 *
272
+	 * @return Elasticsearch|Promise
273
+	 */
274
+	public function get(array $params = [])
275
+	{
276
+		$this->checkRequiredParameters(['repository', 'snapshot'], $params);
277
+		$url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']);
278
+		$method = 'GET';
279
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'ignore_unavailable', 'index_names', 'index_details', 'include_repository', 'sort', 'size', 'order', 'from_sort_value', 'after', 'offset', 'slm_policy_filter', 'verbose', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
280
+		$headers = ['Accept' => 'application/json'];
281
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
282
+		$request = $this->addOtelAttributes($params, ['repository', 'snapshot'], $request, 'snapshot.get');
283
+		return $this->client->sendRequest($request);
284
+	}
285
+	/**
286
+	 * Returns information about a repository.
287
+	 *
288
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
289
+	 *
290
+	 * @param array{
291
+	 *     repository: list, //  A comma-separated list of repository names
292
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
293
+	 *     local: boolean, // Return local information, do not retrieve the state from master node (default: false)
294
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
295
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
296
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
297
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
298
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
299
+	 * } $params
300
+	 *
301
+	 * @throws NoNodeAvailableException if all the hosts are offline
302
+	 * @throws ClientResponseException if the status code of response is 4xx
303
+	 * @throws ServerResponseException if the status code of response is 5xx
304
+	 *
305
+	 * @return Elasticsearch|Promise
306
+	 */
307
+	public function getRepository(array $params = [])
308
+	{
309
+		if (isset($params['repository'])) {
310
+			$url = '/_snapshot/' . $this->encode($params['repository']);
311
+			$method = 'GET';
312
+		} else {
313
+			$url = '/_snapshot';
314
+			$method = 'GET';
315
+		}
316
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'local', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
317
+		$headers = ['Accept' => 'application/json'];
318
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
319
+		$request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.get_repository');
320
+		return $this->client->sendRequest($request);
321
+	}
322
+	/**
323
+	 * Analyzes a repository for correctness and performance
324
+	 *
325
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
326
+	 *
327
+	 * @param array{
328
+	 *     repository: string, // (REQUIRED) A repository name
329
+	 *     blob_count: number, // Number of blobs to create during the test. Defaults to 100.
330
+	 *     concurrency: number, // Number of operations to run concurrently during the test. Defaults to 10.
331
+	 *     read_node_count: number, // Number of nodes on which to read a blob after writing. Defaults to 10.
332
+	 *     early_read_node_count: number, // Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2.
333
+	 *     seed: number, // Seed for the random number generator used to create the test workload. Defaults to a random value.
334
+	 *     rare_action_probability: number, // Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02.
335
+	 *     max_blob_size: string, // Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'.
336
+	 *     max_total_data_size: string, // Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'.
337
+	 *     timeout: time, // Explicit operation timeout. Defaults to '30s'.
338
+	 *     detailed: boolean, // Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned.
339
+	 *     rarely_abort_writes: boolean, // Whether to rarely abort writes before they complete. Defaults to 'true'.
340
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
341
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
342
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
343
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
344
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
345
+	 * } $params
346
+	 *
347
+	 * @throws MissingParameterException if a required parameter is missing
348
+	 * @throws NoNodeAvailableException if all the hosts are offline
349
+	 * @throws ClientResponseException if the status code of response is 4xx
350
+	 * @throws ServerResponseException if the status code of response is 5xx
351
+	 *
352
+	 * @return Elasticsearch|Promise
353
+	 */
354
+	public function repositoryAnalyze(array $params = [])
355
+	{
356
+		$this->checkRequiredParameters(['repository'], $params);
357
+		$url = '/_snapshot/' . $this->encode($params['repository']) . '/_analyze';
358
+		$method = 'POST';
359
+		$url = $this->addQueryString($url, $params, ['blob_count', 'concurrency', 'read_node_count', 'early_read_node_count', 'seed', 'rare_action_probability', 'max_blob_size', 'max_total_data_size', 'timeout', 'detailed', 'rarely_abort_writes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
360
+		$headers = ['Accept' => 'application/json'];
361
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
362
+		$request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.repository_analyze');
363
+		return $this->client->sendRequest($request);
364
+	}
365
+	/**
366
+	 * Restores a snapshot.
367
+	 *
368
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
369
+	 *
370
+	 * @param array{
371
+	 *     repository: string, // (REQUIRED) A repository name
372
+	 *     snapshot: string, // (REQUIRED) A snapshot name
373
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
374
+	 *     wait_for_completion: boolean, // Should this request wait until the operation has completed before returning
375
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
376
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
377
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
378
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
379
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
380
+	 *     body: array, //  Details of what to restore
381
+	 * } $params
382
+	 *
383
+	 * @throws MissingParameterException if a required parameter is missing
384
+	 * @throws NoNodeAvailableException if all the hosts are offline
385
+	 * @throws ClientResponseException if the status code of response is 4xx
386
+	 * @throws ServerResponseException if the status code of response is 5xx
387
+	 *
388
+	 * @return Elasticsearch|Promise
389
+	 */
390
+	public function restore(array $params = [])
391
+	{
392
+		$this->checkRequiredParameters(['repository', 'snapshot'], $params);
393
+		$url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']) . '/_restore';
394
+		$method = 'POST';
395
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
396
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
397
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
398
+		$request = $this->addOtelAttributes($params, ['repository', 'snapshot'], $request, 'snapshot.restore');
399
+		return $this->client->sendRequest($request);
400
+	}
401
+	/**
402
+	 * Returns information about the status of a snapshot.
403
+	 *
404
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
405
+	 *
406
+	 * @param array{
407
+	 *     repository: string, //  A repository name
408
+	 *     snapshot: list, //  A comma-separated list of snapshot names
409
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
410
+	 *     ignore_unavailable: boolean, // Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
411
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
412
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
413
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
414
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
415
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
416
+	 * } $params
417
+	 *
418
+	 * @throws NoNodeAvailableException if all the hosts are offline
419
+	 * @throws ClientResponseException if the status code of response is 4xx
420
+	 * @throws ServerResponseException if the status code of response is 5xx
421
+	 *
422
+	 * @return Elasticsearch|Promise
423
+	 */
424
+	public function status(array $params = [])
425
+	{
426
+		if (isset($params['repository']) && isset($params['snapshot'])) {
427
+			$url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']) . '/_status';
428
+			$method = 'GET';
429
+		} elseif (isset($params['repository'])) {
430
+			$url = '/_snapshot/' . $this->encode($params['repository']) . '/_status';
431
+			$method = 'GET';
432
+		} else {
433
+			$url = '/_snapshot/_status';
434
+			$method = 'GET';
435
+		}
436
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'ignore_unavailable', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
437
+		$headers = ['Accept' => 'application/json'];
438
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
439
+		$request = $this->addOtelAttributes($params, ['repository', 'snapshot'], $request, 'snapshot.status');
440
+		return $this->client->sendRequest($request);
441
+	}
442
+	/**
443
+	 * Verifies a repository.
444
+	 *
445
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
446
+	 *
447
+	 * @param array{
448
+	 *     repository: string, // (REQUIRED) A repository name
449
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
450
+	 *     timeout: time, // Explicit operation timeout
451
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
452
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
453
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
454
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
455
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
456
+	 * } $params
457
+	 *
458
+	 * @throws MissingParameterException if a required parameter is missing
459
+	 * @throws NoNodeAvailableException if all the hosts are offline
460
+	 * @throws ClientResponseException if the status code of response is 4xx
461
+	 * @throws ServerResponseException if the status code of response is 5xx
462
+	 *
463
+	 * @return Elasticsearch|Promise
464
+	 */
465
+	public function verifyRepository(array $params = [])
466
+	{
467
+		$this->checkRequiredParameters(['repository'], $params);
468
+		$url = '/_snapshot/' . $this->encode($params['repository']) . '/_verify';
469
+		$method = 'POST';
470
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
471
+		$headers = ['Accept' => 'application/json'];
472
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
473
+		$request = $this->addOtelAttributes($params, ['repository'], $request, 'snapshot.verify_repository');
474
+		return $this->client->sendRequest($request);
475
+	}
476 476
 }
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function cleanupRepository(array $params = [])
52 52
     {
53 53
         $this->checkRequiredParameters(['repository'], $params);
54
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/_cleanup';
54
+        $url = '/_snapshot/'.$this->encode($params['repository']).'/_cleanup';
55 55
         $method = 'POST';
56 56
         $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
57 57
         $headers = ['Accept' => 'application/json'];
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     public function clone(array $params = [])
88 88
     {
89 89
         $this->checkRequiredParameters(['repository', 'snapshot', 'target_snapshot', 'body'], $params);
90
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']) . '/_clone/' . $this->encode($params['target_snapshot']);
90
+        $url = '/_snapshot/'.$this->encode($params['repository']).'/'.$this->encode($params['snapshot']).'/_clone/'.$this->encode($params['target_snapshot']);
91 91
         $method = 'PUT';
92 92
         $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
93 93
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     public function create(array $params = [])
124 124
     {
125 125
         $this->checkRequiredParameters(['repository', 'snapshot'], $params);
126
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']);
126
+        $url = '/_snapshot/'.$this->encode($params['repository']).'/'.$this->encode($params['snapshot']);
127 127
         $method = 'PUT';
128 128
         $url = $this->addQueryString($url, $params, ['master_timeout', 'wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
129 129
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     public function createRepository(array $params = [])
160 160
     {
161 161
         $this->checkRequiredParameters(['repository', 'body'], $params);
162
-        $url = '/_snapshot/' . $this->encode($params['repository']);
162
+        $url = '/_snapshot/'.$this->encode($params['repository']);
163 163
         $method = 'PUT';
164 164
         $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'verify', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
165 165
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     public function delete(array $params = [])
195 195
     {
196 196
         $this->checkRequiredParameters(['repository', 'snapshot'], $params);
197
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']);
197
+        $url = '/_snapshot/'.$this->encode($params['repository']).'/'.$this->encode($params['snapshot']);
198 198
         $method = 'DELETE';
199 199
         $url = $this->addQueryString($url, $params, ['master_timeout', 'wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
200 200
         $headers = ['Accept' => 'application/json'];
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     public function deleteRepository(array $params = [])
229 229
     {
230 230
         $this->checkRequiredParameters(['repository'], $params);
231
-        $url = '/_snapshot/' . $this->encode($params['repository']);
231
+        $url = '/_snapshot/'.$this->encode($params['repository']);
232 232
         $method = 'DELETE';
233 233
         $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
234 234
         $headers = ['Accept' => 'application/json'];
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
     public function get(array $params = [])
275 275
     {
276 276
         $this->checkRequiredParameters(['repository', 'snapshot'], $params);
277
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']);
277
+        $url = '/_snapshot/'.$this->encode($params['repository']).'/'.$this->encode($params['snapshot']);
278 278
         $method = 'GET';
279 279
         $url = $this->addQueryString($url, $params, ['master_timeout', 'ignore_unavailable', 'index_names', 'index_details', 'include_repository', 'sort', 'size', 'order', 'from_sort_value', 'after', 'offset', 'slm_policy_filter', 'verbose', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
280 280
         $headers = ['Accept' => 'application/json'];
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     public function getRepository(array $params = [])
308 308
     {
309 309
         if (isset($params['repository'])) {
310
-            $url = '/_snapshot/' . $this->encode($params['repository']);
310
+            $url = '/_snapshot/'.$this->encode($params['repository']);
311 311
             $method = 'GET';
312 312
         } else {
313 313
             $url = '/_snapshot';
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
     public function repositoryAnalyze(array $params = [])
355 355
     {
356 356
         $this->checkRequiredParameters(['repository'], $params);
357
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/_analyze';
357
+        $url = '/_snapshot/'.$this->encode($params['repository']).'/_analyze';
358 358
         $method = 'POST';
359 359
         $url = $this->addQueryString($url, $params, ['blob_count', 'concurrency', 'read_node_count', 'early_read_node_count', 'seed', 'rare_action_probability', 'max_blob_size', 'max_total_data_size', 'timeout', 'detailed', 'rarely_abort_writes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
360 360
         $headers = ['Accept' => 'application/json'];
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
     public function restore(array $params = [])
391 391
     {
392 392
         $this->checkRequiredParameters(['repository', 'snapshot'], $params);
393
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']) . '/_restore';
393
+        $url = '/_snapshot/'.$this->encode($params['repository']).'/'.$this->encode($params['snapshot']).'/_restore';
394 394
         $method = 'POST';
395 395
         $url = $this->addQueryString($url, $params, ['master_timeout', 'wait_for_completion', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
396 396
         $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
@@ -424,10 +424,10 @@  discard block
 block discarded – undo
424 424
     public function status(array $params = [])
425 425
     {
426 426
         if (isset($params['repository']) && isset($params['snapshot'])) {
427
-            $url = '/_snapshot/' . $this->encode($params['repository']) . '/' . $this->encode($params['snapshot']) . '/_status';
427
+            $url = '/_snapshot/'.$this->encode($params['repository']).'/'.$this->encode($params['snapshot']).'/_status';
428 428
             $method = 'GET';
429 429
         } elseif (isset($params['repository'])) {
430
-            $url = '/_snapshot/' . $this->encode($params['repository']) . '/_status';
430
+            $url = '/_snapshot/'.$this->encode($params['repository']).'/_status';
431 431
             $method = 'GET';
432 432
         } else {
433 433
             $url = '/_snapshot/_status';
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
     public function verifyRepository(array $params = [])
466 466
     {
467 467
         $this->checkRequiredParameters(['repository'], $params);
468
-        $url = '/_snapshot/' . $this->encode($params['repository']) . '/_verify';
468
+        $url = '/_snapshot/'.$this->encode($params['repository']).'/_verify';
469 469
         $method = 'POST';
470 470
         $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
471 471
         $headers = ['Accept' => 'application/json'];
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Profiling.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Profiling extends AbstractEndpoint
27
-{
26
+class Profiling extends AbstractEndpoint {
28 27
     /**
29 28
      * Extracts a UI-optimized structure to render flamegraphs from Universal Profiling.
30 29
      *
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
Please login to merge, or discard this patch.
Indentation   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -25,129 +25,129 @@
 block discarded – undo
25 25
  */
26 26
 class Profiling extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Extracts a UI-optimized structure to render flamegraphs from Universal Profiling.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html
32
-     *
33
-     * @param array{
34
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
35
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
36
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
37
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
38
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
39
-     *     body: array, // (REQUIRED) The filter conditions for the flamegraph
40
-     * } $params
41
-     *
42
-     * @throws NoNodeAvailableException if all the hosts are offline
43
-     * @throws ClientResponseException if the status code of response is 4xx
44
-     * @throws ServerResponseException if the status code of response is 5xx
45
-     *
46
-     * @return Elasticsearch|Promise
47
-     */
48
-    public function flamegraph(array $params = [])
49
-    {
50
-        $this->checkRequiredParameters(['body'], $params);
51
-        $url = '/_profiling/flamegraph';
52
-        $method = 'POST';
53
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
54
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
55
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
56
-        $request = $this->addOtelAttributes($params, [], $request, 'profiling.flamegraph');
57
-        return $this->client->sendRequest($request);
58
-    }
59
-    /**
60
-     * Extracts raw stacktrace information from Universal Profiling.
61
-     *
62
-     * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html
63
-     *
64
-     * @param array{
65
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
66
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
67
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
68
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
69
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
70
-     *     body: array, // (REQUIRED) The filter conditions for stacktraces
71
-     * } $params
72
-     *
73
-     * @throws NoNodeAvailableException if all the hosts are offline
74
-     * @throws ClientResponseException if the status code of response is 4xx
75
-     * @throws ServerResponseException if the status code of response is 5xx
76
-     *
77
-     * @return Elasticsearch|Promise
78
-     */
79
-    public function stacktraces(array $params = [])
80
-    {
81
-        $this->checkRequiredParameters(['body'], $params);
82
-        $url = '/_profiling/stacktraces';
83
-        $method = 'POST';
84
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
85
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
86
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
87
-        $request = $this->addOtelAttributes($params, [], $request, 'profiling.stacktraces');
88
-        return $this->client->sendRequest($request);
89
-    }
90
-    /**
91
-     * Returns basic information about the status of Universal Profiling.
92
-     *
93
-     * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html
94
-     *
95
-     * @param array{
96
-     *     master_timeout: time, // Explicit operation timeout for connection to master node
97
-     *     timeout: time, // Explicit operation timeout
98
-     *     wait_for_resources_created: boolean, // Whether to return immediately or wait until resources have been created
99
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
100
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
101
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
102
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
103
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
104
-     * } $params
105
-     *
106
-     * @throws NoNodeAvailableException if all the hosts are offline
107
-     * @throws ClientResponseException if the status code of response is 4xx
108
-     * @throws ServerResponseException if the status code of response is 5xx
109
-     *
110
-     * @return Elasticsearch|Promise
111
-     */
112
-    public function status(array $params = [])
113
-    {
114
-        $url = '/_profiling/status';
115
-        $method = 'GET';
116
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'wait_for_resources_created', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
117
-        $headers = ['Accept' => 'application/json'];
118
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
119
-        $request = $this->addOtelAttributes($params, [], $request, 'profiling.status');
120
-        return $this->client->sendRequest($request);
121
-    }
122
-    /**
123
-     * Extracts a list of topN functions from Universal Profiling.
124
-     *
125
-     * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html
126
-     *
127
-     * @param array{
128
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
129
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
130
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
131
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
132
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
133
-     *     body: array, // (REQUIRED) The filter conditions for stacktraces
134
-     * } $params
135
-     *
136
-     * @throws NoNodeAvailableException if all the hosts are offline
137
-     * @throws ClientResponseException if the status code of response is 4xx
138
-     * @throws ServerResponseException if the status code of response is 5xx
139
-     *
140
-     * @return Elasticsearch|Promise
141
-     */
142
-    public function topnFunctions(array $params = [])
143
-    {
144
-        $this->checkRequiredParameters(['body'], $params);
145
-        $url = '/_profiling/topn/functions';
146
-        $method = 'POST';
147
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
148
-        $headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
149
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
150
-        $request = $this->addOtelAttributes($params, [], $request, 'profiling.topn_functions');
151
-        return $this->client->sendRequest($request);
152
-    }
28
+	/**
29
+	 * Extracts a UI-optimized structure to render flamegraphs from Universal Profiling.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html
32
+	 *
33
+	 * @param array{
34
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
35
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
36
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
37
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
38
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
39
+	 *     body: array, // (REQUIRED) The filter conditions for the flamegraph
40
+	 * } $params
41
+	 *
42
+	 * @throws NoNodeAvailableException if all the hosts are offline
43
+	 * @throws ClientResponseException if the status code of response is 4xx
44
+	 * @throws ServerResponseException if the status code of response is 5xx
45
+	 *
46
+	 * @return Elasticsearch|Promise
47
+	 */
48
+	public function flamegraph(array $params = [])
49
+	{
50
+		$this->checkRequiredParameters(['body'], $params);
51
+		$url = '/_profiling/flamegraph';
52
+		$method = 'POST';
53
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
54
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
55
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
56
+		$request = $this->addOtelAttributes($params, [], $request, 'profiling.flamegraph');
57
+		return $this->client->sendRequest($request);
58
+	}
59
+	/**
60
+	 * Extracts raw stacktrace information from Universal Profiling.
61
+	 *
62
+	 * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html
63
+	 *
64
+	 * @param array{
65
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
66
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
67
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
68
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
69
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
70
+	 *     body: array, // (REQUIRED) The filter conditions for stacktraces
71
+	 * } $params
72
+	 *
73
+	 * @throws NoNodeAvailableException if all the hosts are offline
74
+	 * @throws ClientResponseException if the status code of response is 4xx
75
+	 * @throws ServerResponseException if the status code of response is 5xx
76
+	 *
77
+	 * @return Elasticsearch|Promise
78
+	 */
79
+	public function stacktraces(array $params = [])
80
+	{
81
+		$this->checkRequiredParameters(['body'], $params);
82
+		$url = '/_profiling/stacktraces';
83
+		$method = 'POST';
84
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
85
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
86
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
87
+		$request = $this->addOtelAttributes($params, [], $request, 'profiling.stacktraces');
88
+		return $this->client->sendRequest($request);
89
+	}
90
+	/**
91
+	 * Returns basic information about the status of Universal Profiling.
92
+	 *
93
+	 * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html
94
+	 *
95
+	 * @param array{
96
+	 *     master_timeout: time, // Explicit operation timeout for connection to master node
97
+	 *     timeout: time, // Explicit operation timeout
98
+	 *     wait_for_resources_created: boolean, // Whether to return immediately or wait until resources have been created
99
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
100
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
101
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
102
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
103
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
104
+	 * } $params
105
+	 *
106
+	 * @throws NoNodeAvailableException if all the hosts are offline
107
+	 * @throws ClientResponseException if the status code of response is 4xx
108
+	 * @throws ServerResponseException if the status code of response is 5xx
109
+	 *
110
+	 * @return Elasticsearch|Promise
111
+	 */
112
+	public function status(array $params = [])
113
+	{
114
+		$url = '/_profiling/status';
115
+		$method = 'GET';
116
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'timeout', 'wait_for_resources_created', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
117
+		$headers = ['Accept' => 'application/json'];
118
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
119
+		$request = $this->addOtelAttributes($params, [], $request, 'profiling.status');
120
+		return $this->client->sendRequest($request);
121
+	}
122
+	/**
123
+	 * Extracts a list of topN functions from Universal Profiling.
124
+	 *
125
+	 * @see https://www.elastic.co/guide/en/observability/current/universal-profiling.html
126
+	 *
127
+	 * @param array{
128
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
129
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
130
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
131
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
132
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
133
+	 *     body: array, // (REQUIRED) The filter conditions for stacktraces
134
+	 * } $params
135
+	 *
136
+	 * @throws NoNodeAvailableException if all the hosts are offline
137
+	 * @throws ClientResponseException if the status code of response is 4xx
138
+	 * @throws ServerResponseException if the status code of response is 5xx
139
+	 *
140
+	 * @return Elasticsearch|Promise
141
+	 */
142
+	public function topnFunctions(array $params = [])
143
+	{
144
+		$this->checkRequiredParameters(['body'], $params);
145
+		$url = '/_profiling/topn/functions';
146
+		$method = 'POST';
147
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
148
+		$headers = ['Accept' => 'application/json', 'Content-Type' => 'application/json'];
149
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
150
+		$request = $this->addOtelAttributes($params, [], $request, 'profiling.topn_functions');
151
+		return $this->client->sendRequest($request);
152
+	}
153 153
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/DanglingIndices.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     public function deleteDanglingIndex(array $params = [])
53 53
     {
54 54
         $this->checkRequiredParameters(['index_uuid'], $params);
55
-        $url = '/_dangling/' . $this->encode($params['index_uuid']);
55
+        $url = '/_dangling/'.$this->encode($params['index_uuid']);
56 56
         $method = 'DELETE';
57 57
         $url = $this->addQueryString($url, $params, ['accept_data_loss', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
58 58
         $headers = ['Accept' => 'application/json'];
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     public function importDanglingIndex(array $params = [])
86 86
     {
87 87
         $this->checkRequiredParameters(['index_uuid'], $params);
88
-        $url = '/_dangling/' . $this->encode($params['index_uuid']);
88
+        $url = '/_dangling/'.$this->encode($params['index_uuid']);
89 89
         $method = 'POST';
90 90
         $url = $this->addQueryString($url, $params, ['accept_data_loss', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
91 91
         $headers = ['Accept' => 'application/json'];
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class DanglingIndices extends AbstractEndpoint
27
-{
26
+class DanglingIndices extends AbstractEndpoint {
28 27
     /**
29 28
      * Deletes the specified dangling index
30 29
      *
Please login to merge, or discard this patch.
Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -25,103 +25,103 @@
 block discarded – undo
25 25
  */
26 26
 class DanglingIndices extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Deletes the specified dangling index
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html
32
-     *
33
-     * @param array{
34
-     *     index_uuid: string, // (REQUIRED) The UUID of the dangling index
35
-     *     accept_data_loss: boolean, // Must be set to true in order to delete the dangling index
36
-     *     timeout: time, // Explicit operation timeout
37
-     *     master_timeout: time, // Specify timeout for connection to master
38
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
39
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
40
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
41
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
42
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
43
-     * } $params
44
-     *
45
-     * @throws MissingParameterException if a required parameter is missing
46
-     * @throws NoNodeAvailableException if all the hosts are offline
47
-     * @throws ClientResponseException if the status code of response is 4xx
48
-     * @throws ServerResponseException if the status code of response is 5xx
49
-     *
50
-     * @return Elasticsearch|Promise
51
-     */
52
-    public function deleteDanglingIndex(array $params = [])
53
-    {
54
-        $this->checkRequiredParameters(['index_uuid'], $params);
55
-        $url = '/_dangling/' . $this->encode($params['index_uuid']);
56
-        $method = 'DELETE';
57
-        $url = $this->addQueryString($url, $params, ['accept_data_loss', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
58
-        $headers = ['Accept' => 'application/json'];
59
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
60
-        $request = $this->addOtelAttributes($params, ['index_uuid'], $request, 'dangling_indices.delete_dangling_index');
61
-        return $this->client->sendRequest($request);
62
-    }
63
-    /**
64
-     * Imports the specified dangling index
65
-     *
66
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html
67
-     *
68
-     * @param array{
69
-     *     index_uuid: string, // (REQUIRED) The UUID of the dangling index
70
-     *     accept_data_loss: boolean, // Must be set to true in order to import the dangling index
71
-     *     timeout: time, // Explicit operation timeout
72
-     *     master_timeout: time, // Specify timeout for connection to master
73
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
74
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
75
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
76
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
77
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
78
-     * } $params
79
-     *
80
-     * @throws MissingParameterException if a required parameter is missing
81
-     * @throws NoNodeAvailableException if all the hosts are offline
82
-     * @throws ClientResponseException if the status code of response is 4xx
83
-     * @throws ServerResponseException if the status code of response is 5xx
84
-     *
85
-     * @return Elasticsearch|Promise
86
-     */
87
-    public function importDanglingIndex(array $params = [])
88
-    {
89
-        $this->checkRequiredParameters(['index_uuid'], $params);
90
-        $url = '/_dangling/' . $this->encode($params['index_uuid']);
91
-        $method = 'POST';
92
-        $url = $this->addQueryString($url, $params, ['accept_data_loss', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
93
-        $headers = ['Accept' => 'application/json'];
94
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
95
-        $request = $this->addOtelAttributes($params, ['index_uuid'], $request, 'dangling_indices.import_dangling_index');
96
-        return $this->client->sendRequest($request);
97
-    }
98
-    /**
99
-     * Returns all dangling indices.
100
-     *
101
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html
102
-     *
103
-     * @param array{
104
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
105
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
106
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
107
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
108
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
109
-     * } $params
110
-     *
111
-     * @throws NoNodeAvailableException if all the hosts are offline
112
-     * @throws ClientResponseException if the status code of response is 4xx
113
-     * @throws ServerResponseException if the status code of response is 5xx
114
-     *
115
-     * @return Elasticsearch|Promise
116
-     */
117
-    public function listDanglingIndices(array $params = [])
118
-    {
119
-        $url = '/_dangling';
120
-        $method = 'GET';
121
-        $url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
122
-        $headers = ['Accept' => 'application/json'];
123
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
124
-        $request = $this->addOtelAttributes($params, [], $request, 'dangling_indices.list_dangling_indices');
125
-        return $this->client->sendRequest($request);
126
-    }
28
+	/**
29
+	 * Deletes the specified dangling index
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html
32
+	 *
33
+	 * @param array{
34
+	 *     index_uuid: string, // (REQUIRED) The UUID of the dangling index
35
+	 *     accept_data_loss: boolean, // Must be set to true in order to delete the dangling index
36
+	 *     timeout: time, // Explicit operation timeout
37
+	 *     master_timeout: time, // Specify timeout for connection to master
38
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
39
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
40
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
41
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
42
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
43
+	 * } $params
44
+	 *
45
+	 * @throws MissingParameterException if a required parameter is missing
46
+	 * @throws NoNodeAvailableException if all the hosts are offline
47
+	 * @throws ClientResponseException if the status code of response is 4xx
48
+	 * @throws ServerResponseException if the status code of response is 5xx
49
+	 *
50
+	 * @return Elasticsearch|Promise
51
+	 */
52
+	public function deleteDanglingIndex(array $params = [])
53
+	{
54
+		$this->checkRequiredParameters(['index_uuid'], $params);
55
+		$url = '/_dangling/' . $this->encode($params['index_uuid']);
56
+		$method = 'DELETE';
57
+		$url = $this->addQueryString($url, $params, ['accept_data_loss', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
58
+		$headers = ['Accept' => 'application/json'];
59
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
60
+		$request = $this->addOtelAttributes($params, ['index_uuid'], $request, 'dangling_indices.delete_dangling_index');
61
+		return $this->client->sendRequest($request);
62
+	}
63
+	/**
64
+	 * Imports the specified dangling index
65
+	 *
66
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html
67
+	 *
68
+	 * @param array{
69
+	 *     index_uuid: string, // (REQUIRED) The UUID of the dangling index
70
+	 *     accept_data_loss: boolean, // Must be set to true in order to import the dangling index
71
+	 *     timeout: time, // Explicit operation timeout
72
+	 *     master_timeout: time, // Specify timeout for connection to master
73
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
74
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
75
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
76
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
77
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
78
+	 * } $params
79
+	 *
80
+	 * @throws MissingParameterException if a required parameter is missing
81
+	 * @throws NoNodeAvailableException if all the hosts are offline
82
+	 * @throws ClientResponseException if the status code of response is 4xx
83
+	 * @throws ServerResponseException if the status code of response is 5xx
84
+	 *
85
+	 * @return Elasticsearch|Promise
86
+	 */
87
+	public function importDanglingIndex(array $params = [])
88
+	{
89
+		$this->checkRequiredParameters(['index_uuid'], $params);
90
+		$url = '/_dangling/' . $this->encode($params['index_uuid']);
91
+		$method = 'POST';
92
+		$url = $this->addQueryString($url, $params, ['accept_data_loss', 'timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
93
+		$headers = ['Accept' => 'application/json'];
94
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
95
+		$request = $this->addOtelAttributes($params, ['index_uuid'], $request, 'dangling_indices.import_dangling_index');
96
+		return $this->client->sendRequest($request);
97
+	}
98
+	/**
99
+	 * Returns all dangling indices.
100
+	 *
101
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-gateway-dangling-indices.html
102
+	 *
103
+	 * @param array{
104
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
105
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
106
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
107
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
108
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
109
+	 * } $params
110
+	 *
111
+	 * @throws NoNodeAvailableException if all the hosts are offline
112
+	 * @throws ClientResponseException if the status code of response is 4xx
113
+	 * @throws ServerResponseException if the status code of response is 5xx
114
+	 *
115
+	 * @return Elasticsearch|Promise
116
+	 */
117
+	public function listDanglingIndices(array $params = [])
118
+	{
119
+		$url = '/_dangling';
120
+		$method = 'GET';
121
+		$url = $this->addQueryString($url, $params, ['pretty', 'human', 'error_trace', 'source', 'filter_path']);
122
+		$headers = ['Accept' => 'application/json'];
123
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
124
+		$request = $this->addOtelAttributes($params, [], $request, 'dangling_indices.list_dangling_indices');
125
+		return $this->client->sendRequest($request);
126
+	}
127 127
 }
Please login to merge, or discard this patch.
lib/Vendor/Elastic/Elasticsearch/Endpoints/Xpack.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 /**
24 24
  * @generated This file is generated, please do not edit
25 25
  */
26
-class Xpack extends AbstractEndpoint
27
-{
26
+class Xpack extends AbstractEndpoint {
28 27
     /**
29 28
      * Retrieves information about the installed X-Pack features.
30 29
      *
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * Elasticsearch B.V licenses this file to you under the MIT License.
12 12
  * See the LICENSE file in the project root for more information.
13 13
  */
14
-declare (strict_types=1);
14
+declare(strict_types=1);
15 15
 namespace OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Endpoints;
16 16
 
17 17
 use OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException;
Please login to merge, or discard this patch.
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -25,65 +25,65 @@
 block discarded – undo
25 25
  */
26 26
 class Xpack extends AbstractEndpoint
27 27
 {
28
-    /**
29
-     * Retrieves information about the installed X-Pack features.
30
-     *
31
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html
32
-     *
33
-     * @param array{
34
-     *     categories: list, // Comma-separated list of info categories. Can be any of: build, license, features
35
-     *     accept_enterprise: boolean, // If this param is used it must be set to true
36
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
37
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
38
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
39
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
40
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
41
-     * } $params
42
-     *
43
-     * @throws NoNodeAvailableException if all the hosts are offline
44
-     * @throws ClientResponseException if the status code of response is 4xx
45
-     * @throws ServerResponseException if the status code of response is 5xx
46
-     *
47
-     * @return Elasticsearch|Promise
48
-     */
49
-    public function info(array $params = [])
50
-    {
51
-        $url = '/_xpack';
52
-        $method = 'GET';
53
-        $url = $this->addQueryString($url, $params, ['categories', 'accept_enterprise', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
54
-        $headers = ['Accept' => 'application/json'];
55
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
56
-        $request = $this->addOtelAttributes($params, [], $request, 'xpack.info');
57
-        return $this->client->sendRequest($request);
58
-    }
59
-    /**
60
-     * Retrieves usage information about the installed X-Pack features.
61
-     *
62
-     * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html
63
-     *
64
-     * @param array{
65
-     *     master_timeout: time, // Specify timeout for watch write operation
66
-     *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
67
-     *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
68
-     *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
69
-     *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
70
-     *     filter_path: list, // A comma-separated list of filters used to reduce the response.
71
-     * } $params
72
-     *
73
-     * @throws NoNodeAvailableException if all the hosts are offline
74
-     * @throws ClientResponseException if the status code of response is 4xx
75
-     * @throws ServerResponseException if the status code of response is 5xx
76
-     *
77
-     * @return Elasticsearch|Promise
78
-     */
79
-    public function usage(array $params = [])
80
-    {
81
-        $url = '/_xpack/usage';
82
-        $method = 'GET';
83
-        $url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
84
-        $headers = ['Accept' => 'application/json'];
85
-        $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
86
-        $request = $this->addOtelAttributes($params, [], $request, 'xpack.usage');
87
-        return $this->client->sendRequest($request);
88
-    }
28
+	/**
29
+	 * Retrieves information about the installed X-Pack features.
30
+	 *
31
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html
32
+	 *
33
+	 * @param array{
34
+	 *     categories: list, // Comma-separated list of info categories. Can be any of: build, license, features
35
+	 *     accept_enterprise: boolean, // If this param is used it must be set to true
36
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
37
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
38
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
39
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
40
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
41
+	 * } $params
42
+	 *
43
+	 * @throws NoNodeAvailableException if all the hosts are offline
44
+	 * @throws ClientResponseException if the status code of response is 4xx
45
+	 * @throws ServerResponseException if the status code of response is 5xx
46
+	 *
47
+	 * @return Elasticsearch|Promise
48
+	 */
49
+	public function info(array $params = [])
50
+	{
51
+		$url = '/_xpack';
52
+		$method = 'GET';
53
+		$url = $this->addQueryString($url, $params, ['categories', 'accept_enterprise', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
54
+		$headers = ['Accept' => 'application/json'];
55
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
56
+		$request = $this->addOtelAttributes($params, [], $request, 'xpack.info');
57
+		return $this->client->sendRequest($request);
58
+	}
59
+	/**
60
+	 * Retrieves usage information about the installed X-Pack features.
61
+	 *
62
+	 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/usage-api.html
63
+	 *
64
+	 * @param array{
65
+	 *     master_timeout: time, // Specify timeout for watch write operation
66
+	 *     pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
67
+	 *     human: boolean, // Return human readable values for statistics. (DEFAULT: true)
68
+	 *     error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
69
+	 *     source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
70
+	 *     filter_path: list, // A comma-separated list of filters used to reduce the response.
71
+	 * } $params
72
+	 *
73
+	 * @throws NoNodeAvailableException if all the hosts are offline
74
+	 * @throws ClientResponseException if the status code of response is 4xx
75
+	 * @throws ServerResponseException if the status code of response is 5xx
76
+	 *
77
+	 * @return Elasticsearch|Promise
78
+	 */
79
+	public function usage(array $params = [])
80
+	{
81
+		$url = '/_xpack/usage';
82
+		$method = 'GET';
83
+		$url = $this->addQueryString($url, $params, ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']);
84
+		$headers = ['Accept' => 'application/json'];
85
+		$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
86
+		$request = $this->addOtelAttributes($params, [], $request, 'xpack.usage');
87
+		return $this->client->sendRequest($request);
88
+	}
89 89
 }
Please login to merge, or discard this patch.