Skip to content

Commit

Permalink
Merge pull request #772 from tsorya/igal/OCM-139
Browse files Browse the repository at this point in the history
Bump model version to v0.0.282
  • Loading branch information
tzvatot committed May 18, 2023
2 parents b757cc7 + d3d3657 commit b98f743
Show file tree
Hide file tree
Showing 8 changed files with 8,749 additions and 8,747 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.281
model_version:=v0.0.282
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
28 changes: 14 additions & 14 deletions clustersmgmt/v1/aws_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type AWSBuilder struct {
accountID string
auditLog *AuditLogBuilder
billingAccountID string
ec2MetadataHttpTokens Ec2MetadataHttpTokens
etcdEncryption *AwsEtcdEncryptionBuilder
httpTokensState HttpTokenState
privateLinkConfiguration *PrivateLinkClusterConfigurationBuilder
secretAccessKey string
subnetIDs []string
Expand Down Expand Up @@ -103,28 +103,28 @@ func (b *AWSBuilder) BillingAccountID(value string) *AWSBuilder {
return b
}

// Ec2MetadataHttpTokens sets the value of the 'ec_2_metadata_http_tokens' attribute to the given value.
//
// Which Ec2MetadataHttpTokens to use for metadata service interaction options for EC2 instances
func (b *AWSBuilder) Ec2MetadataHttpTokens(value Ec2MetadataHttpTokens) *AWSBuilder {
b.ec2MetadataHttpTokens = value
b.bitmap_ |= 64
return b
}

// EtcdEncryption sets the value of the 'etcd_encryption' attribute to the given value.
//
// Contains the necessary attributes to support etcd encryption for AWS based clusters.
func (b *AWSBuilder) EtcdEncryption(value *AwsEtcdEncryptionBuilder) *AWSBuilder {
b.etcdEncryption = value
if value != nil {
b.bitmap_ |= 64
b.bitmap_ |= 128
} else {
b.bitmap_ &^= 64
b.bitmap_ &^= 128
}
return b
}

// HttpTokensState sets the value of the 'http_tokens_state' attribute to the given value.
//
// Which HttpTokensState to use for metadata service interaction options for EC2 instances
func (b *AWSBuilder) HttpTokensState(value HttpTokenState) *AWSBuilder {
b.httpTokensState = value
b.bitmap_ |= 128
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
Expand Down Expand Up @@ -191,12 +191,12 @@ func (b *AWSBuilder) Copy(object *AWS) *AWSBuilder {
b.auditLog = nil
}
b.billingAccountID = object.billingAccountID
b.ec2MetadataHttpTokens = object.ec2MetadataHttpTokens
if object.etcdEncryption != nil {
b.etcdEncryption = NewAwsEtcdEncryption().Copy(object.etcdEncryption)
} else {
b.etcdEncryption = nil
}
b.httpTokensState = object.httpTokensState
b.privateLink = object.privateLink
if object.privateLinkConfiguration != nil {
b.privateLinkConfiguration = NewPrivateLinkClusterConfiguration().Copy(object.privateLinkConfiguration)
Expand Down Expand Up @@ -241,13 +241,13 @@ func (b *AWSBuilder) Build() (object *AWS, err error) {
}
}
object.billingAccountID = b.billingAccountID
object.ec2MetadataHttpTokens = b.ec2MetadataHttpTokens
if b.etcdEncryption != nil {
object.etcdEncryption, err = b.etcdEncryption.Build()
if err != nil {
return
}
}
object.httpTokensState = b.httpTokensState
object.privateLink = b.privateLink
if b.privateLinkConfiguration != nil {
object.privateLinkConfiguration, err = b.privateLinkConfiguration.Build()
Expand Down
38 changes: 19 additions & 19 deletions clustersmgmt/v1/aws_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type AWS struct {
accountID string
auditLog *AuditLog
billingAccountID string
ec2MetadataHttpTokens Ec2MetadataHttpTokens
etcdEncryption *AwsEtcdEncryption
httpTokensState HttpTokenState
privateLinkConfiguration *PrivateLinkClusterConfiguration
secretAccessKey string
subnetIDs []string
Expand Down Expand Up @@ -182,48 +182,48 @@ func (o *AWS) GetBillingAccountID() (value string, ok bool) {
return
}

// EtcdEncryption returns the value of the 'etcd_encryption' attribute, or
// Ec2MetadataHttpTokens returns the value of the 'ec_2_metadata_http_tokens' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Related etcd encryption configuration
func (o *AWS) EtcdEncryption() *AwsEtcdEncryption {
// Which Ec2MetadataHttpTokens to use for metadata service interaction options for EC2 instances
func (o *AWS) Ec2MetadataHttpTokens() Ec2MetadataHttpTokens {
if o != nil && o.bitmap_&64 != 0 {
return o.etcdEncryption
return o.ec2MetadataHttpTokens
}
return nil
return Ec2MetadataHttpTokens("")
}

// GetEtcdEncryption returns the value of the 'etcd_encryption' attribute and
// GetEc2MetadataHttpTokens returns the value of the 'ec_2_metadata_http_tokens' attribute and
// a flag indicating if the attribute has a value.
//
// Related etcd encryption configuration
func (o *AWS) GetEtcdEncryption() (value *AwsEtcdEncryption, ok bool) {
// Which Ec2MetadataHttpTokens to use for metadata service interaction options for EC2 instances
func (o *AWS) GetEc2MetadataHttpTokens() (value Ec2MetadataHttpTokens, ok bool) {
ok = o != nil && o.bitmap_&64 != 0
if ok {
value = o.etcdEncryption
value = o.ec2MetadataHttpTokens
}
return
}

// HttpTokensState returns the value of the 'http_tokens_state' attribute, or
// EtcdEncryption returns the value of the 'etcd_encryption' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Which HttpTokensState to use for metadata service interaction options for EC2 instances
func (o *AWS) HttpTokensState() HttpTokenState {
// Related etcd encryption configuration
func (o *AWS) EtcdEncryption() *AwsEtcdEncryption {
if o != nil && o.bitmap_&128 != 0 {
return o.httpTokensState
return o.etcdEncryption
}
return HttpTokenState("")
return nil
}

// GetHttpTokensState returns the value of the 'http_tokens_state' attribute and
// GetEtcdEncryption returns the value of the 'etcd_encryption' attribute and
// a flag indicating if the attribute has a value.
//
// Which HttpTokensState to use for metadata service interaction options for EC2 instances
func (o *AWS) GetHttpTokensState() (value HttpTokenState, ok bool) {
// Related etcd encryption configuration
func (o *AWS) GetEtcdEncryption() (value *AwsEtcdEncryption, ok bool) {
ok = o != nil && o.bitmap_&128 != 0
if ok {
value = o.httpTokensState
value = o.etcdEncryption
}
return
}
Expand Down
22 changes: 11 additions & 11 deletions clustersmgmt/v1/aws_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,22 @@ func writeAWS(object *AWS, stream *jsoniter.Stream) {
stream.WriteString(object.billingAccountID)
count++
}
present_ = object.bitmap_&64 != 0 && object.etcdEncryption != nil
present_ = object.bitmap_&64 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("etcd_encryption")
writeAwsEtcdEncryption(object.etcdEncryption, stream)
stream.WriteObjectField("ec_2_metadata_http_tokens")
stream.WriteString(string(object.ec2MetadataHttpTokens))
count++
}
present_ = object.bitmap_&128 != 0
present_ = object.bitmap_&128 != 0 && object.etcdEncryption != nil
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("http_tokens_state")
stream.WriteString(string(object.httpTokensState))
stream.WriteObjectField("etcd_encryption")
writeAwsEtcdEncryption(object.etcdEncryption, stream)
count++
}
present_ = object.bitmap_&256 != 0
Expand Down Expand Up @@ -227,14 +227,14 @@ func readAWS(iterator *jsoniter.Iterator) *AWS {
value := iterator.ReadString()
object.billingAccountID = value
object.bitmap_ |= 32
case "ec_2_metadata_http_tokens":
text := iterator.ReadString()
value := Ec2MetadataHttpTokens(text)
object.ec2MetadataHttpTokens = value
object.bitmap_ |= 64
case "etcd_encryption":
value := readAwsEtcdEncryption(iterator)
object.etcdEncryption = value
object.bitmap_ |= 64
case "http_tokens_state":
text := iterator.ReadString()
value := HttpTokenState(text)
object.httpTokensState = value
object.bitmap_ |= 128
case "private_link":
value := iterator.ReadBool()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ import (
"github.com/openshift-online/ocm-sdk-go/helpers"
)

// MarshalHttpTokenStateList writes a list of values of the 'http_token_state' type to
// MarshalEc2MetadataHttpTokensList writes a list of values of the 'ec_2_metadata_http_tokens' type to
// the given writer.
func MarshalHttpTokenStateList(list []HttpTokenState, writer io.Writer) error {
func MarshalEc2MetadataHttpTokensList(list []Ec2MetadataHttpTokens, writer io.Writer) error {
stream := helpers.NewStream(writer)
writeHttpTokenStateList(list, stream)
writeEc2MetadataHttpTokensList(list, stream)
err := stream.Flush()
if err != nil {
return err
}
return stream.Error
}

// writeHttpTokenStateList writes a list of value of the 'http_token_state' type to
// writeEc2MetadataHttpTokensList writes a list of value of the 'ec_2_metadata_http_tokens' type to
// the given stream.
func writeHttpTokenStateList(list []HttpTokenState, stream *jsoniter.Stream) {
func writeEc2MetadataHttpTokensList(list []Ec2MetadataHttpTokens, stream *jsoniter.Stream) {
stream.WriteArrayStart()
for i, value := range list {
if i > 0 {
Expand All @@ -51,25 +51,25 @@ func writeHttpTokenStateList(list []HttpTokenState, stream *jsoniter.Stream) {
stream.WriteArrayEnd()
}

// UnmarshalHttpTokenStateList reads a list of values of the 'http_token_state' type
// UnmarshalEc2MetadataHttpTokensList reads a list of values of the 'ec_2_metadata_http_tokens' type
// from the given source, which can be a slice of bytes, a string or a reader.
func UnmarshalHttpTokenStateList(source interface{}) (items []HttpTokenState, err error) {
func UnmarshalEc2MetadataHttpTokensList(source interface{}) (items []Ec2MetadataHttpTokens, err error) {
iterator, err := helpers.NewIterator(source)
if err != nil {
return
}
items = readHttpTokenStateList(iterator)
items = readEc2MetadataHttpTokensList(iterator)
err = iterator.Error
return
}

// readHttpTokenStateList reads list of values of the ”http_token_state' type from
// readEc2MetadataHttpTokensList reads list of values of the ”ec_2_metadata_http_tokens' type from
// the given iterator.
func readHttpTokenStateList(iterator *jsoniter.Iterator) []HttpTokenState {
list := []HttpTokenState{}
func readEc2MetadataHttpTokensList(iterator *jsoniter.Iterator) []Ec2MetadataHttpTokens {
list := []Ec2MetadataHttpTokens{}
for iterator.ReadArray() {
text := iterator.ReadString()
item := HttpTokenState(text)
item := Ec2MetadataHttpTokens(text)
list = append(list, item)
}
return list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ limitations under the License.

package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1

// HttpTokenState represents the values of the 'http_token_state' enumerated type.
type HttpTokenState string
// Ec2MetadataHttpTokens represents the values of the 'ec_2_metadata_http_tokens' enumerated type.
type Ec2MetadataHttpTokens string

const (
// imdsv2 is optional
HttpTokenStateOptional HttpTokenState = "optional"
Ec2MetadataHttpTokensOptional Ec2MetadataHttpTokens = "optional"
// imdsv2 is required
HttpTokenStateRequired HttpTokenState = "required"
Ec2MetadataHttpTokensRequired Ec2MetadataHttpTokens = "required"
)
Loading

0 comments on commit b98f743

Please sign in to comment.