Skip to content

Commit

Permalink
[SDA-8369] Bump api model to 0.0.263 (#742)
Browse files Browse the repository at this point in the history
* Update api model to v0.0.263 and prepare for release

* Bump api model to 0.0.263
  • Loading branch information
hunterkepley authored Mar 7, 2023
1 parent 1eb9aa5 commit 04a4e36
Show file tree
Hide file tree
Showing 6 changed files with 341 additions and 278 deletions.
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.262
model_version:=v0.0.263
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
548 changes: 280 additions & 268 deletions clustersmgmt/v1/openapi.go

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions clustersmgmt/v1/version_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type VersionBuilder struct {
rosaEnabled bool
default_ bool
enabled bool
hypershiftEnabled bool
}

// NewVersion creates a new builder of 'version' objects.
Expand Down Expand Up @@ -113,17 +114,24 @@ func (b *VersionBuilder) EndOfLifeTimestamp(value time.Time) *VersionBuilder {
return b
}

// HypershiftEnabled sets the value of the 'hypershift_enabled' attribute to the given value.
func (b *VersionBuilder) HypershiftEnabled(value bool) *VersionBuilder {
b.hypershiftEnabled = value
b.bitmap_ |= 512
return b
}

// RawID sets the value of the 'raw_ID' attribute to the given value.
func (b *VersionBuilder) RawID(value string) *VersionBuilder {
b.rawID = value
b.bitmap_ |= 512
b.bitmap_ |= 1024
return b
}

// ReleaseImage sets the value of the 'release_image' attribute to the given value.
func (b *VersionBuilder) ReleaseImage(value string) *VersionBuilder {
b.releaseImage = value
b.bitmap_ |= 1024
b.bitmap_ |= 2048
return b
}

Expand All @@ -146,6 +154,7 @@ func (b *VersionBuilder) Copy(object *Version) *VersionBuilder {
b.default_ = object.default_
b.enabled = object.enabled
b.endOfLifeTimestamp = object.endOfLifeTimestamp
b.hypershiftEnabled = object.hypershiftEnabled
b.rawID = object.rawID
b.releaseImage = object.releaseImage
return b
Expand All @@ -166,6 +175,7 @@ func (b *VersionBuilder) Build() (object *Version, err error) {
object.default_ = b.default_
object.enabled = b.enabled
object.endOfLifeTimestamp = b.endOfLifeTimestamp
object.hypershiftEnabled = b.hypershiftEnabled
object.rawID = b.rawID
object.releaseImage = b.releaseImage
return
Expand Down
32 changes: 28 additions & 4 deletions clustersmgmt/v1/version_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ type Version struct {
rosaEnabled bool
default_ bool
enabled bool
hypershiftEnabled bool
}

// Kind returns the name of the type of the object.
Expand Down Expand Up @@ -255,12 +256,35 @@ func (o *Version) GetEndOfLifeTimestamp() (value time.Time, ok bool) {
return
}

// HypershiftEnabled returns the value of the 'hypershift_enabled' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// HypershiftEnabled indicates whether this version can be used to create Hypershift clusters.
func (o *Version) HypershiftEnabled() bool {
if o != nil && o.bitmap_&512 != 0 {
return o.hypershiftEnabled
}
return false
}

// GetHypershiftEnabled returns the value of the 'hypershift_enabled' attribute and
// a flag indicating if the attribute has a value.
//
// HypershiftEnabled indicates whether this version can be used to create Hypershift clusters.
func (o *Version) GetHypershiftEnabled() (value bool, ok bool) {
ok = o != nil && o.bitmap_&512 != 0
if ok {
value = o.hypershiftEnabled
}
return
}

// RawID returns the value of the 'raw_ID' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// RawID is the id of the version - without channel group and prefix.
func (o *Version) RawID() string {
if o != nil && o.bitmap_&512 != 0 {
if o != nil && o.bitmap_&1024 != 0 {
return o.rawID
}
return ""
Expand All @@ -271,7 +295,7 @@ func (o *Version) RawID() string {
//
// RawID is the id of the version - without channel group and prefix.
func (o *Version) GetRawID() (value string, ok bool) {
ok = o != nil && o.bitmap_&512 != 0
ok = o != nil && o.bitmap_&1024 != 0
if ok {
value = o.rawID
}
Expand All @@ -283,7 +307,7 @@ func (o *Version) GetRawID() (value string, ok bool) {
//
// ReleaseImage contains the URI of Openshift release image
func (o *Version) ReleaseImage() string {
if o != nil && o.bitmap_&1024 != 0 {
if o != nil && o.bitmap_&2048 != 0 {
return o.releaseImage
}
return ""
Expand All @@ -294,7 +318,7 @@ func (o *Version) ReleaseImage() string {
//
// ReleaseImage contains the URI of Openshift release image
func (o *Version) GetReleaseImage() (value string, ok bool) {
ok = o != nil && o.bitmap_&1024 != 0
ok = o != nil && o.bitmap_&2048 != 0
if ok {
value = o.releaseImage
}
Expand Down
19 changes: 16 additions & 3 deletions clustersmgmt/v1/version_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ func writeVersion(object *Version, stream *jsoniter.Stream) {
count++
}
present_ = object.bitmap_&512 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("hypershift_enabled")
stream.WriteBool(object.hypershiftEnabled)
count++
}
present_ = object.bitmap_&1024 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -129,7 +138,7 @@ func writeVersion(object *Version, stream *jsoniter.Stream) {
stream.WriteString(object.rawID)
count++
}
present_ = object.bitmap_&1024 != 0
present_ = object.bitmap_&2048 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -200,14 +209,18 @@ func readVersion(iterator *jsoniter.Iterator) *Version {
}
object.endOfLifeTimestamp = value
object.bitmap_ |= 256
case "hypershift_enabled":
value := iterator.ReadBool()
object.hypershiftEnabled = value
object.bitmap_ |= 512
case "raw_id":
value := iterator.ReadString()
object.rawID = value
object.bitmap_ |= 512
object.bitmap_ |= 1024
case "release_image":
value := iterator.ReadString()
object.releaseImage = value
object.bitmap_ |= 1024
object.bitmap_ |= 2048
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 @@ -12778,6 +12778,10 @@
"type": "string",
"format": "date-time"
},
"hypershift_enabled": {
"description": "HypershiftEnabled indicates whether this version can be used to create Hypershift clusters.",
"type": "boolean"
},
"raw_id": {
"description": "RawID is the id of the version - without channel group and prefix.",
"type": "string"
Expand Down

0 comments on commit 04a4e36

Please sign in to comment.