@@ -35,13 +35,13 @@ class Autoscaling extends AbstractEndpoint
3535 *
3636 * @param array{
3737 * name: string, // (REQUIRED) the name of the autoscaling policy
38- * master_timeout: time , // Timeout for processing on master node
39- * timeout: time , // Timeout for acknowledgement of update from all nodes in cluster
40- * pretty: boolean , // Pretty format the returned JSON response. (DEFAULT: false)
41- * human: boolean , // Return human readable values for statistics. (DEFAULT: true)
42- * error_trace: boolean , // Include the stack trace of returned errors. (DEFAULT: false)
43- * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
44- * filter_path: list , // A comma-separated list of filters used to reduce the response.
38+ * master_timeout?: int|string , // Timeout for processing on master node
39+ * timeout?: int|string , // Timeout for acknowledgement of update from all nodes in cluster
40+ * pretty?: bool , // Pretty format the returned JSON response. (DEFAULT: false)
41+ * human?: bool , // Return human readable values for statistics. (DEFAULT: true)
42+ * error_trace?: bool , // Include the stack trace of returned errors. (DEFAULT: false)
43+ * source? : string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
44+ * filter_path?: string|array<string> , // A comma-separated list of filters used to reduce the response.
4545 * } $params
4646 *
4747 * @throws MissingParameterException if a required parameter is missing
@@ -51,8 +51,9 @@ class Autoscaling extends AbstractEndpoint
5151 *
5252 * @return Elasticsearch|Promise
5353 */
54- public function deleteAutoscalingPolicy (array $ params = [] )
54+ public function deleteAutoscalingPolicy (? array $ params = null )
5555 {
56+ $ params = $ params ?? [];
5657 $ this ->checkRequiredParameters (['name ' ], $ params );
5758 $ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
5859 $ method = 'DELETE ' ;
@@ -73,12 +74,12 @@ public function deleteAutoscalingPolicy(array $params = [])
7374 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html
7475 *
7576 * @param array{
76- * master_timeout: time , // Timeout for processing on master node
77- * pretty: boolean , // Pretty format the returned JSON response. (DEFAULT: false)
78- * human: boolean , // Return human readable values for statistics. (DEFAULT: true)
79- * error_trace: boolean , // Include the stack trace of returned errors. (DEFAULT: false)
80- * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
81- * filter_path: list , // A comma-separated list of filters used to reduce the response.
77+ * master_timeout?: int|string , // Timeout for processing on master node
78+ * pretty?: bool , // Pretty format the returned JSON response. (DEFAULT: false)
79+ * human?: bool , // Return human readable values for statistics. (DEFAULT: true)
80+ * error_trace?: bool , // Include the stack trace of returned errors. (DEFAULT: false)
81+ * source? : string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
82+ * filter_path?: string|array<string> , // A comma-separated list of filters used to reduce the response.
8283 * } $params
8384 *
8485 * @throws NoNodeAvailableException if all the hosts are offline
@@ -87,8 +88,9 @@ public function deleteAutoscalingPolicy(array $params = [])
8788 *
8889 * @return Elasticsearch|Promise
8990 */
90- public function getAutoscalingCapacity (array $ params = [] )
91+ public function getAutoscalingCapacity (? array $ params = null )
9192 {
93+ $ params = $ params ?? [];
9294 $ url = '/_autoscaling/capacity ' ;
9395 $ method = 'GET ' ;
9496
@@ -109,12 +111,12 @@ public function getAutoscalingCapacity(array $params = [])
109111 *
110112 * @param array{
111113 * name: string, // (REQUIRED) the name of the autoscaling policy
112- * master_timeout: time , // Timeout for processing on master node
113- * pretty: boolean , // Pretty format the returned JSON response. (DEFAULT: false)
114- * human: boolean , // Return human readable values for statistics. (DEFAULT: true)
115- * error_trace: boolean , // Include the stack trace of returned errors. (DEFAULT: false)
116- * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
117- * filter_path: list , // A comma-separated list of filters used to reduce the response.
114+ * master_timeout?: int|string , // Timeout for processing on master node
115+ * pretty?: bool , // Pretty format the returned JSON response. (DEFAULT: false)
116+ * human?: bool , // Return human readable values for statistics. (DEFAULT: true)
117+ * error_trace?: bool , // Include the stack trace of returned errors. (DEFAULT: false)
118+ * source? : string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
119+ * filter_path?: string|array<string> , // A comma-separated list of filters used to reduce the response.
118120 * } $params
119121 *
120122 * @throws MissingParameterException if a required parameter is missing
@@ -124,8 +126,9 @@ public function getAutoscalingCapacity(array $params = [])
124126 *
125127 * @return Elasticsearch|Promise
126128 */
127- public function getAutoscalingPolicy (array $ params = [] )
129+ public function getAutoscalingPolicy (? array $ params = null )
128130 {
131+ $ params = $ params ?? [];
129132 $ this ->checkRequiredParameters (['name ' ], $ params );
130133 $ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
131134 $ method = 'GET ' ;
@@ -147,14 +150,14 @@ public function getAutoscalingPolicy(array $params = [])
147150 *
148151 * @param array{
149152 * name: string, // (REQUIRED) the name of the autoscaling policy
150- * master_timeout: time , // Timeout for processing on master node
151- * timeout: time , // Timeout for acknowledgement of update from all nodes in cluster
152- * pretty: boolean , // Pretty format the returned JSON response. (DEFAULT: false)
153- * human: boolean , // Return human readable values for statistics. (DEFAULT: true)
154- * error_trace: boolean , // Include the stack trace of returned errors. (DEFAULT: false)
155- * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
156- * filter_path: list , // A comma-separated list of filters used to reduce the response.
157- * body: array, // (REQUIRED) the specification of the autoscaling policy
153+ * master_timeout?: int|string , // Timeout for processing on master node
154+ * timeout?: int|string , // Timeout for acknowledgement of update from all nodes in cluster
155+ * pretty?: bool , // Pretty format the returned JSON response. (DEFAULT: false)
156+ * human?: bool , // Return human readable values for statistics. (DEFAULT: true)
157+ * error_trace?: bool , // Include the stack trace of returned errors. (DEFAULT: false)
158+ * source? : string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
159+ * filter_path?: string|array<string> , // A comma-separated list of filters used to reduce the response.
160+ * body: string| array<mixed> , // (REQUIRED) the specification of the autoscaling policy. If body is a string must be a valid JSON.
158161 * } $params
159162 *
160163 * @throws MissingParameterException if a required parameter is missing
@@ -164,8 +167,9 @@ public function getAutoscalingPolicy(array $params = [])
164167 *
165168 * @return Elasticsearch|Promise
166169 */
167- public function putAutoscalingPolicy (array $ params = [] )
170+ public function putAutoscalingPolicy (? array $ params = null )
168171 {
172+ $ params = $ params ?? [];
169173 $ this ->checkRequiredParameters (['name ' ,'body ' ], $ params );
170174 $ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
171175 $ method = 'PUT ' ;
0 commit comments