Skip to content

Commit

Permalink
Bump ocm-api-model version to 0.0.316
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasponce authored and tbrisker committed Sep 11, 2023
1 parent a085b21 commit 97a758c
Show file tree
Hide file tree
Showing 14 changed files with 6,716 additions and 6,414 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.315
model_version:=v0.0.316
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
16 changes: 13 additions & 3 deletions clustersmgmt/v1/cloud_vpc_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
type CloudVPCBuilder struct {
bitmap_ uint32
awsSubnets []*SubnetworkBuilder
cidrBlock string
id string
name string
subnets []string
Expand All @@ -48,25 +49,32 @@ func (b *CloudVPCBuilder) AWSSubnets(values ...*SubnetworkBuilder) *CloudVPCBuil
return b
}

// CIDRBlock sets the value of the 'CIDR_block' attribute to the given value.
func (b *CloudVPCBuilder) CIDRBlock(value string) *CloudVPCBuilder {
b.cidrBlock = value
b.bitmap_ |= 2
return b
}

// ID sets the value of the 'ID' attribute to the given value.
func (b *CloudVPCBuilder) ID(value string) *CloudVPCBuilder {
b.id = value
b.bitmap_ |= 2
b.bitmap_ |= 4
return b
}

// Name sets the value of the 'name' attribute to the given value.
func (b *CloudVPCBuilder) Name(value string) *CloudVPCBuilder {
b.name = value
b.bitmap_ |= 4
b.bitmap_ |= 8
return b
}

// Subnets sets the value of the 'subnets' attribute to the given values.
func (b *CloudVPCBuilder) Subnets(values ...string) *CloudVPCBuilder {
b.subnets = make([]string, len(values))
copy(b.subnets, values)
b.bitmap_ |= 8
b.bitmap_ |= 16
return b
}

Expand All @@ -84,6 +92,7 @@ func (b *CloudVPCBuilder) Copy(object *CloudVPC) *CloudVPCBuilder {
} else {
b.awsSubnets = nil
}
b.cidrBlock = object.cidrBlock
b.id = object.id
b.name = object.name
if object.subnets != nil {
Expand All @@ -108,6 +117,7 @@ func (b *CloudVPCBuilder) Build() (object *CloudVPC, err error) {
}
}
}
object.cidrBlock = b.cidrBlock
object.id = b.id
object.name = b.name
if b.subnets != nil {
Expand Down
48 changes: 36 additions & 12 deletions clustersmgmt/v1/cloud_vpc_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
type CloudVPC struct {
bitmap_ uint32
awsSubnets []*Subnetwork
cidrBlock string
id string
name string
subnets []string
Expand All @@ -38,7 +39,7 @@ func (o *CloudVPC) Empty() bool {
// AWSSubnets returns the value of the 'AWS_subnets' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// List of subnetworks
// List of AWS subnetworks with details.
func (o *CloudVPC) AWSSubnets() []*Subnetwork {
if o != nil && o.bitmap_&1 != 0 {
return o.awsSubnets
Expand All @@ -49,7 +50,7 @@ func (o *CloudVPC) AWSSubnets() []*Subnetwork {
// GetAWSSubnets returns the value of the 'AWS_subnets' attribute and
// a flag indicating if the attribute has a value.
//
// List of subnetworks
// List of AWS subnetworks with details.
func (o *CloudVPC) GetAWSSubnets() (value []*Subnetwork, ok bool) {
ok = o != nil && o.bitmap_&1 != 0
if ok {
Expand All @@ -58,12 +59,35 @@ func (o *CloudVPC) GetAWSSubnets() (value []*Subnetwork, ok bool) {
return
}

// CIDRBlock returns the value of the 'CIDR_block' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// CIDR block of the virtual private cloud.
func (o *CloudVPC) CIDRBlock() string {
if o != nil && o.bitmap_&2 != 0 {
return o.cidrBlock
}
return ""
}

// GetCIDRBlock returns the value of the 'CIDR_block' attribute and
// a flag indicating if the attribute has a value.
//
// CIDR block of the virtual private cloud.
func (o *CloudVPC) GetCIDRBlock() (value string, ok bool) {
ok = o != nil && o.bitmap_&2 != 0
if ok {
value = o.cidrBlock
}
return
}

// ID returns the value of the 'ID' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// ID of virtual private cloud
// ID of virtual private cloud.
func (o *CloudVPC) ID() string {
if o != nil && o.bitmap_&2 != 0 {
if o != nil && o.bitmap_&4 != 0 {
return o.id
}
return ""
Expand All @@ -72,9 +96,9 @@ func (o *CloudVPC) ID() string {
// GetID returns the value of the 'ID' attribute and
// a flag indicating if the attribute has a value.
//
// ID of virtual private cloud
// ID of virtual private cloud.
func (o *CloudVPC) GetID() (value string, ok bool) {
ok = o != nil && o.bitmap_&2 != 0
ok = o != nil && o.bitmap_&4 != 0
if ok {
value = o.id
}
Expand All @@ -84,9 +108,9 @@ func (o *CloudVPC) GetID() (value string, ok bool) {
// Name returns the value of the 'name' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Name of virtual private cloud according to its `Name` tag on AWS
// Name of virtual private cloud according to its `Name` tag on AWS.
func (o *CloudVPC) Name() string {
if o != nil && o.bitmap_&4 != 0 {
if o != nil && o.bitmap_&8 != 0 {
return o.name
}
return ""
Expand All @@ -95,9 +119,9 @@ func (o *CloudVPC) Name() string {
// GetName returns the value of the 'name' attribute and
// a flag indicating if the attribute has a value.
//
// Name of virtual private cloud according to its `Name` tag on AWS
// Name of virtual private cloud according to its `Name` tag on AWS.
func (o *CloudVPC) GetName() (value string, ok bool) {
ok = o != nil && o.bitmap_&4 != 0
ok = o != nil && o.bitmap_&8 != 0
if ok {
value = o.name
}
Expand All @@ -109,7 +133,7 @@ func (o *CloudVPC) GetName() (value string, ok bool) {
//
// List of subnets used by the virtual private cloud.
func (o *CloudVPC) Subnets() []string {
if o != nil && o.bitmap_&8 != 0 {
if o != nil && o.bitmap_&16 != 0 {
return o.subnets
}
return nil
Expand All @@ -120,7 +144,7 @@ func (o *CloudVPC) Subnets() []string {
//
// List of subnets used by the virtual private cloud.
func (o *CloudVPC) GetSubnets() (value []string, ok bool) {
ok = o != nil && o.bitmap_&8 != 0
ok = o != nil && o.bitmap_&16 != 0
if ok {
value = o.subnets
}
Expand Down
23 changes: 18 additions & 5 deletions clustersmgmt/v1/cloud_vpc_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ func writeCloudVPC(object *CloudVPC, stream *jsoniter.Stream) {
count++
}
present_ = object.bitmap_&2 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("cidr_block")
stream.WriteString(object.cidrBlock)
count++
}
present_ = object.bitmap_&4 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -60,7 +69,7 @@ func writeCloudVPC(object *CloudVPC, stream *jsoniter.Stream) {
stream.WriteString(object.id)
count++
}
present_ = object.bitmap_&4 != 0
present_ = object.bitmap_&8 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -69,7 +78,7 @@ func writeCloudVPC(object *CloudVPC, stream *jsoniter.Stream) {
stream.WriteString(object.name)
count++
}
present_ = object.bitmap_&8 != 0 && object.subnets != nil
present_ = object.bitmap_&16 != 0 && object.subnets != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -105,18 +114,22 @@ func readCloudVPC(iterator *jsoniter.Iterator) *CloudVPC {
value := readSubnetworkList(iterator)
object.awsSubnets = value
object.bitmap_ |= 1
case "cidr_block":
value := iterator.ReadString()
object.cidrBlock = value
object.bitmap_ |= 2
case "id":
value := iterator.ReadString()
object.id = value
object.bitmap_ |= 2
object.bitmap_ |= 4
case "name":
value := iterator.ReadString()
object.name = value
object.bitmap_ |= 4
object.bitmap_ |= 8
case "subnets":
value := readStringList(iterator)
object.subnets = value
object.bitmap_ |= 8
object.bitmap_ |= 16
default:
iterator.ReadAny()
}
Expand Down
Loading

0 comments on commit 97a758c

Please sign in to comment.