Skip to content

Commit

Permalink
Merge pull request #1031 from renan-campos/new-release
Browse files Browse the repository at this point in the history
New release v0.1.460
  • Loading branch information
davidleerh authored Feb 27, 2025
2 parents 9256028 + 8e5d706 commit 4758f40
Show file tree
Hide file tree
Showing 8 changed files with 721 additions and 646 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
This document describes the relevant changes between releases of the OCM API
SDK.

## 0.1.460
- Updated model version to v0.0.412
- Added `ClusterCondition` field to `VersionGate` type

## 0.1.459
- Update model version to v0.0.411
- Update json values for SDN to OVN Cluster Migration configuration properties
Expand Down
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.411
model_version:=v0.0.412
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
1,230 changes: 623 additions & 607 deletions clustersmgmt/v1/openapi.go

Large diffs are not rendered by default.

24 changes: 17 additions & 7 deletions clustersmgmt/v1/version_gate_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type VersionGateBuilder struct {
bitmap_ uint32
id string
href string
clusterCondition string
creationTimestamp time.Time
description string
documentationURL string
Expand Down Expand Up @@ -77,52 +78,59 @@ func (b *VersionGateBuilder) STSOnly(value bool) *VersionGateBuilder {
return b
}

// ClusterCondition sets the value of the 'cluster_condition' attribute to the given value.
func (b *VersionGateBuilder) ClusterCondition(value string) *VersionGateBuilder {
b.clusterCondition = value
b.bitmap_ |= 16
return b
}

// CreationTimestamp sets the value of the 'creation_timestamp' attribute to the given value.
func (b *VersionGateBuilder) CreationTimestamp(value time.Time) *VersionGateBuilder {
b.creationTimestamp = value
b.bitmap_ |= 16
b.bitmap_ |= 32
return b
}

// Description sets the value of the 'description' attribute to the given value.
func (b *VersionGateBuilder) Description(value string) *VersionGateBuilder {
b.description = value
b.bitmap_ |= 32
b.bitmap_ |= 64
return b
}

// DocumentationURL sets the value of the 'documentation_URL' attribute to the given value.
func (b *VersionGateBuilder) DocumentationURL(value string) *VersionGateBuilder {
b.documentationURL = value
b.bitmap_ |= 64
b.bitmap_ |= 128
return b
}

// Label sets the value of the 'label' attribute to the given value.
func (b *VersionGateBuilder) Label(value string) *VersionGateBuilder {
b.label = value
b.bitmap_ |= 128
b.bitmap_ |= 256
return b
}

// Value sets the value of the 'value' attribute to the given value.
func (b *VersionGateBuilder) Value(value string) *VersionGateBuilder {
b.value = value
b.bitmap_ |= 256
b.bitmap_ |= 512
return b
}

// VersionRawIDPrefix sets the value of the 'version_raw_ID_prefix' attribute to the given value.
func (b *VersionGateBuilder) VersionRawIDPrefix(value string) *VersionGateBuilder {
b.versionRawIDPrefix = value
b.bitmap_ |= 512
b.bitmap_ |= 1024
return b
}

// WarningMessage sets the value of the 'warning_message' attribute to the given value.
func (b *VersionGateBuilder) WarningMessage(value string) *VersionGateBuilder {
b.warningMessage = value
b.bitmap_ |= 1024
b.bitmap_ |= 2048
return b
}

Expand All @@ -135,6 +143,7 @@ func (b *VersionGateBuilder) Copy(object *VersionGate) *VersionGateBuilder {
b.id = object.id
b.href = object.href
b.stsOnly = object.stsOnly
b.clusterCondition = object.clusterCondition
b.creationTimestamp = object.creationTimestamp
b.description = object.description
b.documentationURL = object.documentationURL
Expand All @@ -152,6 +161,7 @@ func (b *VersionGateBuilder) Build() (object *VersionGate, err error) {
object.href = b.href
object.bitmap_ = b.bitmap_
object.stsOnly = b.stsOnly
object.clusterCondition = b.clusterCondition
object.creationTimestamp = b.creationTimestamp
object.description = b.description
object.documentationURL = b.documentationURL
Expand Down
60 changes: 44 additions & 16 deletions clustersmgmt/v1/version_gate_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type VersionGate struct {
bitmap_ uint32
id string
href string
clusterCondition string
creationTimestamp time.Time
description string
documentationURL string
Expand Down Expand Up @@ -112,7 +113,8 @@ func (o *VersionGate) Empty() bool {
// STSOnly returns the value of the 'STS_only' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// STSOnly indicates if this version gate is for STS clusters only
// STSOnly indicates if this version gate is for STS clusters only,
// deprecated: to be replaced with ClusterCondition
func (o *VersionGate) STSOnly() bool {
if o != nil && o.bitmap_&8 != 0 {
return o.stsOnly
Expand All @@ -123,7 +125,8 @@ func (o *VersionGate) STSOnly() bool {
// GetSTSOnly returns the value of the 'STS_only' attribute and
// a flag indicating if the attribute has a value.
//
// STSOnly indicates if this version gate is for STS clusters only
// STSOnly indicates if this version gate is for STS clusters only,
// deprecated: to be replaced with ClusterCondition
func (o *VersionGate) GetSTSOnly() (value bool, ok bool) {
ok = o != nil && o.bitmap_&8 != 0
if ok {
Expand All @@ -132,13 +135,38 @@ func (o *VersionGate) GetSTSOnly() (value bool, ok bool) {
return
}

// ClusterCondition returns the value of the 'cluster_condition' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// ClusterCondition aims at selecting the clusters targeted by this version gate,
// ignored if STSOnly is true
func (o *VersionGate) ClusterCondition() string {
if o != nil && o.bitmap_&16 != 0 {
return o.clusterCondition
}
return ""
}

// GetClusterCondition returns the value of the 'cluster_condition' attribute and
// a flag indicating if the attribute has a value.
//
// ClusterCondition aims at selecting the clusters targeted by this version gate,
// ignored if STSOnly is true
func (o *VersionGate) GetClusterCondition() (value string, ok bool) {
ok = o != nil && o.bitmap_&16 != 0
if ok {
value = o.clusterCondition
}
return
}

// CreationTimestamp returns the value of the 'creation_timestamp' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// CreationTimestamp is the date and time when the version gate was created,
// format defined in https://www.ietf.org/rfc/rfc3339.txt[RC3339].
func (o *VersionGate) CreationTimestamp() time.Time {
if o != nil && o.bitmap_&16 != 0 {
if o != nil && o.bitmap_&32 != 0 {
return o.creationTimestamp
}
return time.Time{}
Expand All @@ -150,7 +178,7 @@ func (o *VersionGate) CreationTimestamp() time.Time {
// CreationTimestamp is the date and time when the version gate was created,
// format defined in https://www.ietf.org/rfc/rfc3339.txt[RC3339].
func (o *VersionGate) GetCreationTimestamp() (value time.Time, ok bool) {
ok = o != nil && o.bitmap_&16 != 0
ok = o != nil && o.bitmap_&32 != 0
if ok {
value = o.creationTimestamp
}
Expand All @@ -162,7 +190,7 @@ func (o *VersionGate) GetCreationTimestamp() (value time.Time, ok bool) {
//
// Description of the version gate.
func (o *VersionGate) Description() string {
if o != nil && o.bitmap_&32 != 0 {
if o != nil && o.bitmap_&64 != 0 {
return o.description
}
return ""
Expand All @@ -173,7 +201,7 @@ func (o *VersionGate) Description() string {
//
// Description of the version gate.
func (o *VersionGate) GetDescription() (value string, ok bool) {
ok = o != nil && o.bitmap_&32 != 0
ok = o != nil && o.bitmap_&64 != 0
if ok {
value = o.description
}
Expand All @@ -185,7 +213,7 @@ func (o *VersionGate) GetDescription() (value string, ok bool) {
//
// DocumentationURL is the URL for the documentation of the version gate.
func (o *VersionGate) DocumentationURL() string {
if o != nil && o.bitmap_&64 != 0 {
if o != nil && o.bitmap_&128 != 0 {
return o.documentationURL
}
return ""
Expand All @@ -196,7 +224,7 @@ func (o *VersionGate) DocumentationURL() string {
//
// DocumentationURL is the URL for the documentation of the version gate.
func (o *VersionGate) GetDocumentationURL() (value string, ok bool) {
ok = o != nil && o.bitmap_&64 != 0
ok = o != nil && o.bitmap_&128 != 0
if ok {
value = o.documentationURL
}
Expand All @@ -208,7 +236,7 @@ func (o *VersionGate) GetDocumentationURL() (value string, ok bool) {
//
// Label representing the version gate in OpenShift.
func (o *VersionGate) Label() string {
if o != nil && o.bitmap_&128 != 0 {
if o != nil && o.bitmap_&256 != 0 {
return o.label
}
return ""
Expand All @@ -219,7 +247,7 @@ func (o *VersionGate) Label() string {
//
// Label representing the version gate in OpenShift.
func (o *VersionGate) GetLabel() (value string, ok bool) {
ok = o != nil && o.bitmap_&128 != 0
ok = o != nil && o.bitmap_&256 != 0
if ok {
value = o.label
}
Expand All @@ -231,7 +259,7 @@ func (o *VersionGate) GetLabel() (value string, ok bool) {
//
// Value represents the required value of the label.
func (o *VersionGate) Value() string {
if o != nil && o.bitmap_&256 != 0 {
if o != nil && o.bitmap_&512 != 0 {
return o.value
}
return ""
Expand All @@ -242,7 +270,7 @@ func (o *VersionGate) Value() string {
//
// Value represents the required value of the label.
func (o *VersionGate) GetValue() (value string, ok bool) {
ok = o != nil && o.bitmap_&256 != 0
ok = o != nil && o.bitmap_&512 != 0
if ok {
value = o.value
}
Expand All @@ -254,7 +282,7 @@ func (o *VersionGate) GetValue() (value string, ok bool) {
//
// VersionRawIDPrefix represents the versions prefix that the gate applies to.
func (o *VersionGate) VersionRawIDPrefix() string {
if o != nil && o.bitmap_&512 != 0 {
if o != nil && o.bitmap_&1024 != 0 {
return o.versionRawIDPrefix
}
return ""
Expand All @@ -265,7 +293,7 @@ func (o *VersionGate) VersionRawIDPrefix() string {
//
// VersionRawIDPrefix represents the versions prefix that the gate applies to.
func (o *VersionGate) GetVersionRawIDPrefix() (value string, ok bool) {
ok = o != nil && o.bitmap_&512 != 0
ok = o != nil && o.bitmap_&1024 != 0
if ok {
value = o.versionRawIDPrefix
}
Expand All @@ -277,7 +305,7 @@ func (o *VersionGate) GetVersionRawIDPrefix() (value string, ok bool) {
//
// WarningMessage is a warning that will be displayed to the user before they acknowledge the gate
func (o *VersionGate) WarningMessage() string {
if o != nil && o.bitmap_&1024 != 0 {
if o != nil && o.bitmap_&2048 != 0 {
return o.warningMessage
}
return ""
Expand All @@ -288,7 +316,7 @@ func (o *VersionGate) WarningMessage() string {
//
// WarningMessage is a warning that will be displayed to the user before they acknowledge the gate
func (o *VersionGate) GetWarningMessage() (value string, ok bool) {
ok = o != nil && o.bitmap_&1024 != 0
ok = o != nil && o.bitmap_&2048 != 0
if ok {
value = o.warningMessage
}
Expand Down
Loading

0 comments on commit 4758f40

Please sign in to comment.