Skip to content

Commit

Permalink
Release 0.1.287
Browse files Browse the repository at this point in the history
Related: SDA-6766
  • Loading branch information
oriAdler committed Sep 13, 2022
1 parent 8530235 commit 24d813a
Show file tree
Hide file tree
Showing 14 changed files with 4,755 additions and 4,543 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
This document describes the relevant changes between releases of the OCM API
SDK.

## 0.1.287
- Update to model 0.0.223:
- Add Version property to CloudProviderData model.
- Add InfraID property to Cluster model.
- Drop deprecated DisplayName property from ClusterRegistration model.
- Add ConsoleUrl and DisplayName properties to ClusterRegistration model and correct documentation.

## 0.1.286
- Update to model 0.0.220:
- Add `ManagedBy` property in RoleBinding type
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.220
model_version:=v0.0.223
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
25 changes: 25 additions & 0 deletions clustersmgmt/v1/cloud_provider_data_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type CloudProviderDataBuilder struct {
keyLocation string
keyRingName string
region *CloudRegionBuilder
version *VersionBuilder
}

// NewCloudProviderData creates a new builder of 'cloud_provider_data' objects.
Expand Down Expand Up @@ -98,6 +99,19 @@ func (b *CloudProviderDataBuilder) Region(value *CloudRegionBuilder) *CloudProvi
return b
}

// Version sets the value of the 'version' attribute to the given value.
//
// Representation of an _OpenShift_ version.
func (b *CloudProviderDataBuilder) Version(value *VersionBuilder) *CloudProviderDataBuilder {
b.version = value
if value != nil {
b.bitmap_ |= 32
} else {
b.bitmap_ &^= 32
}
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *CloudProviderDataBuilder) Copy(object *CloudProviderData) *CloudProviderDataBuilder {
if object == nil {
Expand All @@ -121,6 +135,11 @@ func (b *CloudProviderDataBuilder) Copy(object *CloudProviderData) *CloudProvide
} else {
b.region = nil
}
if object.version != nil {
b.version = NewVersion().Copy(object.version)
} else {
b.version = nil
}
return b
}

Expand Down Expand Up @@ -148,5 +167,11 @@ func (b *CloudProviderDataBuilder) Build() (object *CloudProviderData, err error
return
}
}
if b.version != nil {
object.version, err = b.version.Build()
if err != nil {
return
}
}
return
}
24 changes: 24 additions & 0 deletions clustersmgmt/v1/cloud_provider_data_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type CloudProviderData struct {
keyLocation string
keyRingName string
region *CloudRegion
version *Version
}

// Empty returns true if the object is empty, i.e. no attribute has a value.
Expand Down Expand Up @@ -151,6 +152,29 @@ func (o *CloudProviderData) GetRegion() (value *CloudRegion, ok bool) {
return
}

// Version returns the value of the 'version' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Openshift version
func (o *CloudProviderData) Version() *Version {
if o != nil && o.bitmap_&32 != 0 {
return o.version
}
return nil
}

// GetVersion returns the value of the 'version' attribute and
// a flag indicating if the attribute has a value.
//
// Openshift version
func (o *CloudProviderData) GetVersion() (value *Version, ok bool) {
ok = o != nil && o.bitmap_&32 != 0
if ok {
value = o.version
}
return
}

// CloudProviderDataListKind is the name of the type used to represent list of objects of
// type 'cloud_provider_data'.
const CloudProviderDataListKind = "CloudProviderDataList"
Expand Down
13 changes: 13 additions & 0 deletions clustersmgmt/v1/cloud_provider_data_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ func writeCloudProviderData(object *CloudProviderData, stream *jsoniter.Stream)
}
stream.WriteObjectField("region")
writeCloudRegion(object.region, stream)
count++
}
present_ = object.bitmap_&32 != 0 && object.version != nil
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("version")
writeVersion(object.version, stream)
}
stream.WriteObjectEnd()
}
Expand Down Expand Up @@ -130,6 +139,10 @@ func readCloudProviderData(iterator *jsoniter.Iterator) *CloudProviderData {
value := readCloudRegion(iterator)
object.region = value
object.bitmap_ |= 16
case "version":
value := readVersion(iterator)
object.version = value
object.bitmap_ |= 32
default:
iterator.ReadAny()
}
Expand Down
Loading

0 comments on commit 24d813a

Please sign in to comment.