Skip to content

Commit

Permalink
Update to metamodel 0.0.44
Browse files Browse the repository at this point in the history
The more relevant changes in the new version of the metamodel are the
following:

- Check for loops in locator paths.
- Add `Empty` method to builders.

Signed-off-by: Juan Hernandez <[email protected]>
  • Loading branch information
jhernand committed Nov 22, 2021
1 parent 4742937 commit 4359e40
Show file tree
Hide file tree
Showing 303 changed files with 1,511 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ model_version:=v0.0.152
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
metamodel_version:=v0.0.43
metamodel_version:=v0.0.44
metamodel_url:=https://github.com/openshift-online/ocm-api-metamodel.git

.PHONY: examples
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/access_token_auth_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ func NewAccessTokenAuth() *AccessTokenAuthBuilder {
return &AccessTokenAuthBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *AccessTokenAuthBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// Auth sets the value of the 'auth' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/access_token_auth_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *AccessTokenAuthListBuilder) Items(values ...*AccessTokenAuthBuilder) *A
return b
}

// Empty returns true if the list is empty.
func (b *AccessTokenAuthListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *AccessTokenAuthListBuilder) Copy(list *AccessTokenAuthList) *AccessTokenAuthListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/access_token_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ func NewAccessToken() *AccessTokenBuilder {
return &AccessTokenBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *AccessTokenBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// Auths sets the value of the 'auths' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/access_token_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *AccessTokenListBuilder) Items(values ...*AccessTokenBuilder) *AccessTok
return b
}

// Empty returns true if the list is empty.
func (b *AccessTokenListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *AccessTokenListBuilder) Copy(list *AccessTokenList) *AccessTokenListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/account_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ func (b *AccountBuilder) HREF(value string) *AccountBuilder {
return b
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *AccountBuilder) Empty() bool {
return b == nil || b.bitmap_&^1 == 0
}

// BanCode sets the value of the 'ban_code' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/account_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *AccountListBuilder) Items(values ...*AccountBuilder) *AccountListBuilde
return b
}

// Empty returns true if the list is empty.
func (b *AccountListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *AccountListBuilder) Copy(list *AccountList) *AccountListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/capability_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ func NewCapability() *CapabilityBuilder {
return &CapabilityBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *CapabilityBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// Inherited sets the value of the 'inherited' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/capability_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *CapabilityListBuilder) Items(values ...*CapabilityBuilder) *CapabilityL
return b
}

// Empty returns true if the list is empty.
func (b *CapabilityListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *CapabilityListBuilder) Copy(list *CapabilityList) *CapabilityListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_authorization_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ func NewClusterAuthorizationRequest() *ClusterAuthorizationRequestBuilder {
return &ClusterAuthorizationRequestBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *ClusterAuthorizationRequestBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// BYOC sets the value of the 'BYOC' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_authorization_request_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *ClusterAuthorizationRequestListBuilder) Items(values ...*ClusterAuthori
return b
}

// Empty returns true if the list is empty.
func (b *ClusterAuthorizationRequestListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *ClusterAuthorizationRequestListBuilder) Copy(list *ClusterAuthorizationRequestList) *ClusterAuthorizationRequestListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_authorization_response_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ func NewClusterAuthorizationResponse() *ClusterAuthorizationResponseBuilder {
return &ClusterAuthorizationResponseBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *ClusterAuthorizationResponseBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// Allowed sets the value of the 'allowed' attribute to the given value.
//
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *ClusterAuthorizationResponseListBuilder) Items(values ...*ClusterAuthor
return b
}

// Empty returns true if the list is empty.
func (b *ClusterAuthorizationResponseListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *ClusterAuthorizationResponseListBuilder) Copy(list *ClusterAuthorizationResponseList) *ClusterAuthorizationResponseListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_metrics_nodes_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ func NewClusterMetricsNodes() *ClusterMetricsNodesBuilder {
return &ClusterMetricsNodesBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *ClusterMetricsNodesBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// Compute sets the value of the 'compute' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_metrics_nodes_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *ClusterMetricsNodesListBuilder) Items(values ...*ClusterMetricsNodesBui
return b
}

// Empty returns true if the list is empty.
func (b *ClusterMetricsNodesListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *ClusterMetricsNodesListBuilder) Copy(list *ClusterMetricsNodesList) *ClusterMetricsNodesListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_registration_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ func NewClusterRegistrationRequest() *ClusterRegistrationRequestBuilder {
return &ClusterRegistrationRequestBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *ClusterRegistrationRequestBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// AuthorizationToken sets the value of the 'authorization_token' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_registration_request_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *ClusterRegistrationRequestListBuilder) Items(values ...*ClusterRegistra
return b
}

// Empty returns true if the list is empty.
func (b *ClusterRegistrationRequestListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *ClusterRegistrationRequestListBuilder) Copy(list *ClusterRegistrationRequestList) *ClusterRegistrationRequestListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_registration_response_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ func NewClusterRegistrationResponse() *ClusterRegistrationResponseBuilder {
return &ClusterRegistrationResponseBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *ClusterRegistrationResponseBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// AccountID sets the value of the 'account_ID' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_registration_response_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *ClusterRegistrationResponseListBuilder) Items(values ...*ClusterRegistr
return b
}

// Empty returns true if the list is empty.
func (b *ClusterRegistrationResponseListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *ClusterRegistrationResponseListBuilder) Copy(list *ClusterRegistrationResponseList) *ClusterRegistrationResponseListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_resource_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ func NewClusterResource() *ClusterResourceBuilder {
return &ClusterResourceBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *ClusterResourceBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// Total sets the value of the 'total' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_resource_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *ClusterResourceListBuilder) Items(values ...*ClusterResourceBuilder) *C
return b
}

// Empty returns true if the list is empty.
func (b *ClusterResourceListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *ClusterResourceListBuilder) Copy(list *ClusterResourceList) *ClusterResourceListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_upgrade_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ func NewClusterUpgrade() *ClusterUpgradeBuilder {
return &ClusterUpgradeBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *ClusterUpgradeBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// Available sets the value of the 'available' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/cluster_upgrade_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *ClusterUpgradeListBuilder) Items(values ...*ClusterUpgradeBuilder) *Clu
return b
}

// Empty returns true if the list is empty.
func (b *ClusterUpgradeListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *ClusterUpgradeListBuilder) Copy(list *ClusterUpgradeList) *ClusterUpgradeListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/feature_toggle_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ func (b *FeatureToggleBuilder) HREF(value string) *FeatureToggleBuilder {
return b
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *FeatureToggleBuilder) Empty() bool {
return b == nil || b.bitmap_&^1 == 0
}

// Enabled sets the value of the 'enabled' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/feature_toggle_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *FeatureToggleListBuilder) Items(values ...*FeatureToggleBuilder) *Featu
return b
}

// Empty returns true if the list is empty.
func (b *FeatureToggleListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *FeatureToggleListBuilder) Copy(list *FeatureToggleList) *FeatureToggleListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/feature_toggle_query_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ func NewFeatureToggleQueryRequest() *FeatureToggleQueryRequestBuilder {
return &FeatureToggleQueryRequestBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *FeatureToggleQueryRequestBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// OrganizationID sets the value of the 'organization_ID' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/feature_toggle_query_request_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *FeatureToggleQueryRequestListBuilder) Items(values ...*FeatureToggleQue
return b
}

// Empty returns true if the list is empty.
func (b *FeatureToggleQueryRequestListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *FeatureToggleQueryRequestListBuilder) Copy(list *FeatureToggleQueryRequestList) *FeatureToggleQueryRequestListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/label_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ func (b *LabelBuilder) HREF(value string) *LabelBuilder {
return b
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *LabelBuilder) Empty() bool {
return b == nil || b.bitmap_&^1 == 0
}

// CreatedAt sets the value of the 'created_at' attribute to the given value.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/label_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *LabelListBuilder) Items(values ...*LabelBuilder) *LabelListBuilder {
return b
}

// Empty returns true if the list is empty.
func (b *LabelListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *LabelListBuilder) Copy(list *LabelList) *LabelListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/organization_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ func (b *OrganizationBuilder) HREF(value string) *OrganizationBuilder {
return b
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *OrganizationBuilder) Empty() bool {
return b == nil || b.bitmap_&^1 == 0
}

// Capabilities sets the value of the 'capabilities' attribute to the given values.
//
//
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/organization_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *OrganizationListBuilder) Items(values ...*OrganizationBuilder) *Organiz
return b
}

// Empty returns true if the list is empty.
func (b *OrganizationListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *OrganizationListBuilder) Copy(list *OrganizationList) *OrganizationListBuilder {
if list == nil || list.items == nil {
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/permission_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ func (b *PermissionBuilder) HREF(value string) *PermissionBuilder {
return b
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *PermissionBuilder) Empty() bool {
return b == nil || b.bitmap_&^1 == 0
}

// Action sets the value of the 'action' attribute to the given value.
//
// Possible actions for a permission.
Expand Down
5 changes: 5 additions & 0 deletions accountsmgmt/v1/permission_list_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (b *PermissionListBuilder) Items(values ...*PermissionBuilder) *PermissionL
return b
}

// Empty returns true if the list is empty.
func (b *PermissionListBuilder) Empty() bool {
return b == nil || len(b.items) == 0
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *PermissionListBuilder) Copy(list *PermissionList) *PermissionListBuilder {
if list == nil || list.items == nil {
Expand Down
Loading

0 comments on commit 4359e40

Please sign in to comment.