Skip to content

Commit

Permalink
Merge pull request #880 from chenz4027/prepare-v-0.1.389
Browse files Browse the repository at this point in the history
Prepare v0.1.389 release
  • Loading branch information
andreadecorte committed Dec 12, 2023
2 parents 1c0b3ee + 66d765f commit 821b411
Show file tree
Hide file tree
Showing 6 changed files with 18,550 additions and 18,402 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Expand Up @@ -3,6 +3,9 @@
This document describes the relevant changes between releases of the OCM API
SDK.

## 0.1.389
- Update model version v0.0.342
- Add `Search` and `Order` methods to List `/api/clusters_mgmt/v1/clusters/{id}/node_pools`

## 0.1.388
- Update model version v0.0.341
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -27,7 +27,7 @@ export PATH := $(LOCAL_BIN_PATH):$(PATH)
export CGO_ENABLED=0

# Details of the model to use:
model_version:=v0.0.341
model_version:=v0.0.342
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
48 changes: 48 additions & 0 deletions clustersmgmt/v1/node_pools_client.go
Expand Up @@ -235,7 +235,9 @@ type NodePoolsListRequest struct {
path string
query url.Values
header http.Header
order *string
page *int
search *string
size *int
}

Expand All @@ -258,6 +260,26 @@ func (r *NodePoolsListRequest) Impersonate(user string) *NodePoolsListRequest {
return r
}

// Order sets the value of the 'order' parameter.
//
// Order criteria.
//
// The syntax of this parameter is similar to the syntax of the _order by_ clause of
// a SQL statement, but using the names of the attributes of the node pools instead of
// the names of the columns of a table. For example, in order to sort the node pools
// descending by identifier the value should be:
//
// ```sql
// id desc
// ```
//
// If the parameter isn't provided, or if the value is empty, then the order of the
// results is undefined.
func (r *NodePoolsListRequest) Order(value string) *NodePoolsListRequest {
r.order = &value
return r
}

// Page sets the value of the 'page' parameter.
//
// Index of the requested page, where one corresponds to the first page.
Expand All @@ -266,6 +288,26 @@ func (r *NodePoolsListRequest) Page(value int) *NodePoolsListRequest {
return r
}

// Search sets the value of the 'search' parameter.
//
// Search criteria.
//
// The syntax of this parameter is similar to the syntax of the _where_ clause of a
// SQL statement, but using the names of the attributes of the node pools instead of
// the names of the columns of a table. For example, in order to retrieve all the
// node pools with replicas of two the following is required:
//
// ```sql
// replicas = 2
// ```
//
// If the parameter isn't provided, or if the value is empty, then all the
// node pools that the user has permission to see will be returned.
func (r *NodePoolsListRequest) Search(value string) *NodePoolsListRequest {
r.search = &value
return r
}

// Size sets the value of the 'size' parameter.
//
// Number of items contained in the returned page.
Expand All @@ -285,9 +327,15 @@ func (r *NodePoolsListRequest) Send() (result *NodePoolsListResponse, err error)
// SendContext sends this request, waits for the response, and returns it.
func (r *NodePoolsListRequest) SendContext(ctx context.Context) (result *NodePoolsListResponse, err error) {
query := helpers.CopyQuery(r.query)
if r.order != nil {
helpers.AddValue(&query, "order", *r.order)
}
if r.page != nil {
helpers.AddValue(&query, "page", *r.page)
}
if r.search != nil {
helpers.AddValue(&query, "search", *r.search)
}
if r.size != nil {
helpers.AddValue(&query, "size", *r.size)
}
Expand Down

0 comments on commit 821b411

Please sign in to comment.