Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump ocm-api-model to v0.0.388 #984

Merged
merged 2 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.387
model_version:=v0.0.388
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
10 changes: 10 additions & 0 deletions clustersmgmt/v1/aws_inquiries_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ func (c *AWSInquiriesClient) MachineTypes() *AWSRegionMachineTypesInquiryClient
)
}

// OidcThumbprint returns the target 'oidc_thumbprint' resource.
//
// Reference to the resource that manages OIDC Config Thumbprint fetching.
func (c *AWSInquiriesClient) OidcThumbprint() *OidcThumbprintClient {
return NewOidcThumbprintClient(
c.transport,
path.Join(c.path, "oidc_thumbprint"),
)
}

// Regions returns the target 'available_regions_inquiry' resource.
//
// Reference to the resource that manages a collection of regions.
Expand Down
103 changes: 103 additions & 0 deletions clustersmgmt/v1/oidc_thumbprint_builder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/*
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

// OidcThumbprintBuilder contains the data and logic needed to build 'oidc_thumbprint' objects.
//
// Contains the necessary attributes to support oidc configuration thumbprint operations such as fetching/creation of a thumbprint
type OidcThumbprintBuilder struct {
bitmap_ uint32
href string
clusterId string
kind string
oidcConfigId string
thumbprint string
}

// NewOidcThumbprint creates a new builder of 'oidc_thumbprint' objects.
func NewOidcThumbprint() *OidcThumbprintBuilder {
return &OidcThumbprintBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *OidcThumbprintBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// HREF sets the value of the 'HREF' attribute to the given value.
func (b *OidcThumbprintBuilder) HREF(value string) *OidcThumbprintBuilder {
b.href = value
b.bitmap_ |= 1
return b
}

// ClusterId sets the value of the 'cluster_id' attribute to the given value.
func (b *OidcThumbprintBuilder) ClusterId(value string) *OidcThumbprintBuilder {
b.clusterId = value
b.bitmap_ |= 2
return b
}

// Kind sets the value of the 'kind' attribute to the given value.
func (b *OidcThumbprintBuilder) Kind(value string) *OidcThumbprintBuilder {
b.kind = value
b.bitmap_ |= 4
return b
}

// OidcConfigId sets the value of the 'oidc_config_id' attribute to the given value.
func (b *OidcThumbprintBuilder) OidcConfigId(value string) *OidcThumbprintBuilder {
b.oidcConfigId = value
b.bitmap_ |= 8
return b
}

// Thumbprint sets the value of the 'thumbprint' attribute to the given value.
func (b *OidcThumbprintBuilder) Thumbprint(value string) *OidcThumbprintBuilder {
b.thumbprint = value
b.bitmap_ |= 16
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *OidcThumbprintBuilder) Copy(object *OidcThumbprint) *OidcThumbprintBuilder {
if object == nil {
return b
}
b.bitmap_ = object.bitmap_
b.href = object.href
b.clusterId = object.clusterId
b.kind = object.kind
b.oidcConfigId = object.oidcConfigId
b.thumbprint = object.thumbprint
return b
}

// Build creates a 'oidc_thumbprint' object using the configuration stored in the builder.
func (b *OidcThumbprintBuilder) Build() (object *OidcThumbprint, err error) {
object = new(OidcThumbprint)
object.bitmap_ = b.bitmap_
object.href = b.href
object.clusterId = b.clusterId
object.kind = b.kind
object.oidcConfigId = b.oidcConfigId
object.thumbprint = b.thumbprint
return
}
203 changes: 203 additions & 0 deletions clustersmgmt/v1/oidc_thumbprint_client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
/*
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"
"bytes"
"context"
"io"
"net/http"
"net/url"

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

// OidcThumbprintClient is the client of the 'oidc_thumbprint' resource.
//
// Manages an Oidc Config Thumbprint configuration.
type OidcThumbprintClient struct {
transport http.RoundTripper
path string
}

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

// Post creates a request for the 'post' method.
//
// Fetches/creates an OIDC Config Thumbprint from either a cluster ID, or an oidc config ID.
func (c *OidcThumbprintClient) Post() *OidcThumbprintPostRequest {
return &OidcThumbprintPostRequest{
transport: c.transport,
path: c.path,
}
}

// OidcThumbprintPostRequest is the request for the 'post' method.
type OidcThumbprintPostRequest struct {
transport http.RoundTripper
path string
query url.Values
header http.Header
body *OidcThumbprintInput
}

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

// Header adds a request header.
func (r *OidcThumbprintPostRequest) Header(name string, value interface{}) *OidcThumbprintPostRequest {
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 *OidcThumbprintPostRequest) Impersonate(user string) *OidcThumbprintPostRequest {
helpers.AddImpersonationHeader(&r.header, user)
return r
}

// Body sets the value of the 'body' parameter.
func (r *OidcThumbprintPostRequest) Body(value *OidcThumbprintInput) *OidcThumbprintPostRequest {
r.body = 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 *OidcThumbprintPostRequest) Send() (result *OidcThumbprintPostResponse, err error) {
return r.SendContext(context.Background())
}

// SendContext sends this request, waits for the response, and returns it.
func (r *OidcThumbprintPostRequest) SendContext(ctx context.Context) (result *OidcThumbprintPostResponse, err error) {
query := helpers.CopyQuery(r.query)
header := helpers.CopyHeader(r.header)
buffer := &bytes.Buffer{}
err = writeOidcThumbprintPostRequest(r, buffer)
if err != nil {
return
}
uri := &url.URL{
Path: r.path,
RawQuery: query.Encode(),
}
request := &http.Request{
Method: "POST",
URL: uri,
Header: header,
Body: io.NopCloser(buffer),
}
if ctx != nil {
request = request.WithContext(ctx)
}
response, err := r.transport.RoundTrip(request)
if err != nil {
return
}
defer response.Body.Close()
result = &OidcThumbprintPostResponse{}
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 = readOidcThumbprintPostResponse(result, reader)
if err != nil {
return
}
return
}

// OidcThumbprintPostResponse is the response for the 'post' method.
type OidcThumbprintPostResponse struct {
status int
header http.Header
err *errors.Error
body *OidcThumbprint
}

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

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

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

// Body returns the value of the 'body' parameter.
func (r *OidcThumbprintPostResponse) Body() *OidcThumbprint {
if r == nil {
return nil
}
return r.body
}

// GetBody returns the value of the 'body' parameter and
// a flag indicating if the parameter has a value.
func (r *OidcThumbprintPostResponse) GetBody() (value *OidcThumbprint, ok bool) {
ok = r != nil && r.body != nil
if ok {
value = r.body
}
return
}
Loading
Loading