Skip to content

Commit

Permalink
chore: bump to ocm-api-model 0.0.392
Browse files Browse the repository at this point in the history
  • Loading branch information
renan-campos committed Sep 3, 2024
1 parent 16f4c21 commit b41c6c2
Show file tree
Hide file tree
Showing 23 changed files with 1,658 additions and 464 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.391
model_version:=v0.0.392
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
479 changes: 254 additions & 225 deletions clustersmgmt/v1/openapi.go

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions clustersmgmt/v1/wif_access_method_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ const (
//
WifAccessMethodImpersonate WifAccessMethod = "impersonate"
//
WifAccessMethodVm WifAccessMethod = "vm"
//
WifAccessMethodWif WifAccessMethod = "wif"
)
27 changes: 25 additions & 2 deletions clustersmgmt/v1/wif_gcp_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type WifGcpBuilder struct {
projectNumber string
rolePrefix string
serviceAccounts []*WifServiceAccountBuilder
support *WifSupportBuilder
workloadIdentityPool *WifPoolBuilder
}

Expand Down Expand Up @@ -76,13 +77,24 @@ func (b *WifGcpBuilder) ServiceAccounts(values ...*WifServiceAccountBuilder) *Wi
return b
}

// Support sets the value of the 'support' attribute to the given value.
func (b *WifGcpBuilder) Support(value *WifSupportBuilder) *WifGcpBuilder {
b.support = value
if value != nil {
b.bitmap_ |= 32
} else {
b.bitmap_ &^= 32
}
return b
}

// WorkloadIdentityPool sets the value of the 'workload_identity_pool' attribute to the given value.
func (b *WifGcpBuilder) WorkloadIdentityPool(value *WifPoolBuilder) *WifGcpBuilder {
b.workloadIdentityPool = value
if value != nil {
b.bitmap_ |= 32
b.bitmap_ |= 64
} else {
b.bitmap_ &^= 32
b.bitmap_ &^= 64
}
return b
}
Expand All @@ -105,6 +117,11 @@ func (b *WifGcpBuilder) Copy(object *WifGcp) *WifGcpBuilder {
} else {
b.serviceAccounts = nil
}
if object.support != nil {
b.support = NewWifSupport().Copy(object.support)
} else {
b.support = nil
}
if object.workloadIdentityPool != nil {
b.workloadIdentityPool = NewWifPool().Copy(object.workloadIdentityPool)
} else {
Expand All @@ -130,6 +147,12 @@ func (b *WifGcpBuilder) Build() (object *WifGcp, err error) {
}
}
}
if b.support != nil {
object.support, err = b.support.Build()
if err != nil {
return
}
}
if b.workloadIdentityPool != nil {
object.workloadIdentityPool, err = b.workloadIdentityPool.Build()
if err != nil {
Expand Down
28 changes: 26 additions & 2 deletions clustersmgmt/v1/wif_gcp_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type WifGcp struct {
projectNumber string
rolePrefix string
serviceAccounts []*WifServiceAccount
support *WifSupport
workloadIdentityPool *WifPool
}

Expand Down Expand Up @@ -152,13 +153,36 @@ func (o *WifGcp) GetServiceAccounts() (value []*WifServiceAccount, ok bool) {
return
}

// Support returns the value of the 'support' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Defines the access configuration for support.
func (o *WifGcp) Support() *WifSupport {
if o != nil && o.bitmap_&32 != 0 {
return o.support
}
return nil
}

// GetSupport returns the value of the 'support' attribute and
// a flag indicating if the attribute has a value.
//
// Defines the access configuration for support.
func (o *WifGcp) GetSupport() (value *WifSupport, ok bool) {
ok = o != nil && o.bitmap_&32 != 0
if ok {
value = o.support
}
return
}

// WorkloadIdentityPool returns the value of the 'workload_identity_pool' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// The workload identity configuration data that will be used to create the
// workload identity pool on the user's account.
func (o *WifGcp) WorkloadIdentityPool() *WifPool {
if o != nil && o.bitmap_&32 != 0 {
if o != nil && o.bitmap_&64 != 0 {
return o.workloadIdentityPool
}
return nil
Expand All @@ -170,7 +194,7 @@ func (o *WifGcp) WorkloadIdentityPool() *WifPool {
// The workload identity configuration data that will be used to create the
// workload identity pool on the user's account.
func (o *WifGcp) GetWorkloadIdentityPool() (value *WifPool, ok bool) {
ok = o != nil && o.bitmap_&32 != 0
ok = o != nil && o.bitmap_&64 != 0
if ok {
value = o.workloadIdentityPool
}
Expand Down
17 changes: 15 additions & 2 deletions clustersmgmt/v1/wif_gcp_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,16 @@ func writeWifGcp(object *WifGcp, stream *jsoniter.Stream) {
writeWifServiceAccountList(object.serviceAccounts, stream)
count++
}
present_ = object.bitmap_&32 != 0 && object.workloadIdentityPool != nil
present_ = object.bitmap_&32 != 0 && object.support != nil
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("support")
writeWifSupport(object.support, stream)
count++
}
present_ = object.bitmap_&64 != 0 && object.workloadIdentityPool != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -139,10 +148,14 @@ func readWifGcp(iterator *jsoniter.Iterator) *WifGcp {
value := readWifServiceAccountList(iterator)
object.serviceAccounts = value
object.bitmap_ |= 16
case "support":
value := readWifSupport(iterator)
object.support = value
object.bitmap_ |= 32
case "workload_identity_pool":
value := readWifPool(iterator)
object.workloadIdentityPool = value
object.bitmap_ |= 32
object.bitmap_ |= 64
default:
iterator.ReadAny()
}
Expand Down
87 changes: 87 additions & 0 deletions clustersmgmt/v1/wif_support_builder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
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

// WifSupportBuilder contains the data and logic needed to build 'wif_support' objects.
type WifSupportBuilder struct {
bitmap_ uint32
principal string
roles []*WifRoleBuilder
}

// NewWifSupport creates a new builder of 'wif_support' objects.
func NewWifSupport() *WifSupportBuilder {
return &WifSupportBuilder{}
}

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

// Principal sets the value of the 'principal' attribute to the given value.
func (b *WifSupportBuilder) Principal(value string) *WifSupportBuilder {
b.principal = value
b.bitmap_ |= 1
return b
}

// Roles sets the value of the 'roles' attribute to the given values.
func (b *WifSupportBuilder) Roles(values ...*WifRoleBuilder) *WifSupportBuilder {
b.roles = make([]*WifRoleBuilder, len(values))
copy(b.roles, values)
b.bitmap_ |= 2
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *WifSupportBuilder) Copy(object *WifSupport) *WifSupportBuilder {
if object == nil {
return b
}
b.bitmap_ = object.bitmap_
b.principal = object.principal
if object.roles != nil {
b.roles = make([]*WifRoleBuilder, len(object.roles))
for i, v := range object.roles {
b.roles[i] = NewWifRole().Copy(v)
}
} else {
b.roles = nil
}
return b
}

// Build creates a 'wif_support' object using the configuration stored in the builder.
func (b *WifSupportBuilder) Build() (object *WifSupport, err error) {
object = new(WifSupport)
object.bitmap_ = b.bitmap_
object.principal = b.principal
if b.roles != nil {
object.roles = make([]*WifRole, len(b.roles))
for i, v := range b.roles {
object.roles[i], err = v.Build()
if err != nil {
return
}
}
}
return
}
71 changes: 71 additions & 0 deletions clustersmgmt/v1/wif_support_list_builder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
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

// WifSupportListBuilder contains the data and logic needed to build
// 'wif_support' objects.
type WifSupportListBuilder struct {
items []*WifSupportBuilder
}

// NewWifSupportList creates a new builder of 'wif_support' objects.
func NewWifSupportList() *WifSupportListBuilder {
return new(WifSupportListBuilder)
}

// Items sets the items of the list.
func (b *WifSupportListBuilder) Items(values ...*WifSupportBuilder) *WifSupportListBuilder {
b.items = make([]*WifSupportBuilder, len(values))
copy(b.items, values)
return b
}

// Empty returns true if the list is empty.
func (b *WifSupportListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *WifSupportListBuilder) Copy(list *WifSupportList) *WifSupportListBuilder {
if list == nil || list.items == nil {
b.items = nil
} else {
b.items = make([]*WifSupportBuilder, len(list.items))
for i, v := range list.items {
b.items[i] = NewWifSupport().Copy(v)
}
}
return b
}

// Build creates a list of 'wif_support' objects using the
// configuration stored in the builder.
func (b *WifSupportListBuilder) Build() (list *WifSupportList, err error) {
items := make([]*WifSupport, len(b.items))
for i, item := range b.items {
items[i], err = item.Build()
if err != nil {
return
}
}
list = new(WifSupportList)
list.items = items
return
}
Loading

0 comments on commit b41c6c2

Please sign in to comment.