Skip to content

Commit

Permalink
Merge pull request #971 from renan-campos/wif
Browse files Browse the repository at this point in the history
chore: bump to ocm-api-model 0.0.381
  • Loading branch information
vkareh committed Jul 11, 2024
2 parents 61832ee + 83ee60b commit b67b07c
Show file tree
Hide file tree
Showing 60 changed files with 20,428 additions and 12,130 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.380
model_version:=v0.0.381
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
25,054 changes: 12,926 additions & 12,128 deletions clustersmgmt/v1/openapi.go

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions clustersmgmt/v1/root_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,23 @@ func (c *Client) Versions() *VersionsClient {
path.Join(c.path, "versions"),
)
}

// WifConfigs returns the target 'wif_configs' resource.
//
// Reference to the resource that manages wif_configs
func (c *Client) WifConfigs() *WifConfigsClient {
return NewWifConfigsClient(
c.transport,
path.Join(c.path, "wif_configs"),
)
}

// WifTemplates returns the target 'wif_template' resource.
//
// Reference to the resource that manages wif_templates
func (c *Client) WifTemplates() *WifTemplateClient {
return NewWifTemplateClient(
c.transport,
path.Join(c.path, "wif_templates"),
)
}
76 changes: 76 additions & 0 deletions clustersmgmt/v1/wif_access_method_list_type_json.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
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 (
"io"

jsoniter "github.com/json-iterator/go"
"github.com/openshift-online/ocm-sdk-go/helpers"
)

// MarshalWifAccessMethodList writes a list of values of the 'wif_access_method' type to
// the given writer.
func MarshalWifAccessMethodList(list []WifAccessMethod, writer io.Writer) error {
stream := helpers.NewStream(writer)
writeWifAccessMethodList(list, stream)
err := stream.Flush()
if err != nil {
return err
}
return stream.Error
}

// writeWifAccessMethodList writes a list of value of the 'wif_access_method' type to
// the given stream.
func writeWifAccessMethodList(list []WifAccessMethod, stream *jsoniter.Stream) {
stream.WriteArrayStart()
for i, value := range list {
if i > 0 {
stream.WriteMore()
}
stream.WriteString(string(value))
}
stream.WriteArrayEnd()
}

// UnmarshalWifAccessMethodList reads a list of values of the 'wif_access_method' type
// from the given source, which can be a slice of bytes, a string or a reader.
func UnmarshalWifAccessMethodList(source interface{}) (items []WifAccessMethod, err error) {
iterator, err := helpers.NewIterator(source)
if err != nil {
return
}
items = readWifAccessMethodList(iterator)
err = iterator.Error
return
}

// readWifAccessMethodList reads list of values of the ”wif_access_method' type from
// the given iterator.
func readWifAccessMethodList(iterator *jsoniter.Iterator) []WifAccessMethod {
list := []WifAccessMethod{}
for iterator.ReadArray() {
text := iterator.ReadString()
item := WifAccessMethod(text)
list = append(list, item)
}
return list
}
30 changes: 30 additions & 0 deletions clustersmgmt/v1/wif_access_method_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
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

// WifAccessMethod represents the values of the 'wif_access_method' enumerated type.
type WifAccessMethod string

const (
//
WifAccessMethodImpersonate WifAccessMethod = "impersonate"
//
WifAccessMethodWif WifAccessMethod = "wif"
)
137 changes: 137 additions & 0 deletions clustersmgmt/v1/wif_config_builder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
/*
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

// WifConfigBuilder contains the data and logic needed to build 'wif_config' objects.
//
// Definition of an wif_config resource.
type WifConfigBuilder struct {
bitmap_ uint32
id string
href string
displayName string
gcp *WifGcpBuilder
organization *OrganizationLinkBuilder
}

// NewWifConfig creates a new builder of 'wif_config' objects.
func NewWifConfig() *WifConfigBuilder {
return &WifConfigBuilder{}
}

// Link sets the flag that indicates if this is a link.
func (b *WifConfigBuilder) Link(value bool) *WifConfigBuilder {
b.bitmap_ |= 1
return b
}

// ID sets the identifier of the object.
func (b *WifConfigBuilder) ID(value string) *WifConfigBuilder {
b.id = value
b.bitmap_ |= 2
return b
}

// HREF sets the link to the object.
func (b *WifConfigBuilder) HREF(value string) *WifConfigBuilder {
b.href = value
b.bitmap_ |= 4
return b
}

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

// DisplayName sets the value of the 'display_name' attribute to the given value.
func (b *WifConfigBuilder) DisplayName(value string) *WifConfigBuilder {
b.displayName = value
b.bitmap_ |= 8
return b
}

// Gcp sets the value of the 'gcp' attribute to the given value.
func (b *WifConfigBuilder) Gcp(value *WifGcpBuilder) *WifConfigBuilder {
b.gcp = value
if value != nil {
b.bitmap_ |= 16
} else {
b.bitmap_ &^= 16
}
return b
}

// Organization sets the value of the 'organization' attribute to the given value.
//
// Definition of an organization link.
func (b *WifConfigBuilder) Organization(value *OrganizationLinkBuilder) *WifConfigBuilder {
b.organization = value
if value != nil {
b.bitmap_ |= 32
} else {
b.bitmap_ &^= 32
}
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *WifConfigBuilder) Copy(object *WifConfig) *WifConfigBuilder {
if object == nil {
return b
}
b.bitmap_ = object.bitmap_
b.id = object.id
b.href = object.href
b.displayName = object.displayName
if object.gcp != nil {
b.gcp = NewWifGcp().Copy(object.gcp)
} else {
b.gcp = nil
}
if object.organization != nil {
b.organization = NewOrganizationLink().Copy(object.organization)
} else {
b.organization = nil
}
return b
}

// Build creates a 'wif_config' object using the configuration stored in the builder.
func (b *WifConfigBuilder) Build() (object *WifConfig, err error) {
object = new(WifConfig)
object.id = b.id
object.href = b.href
object.bitmap_ = b.bitmap_
object.displayName = b.displayName
if b.gcp != nil {
object.gcp, err = b.gcp.Build()
if err != nil {
return
}
}
if b.organization != nil {
object.organization, err = b.organization.Build()
if err != nil {
return
}
}
return
}
Loading

0 comments on commit b67b07c

Please sign in to comment.