Skip to content

Commit

Permalink
Merge pull request #633 from ciaranRoche/update_model_0.0.196
Browse files Browse the repository at this point in the history
update model v0.0.196
  • Loading branch information
ciaranRoche authored Apr 20, 2022
2 parents 6d66c96 + 68b4eac commit 5c41bf9
Show file tree
Hide file tree
Showing 17 changed files with 5,771 additions and 5,134 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.195
model_version:=v0.0.196
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
18 changes: 3 additions & 15 deletions clustersmgmt/v1/add_on_installation_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ type AddOnInstallationBuilder struct {
creationTimestamp time.Time
operatorVersion string
parameters *AddOnInstallationParameterListBuilder
roleARN string
state AddOnInstallationState
stateDescription string
updatedTimestamp time.Time
Expand Down Expand Up @@ -172,21 +171,12 @@ func (b *AddOnInstallationBuilder) Parameters(value *AddOnInstallationParameterL
return b
}

// RoleARN sets the value of the 'role_ARN' attribute to the given value.
//
//
func (b *AddOnInstallationBuilder) RoleARN(value string) *AddOnInstallationBuilder {
b.roleARN = value
b.bitmap_ |= 512
return b
}

// State sets the value of the 'state' attribute to the given value.
//
// Representation of an add-on installation State field.
func (b *AddOnInstallationBuilder) State(value AddOnInstallationState) *AddOnInstallationBuilder {
b.state = value
b.bitmap_ |= 1024
b.bitmap_ |= 512
return b
}

Expand All @@ -195,7 +185,7 @@ func (b *AddOnInstallationBuilder) State(value AddOnInstallationState) *AddOnIns
//
func (b *AddOnInstallationBuilder) StateDescription(value string) *AddOnInstallationBuilder {
b.stateDescription = value
b.bitmap_ |= 2048
b.bitmap_ |= 1024
return b
}

Expand All @@ -204,7 +194,7 @@ func (b *AddOnInstallationBuilder) StateDescription(value string) *AddOnInstalla
//
func (b *AddOnInstallationBuilder) UpdatedTimestamp(value time.Time) *AddOnInstallationBuilder {
b.updatedTimestamp = value
b.bitmap_ |= 4096
b.bitmap_ |= 2048
return b
}

Expand Down Expand Up @@ -238,7 +228,6 @@ func (b *AddOnInstallationBuilder) Copy(object *AddOnInstallation) *AddOnInstall
} else {
b.parameters = nil
}
b.roleARN = object.roleARN
b.state = object.state
b.stateDescription = object.stateDescription
b.updatedTimestamp = object.updatedTimestamp
Expand Down Expand Up @@ -277,7 +266,6 @@ func (b *AddOnInstallationBuilder) Build() (object *AddOnInstallation, err error
return
}
}
object.roleARN = b.roleARN
object.state = b.state
object.stateDescription = b.stateDescription
object.updatedTimestamp = b.updatedTimestamp
Expand Down
36 changes: 6 additions & 30 deletions clustersmgmt/v1/add_on_installation_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ type AddOnInstallation struct {
creationTimestamp time.Time
operatorVersion string
parameters *AddOnInstallationParameterList
roleARN string
state AddOnInstallationState
stateDescription string
updatedTimestamp time.Time
Expand Down Expand Up @@ -249,35 +248,12 @@ func (o *AddOnInstallation) GetParameters() (value *AddOnInstallationParameterLi
return
}

// RoleARN returns the value of the 'role_ARN' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Role ARN used to authenticate the addon operator
func (o *AddOnInstallation) RoleARN() string {
if o != nil && o.bitmap_&512 != 0 {
return o.roleARN
}
return ""
}

// GetRoleARN returns the value of the 'role_ARN' attribute and
// a flag indicating if the attribute has a value.
//
// Role ARN used to authenticate the addon operator
func (o *AddOnInstallation) GetRoleARN() (value string, ok bool) {
ok = o != nil && o.bitmap_&512 != 0
if ok {
value = o.roleARN
}
return
}

// State returns the value of the 'state' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Overall state of the add-on installation.
func (o *AddOnInstallation) State() AddOnInstallationState {
if o != nil && o.bitmap_&1024 != 0 {
if o != nil && o.bitmap_&512 != 0 {
return o.state
}
return AddOnInstallationState("")
Expand All @@ -288,7 +264,7 @@ func (o *AddOnInstallation) State() AddOnInstallationState {
//
// Overall state of the add-on installation.
func (o *AddOnInstallation) GetState() (value AddOnInstallationState, ok bool) {
ok = o != nil && o.bitmap_&1024 != 0
ok = o != nil && o.bitmap_&512 != 0
if ok {
value = o.state
}
Expand All @@ -300,7 +276,7 @@ func (o *AddOnInstallation) GetState() (value AddOnInstallationState, ok bool) {
//
// Reason for the current State.
func (o *AddOnInstallation) StateDescription() string {
if o != nil && o.bitmap_&2048 != 0 {
if o != nil && o.bitmap_&1024 != 0 {
return o.stateDescription
}
return ""
Expand All @@ -311,7 +287,7 @@ func (o *AddOnInstallation) StateDescription() string {
//
// Reason for the current State.
func (o *AddOnInstallation) GetStateDescription() (value string, ok bool) {
ok = o != nil && o.bitmap_&2048 != 0
ok = o != nil && o.bitmap_&1024 != 0
if ok {
value = o.stateDescription
}
Expand All @@ -323,7 +299,7 @@ func (o *AddOnInstallation) GetStateDescription() (value string, ok bool) {
//
// Date and time when the add-on installation information was last updated.
func (o *AddOnInstallation) UpdatedTimestamp() time.Time {
if o != nil && o.bitmap_&4096 != 0 {
if o != nil && o.bitmap_&2048 != 0 {
return o.updatedTimestamp
}
return time.Time{}
Expand All @@ -334,7 +310,7 @@ func (o *AddOnInstallation) UpdatedTimestamp() time.Time {
//
// Date and time when the add-on installation information was last updated.
func (o *AddOnInstallation) GetUpdatedTimestamp() (value time.Time, ok bool) {
ok = o != nil && o.bitmap_&4096 != 0
ok = o != nil && o.bitmap_&2048 != 0
if ok {
value = o.updatedTimestamp
}
Expand Down
23 changes: 5 additions & 18 deletions clustersmgmt/v1/add_on_installation_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,6 @@ func writeAddOnInstallation(object *AddOnInstallation, stream *jsoniter.Stream)
count++
}
present_ = object.bitmap_&512 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("role_arn")
stream.WriteString(object.roleARN)
count++
}
present_ = object.bitmap_&1024 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -141,7 +132,7 @@ func writeAddOnInstallation(object *AddOnInstallation, stream *jsoniter.Stream)
stream.WriteString(string(object.state))
count++
}
present_ = object.bitmap_&2048 != 0
present_ = object.bitmap_&1024 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -150,7 +141,7 @@ func writeAddOnInstallation(object *AddOnInstallation, stream *jsoniter.Stream)
stream.WriteString(object.stateDescription)
count++
}
present_ = object.bitmap_&4096 != 0
present_ = object.bitmap_&2048 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -238,27 +229,23 @@ func readAddOnInstallation(iterator *jsoniter.Iterator) *AddOnInstallation {
}
object.parameters = value
object.bitmap_ |= 256
case "role_arn":
value := iterator.ReadString()
object.roleARN = value
object.bitmap_ |= 512
case "state":
text := iterator.ReadString()
value := AddOnInstallationState(text)
object.state = value
object.bitmap_ |= 1024
object.bitmap_ |= 512
case "state_description":
value := iterator.ReadString()
object.stateDescription = value
object.bitmap_ |= 2048
object.bitmap_ |= 1024
case "updated_timestamp":
text := iterator.ReadString()
value, err := time.Parse(time.RFC3339, text)
if err != nil {
iterator.ReportError("", err.Error())
}
object.updatedTimestamp = value
object.bitmap_ |= 4096
object.bitmap_ |= 2048
default:
iterator.ReadAny()
}
Expand Down
48 changes: 38 additions & 10 deletions clustersmgmt/v1/cluster_nodes_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
//
// Counts of different classes of nodes inside a cluster.
type ClusterNodesBuilder struct {
bitmap_ uint32
autoscaleCompute *MachinePoolAutoscalingBuilder
availabilityZones []string
compute int
computeLabels map[string]string
computeMachineType *MachineTypeBuilder
infra int
master int
total int
bitmap_ uint32
autoscaleCompute *MachinePoolAutoscalingBuilder
availabilityZones []string
compute int
computeLabels map[string]string
computeMachineType *MachineTypeBuilder
infra int
master int
securityGroupFilters []*MachinePoolSecurityGroupFilterBuilder
total int
}

// NewClusterNodes creates a new builder of 'cluster_nodes' objects.
Expand Down Expand Up @@ -120,12 +121,22 @@ func (b *ClusterNodesBuilder) Master(value int) *ClusterNodesBuilder {
return b
}

// SecurityGroupFilters sets the value of the 'security_group_filters' attribute to the given values.
//
//
func (b *ClusterNodesBuilder) SecurityGroupFilters(values ...*MachinePoolSecurityGroupFilterBuilder) *ClusterNodesBuilder {
b.securityGroupFilters = make([]*MachinePoolSecurityGroupFilterBuilder, len(values))
copy(b.securityGroupFilters, values)
b.bitmap_ |= 128
return b
}

// Total sets the value of the 'total' attribute to the given value.
//
//
func (b *ClusterNodesBuilder) Total(value int) *ClusterNodesBuilder {
b.total = value
b.bitmap_ |= 128
b.bitmap_ |= 256
return b
}

Expand Down Expand Up @@ -162,6 +173,14 @@ func (b *ClusterNodesBuilder) Copy(object *ClusterNodes) *ClusterNodesBuilder {
}
b.infra = object.infra
b.master = object.master
if object.securityGroupFilters != nil {
b.securityGroupFilters = make([]*MachinePoolSecurityGroupFilterBuilder, len(object.securityGroupFilters))
for i, v := range object.securityGroupFilters {
b.securityGroupFilters[i] = NewMachinePoolSecurityGroupFilter().Copy(v)
}
} else {
b.securityGroupFilters = nil
}
b.total = object.total
return b
}
Expand Down Expand Up @@ -195,6 +214,15 @@ func (b *ClusterNodesBuilder) Build() (object *ClusterNodes, err error) {
}
object.infra = b.infra
object.master = b.master
if b.securityGroupFilters != nil {
object.securityGroupFilters = make([]*MachinePoolSecurityGroupFilter, len(b.securityGroupFilters))
for i, v := range b.securityGroupFilters {
object.securityGroupFilters[i], err = v.Build()
if err != nil {
return
}
}
}
object.total = b.total
return
}
46 changes: 35 additions & 11 deletions clustersmgmt/v1/cluster_nodes_type.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
//
// Counts of different classes of nodes inside a cluster.
type ClusterNodes struct {
bitmap_ uint32
autoscaleCompute *MachinePoolAutoscaling
availabilityZones []string
compute int
computeLabels map[string]string
computeMachineType *MachineType
infra int
master int
total int
bitmap_ uint32
autoscaleCompute *MachinePoolAutoscaling
availabilityZones []string
compute int
computeLabels map[string]string
computeMachineType *MachineType
infra int
master int
securityGroupFilters []*MachinePoolSecurityGroupFilter
total int
}

// Empty returns true if the object is empty, i.e. no attribute has a value.
Expand Down Expand Up @@ -204,12 +205,35 @@ func (o *ClusterNodes) GetMaster() (value int, ok bool) {
return
}

// SecurityGroupFilters returns the value of the 'security_group_filters' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// List of security groups to be applied to nodes (Optional)
func (o *ClusterNodes) SecurityGroupFilters() []*MachinePoolSecurityGroupFilter {
if o != nil && o.bitmap_&128 != 0 {
return o.securityGroupFilters
}
return nil
}

// GetSecurityGroupFilters returns the value of the 'security_group_filters' attribute and
// a flag indicating if the attribute has a value.
//
// List of security groups to be applied to nodes (Optional)
func (o *ClusterNodes) GetSecurityGroupFilters() (value []*MachinePoolSecurityGroupFilter, ok bool) {
ok = o != nil && o.bitmap_&128 != 0
if ok {
value = o.securityGroupFilters
}
return
}

// Total returns the value of the 'total' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Total number of nodes of the cluster.
func (o *ClusterNodes) Total() int {
if o != nil && o.bitmap_&128 != 0 {
if o != nil && o.bitmap_&256 != 0 {
return o.total
}
return 0
Expand All @@ -220,7 +244,7 @@ func (o *ClusterNodes) Total() int {
//
// Total number of nodes of the cluster.
func (o *ClusterNodes) GetTotal() (value int, ok bool) {
ok = o != nil && o.bitmap_&128 != 0
ok = o != nil && o.bitmap_&256 != 0
if ok {
value = o.total
}
Expand Down
Loading

0 comments on commit 5c41bf9

Please sign in to comment.