Skip to content

Commit

Permalink
chore: bump to ocm-api-model 0.0.387 (#987)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobGray committed Aug 26, 2024
1 parent d2758a6 commit 32b7315
Show file tree
Hide file tree
Showing 6 changed files with 321 additions and 261 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.389
model_version:=v0.0.390
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
507 changes: 258 additions & 249 deletions clustersmgmt/v1/openapi.go

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions clustersmgmt/v1/wif_gcp_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type WifGcpBuilder struct {
impersonatorEmail string
projectId string
projectNumber string
rolePrefix string
serviceAccounts []*WifServiceAccountBuilder
workloadIdentityPool *WifPoolBuilder
}
Expand Down Expand Up @@ -60,21 +61,28 @@ func (b *WifGcpBuilder) ProjectNumber(value string) *WifGcpBuilder {
return b
}

// RolePrefix sets the value of the 'role_prefix' attribute to the given value.
func (b *WifGcpBuilder) RolePrefix(value string) *WifGcpBuilder {
b.rolePrefix = value
b.bitmap_ |= 8
return b
}

// ServiceAccounts sets the value of the 'service_accounts' attribute to the given values.
func (b *WifGcpBuilder) ServiceAccounts(values ...*WifServiceAccountBuilder) *WifGcpBuilder {
b.serviceAccounts = make([]*WifServiceAccountBuilder, len(values))
copy(b.serviceAccounts, values)
b.bitmap_ |= 8
b.bitmap_ |= 16
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_ |= 16
b.bitmap_ |= 32
} else {
b.bitmap_ &^= 16
b.bitmap_ &^= 32
}
return b
}
Expand All @@ -88,6 +96,7 @@ func (b *WifGcpBuilder) Copy(object *WifGcp) *WifGcpBuilder {
b.impersonatorEmail = object.impersonatorEmail
b.projectId = object.projectId
b.projectNumber = object.projectNumber
b.rolePrefix = object.rolePrefix
if object.serviceAccounts != nil {
b.serviceAccounts = make([]*WifServiceAccountBuilder, len(object.serviceAccounts))
for i, v := range object.serviceAccounts {
Expand All @@ -111,6 +120,7 @@ func (b *WifGcpBuilder) Build() (object *WifGcp, err error) {
object.impersonatorEmail = b.impersonatorEmail
object.projectId = b.projectId
object.projectNumber = b.projectNumber
object.rolePrefix = b.rolePrefix
if b.serviceAccounts != nil {
object.serviceAccounts = make([]*WifServiceAccount, len(b.serviceAccounts))
for i, v := range b.serviceAccounts {
Expand Down
32 changes: 28 additions & 4 deletions clustersmgmt/v1/wif_gcp_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type WifGcp struct {
impersonatorEmail string
projectId string
projectNumber string
rolePrefix string
serviceAccounts []*WifServiceAccount
workloadIdentityPool *WifPool
}
Expand Down Expand Up @@ -103,13 +104,36 @@ func (o *WifGcp) GetProjectNumber() (value string, ok bool) {
return
}

// RolePrefix returns the value of the 'role_prefix' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Prefix for naming GCP custom roles configured.
func (o *WifGcp) RolePrefix() string {
if o != nil && o.bitmap_&8 != 0 {
return o.rolePrefix
}
return ""
}

// GetRolePrefix returns the value of the 'role_prefix' attribute and
// a flag indicating if the attribute has a value.
//
// Prefix for naming GCP custom roles configured.
func (o *WifGcp) GetRolePrefix() (value string, ok bool) {
ok = o != nil && o.bitmap_&8 != 0
if ok {
value = o.rolePrefix
}
return
}

// ServiceAccounts returns the value of the 'service_accounts' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// The list of service accounts and their associated roles that will need to be
// configured on the user's GCP project.
func (o *WifGcp) ServiceAccounts() []*WifServiceAccount {
if o != nil && o.bitmap_&8 != 0 {
if o != nil && o.bitmap_&16 != 0 {
return o.serviceAccounts
}
return nil
Expand All @@ -121,7 +145,7 @@ func (o *WifGcp) ServiceAccounts() []*WifServiceAccount {
// The list of service accounts and their associated roles that will need to be
// configured on the user's GCP project.
func (o *WifGcp) GetServiceAccounts() (value []*WifServiceAccount, ok bool) {
ok = o != nil && o.bitmap_&8 != 0
ok = o != nil && o.bitmap_&16 != 0
if ok {
value = o.serviceAccounts
}
Expand All @@ -134,7 +158,7 @@ func (o *WifGcp) GetServiceAccounts() (value []*WifServiceAccount, ok bool) {
// 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_&16 != 0 {
if o != nil && o.bitmap_&32 != 0 {
return o.workloadIdentityPool
}
return nil
Expand All @@ -146,7 +170,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_&16 != 0
ok = o != nil && o.bitmap_&32 != 0
if ok {
value = o.workloadIdentityPool
}
Expand Down
21 changes: 17 additions & 4 deletions clustersmgmt/v1/wif_gcp_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,16 @@ func writeWifGcp(object *WifGcp, stream *jsoniter.Stream) {
stream.WriteString(object.projectNumber)
count++
}
present_ = object.bitmap_&8 != 0 && object.serviceAccounts != nil
present_ = object.bitmap_&8 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("role_prefix")
stream.WriteString(object.rolePrefix)
count++
}
present_ = object.bitmap_&16 != 0 && object.serviceAccounts != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -78,7 +87,7 @@ func writeWifGcp(object *WifGcp, stream *jsoniter.Stream) {
writeWifServiceAccountList(object.serviceAccounts, stream)
count++
}
present_ = object.bitmap_&16 != 0 && object.workloadIdentityPool != nil
present_ = object.bitmap_&32 != 0 && object.workloadIdentityPool != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -122,14 +131,18 @@ func readWifGcp(iterator *jsoniter.Iterator) *WifGcp {
value := iterator.ReadString()
object.projectNumber = value
object.bitmap_ |= 4
case "role_prefix":
value := iterator.ReadString()
object.rolePrefix = value
object.bitmap_ |= 8
case "service_accounts":
value := readWifServiceAccountList(iterator)
object.serviceAccounts = value
object.bitmap_ |= 8
object.bitmap_ |= 16
case "workload_identity_pool":
value := readWifPool(iterator)
object.workloadIdentityPool = value
object.bitmap_ |= 16
object.bitmap_ |= 32
default:
iterator.ReadAny()
}
Expand Down
4 changes: 4 additions & 0 deletions openapi/clusters_mgmt/v1/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -18237,6 +18237,10 @@
"description": "This represents the GCP project number in which the wif resources will be configured.",
"type": "string"
},
"role_prefix": {
"description": "Prefix for naming GCP custom roles configured.",
"type": "string"
},
"service_accounts": {
"description": "The list of service accounts and their associated roles that will need to be\nconfigured on the user's GCP project.",
"type": "array",
Expand Down

0 comments on commit 32b7315

Please sign in to comment.