Skip to content

Commit

Permalink
Merge pull request #941 from ahitacat/bump-version
Browse files Browse the repository at this point in the history
chore: update model to v0.0.367
  • Loading branch information
mnecas authored Apr 10, 2024
2 parents 9edb954 + d6662df commit 51746eb
Show file tree
Hide file tree
Showing 17 changed files with 15,635 additions and 13,700 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
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.366
model_version:=v0.0.367
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
52 changes: 48 additions & 4 deletions clustersmgmt/v1/break_glass_credentials_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ func (c *BreakGlassCredentialsClient) Delete() *BreakGlassCredentialsDeleteReque
// List creates a request for the 'list' method.
//
// Retrieves the list of break glass credentials.
//
// IMPORTANT: This collection doesn't currently support paging or searching, so the returned
// `page` will always be 1 and `size` and `total` will always be the total number of break
// glass credentials for this cluster.
func (c *BreakGlassCredentialsClient) List() *BreakGlassCredentialsListRequest {
return &BreakGlassCredentialsListRequest{
transport: c.transport,
Expand Down Expand Up @@ -356,7 +352,9 @@ type BreakGlassCredentialsListRequest struct {
path string
query url.Values
header http.Header
order *string
page *int
search *string
size *int
}

Expand All @@ -379,6 +377,26 @@ func (r *BreakGlassCredentialsListRequest) Impersonate(user string) *BreakGlassC
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 break glass credentials
// instead of the the names of the columns of a table. For example, in order to sort the
// credentials 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 *BreakGlassCredentialsListRequest) Order(value string) *BreakGlassCredentialsListRequest {
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 @@ -387,6 +405,26 @@ func (r *BreakGlassCredentialsListRequest) Page(value int) *BreakGlassCredential
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 break glass credentials
// instead of the names of the columns of a table. For example, in order to retrieve all
// the credentials with a specific username and status the following is required:
//
// ```sql
// username='user1' AND status='expired'
// ```
//
// If the parameter isn't provided, or if the value is empty, then all the
// break glass credentials that the user has permission to see will be returned.
func (r *BreakGlassCredentialsListRequest) Search(value string) *BreakGlassCredentialsListRequest {
r.search = &value
return r
}

// Size sets the value of the 'size' parameter.
//
// Number of items contained in the returned page.
Expand All @@ -406,9 +444,15 @@ func (r *BreakGlassCredentialsListRequest) Send() (result *BreakGlassCredentials
// SendContext sends this request, waits for the response, and returns it.
func (r *BreakGlassCredentialsListRequest) SendContext(ctx context.Context) (result *BreakGlassCredentialsListResponse, 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
286 changes: 286 additions & 0 deletions clustersmgmt/v1/load_balancer_quota_values_client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
/*
Copyright (c) 2020 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
// your changes will be lost when the file is generated again.

package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1

import (
"bufio"
"context"
"io"
"net/http"
"net/url"

"github.com/openshift-online/ocm-sdk-go/errors"
"github.com/openshift-online/ocm-sdk-go/helpers"
)

// LoadBalancerQuotaValuesClient is the client of the 'load_balancer_quota_values' resource.
//
// Manages load balancer quota values.
type LoadBalancerQuotaValuesClient struct {
transport http.RoundTripper
path string
}

// NewLoadBalancerQuotaValuesClient creates a new client for the 'load_balancer_quota_values'
// resource using the given transport to send the requests and receive the
// responses.
func NewLoadBalancerQuotaValuesClient(transport http.RoundTripper, path string) *LoadBalancerQuotaValuesClient {
return &LoadBalancerQuotaValuesClient{
transport: transport,
path: path,
}
}

// List creates a request for the 'list' method.
//
// Retrieves the list of Load Balancer Quota Values.
func (c *LoadBalancerQuotaValuesClient) List() *LoadBalancerQuotaValuesListRequest {
return &LoadBalancerQuotaValuesListRequest{
transport: c.transport,
path: c.path,
}
}

// LoadBalancerQuotaValuesListRequest is the request for the 'list' method.
type LoadBalancerQuotaValuesListRequest struct {
transport http.RoundTripper
path string
query url.Values
header http.Header
page *int
size *int
}

// Parameter adds a query parameter.
func (r *LoadBalancerQuotaValuesListRequest) Parameter(name string, value interface{}) *LoadBalancerQuotaValuesListRequest {
helpers.AddValue(&r.query, name, value)
return r
}

// Header adds a request header.
func (r *LoadBalancerQuotaValuesListRequest) Header(name string, value interface{}) *LoadBalancerQuotaValuesListRequest {
helpers.AddHeader(&r.header, name, value)
return r
}

// Impersonate wraps requests on behalf of another user.
// Note: Services that do not support this feature may silently ignore this call.
func (r *LoadBalancerQuotaValuesListRequest) Impersonate(user string) *LoadBalancerQuotaValuesListRequest {
helpers.AddImpersonationHeader(&r.header, user)
return r
}

// Page sets the value of the 'page' parameter.
//
// Index of the requested page, where one corresponds to the first page.
func (r *LoadBalancerQuotaValuesListRequest) Page(value int) *LoadBalancerQuotaValuesListRequest {
r.page = &value
return r
}

// Size sets the value of the 'size' parameter.
//
// Number of items contained in the returned page.
func (r *LoadBalancerQuotaValuesListRequest) Size(value int) *LoadBalancerQuotaValuesListRequest {
r.size = &value
return r
}

// Send sends this request, waits for the response, and returns it.
//
// This is a potentially lengthy operation, as it requires network communication.
// Consider using a context and the SendContext method.
func (r *LoadBalancerQuotaValuesListRequest) Send() (result *LoadBalancerQuotaValuesListResponse, err error) {
return r.SendContext(context.Background())
}

// SendContext sends this request, waits for the response, and returns it.
func (r *LoadBalancerQuotaValuesListRequest) SendContext(ctx context.Context) (result *LoadBalancerQuotaValuesListResponse, err error) {
query := helpers.CopyQuery(r.query)
if r.page != nil {
helpers.AddValue(&query, "page", *r.page)
}
if r.size != nil {
helpers.AddValue(&query, "size", *r.size)
}
header := helpers.CopyHeader(r.header)
uri := &url.URL{
Path: r.path,
RawQuery: query.Encode(),
}
request := &http.Request{
Method: "GET",
URL: uri,
Header: header,
}
if ctx != nil {
request = request.WithContext(ctx)
}
response, err := r.transport.RoundTrip(request)
if err != nil {
return
}
defer response.Body.Close()
result = &LoadBalancerQuotaValuesListResponse{}
result.status = response.StatusCode
result.header = response.Header
reader := bufio.NewReader(response.Body)
_, err = reader.Peek(1)
if err == io.EOF {
err = nil
return
}
if result.status >= 400 {
result.err, err = errors.UnmarshalErrorStatus(reader, result.status)
if err != nil {
return
}
err = result.err
return
}
err = readLoadBalancerQuotaValuesListResponse(result, reader)
if err != nil {
return
}
return
}

// LoadBalancerQuotaValuesListResponse is the response for the 'list' method.
type LoadBalancerQuotaValuesListResponse struct {
status int
header http.Header
err *errors.Error
items []int
page *int
size *int
total *int
}

// Status returns the response status code.
func (r *LoadBalancerQuotaValuesListResponse) Status() int {
if r == nil {
return 0
}
return r.status
}

// Header returns header of the response.
func (r *LoadBalancerQuotaValuesListResponse) Header() http.Header {
if r == nil {
return nil
}
return r.header
}

// Error returns the response error.
func (r *LoadBalancerQuotaValuesListResponse) Error() *errors.Error {
if r == nil {
return nil
}
return r.err
}

// Items returns the value of the 'items' parameter.
//
// Retrieved list of values.
func (r *LoadBalancerQuotaValuesListResponse) Items() []int {
if r == nil {
return nil
}
return r.items
}

// GetItems returns the value of the 'items' parameter and
// a flag indicating if the parameter has a value.
//
// Retrieved list of values.
func (r *LoadBalancerQuotaValuesListResponse) GetItems() (value []int, ok bool) {
ok = r != nil && r.items != nil
if ok {
value = r.items
}
return
}

// Page returns the value of the 'page' parameter.
//
// Index of the requested page, where one corresponds to the first page.
func (r *LoadBalancerQuotaValuesListResponse) Page() int {
if r != nil && r.page != nil {
return *r.page
}
return 0
}

// GetPage returns the value of the 'page' parameter and
// a flag indicating if the parameter has a value.
//
// Index of the requested page, where one corresponds to the first page.
func (r *LoadBalancerQuotaValuesListResponse) GetPage() (value int, ok bool) {
ok = r != nil && r.page != nil
if ok {
value = *r.page
}
return
}

// Size returns the value of the 'size' parameter.
//
// Number of items contained in the returned page.
func (r *LoadBalancerQuotaValuesListResponse) Size() int {
if r != nil && r.size != nil {
return *r.size
}
return 0
}

// GetSize returns the value of the 'size' parameter and
// a flag indicating if the parameter has a value.
//
// Number of items contained in the returned page.
func (r *LoadBalancerQuotaValuesListResponse) GetSize() (value int, ok bool) {
ok = r != nil && r.size != nil
if ok {
value = *r.size
}
return
}

// Total returns the value of the 'total' parameter.
//
// Total number of items of the collection.
func (r *LoadBalancerQuotaValuesListResponse) Total() int {
if r != nil && r.total != nil {
return *r.total
}
return 0
}

// GetTotal returns the value of the 'total' parameter and
// a flag indicating if the parameter has a value.
//
// Total number of items of the collection.
func (r *LoadBalancerQuotaValuesListResponse) GetTotal() (value int, ok bool) {
ok = r != nil && r.total != nil
if ok {
value = *r.total
}
return
}
Loading

0 comments on commit 51746eb

Please sign in to comment.