Skip to content

Commit

Permalink
chore: synchronise to ocm-api-model 0.0.373
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelsorianod committed May 13, 2024
1 parent f725c57 commit 4c2b661
Show file tree
Hide file tree
Showing 6 changed files with 8,084 additions and 7,774 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export PATH := $(LOCAL_BIN_PATH):$(PATH)
export CGO_ENABLED=0

# Details of the model to use:
model_version:=v0.0.372
model_version:=v0.0.373
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
40 changes: 30 additions & 10 deletions clustersmgmt/v1/azure_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
//
// Microsoft Azure settings of a cluster.
type AzureBuilder struct {
bitmap_ uint32
managedResourceGroupName string
resourceGroupName string
resourceName string
subscriptionID string
tenantID string
bitmap_ uint32
managedResourceGroupName string
networkSecurityGroupResourceID string
resourceGroupName string
resourceName string
subnetResourceID string
subscriptionID string
tenantID string
}

// NewAzure creates a new builder of 'azure' objects.
Expand All @@ -48,31 +50,45 @@ func (b *AzureBuilder) ManagedResourceGroupName(value string) *AzureBuilder {
return b
}

// NetworkSecurityGroupResourceID sets the value of the 'network_security_group_resource_ID' attribute to the given value.
func (b *AzureBuilder) NetworkSecurityGroupResourceID(value string) *AzureBuilder {
b.networkSecurityGroupResourceID = value
b.bitmap_ |= 2
return b
}

// ResourceGroupName sets the value of the 'resource_group_name' attribute to the given value.
func (b *AzureBuilder) ResourceGroupName(value string) *AzureBuilder {
b.resourceGroupName = value
b.bitmap_ |= 2
b.bitmap_ |= 4
return b
}

// ResourceName sets the value of the 'resource_name' attribute to the given value.
func (b *AzureBuilder) ResourceName(value string) *AzureBuilder {
b.resourceName = value
b.bitmap_ |= 4
b.bitmap_ |= 8
return b
}

// SubnetResourceID sets the value of the 'subnet_resource_ID' attribute to the given value.
func (b *AzureBuilder) SubnetResourceID(value string) *AzureBuilder {
b.subnetResourceID = value
b.bitmap_ |= 16
return b
}

// SubscriptionID sets the value of the 'subscription_ID' attribute to the given value.
func (b *AzureBuilder) SubscriptionID(value string) *AzureBuilder {
b.subscriptionID = value
b.bitmap_ |= 8
b.bitmap_ |= 32
return b
}

// TenantID sets the value of the 'tenant_ID' attribute to the given value.
func (b *AzureBuilder) TenantID(value string) *AzureBuilder {
b.tenantID = value
b.bitmap_ |= 16
b.bitmap_ |= 64
return b
}

Expand All @@ -83,8 +99,10 @@ func (b *AzureBuilder) Copy(object *Azure) *AzureBuilder {
}
b.bitmap_ = object.bitmap_
b.managedResourceGroupName = object.managedResourceGroupName
b.networkSecurityGroupResourceID = object.networkSecurityGroupResourceID
b.resourceGroupName = object.resourceGroupName
b.resourceName = object.resourceName
b.subnetResourceID = object.subnetResourceID
b.subscriptionID = object.subscriptionID
b.tenantID = object.tenantID
return b
Expand All @@ -95,8 +113,10 @@ func (b *AzureBuilder) Build() (object *Azure, err error) {
object = new(Azure)
object.bitmap_ = b.bitmap_
object.managedResourceGroupName = b.managedResourceGroupName
object.networkSecurityGroupResourceID = b.networkSecurityGroupResourceID
object.resourceGroupName = b.resourceGroupName
object.resourceName = b.resourceName
object.subnetResourceID = b.subnetResourceID
object.subscriptionID = b.subscriptionID
object.tenantID = b.tenantID
return
Expand Down
142 changes: 128 additions & 14 deletions clustersmgmt/v1/azure_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
//
// Microsoft Azure settings of a cluster.
type Azure struct {
bitmap_ uint32
managedResourceGroupName string
resourceGroupName string
resourceName string
subscriptionID string
tenantID string
bitmap_ uint32
managedResourceGroupName string
networkSecurityGroupResourceID string
resourceGroupName string
resourceName string
subnetResourceID string
subscriptionID string
tenantID string
}

// Empty returns true if the object is empty, i.e. no attribute has a value.
Expand Down Expand Up @@ -73,14 +75,75 @@ func (o *Azure) GetManagedResourceGroupName() (value string, ok bool) {
return
}

// NetworkSecurityGroupResourceID returns the value of the 'network_security_group_resource_ID' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// [Required] The Azure Resource ID of a pre-existing
// Azure Network Security Group.
// The Network Security Group specified in network_security_group_resource_id
// must already be associated to the Azure Subnet `subnet_resource_id`.
// It is the Azure Network Security Group associated to the cluster's subnet
// specified in `subnet_resource_id`.
// `network_security_group_resource_id` must be located in the same Azure
// location as the cluster's region.
// The Azure Subscription specified as part of
// `network_security_group_resource_id` must be located in the same Azure
// Subscription as `subscription_id`.
// The Azure Resource Group Name specified as part of `network_security_group_resource_id`
// must belong to the Azure Subscription `subscription_id`, and in the same
// Azure location as the cluster's region.
// The Azure Resource Group Name specified as part of `network_security_group_resource_id`
// must be a different Resource Group Name than the one specified in
// `managed_resource_group_name`.
// The Azure Resource Group Name specified as part of `network_security_group_resource_id`
// can be the same, or a different one than the one specified in
// `resource_group_name`.
func (o *Azure) NetworkSecurityGroupResourceID() string {
if o != nil && o.bitmap_&2 != 0 {
return o.networkSecurityGroupResourceID
}
return ""
}

// GetNetworkSecurityGroupResourceID returns the value of the 'network_security_group_resource_ID' attribute and
// a flag indicating if the attribute has a value.
//
// [Required] The Azure Resource ID of a pre-existing
// Azure Network Security Group.
// The Network Security Group specified in network_security_group_resource_id
// must already be associated to the Azure Subnet `subnet_resource_id`.
// It is the Azure Network Security Group associated to the cluster's subnet
// specified in `subnet_resource_id`.
// `network_security_group_resource_id` must be located in the same Azure
// location as the cluster's region.
// The Azure Subscription specified as part of
// `network_security_group_resource_id` must be located in the same Azure
// Subscription as `subscription_id`.
// The Azure Resource Group Name specified as part of `network_security_group_resource_id`
// must belong to the Azure Subscription `subscription_id`, and in the same
// Azure location as the cluster's region.
// The Azure Resource Group Name specified as part of `network_security_group_resource_id`
// must be a different Resource Group Name than the one specified in
// `managed_resource_group_name`.
// The Azure Resource Group Name specified as part of `network_security_group_resource_id`
// can be the same, or a different one than the one specified in
// `resource_group_name`.
func (o *Azure) GetNetworkSecurityGroupResourceID() (value string, ok bool) {
ok = o != nil && o.bitmap_&2 != 0
if ok {
value = o.networkSecurityGroupResourceID
}
return
}

// ResourceGroupName returns the value of the 'resource_group_name' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// [Required] The Azure Resource Group Name of the cluster. It must be within `subscription_id`
// of the cluster. `resource_group_name` is located in the same Azure location
// as the cluster's region.
func (o *Azure) ResourceGroupName() string {
if o != nil && o.bitmap_&2 != 0 {
if o != nil && o.bitmap_&4 != 0 {
return o.resourceGroupName
}
return ""
Expand All @@ -93,7 +156,7 @@ func (o *Azure) ResourceGroupName() string {
// of the cluster. `resource_group_name` is located in the same Azure location
// as the cluster's region.
func (o *Azure) GetResourceGroupName() (value string, ok bool) {
ok = o != nil && o.bitmap_&2 != 0
ok = o != nil && o.bitmap_&4 != 0
if ok {
value = o.resourceGroupName
}
Expand All @@ -107,7 +170,7 @@ func (o *Azure) GetResourceGroupName() (value string, ok bool) {
// Azure Resource Group Name `resource_group_name`.
// `resource_name` is located in the same Azure location as the cluster's region.
func (o *Azure) ResourceName() string {
if o != nil && o.bitmap_&4 != 0 {
if o != nil && o.bitmap_&8 != 0 {
return o.resourceName
}
return ""
Expand All @@ -120,20 +183,71 @@ func (o *Azure) ResourceName() string {
// Azure Resource Group Name `resource_group_name`.
// `resource_name` is located in the same Azure location as the cluster's region.
func (o *Azure) GetResourceName() (value string, ok bool) {
ok = o != nil && o.bitmap_&4 != 0
ok = o != nil && o.bitmap_&8 != 0
if ok {
value = o.resourceName
}
return
}

// SubnetResourceID returns the value of the 'subnet_resource_ID' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// [Required] The Azure Resource ID of a pre-existing Azure
// Subnet. It is an Azure Subnet used for the Data Plane of the cluster.
// `subnet_resource_id` must be located in the same Azure location as the
// cluster's region.
// The Azure Subscription specified as part of the `subnet_resource_id`
// must be located in the same Azure Subscription as `subscription_id`.
// The Azure Resource Group Name specified as part of `subnet_resource_id`
// must belong to the Azure Subscription `subscription_id`, and in the same
// Azure location as the cluster's region.
// The Azure Resource Group Name specified as part of `subnet_resource_id`
// must be a different Resource Group Name than the one specified in
// `managed_resource_group_name`.
// The Azure Resource Group Name specified as part of the `subnet_resource_id`
// can be the same, or a different one than the one specified in
// `resource_group_name`.
func (o *Azure) SubnetResourceID() string {
if o != nil && o.bitmap_&16 != 0 {
return o.subnetResourceID
}
return ""
}

// GetSubnetResourceID returns the value of the 'subnet_resource_ID' attribute and
// a flag indicating if the attribute has a value.
//
// [Required] The Azure Resource ID of a pre-existing Azure
// Subnet. It is an Azure Subnet used for the Data Plane of the cluster.
// `subnet_resource_id` must be located in the same Azure location as the
// cluster's region.
// The Azure Subscription specified as part of the `subnet_resource_id`
// must be located in the same Azure Subscription as `subscription_id`.
// The Azure Resource Group Name specified as part of `subnet_resource_id`
// must belong to the Azure Subscription `subscription_id`, and in the same
// Azure location as the cluster's region.
// The Azure Resource Group Name specified as part of `subnet_resource_id`
// must be a different Resource Group Name than the one specified in
// `managed_resource_group_name`.
// The Azure Resource Group Name specified as part of the `subnet_resource_id`
// can be the same, or a different one than the one specified in
// `resource_group_name`.
func (o *Azure) GetSubnetResourceID() (value string, ok bool) {
ok = o != nil && o.bitmap_&16 != 0
if ok {
value = o.subnetResourceID
}
return
}

// SubscriptionID returns the value of the 'subscription_ID' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// [Required] The Azure Subscription ID associated with the cluster. It must belong to
// the Microsoft Entra Tenant ID `tenant_id`.
func (o *Azure) SubscriptionID() string {
if o != nil && o.bitmap_&8 != 0 {
if o != nil && o.bitmap_&32 != 0 {
return o.subscriptionID
}
return ""
Expand All @@ -145,7 +259,7 @@ func (o *Azure) SubscriptionID() string {
// [Required] The Azure Subscription ID associated with the cluster. It must belong to
// the Microsoft Entra Tenant ID `tenant_id`.
func (o *Azure) GetSubscriptionID() (value string, ok bool) {
ok = o != nil && o.bitmap_&8 != 0
ok = o != nil && o.bitmap_&32 != 0
if ok {
value = o.subscriptionID
}
Expand All @@ -157,7 +271,7 @@ func (o *Azure) GetSubscriptionID() (value string, ok bool) {
//
// [Required] The Microsoft Entra Tenant ID where the cluster belongs.
func (o *Azure) TenantID() string {
if o != nil && o.bitmap_&16 != 0 {
if o != nil && o.bitmap_&64 != 0 {
return o.tenantID
}
return ""
Expand All @@ -168,7 +282,7 @@ func (o *Azure) TenantID() string {
//
// [Required] The Microsoft Entra Tenant ID where the cluster belongs.
func (o *Azure) GetTenantID() (value string, ok bool) {
ok = o != nil && o.bitmap_&16 != 0
ok = o != nil && o.bitmap_&64 != 0
if ok {
value = o.tenantID
}
Expand Down
Loading

0 comments on commit 4c2b661

Please sign in to comment.