Skip to content

Commit

Permalink
Merge pull request #686 from oriAdler/release-0-1-292
Browse files Browse the repository at this point in the history
Release 0.1.292
  • Loading branch information
oriAdler authored Nov 3, 2022
2 parents de166b9 + f282749 commit 4ac0838
Show file tree
Hide file tree
Showing 10 changed files with 4,752 additions and 4,625 deletions.
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.292
- Update to model 0.0.231
- Add `AvailabilityZone` property to CloudProviderData model.
- Add `Public` property to Subnetwork model.

## 0.1.291
- Update to model 0.0.230
- Add creation timestamp and modification timestamp to provision shard
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.230
model_version:=v0.0.231
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
38 changes: 25 additions & 13 deletions clustersmgmt/v1/cloud_provider_data_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
//
// Description of a cloud provider data used for cloud provider inquiries.
type CloudProviderDataBuilder struct {
bitmap_ uint32
aws *AWSBuilder
gcp *GCPBuilder
keyLocation string
keyRingName string
region *CloudRegionBuilder
version *VersionBuilder
bitmap_ uint32
aws *AWSBuilder
gcp *GCPBuilder
availabilityZone string
keyLocation string
keyRingName string
region *CloudRegionBuilder
version *VersionBuilder
}

// NewCloudProviderData creates a new builder of 'cloud_provider_data' objects.
Expand Down Expand Up @@ -68,12 +69,21 @@ func (b *CloudProviderDataBuilder) GCP(value *GCPBuilder) *CloudProviderDataBuil
return b
}

// AvailabilityZone sets the value of the 'availability_zone' attribute to the given value.
//
//
func (b *CloudProviderDataBuilder) AvailabilityZone(value string) *CloudProviderDataBuilder {
b.availabilityZone = value
b.bitmap_ |= 4
return b
}

// KeyLocation sets the value of the 'key_location' attribute to the given value.
//
//
func (b *CloudProviderDataBuilder) KeyLocation(value string) *CloudProviderDataBuilder {
b.keyLocation = value
b.bitmap_ |= 4
b.bitmap_ |= 8
return b
}

Expand All @@ -82,7 +92,7 @@ func (b *CloudProviderDataBuilder) KeyLocation(value string) *CloudProviderDataB
//
func (b *CloudProviderDataBuilder) KeyRingName(value string) *CloudProviderDataBuilder {
b.keyRingName = value
b.bitmap_ |= 8
b.bitmap_ |= 16
return b
}

Expand All @@ -92,9 +102,9 @@ func (b *CloudProviderDataBuilder) KeyRingName(value string) *CloudProviderDataB
func (b *CloudProviderDataBuilder) Region(value *CloudRegionBuilder) *CloudProviderDataBuilder {
b.region = value
if value != nil {
b.bitmap_ |= 16
b.bitmap_ |= 32
} else {
b.bitmap_ &^= 16
b.bitmap_ &^= 32
}
return b
}
Expand All @@ -105,9 +115,9 @@ func (b *CloudProviderDataBuilder) Region(value *CloudRegionBuilder) *CloudProvi
func (b *CloudProviderDataBuilder) Version(value *VersionBuilder) *CloudProviderDataBuilder {
b.version = value
if value != nil {
b.bitmap_ |= 32
b.bitmap_ |= 64
} else {
b.bitmap_ &^= 32
b.bitmap_ &^= 64
}
return b
}
Expand All @@ -128,6 +138,7 @@ func (b *CloudProviderDataBuilder) Copy(object *CloudProviderData) *CloudProvide
} else {
b.gcp = nil
}
b.availabilityZone = object.availabilityZone
b.keyLocation = object.keyLocation
b.keyRingName = object.keyRingName
if object.region != nil {
Expand Down Expand Up @@ -159,6 +170,7 @@ func (b *CloudProviderDataBuilder) Build() (object *CloudProviderData, err error
return
}
}
object.availabilityZone = b.availabilityZone
object.keyLocation = b.keyLocation
object.keyRingName = b.keyRingName
if b.region != nil {
Expand Down
54 changes: 39 additions & 15 deletions clustersmgmt/v1/cloud_provider_data_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
//
// Description of a cloud provider data used for cloud provider inquiries.
type CloudProviderData struct {
bitmap_ uint32
aws *AWS
gcp *GCP
keyLocation string
keyRingName string
region *CloudRegion
version *Version
bitmap_ uint32
aws *AWS
gcp *GCP
availabilityZone string
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 @@ -83,12 +84,35 @@ func (o *CloudProviderData) GetGCP() (value *GCP, ok bool) {
return
}

// AvailabilityZone returns the value of the 'availability_zone' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Availability zone
func (o *CloudProviderData) AvailabilityZone() string {
if o != nil && o.bitmap_&4 != 0 {
return o.availabilityZone
}
return ""
}

// GetAvailabilityZone returns the value of the 'availability_zone' attribute and
// a flag indicating if the attribute has a value.
//
// Availability zone
func (o *CloudProviderData) GetAvailabilityZone() (value string, ok bool) {
ok = o != nil && o.bitmap_&4 != 0
if ok {
value = o.availabilityZone
}
return
}

// KeyLocation returns the value of the 'key_location' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Key location
func (o *CloudProviderData) KeyLocation() string {
if o != nil && o.bitmap_&4 != 0 {
if o != nil && o.bitmap_&8 != 0 {
return o.keyLocation
}
return ""
Expand All @@ -99,7 +123,7 @@ func (o *CloudProviderData) KeyLocation() string {
//
// Key location
func (o *CloudProviderData) GetKeyLocation() (value string, ok bool) {
ok = o != nil && o.bitmap_&4 != 0
ok = o != nil && o.bitmap_&8 != 0
if ok {
value = o.keyLocation
}
Expand All @@ -111,7 +135,7 @@ func (o *CloudProviderData) GetKeyLocation() (value string, ok bool) {
//
// Key ring name
func (o *CloudProviderData) KeyRingName() string {
if o != nil && o.bitmap_&8 != 0 {
if o != nil && o.bitmap_&16 != 0 {
return o.keyRingName
}
return ""
Expand All @@ -122,7 +146,7 @@ func (o *CloudProviderData) KeyRingName() string {
//
// Key ring name
func (o *CloudProviderData) GetKeyRingName() (value string, ok bool) {
ok = o != nil && o.bitmap_&8 != 0
ok = o != nil && o.bitmap_&16 != 0
if ok {
value = o.keyRingName
}
Expand All @@ -134,7 +158,7 @@ func (o *CloudProviderData) GetKeyRingName() (value string, ok bool) {
//
// Region
func (o *CloudProviderData) Region() *CloudRegion {
if o != nil && o.bitmap_&16 != 0 {
if o != nil && o.bitmap_&32 != 0 {
return o.region
}
return nil
Expand All @@ -145,7 +169,7 @@ func (o *CloudProviderData) Region() *CloudRegion {
//
// Region
func (o *CloudProviderData) GetRegion() (value *CloudRegion, ok bool) {
ok = o != nil && o.bitmap_&16 != 0
ok = o != nil && o.bitmap_&32 != 0
if ok {
value = o.region
}
Expand All @@ -157,7 +181,7 @@ func (o *CloudProviderData) GetRegion() (value *CloudRegion, ok bool) {
//
// Openshift version
func (o *CloudProviderData) Version() *Version {
if o != nil && o.bitmap_&32 != 0 {
if o != nil && o.bitmap_&64 != 0 {
return o.version
}
return nil
Expand All @@ -168,7 +192,7 @@ func (o *CloudProviderData) Version() *Version {
//
// Openshift version
func (o *CloudProviderData) GetVersion() (value *Version, ok bool) {
ok = o != nil && o.bitmap_&32 != 0
ok = o != nil && o.bitmap_&64 != 0
if ok {
value = o.version
}
Expand Down
27 changes: 20 additions & 7 deletions clustersmgmt/v1/cloud_provider_data_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ func writeCloudProviderData(object *CloudProviderData, stream *jsoniter.Stream)
count++
}
present_ = object.bitmap_&4 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("availability_zone")
stream.WriteString(object.availabilityZone)
count++
}
present_ = object.bitmap_&8 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -69,7 +78,7 @@ func writeCloudProviderData(object *CloudProviderData, stream *jsoniter.Stream)
stream.WriteString(object.keyLocation)
count++
}
present_ = object.bitmap_&8 != 0
present_ = object.bitmap_&16 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -78,7 +87,7 @@ func writeCloudProviderData(object *CloudProviderData, stream *jsoniter.Stream)
stream.WriteString(object.keyRingName)
count++
}
present_ = object.bitmap_&16 != 0 && object.region != nil
present_ = object.bitmap_&32 != 0 && object.region != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -87,7 +96,7 @@ func writeCloudProviderData(object *CloudProviderData, stream *jsoniter.Stream)
writeCloudRegion(object.region, stream)
count++
}
present_ = object.bitmap_&32 != 0 && object.version != nil
present_ = object.bitmap_&64 != 0 && object.version != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -127,22 +136,26 @@ func readCloudProviderData(iterator *jsoniter.Iterator) *CloudProviderData {
value := readGCP(iterator)
object.gcp = value
object.bitmap_ |= 2
case "availability_zone":
value := iterator.ReadString()
object.availabilityZone = value
object.bitmap_ |= 4
case "key_location":
value := iterator.ReadString()
object.keyLocation = value
object.bitmap_ |= 4
object.bitmap_ |= 8
case "key_ring_name":
value := iterator.ReadString()
object.keyRingName = value
object.bitmap_ |= 8
object.bitmap_ |= 16
case "region":
value := readCloudRegion(iterator)
object.region = value
object.bitmap_ |= 16
object.bitmap_ |= 32
case "version":
value := readVersion(iterator)
object.version = value
object.bitmap_ |= 32
object.bitmap_ |= 64
default:
iterator.ReadAny()
}
Expand Down
Loading

0 comments on commit 4ac0838

Please sign in to comment.