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

Bump ocm-api-model version to 0.0.304 #813

Merged
merged 2 commits into from
Jul 26, 2023
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
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
This document describes the relevant changes between releases of the OCM API
SDK.

## 0.1.358
- Update model version v0.0.304
- Add upgrade related constants also for `NodePoolUpgradePolicy`.
- Change DNS domain field names.

## 0.1.357
- Update model version v0.0.303
- Add upgrade related constants.
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.303
model_version:=v0.0.304
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
36 changes: 18 additions & 18 deletions clustersmgmt/v1/dns_domain_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type DNSDomainBuilder struct {
bitmap_ uint32
id string
href string
clusterLink *ClusterLinkBuilder
organizationLink *OrganizationLinkBuilder
cluster *ClusterLinkBuilder
organization *OrganizationLinkBuilder
reservedAtTimestamp time.Time
userDefined bool
}
Expand Down Expand Up @@ -66,11 +66,11 @@ func (b *DNSDomainBuilder) Empty() bool {
return b == nil || b.bitmap_&^1 == 0
}

// ClusterLink sets the value of the 'cluster_link' attribute to the given value.
// Cluster sets the value of the 'cluster' attribute to the given value.
//
// Definition of a cluster link.
func (b *DNSDomainBuilder) ClusterLink(value *ClusterLinkBuilder) *DNSDomainBuilder {
b.clusterLink = value
func (b *DNSDomainBuilder) Cluster(value *ClusterLinkBuilder) *DNSDomainBuilder {
b.cluster = value
if value != nil {
b.bitmap_ |= 8
} else {
Expand All @@ -79,11 +79,11 @@ func (b *DNSDomainBuilder) ClusterLink(value *ClusterLinkBuilder) *DNSDomainBuil
return b
}

// OrganizationLink sets the value of the 'organization_link' attribute to the given value.
// Organization sets the value of the 'organization' attribute to the given value.
//
// Definition of an organization link.
func (b *DNSDomainBuilder) OrganizationLink(value *OrganizationLinkBuilder) *DNSDomainBuilder {
b.organizationLink = value
func (b *DNSDomainBuilder) Organization(value *OrganizationLinkBuilder) *DNSDomainBuilder {
b.organization = value
if value != nil {
b.bitmap_ |= 16
} else {
Expand Down Expand Up @@ -114,15 +114,15 @@ func (b *DNSDomainBuilder) Copy(object *DNSDomain) *DNSDomainBuilder {
b.bitmap_ = object.bitmap_
b.id = object.id
b.href = object.href
if object.clusterLink != nil {
b.clusterLink = NewClusterLink().Copy(object.clusterLink)
if object.cluster != nil {
b.cluster = NewClusterLink().Copy(object.cluster)
} else {
b.clusterLink = nil
b.cluster = nil
}
if object.organizationLink != nil {
b.organizationLink = NewOrganizationLink().Copy(object.organizationLink)
if object.organization != nil {
b.organization = NewOrganizationLink().Copy(object.organization)
} else {
b.organizationLink = nil
b.organization = nil
}
b.reservedAtTimestamp = object.reservedAtTimestamp
b.userDefined = object.userDefined
Expand All @@ -135,14 +135,14 @@ func (b *DNSDomainBuilder) Build() (object *DNSDomain, err error) {
object.id = b.id
object.href = b.href
object.bitmap_ = b.bitmap_
if b.clusterLink != nil {
object.clusterLink, err = b.clusterLink.Build()
if b.cluster != nil {
object.cluster, err = b.cluster.Build()
if err != nil {
return
}
}
if b.organizationLink != nil {
object.organizationLink, err = b.organizationLink.Build()
if b.organization != nil {
object.organization, err = b.organization.Build()
if err != nil {
return
}
Expand Down
28 changes: 14 additions & 14 deletions clustersmgmt/v1/dns_domain_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ type DNSDomain struct {
bitmap_ uint32
id string
href string
clusterLink *ClusterLink
organizationLink *OrganizationLink
cluster *ClusterLink
organization *OrganizationLink
reservedAtTimestamp time.Time
userDefined bool
}
Expand Down Expand Up @@ -105,48 +105,48 @@ func (o *DNSDomain) Empty() bool {
return o == nil || o.bitmap_&^1 == 0
}

// ClusterLink returns the value of the 'cluster_link' attribute, or
// Cluster returns the value of the 'cluster' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Link to the cluster that is registered with the DNS domain (optional).
func (o *DNSDomain) ClusterLink() *ClusterLink {
func (o *DNSDomain) Cluster() *ClusterLink {
if o != nil && o.bitmap_&8 != 0 {
return o.clusterLink
return o.cluster
}
return nil
}

// GetClusterLink returns the value of the 'cluster_link' attribute and
// GetCluster returns the value of the 'cluster' attribute and
// a flag indicating if the attribute has a value.
//
// Link to the cluster that is registered with the DNS domain (optional).
func (o *DNSDomain) GetClusterLink() (value *ClusterLink, ok bool) {
func (o *DNSDomain) GetCluster() (value *ClusterLink, ok bool) {
ok = o != nil && o.bitmap_&8 != 0
if ok {
value = o.clusterLink
value = o.cluster
}
return
}

// OrganizationLink returns the value of the 'organization_link' attribute, or
// Organization returns the value of the 'organization' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Link to the organization that reserved the DNS domain.
func (o *DNSDomain) OrganizationLink() *OrganizationLink {
func (o *DNSDomain) Organization() *OrganizationLink {
if o != nil && o.bitmap_&16 != 0 {
return o.organizationLink
return o.organization
}
return nil
}

// GetOrganizationLink returns the value of the 'organization_link' attribute and
// GetOrganization returns the value of the 'organization' attribute and
// a flag indicating if the attribute has a value.
//
// Link to the organization that reserved the DNS domain.
func (o *DNSDomain) GetOrganizationLink() (value *OrganizationLink, ok bool) {
func (o *DNSDomain) GetOrganization() (value *OrganizationLink, ok bool) {
ok = o != nil && o.bitmap_&16 != 0
if ok {
value = o.organizationLink
value = o.organization
}
return
}
Expand Down
20 changes: 10 additions & 10 deletions clustersmgmt/v1/dns_domain_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,22 @@ func writeDNSDomain(object *DNSDomain, stream *jsoniter.Stream) {
count++
}
var present_ bool
present_ = object.bitmap_&8 != 0 && object.clusterLink != nil
present_ = object.bitmap_&8 != 0 && object.cluster != nil
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("cluster_link")
writeClusterLink(object.clusterLink, stream)
stream.WriteObjectField("cluster")
writeClusterLink(object.cluster, stream)
count++
}
present_ = object.bitmap_&16 != 0 && object.organizationLink != nil
present_ = object.bitmap_&16 != 0 && object.organization != nil
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("organization_link")
writeOrganizationLink(object.organizationLink, stream)
stream.WriteObjectField("organization")
writeOrganizationLink(object.organization, stream)
count++
}
present_ = object.bitmap_&32 != 0
Expand Down Expand Up @@ -136,13 +136,13 @@ func readDNSDomain(iterator *jsoniter.Iterator) *DNSDomain {
case "href":
object.href = iterator.ReadString()
object.bitmap_ |= 4
case "cluster_link":
case "cluster":
value := readClusterLink(iterator)
object.clusterLink = value
object.cluster = value
object.bitmap_ |= 8
case "organization_link":
case "organization":
value := readOrganizationLink(iterator)
object.organizationLink = value
object.organization = value
object.bitmap_ |= 16
case "reserved_at_timestamp":
text := iterator.ReadString()
Expand Down
12 changes: 8 additions & 4 deletions clustersmgmt/v1/node_pool_upgrade_policy_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ type NodePoolUpgradePolicyBuilder struct {
nextRun time.Time
nodePoolID string
schedule string
scheduleType string
scheduleType ScheduleType
state *UpgradePolicyStateBuilder
upgradeType string
upgradeType UpgradeType
version string
enableMinorVersionUpgrades bool
}
Expand Down Expand Up @@ -123,7 +123,9 @@ func (b *NodePoolUpgradePolicyBuilder) Schedule(value string) *NodePoolUpgradePo
}

// ScheduleType sets the value of the 'schedule_type' attribute to the given value.
func (b *NodePoolUpgradePolicyBuilder) ScheduleType(value string) *NodePoolUpgradePolicyBuilder {
//
// ScheduleType defines which type of scheduling should be used for the upgrade policy.
func (b *NodePoolUpgradePolicyBuilder) ScheduleType(value ScheduleType) *NodePoolUpgradePolicyBuilder {
b.scheduleType = value
b.bitmap_ |= 1024
return b
Expand All @@ -143,7 +145,9 @@ func (b *NodePoolUpgradePolicyBuilder) State(value *UpgradePolicyStateBuilder) *
}

// UpgradeType sets the value of the 'upgrade_type' attribute to the given value.
func (b *NodePoolUpgradePolicyBuilder) UpgradeType(value string) *NodePoolUpgradePolicyBuilder {
//
// UpgradeType defines which type of upgrade should be used.
func (b *NodePoolUpgradePolicyBuilder) UpgradeType(value UpgradeType) *NodePoolUpgradePolicyBuilder {
b.upgradeType = value
b.bitmap_ |= 4096
return b
Expand Down
24 changes: 12 additions & 12 deletions clustersmgmt/v1/node_pool_upgrade_policy_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ type NodePoolUpgradePolicy struct {
nextRun time.Time
nodePoolID string
schedule string
scheduleType string
scheduleType ScheduleType
state *UpgradePolicyState
upgradeType string
upgradeType UpgradeType
version string
enableMinorVersionUpgrades bool
}
Expand Down Expand Up @@ -276,19 +276,19 @@ func (o *NodePoolUpgradePolicy) GetSchedule() (value string, ok bool) {
// ScheduleType returns the value of the 'schedule_type' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Schedule type can be either "manual" (single execution) or "automatic" (re-occurring).
func (o *NodePoolUpgradePolicy) ScheduleType() string {
// Schedule type of the upgrade.
func (o *NodePoolUpgradePolicy) ScheduleType() ScheduleType {
if o != nil && o.bitmap_&1024 != 0 {
return o.scheduleType
}
return ""
return ScheduleType("")
}

// GetScheduleType returns the value of the 'schedule_type' attribute and
// a flag indicating if the attribute has a value.
//
// Schedule type can be either "manual" (single execution) or "automatic" (re-occurring).
func (o *NodePoolUpgradePolicy) GetScheduleType() (value string, ok bool) {
// Schedule type of the upgrade.
func (o *NodePoolUpgradePolicy) GetScheduleType() (value ScheduleType, ok bool) {
ok = o != nil && o.bitmap_&1024 != 0
if ok {
value = o.scheduleType
Expand Down Expand Up @@ -322,19 +322,19 @@ func (o *NodePoolUpgradePolicy) GetState() (value *UpgradePolicyState, ok bool)
// UpgradeType returns the value of the 'upgrade_type' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Upgrade type specify the type of the upgrade. Can only be "NodePool".
func (o *NodePoolUpgradePolicy) UpgradeType() string {
// Upgrade type of the node pool.
func (o *NodePoolUpgradePolicy) UpgradeType() UpgradeType {
if o != nil && o.bitmap_&4096 != 0 {
return o.upgradeType
}
return ""
return UpgradeType("")
}

// GetUpgradeType returns the value of the 'upgrade_type' attribute and
// a flag indicating if the attribute has a value.
//
// Upgrade type specify the type of the upgrade. Can only be "NodePool".
func (o *NodePoolUpgradePolicy) GetUpgradeType() (value string, ok bool) {
// Upgrade type of the node pool.
func (o *NodePoolUpgradePolicy) GetUpgradeType() (value UpgradeType, ok bool) {
ok = o != nil && o.bitmap_&4096 != 0
if ok {
value = o.upgradeType
Expand Down
10 changes: 6 additions & 4 deletions clustersmgmt/v1/node_pool_upgrade_policy_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func writeNodePoolUpgradePolicy(object *NodePoolUpgradePolicy, stream *jsoniter.
stream.WriteMore()
}
stream.WriteObjectField("schedule_type")
stream.WriteString(object.scheduleType)
stream.WriteString(string(object.scheduleType))
count++
}
present_ = object.bitmap_&2048 != 0 && object.state != nil
Expand All @@ -153,7 +153,7 @@ func writeNodePoolUpgradePolicy(object *NodePoolUpgradePolicy, stream *jsoniter.
stream.WriteMore()
}
stream.WriteObjectField("upgrade_type")
stream.WriteString(object.upgradeType)
stream.WriteString(string(object.upgradeType))
count++
}
present_ = object.bitmap_&8192 != 0
Expand Down Expand Up @@ -240,15 +240,17 @@ func readNodePoolUpgradePolicy(iterator *jsoniter.Iterator) *NodePoolUpgradePoli
object.schedule = value
object.bitmap_ |= 512
case "schedule_type":
value := iterator.ReadString()
text := iterator.ReadString()
value := ScheduleType(text)
object.scheduleType = value
object.bitmap_ |= 1024
case "state":
value := readUpgradePolicyState(iterator)
object.state = value
object.bitmap_ |= 2048
case "upgrade_type":
value := iterator.ReadString()
text := iterator.ReadString()
value := UpgradeType(text)
object.upgradeType = value
object.bitmap_ |= 4096
case "version":
Expand Down
Loading
Loading