Skip to content

Commit

Permalink
Bump model version to v0.0.280 (#768)
Browse files Browse the repository at this point in the history
  • Loading branch information
renan-campos authored May 4, 2023
1 parent b7adf9f commit 94e1757
Show file tree
Hide file tree
Showing 8 changed files with 8,716 additions and 8,519 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.279
model_version:=v0.0.280
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
26 changes: 19 additions & 7 deletions clustersmgmt/v1/aws_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type AWSBuilder struct {
auditLog *AuditLogBuilder
billingAccountID string
etcdEncryption *AwsEtcdEncryptionBuilder
httpTokensState HttpTokenState
privateLinkConfiguration *PrivateLinkClusterConfigurationBuilder
secretAccessKey string
subnetIDs []string
Expand Down Expand Up @@ -115,10 +116,19 @@ func (b *AWSBuilder) EtcdEncryption(value *AwsEtcdEncryptionBuilder) *AWSBuilder
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
b.bitmap_ |= 128
b.bitmap_ |= 256
return b
}

Expand All @@ -128,35 +138,35 @@ func (b *AWSBuilder) PrivateLink(value bool) *AWSBuilder {
func (b *AWSBuilder) PrivateLinkConfiguration(value *PrivateLinkClusterConfigurationBuilder) *AWSBuilder {
b.privateLinkConfiguration = value
if value != nil {
b.bitmap_ |= 256
b.bitmap_ |= 512
} else {
b.bitmap_ &^= 256
b.bitmap_ &^= 512
}
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_ |= 512
b.bitmap_ |= 1024
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_ |= 1024
b.bitmap_ |= 2048
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_ |= 2048
b.bitmap_ |= 4096
} else {
b.bitmap_ &^= 2048
b.bitmap_ &^= 4096
}
return b
}
Expand Down Expand Up @@ -186,6 +196,7 @@ func (b *AWSBuilder) Copy(object *AWS) *AWSBuilder {
} 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 @@ -236,6 +247,7 @@ func (b *AWSBuilder) Build() (object *AWS, err error) {
return
}
}
object.httpTokensState = b.httpTokensState
object.privateLink = b.privateLink
if b.privateLinkConfiguration != nil {
object.privateLinkConfiguration, err = b.privateLinkConfiguration.Build()
Expand Down
44 changes: 34 additions & 10 deletions clustersmgmt/v1/aws_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type AWS struct {
auditLog *AuditLog
billingAccountID string
etcdEncryption *AwsEtcdEncryption
httpTokensState HttpTokenState
privateLinkConfiguration *PrivateLinkClusterConfiguration
secretAccessKey string
subnetIDs []string
Expand Down Expand Up @@ -204,12 +205,35 @@ func (o *AWS) GetEtcdEncryption() (value *AwsEtcdEncryption, ok bool) {
return
}

// HttpTokensState returns the value of the 'http_tokens_state' 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 {
if o != nil && o.bitmap_&128 != 0 {
return o.httpTokensState
}
return HttpTokenState("")
}

// GetHttpTokensState returns the value of the 'http_tokens_state' 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) {
ok = o != nil && o.bitmap_&128 != 0
if ok {
value = o.httpTokensState
}
return
}

// PrivateLink returns the value of the 'private_link' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Sets cluster to be inaccessible externally.
func (o *AWS) PrivateLink() bool {
if o != nil && o.bitmap_&128 != 0 {
if o != nil && o.bitmap_&256 != 0 {
return o.privateLink
}
return false
Expand All @@ -220,7 +244,7 @@ func (o *AWS) PrivateLink() bool {
//
// Sets cluster to be inaccessible externally.
func (o *AWS) GetPrivateLink() (value bool, ok bool) {
ok = o != nil && o.bitmap_&128 != 0
ok = o != nil && o.bitmap_&256 != 0
if ok {
value = o.privateLink
}
Expand All @@ -232,7 +256,7 @@ func (o *AWS) GetPrivateLink() (value bool, ok bool) {
//
// Manages additional configuration for Private Links.
func (o *AWS) PrivateLinkConfiguration() *PrivateLinkClusterConfiguration {
if o != nil && o.bitmap_&256 != 0 {
if o != nil && o.bitmap_&512 != 0 {
return o.privateLinkConfiguration
}
return nil
Expand All @@ -243,7 +267,7 @@ func (o *AWS) PrivateLinkConfiguration() *PrivateLinkClusterConfiguration {
//
// Manages additional configuration for Private Links.
func (o *AWS) GetPrivateLinkConfiguration() (value *PrivateLinkClusterConfiguration, ok bool) {
ok = o != nil && o.bitmap_&256 != 0
ok = o != nil && o.bitmap_&512 != 0
if ok {
value = o.privateLinkConfiguration
}
Expand All @@ -255,7 +279,7 @@ func (o *AWS) GetPrivateLinkConfiguration() (value *PrivateLinkClusterConfigurat
//
// AWS secret access key.
func (o *AWS) SecretAccessKey() string {
if o != nil && o.bitmap_&512 != 0 {
if o != nil && o.bitmap_&1024 != 0 {
return o.secretAccessKey
}
return ""
Expand All @@ -266,7 +290,7 @@ func (o *AWS) SecretAccessKey() string {
//
// AWS secret access key.
func (o *AWS) GetSecretAccessKey() (value string, ok bool) {
ok = o != nil && o.bitmap_&512 != 0
ok = o != nil && o.bitmap_&1024 != 0
if ok {
value = o.secretAccessKey
}
Expand All @@ -278,7 +302,7 @@ func (o *AWS) GetSecretAccessKey() (value string, ok bool) {
//
// The subnet ids to be used when installing the cluster.
func (o *AWS) SubnetIDs() []string {
if o != nil && o.bitmap_&1024 != 0 {
if o != nil && o.bitmap_&2048 != 0 {
return o.subnetIDs
}
return nil
Expand All @@ -289,7 +313,7 @@ func (o *AWS) SubnetIDs() []string {
//
// The subnet ids to be used when installing the cluster.
func (o *AWS) GetSubnetIDs() (value []string, ok bool) {
ok = o != nil && o.bitmap_&1024 != 0
ok = o != nil && o.bitmap_&2048 != 0
if ok {
value = o.subnetIDs
}
Expand All @@ -301,7 +325,7 @@ func (o *AWS) GetSubnetIDs() (value []string, ok bool) {
//
// Optional keys and values that the installer will add as tags to all AWS resources it creates
func (o *AWS) Tags() map[string]string {
if o != nil && o.bitmap_&2048 != 0 {
if o != nil && o.bitmap_&4096 != 0 {
return o.tags
}
return nil
Expand All @@ -312,7 +336,7 @@ func (o *AWS) Tags() map[string]string {
//
// Optional keys and values that the installer will add as tags to all AWS resources it creates
func (o *AWS) GetTags() (value map[string]string, ok bool) {
ok = o != nil && o.bitmap_&2048 != 0
ok = o != nil && o.bitmap_&4096 != 0
if ok {
value = o.tags
}
Expand Down
32 changes: 23 additions & 9 deletions clustersmgmt/v1/aws_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ func writeAWS(object *AWS, stream *jsoniter.Stream) {
count++
}
present_ = object.bitmap_&128 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("http_tokens_state")
stream.WriteString(string(object.httpTokensState))
count++
}
present_ = object.bitmap_&256 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -115,7 +124,7 @@ func writeAWS(object *AWS, stream *jsoniter.Stream) {
stream.WriteBool(object.privateLink)
count++
}
present_ = object.bitmap_&256 != 0 && object.privateLinkConfiguration != nil
present_ = object.bitmap_&512 != 0 && object.privateLinkConfiguration != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -124,7 +133,7 @@ func writeAWS(object *AWS, stream *jsoniter.Stream) {
writePrivateLinkClusterConfiguration(object.privateLinkConfiguration, stream)
count++
}
present_ = object.bitmap_&512 != 0
present_ = object.bitmap_&1024 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -133,7 +142,7 @@ func writeAWS(object *AWS, stream *jsoniter.Stream) {
stream.WriteString(object.secretAccessKey)
count++
}
present_ = object.bitmap_&1024 != 0 && object.subnetIDs != nil
present_ = object.bitmap_&2048 != 0 && object.subnetIDs != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -142,7 +151,7 @@ func writeAWS(object *AWS, stream *jsoniter.Stream) {
writeStringList(object.subnetIDs, stream)
count++
}
present_ = object.bitmap_&2048 != 0 && object.tags != nil
present_ = object.bitmap_&4096 != 0 && object.tags != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -222,22 +231,27 @@ func readAWS(iterator *jsoniter.Iterator) *AWS {
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()
object.privateLink = value
object.bitmap_ |= 128
object.bitmap_ |= 256
case "private_link_configuration":
value := readPrivateLinkClusterConfiguration(iterator)
object.privateLinkConfiguration = value
object.bitmap_ |= 256
object.bitmap_ |= 512
case "secret_access_key":
value := iterator.ReadString()
object.secretAccessKey = value
object.bitmap_ |= 512
object.bitmap_ |= 1024
case "subnet_ids":
value := readStringList(iterator)
object.subnetIDs = value
object.bitmap_ |= 1024
object.bitmap_ |= 2048
case "tags":
value := map[string]string{}
for {
Expand All @@ -249,7 +263,7 @@ func readAWS(iterator *jsoniter.Iterator) *AWS {
value[key] = item
}
object.tags = value
object.bitmap_ |= 2048
object.bitmap_ |= 4096
default:
iterator.ReadAny()
}
Expand Down
76 changes: 76 additions & 0 deletions clustersmgmt/v1/http_token_state_list_type_json.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
Copyright (c) 2020 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
// your changes will be lost when the file is generated again.

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

import (
"io"

jsoniter "github.com/json-iterator/go"
"github.com/openshift-online/ocm-sdk-go/helpers"
)

// MarshalHttpTokenStateList writes a list of values of the 'http_token_state' type to
// the given writer.
func MarshalHttpTokenStateList(list []HttpTokenState, writer io.Writer) error {
stream := helpers.NewStream(writer)
writeHttpTokenStateList(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
// the given stream.
func writeHttpTokenStateList(list []HttpTokenState, stream *jsoniter.Stream) {
stream.WriteArrayStart()
for i, value := range list {
if i > 0 {
stream.WriteMore()
}
stream.WriteString(string(value))
}
stream.WriteArrayEnd()
}

// UnmarshalHttpTokenStateList reads a list of values of the 'http_token_state' 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) {
iterator, err := helpers.NewIterator(source)
if err != nil {
return
}
items = readHttpTokenStateList(iterator)
err = iterator.Error
return
}

// readHttpTokenStateList reads list of values of the ”http_token_state' type from
// the given iterator.
func readHttpTokenStateList(iterator *jsoniter.Iterator) []HttpTokenState {
list := []HttpTokenState{}
for iterator.ReadArray() {
text := iterator.ReadString()
item := HttpTokenState(text)
list = append(list, item)
}
return list
}
Loading

0 comments on commit 94e1757

Please sign in to comment.