Skip to content

Commit

Permalink
Bump model to v0.0.247 (#708)
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercreller authored Jan 6, 2023
1 parent 37fee0c commit a0dda21
Show file tree
Hide file tree
Showing 6 changed files with 1,845 additions and 1,870 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.246
model_version:=v0.0.247
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
28 changes: 6 additions & 22 deletions accountsmgmt/v1/deleted_subscription_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type DeletedSubscriptionBuilder struct {
lastReconcileDate time.Time
lastReleasedAt time.Time
lastTelemetryDate time.Time
metrics []*SubscriptionMetricsBuilder
metrics string
organizationID string
planID string
productBundle string
Expand Down Expand Up @@ -213,10 +213,9 @@ func (b *DeletedSubscriptionBuilder) Managed(value bool) *DeletedSubscriptionBui
return b
}

// Metrics sets the value of the 'metrics' attribute to the given values.
func (b *DeletedSubscriptionBuilder) Metrics(values ...*SubscriptionMetricsBuilder) *DeletedSubscriptionBuilder {
b.metrics = make([]*SubscriptionMetricsBuilder, len(values))
copy(b.metrics, values)
// Metrics sets the value of the 'metrics' attribute to the given value.
func (b *DeletedSubscriptionBuilder) Metrics(value string) *DeletedSubscriptionBuilder {
b.metrics = value
b.bitmap_ |= 1048576
return b
}
Expand Down Expand Up @@ -344,14 +343,7 @@ func (b *DeletedSubscriptionBuilder) Copy(object *DeletedSubscription) *DeletedS
b.lastReleasedAt = object.lastReleasedAt
b.lastTelemetryDate = object.lastTelemetryDate
b.managed = object.managed
if object.metrics != nil {
b.metrics = make([]*SubscriptionMetricsBuilder, len(object.metrics))
for i, v := range object.metrics {
b.metrics[i] = NewSubscriptionMetrics().Copy(v)
}
} else {
b.metrics = nil
}
b.metrics = object.metrics
b.organizationID = object.organizationID
b.planID = object.planID
b.productBundle = object.productBundle
Expand Down Expand Up @@ -392,15 +384,7 @@ func (b *DeletedSubscriptionBuilder) Build() (object *DeletedSubscription, err e
object.lastReleasedAt = b.lastReleasedAt
object.lastTelemetryDate = b.lastTelemetryDate
object.managed = b.managed
if b.metrics != nil {
object.metrics = make([]*SubscriptionMetrics, len(b.metrics))
for i, v := range b.metrics {
object.metrics[i], err = v.Build()
if err != nil {
return
}
}
}
object.metrics = b.metrics
object.organizationID = b.organizationID
object.planID = b.planID
object.productBundle = b.productBundle
Expand Down
8 changes: 4 additions & 4 deletions accountsmgmt/v1/deleted_subscription_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type DeletedSubscription struct {
lastReconcileDate time.Time
lastReleasedAt time.Time
lastTelemetryDate time.Time
metrics []*SubscriptionMetrics
metrics string
organizationID string
planID string
productBundle string
Expand Down Expand Up @@ -456,16 +456,16 @@ func (o *DeletedSubscription) GetManaged() (value bool, ok bool) {

// Metrics returns the value of the 'metrics' attribute, or
// the zero value of the type if the attribute doesn't have a value.
func (o *DeletedSubscription) Metrics() []*SubscriptionMetrics {
func (o *DeletedSubscription) Metrics() string {
if o != nil && o.bitmap_&1048576 != 0 {
return o.metrics
}
return nil
return ""
}

// GetMetrics returns the value of the 'metrics' attribute and
// a flag indicating if the attribute has a value.
func (o *DeletedSubscription) GetMetrics() (value []*SubscriptionMetrics, ok bool) {
func (o *DeletedSubscription) GetMetrics() (value string, ok bool) {
ok = o != nil && o.bitmap_&1048576 != 0
if ok {
value = o.metrics
Expand Down
6 changes: 3 additions & 3 deletions accountsmgmt/v1/deleted_subscription_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@ func writeDeletedSubscription(object *DeletedSubscription, stream *jsoniter.Stre
stream.WriteBool(object.managed)
count++
}
present_ = object.bitmap_&1048576 != 0 && object.metrics != nil
present_ = object.bitmap_&1048576 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("metrics")
writeSubscriptionMetricsList(object.metrics, stream)
stream.WriteString(object.metrics)
count++
}
present_ = object.bitmap_&2097152 != 0
Expand Down Expand Up @@ -478,7 +478,7 @@ func readDeletedSubscription(iterator *jsoniter.Iterator) *DeletedSubscription {
object.managed = value
object.bitmap_ |= 524288
case "metrics":
value := readSubscriptionMetricsList(iterator)
value := iterator.ReadString()
object.metrics = value
object.bitmap_ |= 1048576
case "organization_id":
Expand Down
Loading

0 comments on commit a0dda21

Please sign in to comment.