@@ -235,7 +235,9 @@ type NodePoolsListRequest struct {
235
235
path string
236
236
query url.Values
237
237
header http.Header
238
+ order * string
238
239
page * int
240
+ search * string
239
241
size * int
240
242
}
241
243
@@ -258,6 +260,26 @@ func (r *NodePoolsListRequest) Impersonate(user string) *NodePoolsListRequest {
258
260
return r
259
261
}
260
262
263
+ // Order sets the value of the 'order' parameter.
264
+ //
265
+ // Order criteria.
266
+ //
267
+ // The syntax of this parameter is similar to the syntax of the _order by_ clause of
268
+ // a SQL statement, but using the names of the attributes of the node pools instead of
269
+ // the names of the columns of a table. For example, in order to sort the node pools
270
+ // descending by identifier the value should be:
271
+ //
272
+ // ```sql
273
+ // id desc
274
+ // ```
275
+ //
276
+ // If the parameter isn't provided, or if the value is empty, then the order of the
277
+ // results is undefined.
278
+ func (r * NodePoolsListRequest ) Order (value string ) * NodePoolsListRequest {
279
+ r .order = & value
280
+ return r
281
+ }
282
+
261
283
// Page sets the value of the 'page' parameter.
262
284
//
263
285
// Index of the requested page, where one corresponds to the first page.
@@ -266,6 +288,26 @@ func (r *NodePoolsListRequest) Page(value int) *NodePoolsListRequest {
266
288
return r
267
289
}
268
290
291
+ // Search sets the value of the 'search' parameter.
292
+ //
293
+ // Search criteria.
294
+ //
295
+ // The syntax of this parameter is similar to the syntax of the _where_ clause of a
296
+ // SQL statement, but using the names of the attributes of the node pools instead of
297
+ // the names of the columns of a table. For example, in order to retrieve all the
298
+ // node pools with replicas of two the following is required:
299
+ //
300
+ // ```sql
301
+ // replicas = 2
302
+ // ```
303
+ //
304
+ // If the parameter isn't provided, or if the value is empty, then all the
305
+ // node pools that the user has permission to see will be returned.
306
+ func (r * NodePoolsListRequest ) Search (value string ) * NodePoolsListRequest {
307
+ r .search = & value
308
+ return r
309
+ }
310
+
269
311
// Size sets the value of the 'size' parameter.
270
312
//
271
313
// Number of items contained in the returned page.
@@ -285,9 +327,15 @@ func (r *NodePoolsListRequest) Send() (result *NodePoolsListResponse, err error)
285
327
// SendContext sends this request, waits for the response, and returns it.
286
328
func (r * NodePoolsListRequest ) SendContext (ctx context.Context ) (result * NodePoolsListResponse , err error ) {
287
329
query := helpers .CopyQuery (r .query )
330
+ if r .order != nil {
331
+ helpers .AddValue (& query , "order" , * r .order )
332
+ }
288
333
if r .page != nil {
289
334
helpers .AddValue (& query , "page" , * r .page )
290
335
}
336
+ if r .search != nil {
337
+ helpers .AddValue (& query , "search" , * r .search )
338
+ }
291
339
if r .size != nil {
292
340
helpers .AddValue (& query , "size" , * r .size )
293
341
}
0 commit comments