@@ -31,17 +31,17 @@ class Autoscaling extends AbstractEndpoint
31
31
/**
32
32
* Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
33
33
*
34
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html
34
+ * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html
35
35
*
36
36
* @param array{
37
37
* 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.
45
45
* } $params
46
46
*
47
47
* @throws MissingParameterException if a required parameter is missing
@@ -51,8 +51,9 @@ class Autoscaling extends AbstractEndpoint
51
51
*
52
52
* @return Elasticsearch|Promise
53
53
*/
54
- public function deleteAutoscalingPolicy (array $ params = [] )
54
+ public function deleteAutoscalingPolicy (? array $ params = null )
55
55
{
56
+ $ params = $ params ?? [];
56
57
$ this ->checkRequiredParameters (['name ' ], $ params );
57
58
$ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
58
59
$ method = 'DELETE ' ;
@@ -70,15 +71,15 @@ public function deleteAutoscalingPolicy(array $params = [])
70
71
/**
71
72
* Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
72
73
*
73
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html
74
+ * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html
74
75
*
75
76
* @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.
82
83
* } $params
83
84
*
84
85
* @throws NoNodeAvailableException if all the hosts are offline
@@ -87,8 +88,9 @@ public function deleteAutoscalingPolicy(array $params = [])
87
88
*
88
89
* @return Elasticsearch|Promise
89
90
*/
90
- public function getAutoscalingCapacity (array $ params = [] )
91
+ public function getAutoscalingCapacity (? array $ params = null )
91
92
{
93
+ $ params = $ params ?? [];
92
94
$ url = '/_autoscaling/capacity ' ;
93
95
$ method = 'GET ' ;
94
96
@@ -105,16 +107,16 @@ public function getAutoscalingCapacity(array $params = [])
105
107
/**
106
108
* Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
107
109
*
108
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html
110
+ * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html
109
111
*
110
112
* @param array{
111
113
* 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.
118
120
* } $params
119
121
*
120
122
* @throws MissingParameterException if a required parameter is missing
@@ -124,8 +126,9 @@ public function getAutoscalingCapacity(array $params = [])
124
126
*
125
127
* @return Elasticsearch|Promise
126
128
*/
127
- public function getAutoscalingPolicy (array $ params = [] )
129
+ public function getAutoscalingPolicy (? array $ params = null )
128
130
{
131
+ $ params = $ params ?? [];
129
132
$ this ->checkRequiredParameters (['name ' ], $ params );
130
133
$ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
131
134
$ method = 'GET ' ;
@@ -143,18 +146,18 @@ public function getAutoscalingPolicy(array $params = [])
143
146
/**
144
147
* Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
145
148
*
146
- * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html
149
+ * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html
147
150
*
148
151
* @param array{
149
152
* 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.
158
161
* } $params
159
162
*
160
163
* @throws MissingParameterException if a required parameter is missing
@@ -164,8 +167,9 @@ public function getAutoscalingPolicy(array $params = [])
164
167
*
165
168
* @return Elasticsearch|Promise
166
169
*/
167
- public function putAutoscalingPolicy (array $ params = [] )
170
+ public function putAutoscalingPolicy (? array $ params = null )
168
171
{
172
+ $ params = $ params ?? [];
169
173
$ this ->checkRequiredParameters (['name ' ,'body ' ], $ params );
170
174
$ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
171
175
$ method = 'PUT ' ;
0 commit comments