Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump to ocm-api-model 0.0.403 #1013

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.402
model_version:=v0.0.403
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
39 changes: 32 additions & 7 deletions clustersmgmt/v1/azure_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type AzureBuilder struct {
bitmap_ uint32
managedResourceGroupName string
networkSecurityGroupResourceID string
nodesOutboundConnectivity *AzureNodesOutboundConnectivityBuilder
operatorsAuthentication *AzureOperatorsAuthenticationBuilder
resourceGroupName string
resourceName string
Expand Down Expand Up @@ -58,52 +59,65 @@ func (b *AzureBuilder) NetworkSecurityGroupResourceID(value string) *AzureBuilde
return b
}

// NodesOutboundConnectivity sets the value of the 'nodes_outbound_connectivity' attribute to the given value.
//
// The configuration of the node outbound connectivity
func (b *AzureBuilder) NodesOutboundConnectivity(value *AzureNodesOutboundConnectivityBuilder) *AzureBuilder {
b.nodesOutboundConnectivity = value
if value != nil {
b.bitmap_ |= 4
} else {
b.bitmap_ &^= 4
}
return b
}

// OperatorsAuthentication sets the value of the 'operators_authentication' attribute to the given value.
//
// The configuration that the operators of the
// cluster have to authenticate to Azure.
func (b *AzureBuilder) OperatorsAuthentication(value *AzureOperatorsAuthenticationBuilder) *AzureBuilder {
b.operatorsAuthentication = value
if value != nil {
b.bitmap_ |= 4
b.bitmap_ |= 8
} else {
b.bitmap_ &^= 4
b.bitmap_ &^= 8
}
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_ |= 8
b.bitmap_ |= 16
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_ |= 16
b.bitmap_ |= 32
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_ |= 32
b.bitmap_ |= 64
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_ |= 64
b.bitmap_ |= 128
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_ |= 128
b.bitmap_ |= 256
return b
}

Expand All @@ -115,6 +129,11 @@ func (b *AzureBuilder) Copy(object *Azure) *AzureBuilder {
b.bitmap_ = object.bitmap_
b.managedResourceGroupName = object.managedResourceGroupName
b.networkSecurityGroupResourceID = object.networkSecurityGroupResourceID
if object.nodesOutboundConnectivity != nil {
b.nodesOutboundConnectivity = NewAzureNodesOutboundConnectivity().Copy(object.nodesOutboundConnectivity)
} else {
b.nodesOutboundConnectivity = nil
}
if object.operatorsAuthentication != nil {
b.operatorsAuthentication = NewAzureOperatorsAuthentication().Copy(object.operatorsAuthentication)
} else {
Expand All @@ -134,6 +153,12 @@ func (b *AzureBuilder) Build() (object *Azure, err error) {
object.bitmap_ = b.bitmap_
object.managedResourceGroupName = b.managedResourceGroupName
object.networkSecurityGroupResourceID = b.networkSecurityGroupResourceID
if b.nodesOutboundConnectivity != nil {
object.nodesOutboundConnectivity, err = b.nodesOutboundConnectivity.Build()
if err != nil {
return
}
}
if b.operatorsAuthentication != nil {
object.operatorsAuthentication, err = b.operatorsAuthentication.Build()
if err != nil {
Expand Down
63 changes: 63 additions & 0 deletions clustersmgmt/v1/azure_nodes_outbound_connectivity_builder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
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

// AzureNodesOutboundConnectivityBuilder contains the data and logic needed to build 'azure_nodes_outbound_connectivity' objects.
//
// The configuration of the node outbound connectivity
type AzureNodesOutboundConnectivityBuilder struct {
bitmap_ uint32
outboundType string
}

// NewAzureNodesOutboundConnectivity creates a new builder of 'azure_nodes_outbound_connectivity' objects.
func NewAzureNodesOutboundConnectivity() *AzureNodesOutboundConnectivityBuilder {
return &AzureNodesOutboundConnectivityBuilder{}
}

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

// OutboundType sets the value of the 'outbound_type' attribute to the given value.
func (b *AzureNodesOutboundConnectivityBuilder) OutboundType(value string) *AzureNodesOutboundConnectivityBuilder {
b.outboundType = value
b.bitmap_ |= 1
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *AzureNodesOutboundConnectivityBuilder) Copy(object *AzureNodesOutboundConnectivity) *AzureNodesOutboundConnectivityBuilder {
if object == nil {
return b
}
b.bitmap_ = object.bitmap_
b.outboundType = object.outboundType
return b
}

// Build creates a 'azure_nodes_outbound_connectivity' object using the configuration stored in the builder.
func (b *AzureNodesOutboundConnectivityBuilder) Build() (object *AzureNodesOutboundConnectivity, err error) {
object = new(AzureNodesOutboundConnectivity)
object.bitmap_ = b.bitmap_
object.outboundType = b.outboundType
return
}
71 changes: 71 additions & 0 deletions clustersmgmt/v1/azure_nodes_outbound_connectivity_list_builder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
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

// AzureNodesOutboundConnectivityListBuilder contains the data and logic needed to build
// 'azure_nodes_outbound_connectivity' objects.
type AzureNodesOutboundConnectivityListBuilder struct {
items []*AzureNodesOutboundConnectivityBuilder
}

// NewAzureNodesOutboundConnectivityList creates a new builder of 'azure_nodes_outbound_connectivity' objects.
func NewAzureNodesOutboundConnectivityList() *AzureNodesOutboundConnectivityListBuilder {
return new(AzureNodesOutboundConnectivityListBuilder)
}

// Items sets the items of the list.
func (b *AzureNodesOutboundConnectivityListBuilder) Items(values ...*AzureNodesOutboundConnectivityBuilder) *AzureNodesOutboundConnectivityListBuilder {
b.items = make([]*AzureNodesOutboundConnectivityBuilder, len(values))
copy(b.items, values)
return b
}

// Empty returns true if the list is empty.
func (b *AzureNodesOutboundConnectivityListBuilder) 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 *AzureNodesOutboundConnectivityListBuilder) Copy(list *AzureNodesOutboundConnectivityList) *AzureNodesOutboundConnectivityListBuilder {
if list == nil || list.items == nil {
b.items = nil
} else {
b.items = make([]*AzureNodesOutboundConnectivityBuilder, len(list.items))
for i, v := range list.items {
b.items[i] = NewAzureNodesOutboundConnectivity().Copy(v)
}
}
return b
}

// Build creates a list of 'azure_nodes_outbound_connectivity' objects using the
// configuration stored in the builder.
func (b *AzureNodesOutboundConnectivityListBuilder) Build() (list *AzureNodesOutboundConnectivityList, err error) {
items := make([]*AzureNodesOutboundConnectivity, len(b.items))
for i, item := range b.items {
items[i], err = item.Build()
if err != nil {
return
}
}
list = new(AzureNodesOutboundConnectivityList)
list.items = items
return
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
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"
)

// MarshalAzureNodesOutboundConnectivityList writes a list of values of the 'azure_nodes_outbound_connectivity' type to
// the given writer.
func MarshalAzureNodesOutboundConnectivityList(list []*AzureNodesOutboundConnectivity, writer io.Writer) error {
stream := helpers.NewStream(writer)
writeAzureNodesOutboundConnectivityList(list, stream)
err := stream.Flush()
if err != nil {
return err
}
return stream.Error
}

// writeAzureNodesOutboundConnectivityList writes a list of value of the 'azure_nodes_outbound_connectivity' type to
// the given stream.
func writeAzureNodesOutboundConnectivityList(list []*AzureNodesOutboundConnectivity, stream *jsoniter.Stream) {
stream.WriteArrayStart()
for i, value := range list {
if i > 0 {
stream.WriteMore()
}
writeAzureNodesOutboundConnectivity(value, stream)
}
stream.WriteArrayEnd()
}

// UnmarshalAzureNodesOutboundConnectivityList reads a list of values of the 'azure_nodes_outbound_connectivity' type
// from the given source, which can be a slice of bytes, a string or a reader.
func UnmarshalAzureNodesOutboundConnectivityList(source interface{}) (items []*AzureNodesOutboundConnectivity, err error) {
iterator, err := helpers.NewIterator(source)
if err != nil {
return
}
items = readAzureNodesOutboundConnectivityList(iterator)
err = iterator.Error
return
}

// readAzureNodesOutboundConnectivityList reads list of values of the ”azure_nodes_outbound_connectivity' type from
// the given iterator.
func readAzureNodesOutboundConnectivityList(iterator *jsoniter.Iterator) []*AzureNodesOutboundConnectivity {
list := []*AzureNodesOutboundConnectivity{}
for iterator.ReadArray() {
item := readAzureNodesOutboundConnectivity(iterator)
list = append(list, item)
}
return list
}
Loading
Loading