Skip to content

Commit

Permalink
Merge pull request #814 from andreadecorte/OCM-2899_tris
Browse files Browse the repository at this point in the history
Bump ocm-api-model version to 0.0.306
  • Loading branch information
gdbranco authored Jul 31, 2023
2 parents 5a64332 + f6fa79d commit 4e5675c
Show file tree
Hide file tree
Showing 9 changed files with 5,051 additions and 4,921 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
This document describes the relevant changes between releases of the OCM API
SDK.

## 0.1.359
- Update model version v0.0.306
- Fix upgrade related constants JSON output to align with existing values
- Update model version v0.0.305
- Add `PrivateHostedZoneID` and `PrivateHostedZoneRoleARN` to `cluster_type` resource

## 0.1.358
- Update model version v0.0.304
- Add upgrade related constants also for `NodePoolUpgradePolicy`.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
export CGO_ENABLED=0

# Details of the model to use:
model_version:=v0.0.304
model_version:=v0.0.306
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
58 changes: 39 additions & 19 deletions clustersmgmt/v1/cluster_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ type ClusterBuilder struct {
nodePools *NodePoolListBuilder
nodes *ClusterNodesBuilder
openshiftVersion string
privateHostedZoneID string
privateHostedZoneRoleARN string
product *ProductBuilder
properties map[string]string
provisionShard *ProvisionShardBuilder
Expand Down Expand Up @@ -594,15 +596,29 @@ func (b *ClusterBuilder) OpenshiftVersion(value string) *ClusterBuilder {
return b
}

// PrivateHostedZoneID sets the value of the 'private_hosted_zone_ID' attribute to the given value.
func (b *ClusterBuilder) PrivateHostedZoneID(value string) *ClusterBuilder {
b.privateHostedZoneID = value
b.bitmap_ |= 70368744177664
return b
}

// PrivateHostedZoneRoleARN sets the value of the 'private_hosted_zone_role_ARN' attribute to the given value.
func (b *ClusterBuilder) PrivateHostedZoneRoleARN(value string) *ClusterBuilder {
b.privateHostedZoneRoleARN = value
b.bitmap_ |= 140737488355328
return b
}

// Product sets the value of the 'product' attribute to the given value.
//
// Representation of an product that can be selected as a cluster type.
func (b *ClusterBuilder) Product(value *ProductBuilder) *ClusterBuilder {
b.product = value
if value != nil {
b.bitmap_ |= 70368744177664
b.bitmap_ |= 281474976710656
} else {
b.bitmap_ &^= 70368744177664
b.bitmap_ &^= 281474976710656
}
return b
}
Expand All @@ -611,9 +627,9 @@ func (b *ClusterBuilder) Product(value *ProductBuilder) *ClusterBuilder {
func (b *ClusterBuilder) Properties(value map[string]string) *ClusterBuilder {
b.properties = value
if value != nil {
b.bitmap_ |= 140737488355328
b.bitmap_ |= 562949953421312
} else {
b.bitmap_ &^= 140737488355328
b.bitmap_ &^= 562949953421312
}
return b
}
Expand All @@ -624,9 +640,9 @@ func (b *ClusterBuilder) Properties(value map[string]string) *ClusterBuilder {
func (b *ClusterBuilder) ProvisionShard(value *ProvisionShardBuilder) *ClusterBuilder {
b.provisionShard = value
if value != nil {
b.bitmap_ |= 281474976710656
b.bitmap_ |= 1125899906842624
} else {
b.bitmap_ &^= 281474976710656
b.bitmap_ &^= 1125899906842624
}
return b
}
Expand All @@ -637,9 +653,9 @@ func (b *ClusterBuilder) ProvisionShard(value *ProvisionShardBuilder) *ClusterBu
func (b *ClusterBuilder) Proxy(value *ProxyBuilder) *ClusterBuilder {
b.proxy = value
if value != nil {
b.bitmap_ |= 562949953421312
b.bitmap_ |= 2251799813685248
} else {
b.bitmap_ &^= 562949953421312
b.bitmap_ &^= 2251799813685248
}
return b
}
Expand All @@ -650,9 +666,9 @@ func (b *ClusterBuilder) Proxy(value *ProxyBuilder) *ClusterBuilder {
func (b *ClusterBuilder) Region(value *CloudRegionBuilder) *ClusterBuilder {
b.region = value
if value != nil {
b.bitmap_ |= 1125899906842624
b.bitmap_ |= 4503599627370496
} else {
b.bitmap_ &^= 1125899906842624
b.bitmap_ &^= 4503599627370496
}
return b
}
Expand All @@ -662,7 +678,7 @@ func (b *ClusterBuilder) Region(value *CloudRegionBuilder) *ClusterBuilder {
// Overall state of a cluster.
func (b *ClusterBuilder) State(value ClusterState) *ClusterBuilder {
b.state = value
b.bitmap_ |= 2251799813685248
b.bitmap_ |= 9007199254740992
return b
}

Expand All @@ -672,9 +688,9 @@ func (b *ClusterBuilder) State(value ClusterState) *ClusterBuilder {
func (b *ClusterBuilder) Status(value *ClusterStatusBuilder) *ClusterBuilder {
b.status = value
if value != nil {
b.bitmap_ |= 4503599627370496
b.bitmap_ |= 18014398509481984
} else {
b.bitmap_ &^= 4503599627370496
b.bitmap_ &^= 18014398509481984
}
return b
}
Expand Down Expand Up @@ -702,9 +718,9 @@ func (b *ClusterBuilder) Status(value *ClusterStatusBuilder) *ClusterBuilder {
func (b *ClusterBuilder) StorageQuota(value *ValueBuilder) *ClusterBuilder {
b.storageQuota = value
if value != nil {
b.bitmap_ |= 9007199254740992
b.bitmap_ |= 36028797018963968
} else {
b.bitmap_ &^= 9007199254740992
b.bitmap_ &^= 36028797018963968
}
return b
}
Expand All @@ -715,9 +731,9 @@ func (b *ClusterBuilder) StorageQuota(value *ValueBuilder) *ClusterBuilder {
func (b *ClusterBuilder) Subscription(value *SubscriptionBuilder) *ClusterBuilder {
b.subscription = value
if value != nil {
b.bitmap_ |= 18014398509481984
b.bitmap_ |= 72057594037927936
} else {
b.bitmap_ &^= 18014398509481984
b.bitmap_ &^= 72057594037927936
}
return b
}
Expand All @@ -728,9 +744,9 @@ func (b *ClusterBuilder) Subscription(value *SubscriptionBuilder) *ClusterBuilde
func (b *ClusterBuilder) Version(value *VersionBuilder) *ClusterBuilder {
b.version = value
if value != nil {
b.bitmap_ |= 36028797018963968
b.bitmap_ |= 144115188075855872
} else {
b.bitmap_ &^= 36028797018963968
b.bitmap_ &^= 144115188075855872
}
return b
}
Expand Down Expand Up @@ -898,6 +914,8 @@ func (b *ClusterBuilder) Copy(object *Cluster) *ClusterBuilder {
b.nodes = nil
}
b.openshiftVersion = object.openshiftVersion
b.privateHostedZoneID = object.privateHostedZoneID
b.privateHostedZoneRoleARN = object.privateHostedZoneRoleARN
if object.product != nil {
b.product = NewProduct().Copy(object.product)
} else {
Expand Down Expand Up @@ -1139,6 +1157,8 @@ func (b *ClusterBuilder) Build() (object *Cluster, err error) {
}
}
object.openshiftVersion = b.openshiftVersion
object.privateHostedZoneID = b.privateHostedZoneID
object.privateHostedZoneRoleARN = b.privateHostedZoneRoleARN
if b.product != nil {
object.product, err = b.product.Build()
if err != nil {
Expand Down
Loading

0 comments on commit 4e5675c

Please sign in to comment.