Skip to content

Commit

Permalink
chore: synchronise to ocm-api-model 0.0.376
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelsorianod committed May 31, 2024
1 parent d0bf924 commit bf8c151
Show file tree
Hide file tree
Showing 11 changed files with 8,741 additions and 7,847 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.375
model_version:=v0.0.376
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
103 changes: 103 additions & 0 deletions clustersmgmt/v1/azure_node_pool_builder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/*
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

// AzureNodePoolBuilder contains the data and logic needed to build 'azure_node_pool' objects.
//
// Representation of azure node pool specific parameters.
type AzureNodePoolBuilder struct {
bitmap_ uint32
osDiskSizeGibibytes string
osDiskStorageAccountType string
vmSize string
resourceName string
ephemeralOSDiskEnabled bool
}

// NewAzureNodePool creates a new builder of 'azure_node_pool' objects.
func NewAzureNodePool() *AzureNodePoolBuilder {
return &AzureNodePoolBuilder{}
}

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

// OSDiskSizeGibibytes sets the value of the 'OS_disk_size_gibibytes' attribute to the given value.
func (b *AzureNodePoolBuilder) OSDiskSizeGibibytes(value string) *AzureNodePoolBuilder {
b.osDiskSizeGibibytes = value
b.bitmap_ |= 1
return b
}

// OSDiskStorageAccountType sets the value of the 'OS_disk_storage_account_type' attribute to the given value.
func (b *AzureNodePoolBuilder) OSDiskStorageAccountType(value string) *AzureNodePoolBuilder {
b.osDiskStorageAccountType = value
b.bitmap_ |= 2
return b
}

// VMSize sets the value of the 'VM_size' attribute to the given value.
func (b *AzureNodePoolBuilder) VMSize(value string) *AzureNodePoolBuilder {
b.vmSize = value
b.bitmap_ |= 4
return b
}

// EphemeralOSDiskEnabled sets the value of the 'ephemeral_OS_disk_enabled' attribute to the given value.
func (b *AzureNodePoolBuilder) EphemeralOSDiskEnabled(value bool) *AzureNodePoolBuilder {
b.ephemeralOSDiskEnabled = value
b.bitmap_ |= 8
return b
}

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

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *AzureNodePoolBuilder) Copy(object *AzureNodePool) *AzureNodePoolBuilder {
if object == nil {
return b
}
b.bitmap_ = object.bitmap_
b.osDiskSizeGibibytes = object.osDiskSizeGibibytes
b.osDiskStorageAccountType = object.osDiskStorageAccountType
b.vmSize = object.vmSize
b.ephemeralOSDiskEnabled = object.ephemeralOSDiskEnabled
b.resourceName = object.resourceName
return b
}

// Build creates a 'azure_node_pool' object using the configuration stored in the builder.
func (b *AzureNodePoolBuilder) Build() (object *AzureNodePool, err error) {
object = new(AzureNodePool)
object.bitmap_ = b.bitmap_
object.osDiskSizeGibibytes = b.osDiskSizeGibibytes
object.osDiskStorageAccountType = b.osDiskStorageAccountType
object.vmSize = b.vmSize
object.ephemeralOSDiskEnabled = b.ephemeralOSDiskEnabled
object.resourceName = b.resourceName
return
}
71 changes: 71 additions & 0 deletions clustersmgmt/v1/azure_node_pool_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

// AzureNodePoolListBuilder contains the data and logic needed to build
// 'azure_node_pool' objects.
type AzureNodePoolListBuilder struct {
items []*AzureNodePoolBuilder
}

// NewAzureNodePoolList creates a new builder of 'azure_node_pool' objects.
func NewAzureNodePoolList() *AzureNodePoolListBuilder {
return new(AzureNodePoolListBuilder)
}

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

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

// Build creates a list of 'azure_node_pool' objects using the
// configuration stored in the builder.
func (b *AzureNodePoolListBuilder) Build() (list *AzureNodePoolList, err error) {
items := make([]*AzureNodePool, len(b.items))
for i, item := range b.items {
items[i], err = item.Build()
if err != nil {
return
}
}
list = new(AzureNodePoolList)
list.items = items
return
}
75 changes: 75 additions & 0 deletions clustersmgmt/v1/azure_node_pool_list_type_json.go
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"
)

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

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

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

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

0 comments on commit bf8c151

Please sign in to comment.