Skip to content

Commit

Permalink
Release 0.1.294
Browse files Browse the repository at this point in the history
  • Loading branch information
andreadecorte authored and tbrisker committed Nov 21, 2022
1 parent e5facb4 commit 3d127e4
Show file tree
Hide file tree
Showing 8 changed files with 4,567 additions and 4,498 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.294
- Update to model 0.0.233
- Add SupportsHypershift property to CloudRegion model.

## 0.1.293
- Update to model 0.0.232
- Modify `availabilityZone` property in CloudProviderData model from `string` to `[]string`.
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.232
model_version:=v0.0.233
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
32 changes: 22 additions & 10 deletions clustersmgmt/v1/cloud_region_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
//
// Description of a region of a cloud provider.
type CloudRegionBuilder struct {
bitmap_ uint32
id string
href string
cloudProvider *CloudProviderBuilder
displayName string
name string
ccsOnly bool
enabled bool
supportsMultiAZ bool
bitmap_ uint32
id string
href string
cloudProvider *CloudProviderBuilder
displayName string
name string
ccsOnly bool
enabled bool
supportsHypershift bool
supportsMultiAZ bool
}

// NewCloudRegion creates a new builder of 'cloud_region' objects.
Expand Down Expand Up @@ -113,12 +114,21 @@ func (b *CloudRegionBuilder) Name(value string) *CloudRegionBuilder {
return b
}

// SupportsHypershift sets the value of the 'supports_hypershift' attribute to the given value.
//
//
func (b *CloudRegionBuilder) SupportsHypershift(value bool) *CloudRegionBuilder {
b.supportsHypershift = value
b.bitmap_ |= 256
return b
}

// SupportsMultiAZ sets the value of the 'supports_multi_AZ' attribute to the given value.
//
//
func (b *CloudRegionBuilder) SupportsMultiAZ(value bool) *CloudRegionBuilder {
b.supportsMultiAZ = value
b.bitmap_ |= 256
b.bitmap_ |= 512
return b
}

Expand All @@ -139,6 +149,7 @@ func (b *CloudRegionBuilder) Copy(object *CloudRegion) *CloudRegionBuilder {
b.displayName = object.displayName
b.enabled = object.enabled
b.name = object.name
b.supportsHypershift = object.supportsHypershift
b.supportsMultiAZ = object.supportsMultiAZ
return b
}
Expand All @@ -159,6 +170,7 @@ func (b *CloudRegionBuilder) Build() (object *CloudRegion, err error) {
object.displayName = b.displayName
object.enabled = b.enabled
object.name = b.name
object.supportsHypershift = b.supportsHypershift
object.supportsMultiAZ = b.supportsMultiAZ
return
}
46 changes: 35 additions & 11 deletions clustersmgmt/v1/cloud_region_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ const CloudRegionNilKind = "CloudRegionNil"
//
// Description of a region of a cloud provider.
type CloudRegion struct {
bitmap_ uint32
id string
href string
cloudProvider *CloudProvider
displayName string
name string
ccsOnly bool
enabled bool
supportsMultiAZ bool
bitmap_ uint32
id string
href string
cloudProvider *CloudProvider
displayName string
name string
ccsOnly bool
enabled bool
supportsHypershift bool
supportsMultiAZ bool
}

// Kind returns the name of the type of the object.
Expand Down Expand Up @@ -224,12 +225,35 @@ func (o *CloudRegion) GetName() (value string, ok bool) {
return
}

// SupportsHypershift returns the value of the 'supports_hypershift' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// 'true' if the region is supported for Hypershift deployments, 'false' otherwise.
func (o *CloudRegion) SupportsHypershift() bool {
if o != nil && o.bitmap_&256 != 0 {
return o.supportsHypershift
}
return false
}

// GetSupportsHypershift returns the value of the 'supports_hypershift' attribute and
// a flag indicating if the attribute has a value.
//
// 'true' if the region is supported for Hypershift deployments, 'false' otherwise.
func (o *CloudRegion) GetSupportsHypershift() (value bool, ok bool) {
ok = o != nil && o.bitmap_&256 != 0
if ok {
value = o.supportsHypershift
}
return
}

// SupportsMultiAZ returns the value of the 'supports_multi_AZ' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Whether the region supports multiple availability zones.
func (o *CloudRegion) SupportsMultiAZ() bool {
if o != nil && o.bitmap_&256 != 0 {
if o != nil && o.bitmap_&512 != 0 {
return o.supportsMultiAZ
}
return false
Expand All @@ -240,7 +264,7 @@ func (o *CloudRegion) SupportsMultiAZ() bool {
//
// Whether the region supports multiple availability zones.
func (o *CloudRegion) GetSupportsMultiAZ() (value bool, ok bool) {
ok = o != nil && o.bitmap_&256 != 0
ok = o != nil && o.bitmap_&512 != 0
if ok {
value = o.supportsMultiAZ
}
Expand Down
15 changes: 14 additions & 1 deletion clustersmgmt/v1/cloud_region_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ func writeCloudRegion(object *CloudRegion, stream *jsoniter.Stream) {
count++
}
present_ = object.bitmap_&256 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("supports_hypershift")
stream.WriteBool(object.supportsHypershift)
count++
}
present_ = object.bitmap_&512 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -173,10 +182,14 @@ func readCloudRegion(iterator *jsoniter.Iterator) *CloudRegion {
value := iterator.ReadString()
object.name = value
object.bitmap_ |= 128
case "supports_hypershift":
value := iterator.ReadBool()
object.supportsHypershift = value
object.bitmap_ |= 256
case "supports_multi_az":
value := iterator.ReadBool()
object.supportsMultiAZ = value
object.bitmap_ |= 256
object.bitmap_ |= 512
default:
iterator.ReadAny()
}
Expand Down
Loading

0 comments on commit 3d127e4

Please sign in to comment.