Skip to content

Commit

Permalink
Merge pull request #862 from gdbranco/feat/ocm-4601
Browse files Browse the repository at this point in the history
OCM-4601 | chore: bump api-model to v0.0.332
  • Loading branch information
gdbranco authored Nov 1, 2023
2 parents 49961c3 + 0e48b35 commit ca9f331
Show file tree
Hide file tree
Showing 13 changed files with 16,003 additions and 15,708 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
This document describes the relevant changes between releases of the OCM API
SDK.

## 0.1.380
- Update model version v0.0.332
- Add `AdditionalInfraSecurityGroupIds` to `AWS` type
- Add `AdditionalControlPlaneSecurityGroupIds` to `AWS` type
- Update model version v0.0.331
- Add `Search` method to `status_board` `products_resource`, `applications_resource`, and `services_resource models`

## 0.1.379
- Require Go 1.21

Expand Down
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.330
model_version:=v0.0.332
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
102 changes: 70 additions & 32 deletions clustersmgmt/v1/aws_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,25 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
//
// _Amazon Web Services_ specific settings of a cluster.
type AWSBuilder struct {
bitmap_ uint32
kmsKeyArn string
sts *STSBuilder
accessKeyID string
accountID string
additionalComputeSecurityGroupIds []string
auditLog *AuditLogBuilder
billingAccountID string
ec2MetadataHttpTokens Ec2MetadataHttpTokens
etcdEncryption *AwsEtcdEncryptionBuilder
privateHostedZoneID string
privateHostedZoneRoleARN string
privateLinkConfiguration *PrivateLinkClusterConfigurationBuilder
secretAccessKey string
subnetIDs []string
tags map[string]string
privateLink bool
bitmap_ uint32
kmsKeyArn string
sts *STSBuilder
accessKeyID string
accountID string
additionalComputeSecurityGroupIds []string
additionalControlPlaneSecurityGroupIds []string
additionalInfraSecurityGroupIds []string
auditLog *AuditLogBuilder
billingAccountID string
ec2MetadataHttpTokens Ec2MetadataHttpTokens
etcdEncryption *AwsEtcdEncryptionBuilder
privateHostedZoneID string
privateHostedZoneRoleARN string
privateLinkConfiguration *PrivateLinkClusterConfigurationBuilder
secretAccessKey string
subnetIDs []string
tags map[string]string
privateLink bool
}

// NewAWS creates a new builder of 'AWS' objects.
Expand Down Expand Up @@ -94,23 +96,39 @@ func (b *AWSBuilder) AdditionalComputeSecurityGroupIds(values ...string) *AWSBui
return b
}

// AdditionalControlPlaneSecurityGroupIds sets the value of the 'additional_control_plane_security_group_ids' attribute to the given values.
func (b *AWSBuilder) AdditionalControlPlaneSecurityGroupIds(values ...string) *AWSBuilder {
b.additionalControlPlaneSecurityGroupIds = make([]string, len(values))
copy(b.additionalControlPlaneSecurityGroupIds, values)
b.bitmap_ |= 32
return b
}

// AdditionalInfraSecurityGroupIds sets the value of the 'additional_infra_security_group_ids' attribute to the given values.
func (b *AWSBuilder) AdditionalInfraSecurityGroupIds(values ...string) *AWSBuilder {
b.additionalInfraSecurityGroupIds = make([]string, len(values))
copy(b.additionalInfraSecurityGroupIds, values)
b.bitmap_ |= 64
return b
}

// AuditLog sets the value of the 'audit_log' attribute to the given value.
//
// Contains the necessary attributes to support audit log forwarding
func (b *AWSBuilder) AuditLog(value *AuditLogBuilder) *AWSBuilder {
b.auditLog = value
if value != nil {
b.bitmap_ |= 32
b.bitmap_ |= 128
} else {
b.bitmap_ &^= 32
b.bitmap_ &^= 128
}
return b
}

// BillingAccountID sets the value of the 'billing_account_ID' attribute to the given value.
func (b *AWSBuilder) BillingAccountID(value string) *AWSBuilder {
b.billingAccountID = value
b.bitmap_ |= 64
b.bitmap_ |= 256
return b
}

Expand All @@ -119,7 +137,7 @@ func (b *AWSBuilder) BillingAccountID(value string) *AWSBuilder {
// Which Ec2MetadataHttpTokens to use for metadata service interaction options for EC2 instances
func (b *AWSBuilder) Ec2MetadataHttpTokens(value Ec2MetadataHttpTokens) *AWSBuilder {
b.ec2MetadataHttpTokens = value
b.bitmap_ |= 128
b.bitmap_ |= 512
return b
}

Expand All @@ -129,31 +147,31 @@ func (b *AWSBuilder) Ec2MetadataHttpTokens(value Ec2MetadataHttpTokens) *AWSBuil
func (b *AWSBuilder) EtcdEncryption(value *AwsEtcdEncryptionBuilder) *AWSBuilder {
b.etcdEncryption = value
if value != nil {
b.bitmap_ |= 256
b.bitmap_ |= 1024
} else {
b.bitmap_ &^= 256
b.bitmap_ &^= 1024
}
return b
}

// PrivateHostedZoneID sets the value of the 'private_hosted_zone_ID' attribute to the given value.
func (b *AWSBuilder) PrivateHostedZoneID(value string) *AWSBuilder {
b.privateHostedZoneID = value
b.bitmap_ |= 512
b.bitmap_ |= 2048
return b
}

// PrivateHostedZoneRoleARN sets the value of the 'private_hosted_zone_role_ARN' attribute to the given value.
func (b *AWSBuilder) PrivateHostedZoneRoleARN(value string) *AWSBuilder {
b.privateHostedZoneRoleARN = value
b.bitmap_ |= 1024
b.bitmap_ |= 4096
return b
}

// PrivateLink sets the value of the 'private_link' attribute to the given value.
func (b *AWSBuilder) PrivateLink(value bool) *AWSBuilder {
b.privateLink = value
b.bitmap_ |= 2048
b.bitmap_ |= 8192
return b
}

Expand All @@ -163,35 +181,35 @@ func (b *AWSBuilder) PrivateLink(value bool) *AWSBuilder {
func (b *AWSBuilder) PrivateLinkConfiguration(value *PrivateLinkClusterConfigurationBuilder) *AWSBuilder {
b.privateLinkConfiguration = value
if value != nil {
b.bitmap_ |= 4096
b.bitmap_ |= 16384
} else {
b.bitmap_ &^= 4096
b.bitmap_ &^= 16384
}
return b
}

// SecretAccessKey sets the value of the 'secret_access_key' attribute to the given value.
func (b *AWSBuilder) SecretAccessKey(value string) *AWSBuilder {
b.secretAccessKey = value
b.bitmap_ |= 8192
b.bitmap_ |= 32768
return b
}

// SubnetIDs sets the value of the 'subnet_IDs' attribute to the given values.
func (b *AWSBuilder) SubnetIDs(values ...string) *AWSBuilder {
b.subnetIDs = make([]string, len(values))
copy(b.subnetIDs, values)
b.bitmap_ |= 16384
b.bitmap_ |= 65536
return b
}

// Tags sets the value of the 'tags' attribute to the given value.
func (b *AWSBuilder) Tags(value map[string]string) *AWSBuilder {
b.tags = value
if value != nil {
b.bitmap_ |= 32768
b.bitmap_ |= 131072
} else {
b.bitmap_ &^= 32768
b.bitmap_ &^= 131072
}
return b
}
Expand All @@ -216,6 +234,18 @@ func (b *AWSBuilder) Copy(object *AWS) *AWSBuilder {
} else {
b.additionalComputeSecurityGroupIds = nil
}
if object.additionalControlPlaneSecurityGroupIds != nil {
b.additionalControlPlaneSecurityGroupIds = make([]string, len(object.additionalControlPlaneSecurityGroupIds))
copy(b.additionalControlPlaneSecurityGroupIds, object.additionalControlPlaneSecurityGroupIds)
} else {
b.additionalControlPlaneSecurityGroupIds = nil
}
if object.additionalInfraSecurityGroupIds != nil {
b.additionalInfraSecurityGroupIds = make([]string, len(object.additionalInfraSecurityGroupIds))
copy(b.additionalInfraSecurityGroupIds, object.additionalInfraSecurityGroupIds)
} else {
b.additionalInfraSecurityGroupIds = nil
}
if object.auditLog != nil {
b.auditLog = NewAuditLog().Copy(object.auditLog)
} else {
Expand Down Expand Up @@ -271,6 +301,14 @@ func (b *AWSBuilder) Build() (object *AWS, err error) {
object.additionalComputeSecurityGroupIds = make([]string, len(b.additionalComputeSecurityGroupIds))
copy(object.additionalComputeSecurityGroupIds, b.additionalComputeSecurityGroupIds)
}
if b.additionalControlPlaneSecurityGroupIds != nil {
object.additionalControlPlaneSecurityGroupIds = make([]string, len(b.additionalControlPlaneSecurityGroupIds))
copy(object.additionalControlPlaneSecurityGroupIds, b.additionalControlPlaneSecurityGroupIds)
}
if b.additionalInfraSecurityGroupIds != nil {
object.additionalInfraSecurityGroupIds = make([]string, len(b.additionalInfraSecurityGroupIds))
copy(object.additionalInfraSecurityGroupIds, b.additionalInfraSecurityGroupIds)
}
if b.auditLog != nil {
object.auditLog, err = b.auditLog.Build()
if err != nil {
Expand Down
Loading

0 comments on commit ca9f331

Please sign in to comment.