-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCM-7288 | feat: bump model to v0.0.375
- Loading branch information
1 parent
44af134
commit ae6428a
Showing
14 changed files
with
2,661 additions
and
1,660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
clustersmgmt/v1/node_pool_management_upgrade_builder.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
/* | ||
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 | ||
|
||
// NodePoolManagementUpgradeBuilder contains the data and logic needed to build 'node_pool_management_upgrade' objects. | ||
// | ||
// Representation of node pool management. | ||
type NodePoolManagementUpgradeBuilder struct { | ||
bitmap_ uint32 | ||
id string | ||
href string | ||
maxSurge string | ||
maxUnavailable string | ||
type_ string | ||
} | ||
|
||
// NewNodePoolManagementUpgrade creates a new builder of 'node_pool_management_upgrade' objects. | ||
func NewNodePoolManagementUpgrade() *NodePoolManagementUpgradeBuilder { | ||
return &NodePoolManagementUpgradeBuilder{} | ||
} | ||
|
||
// Link sets the flag that indicates if this is a link. | ||
func (b *NodePoolManagementUpgradeBuilder) Link(value bool) *NodePoolManagementUpgradeBuilder { | ||
b.bitmap_ |= 1 | ||
return b | ||
} | ||
|
||
// ID sets the identifier of the object. | ||
func (b *NodePoolManagementUpgradeBuilder) ID(value string) *NodePoolManagementUpgradeBuilder { | ||
b.id = value | ||
b.bitmap_ |= 2 | ||
return b | ||
} | ||
|
||
// HREF sets the link to the object. | ||
func (b *NodePoolManagementUpgradeBuilder) HREF(value string) *NodePoolManagementUpgradeBuilder { | ||
b.href = value | ||
b.bitmap_ |= 4 | ||
return b | ||
} | ||
|
||
// Empty returns true if the builder is empty, i.e. no attribute has a value. | ||
func (b *NodePoolManagementUpgradeBuilder) Empty() bool { | ||
return b == nil || b.bitmap_&^1 == 0 | ||
} | ||
|
||
// MaxSurge sets the value of the 'max_surge' attribute to the given value. | ||
func (b *NodePoolManagementUpgradeBuilder) MaxSurge(value string) *NodePoolManagementUpgradeBuilder { | ||
b.maxSurge = value | ||
b.bitmap_ |= 8 | ||
return b | ||
} | ||
|
||
// MaxUnavailable sets the value of the 'max_unavailable' attribute to the given value. | ||
func (b *NodePoolManagementUpgradeBuilder) MaxUnavailable(value string) *NodePoolManagementUpgradeBuilder { | ||
b.maxUnavailable = value | ||
b.bitmap_ |= 16 | ||
return b | ||
} | ||
|
||
// Type sets the value of the 'type' attribute to the given value. | ||
func (b *NodePoolManagementUpgradeBuilder) Type(value string) *NodePoolManagementUpgradeBuilder { | ||
b.type_ = value | ||
b.bitmap_ |= 32 | ||
return b | ||
} | ||
|
||
// Copy copies the attributes of the given object into this builder, discarding any previous values. | ||
func (b *NodePoolManagementUpgradeBuilder) Copy(object *NodePoolManagementUpgrade) *NodePoolManagementUpgradeBuilder { | ||
if object == nil { | ||
return b | ||
} | ||
b.bitmap_ = object.bitmap_ | ||
b.id = object.id | ||
b.href = object.href | ||
b.maxSurge = object.maxSurge | ||
b.maxUnavailable = object.maxUnavailable | ||
b.type_ = object.type_ | ||
return b | ||
} | ||
|
||
// Build creates a 'node_pool_management_upgrade' object using the configuration stored in the builder. | ||
func (b *NodePoolManagementUpgradeBuilder) Build() (object *NodePoolManagementUpgrade, err error) { | ||
object = new(NodePoolManagementUpgrade) | ||
object.id = b.id | ||
object.href = b.href | ||
object.bitmap_ = b.bitmap_ | ||
object.maxSurge = b.maxSurge | ||
object.maxUnavailable = b.maxUnavailable | ||
object.type_ = b.type_ | ||
return | ||
} |
71 changes: 71 additions & 0 deletions
71
clustersmgmt/v1/node_pool_management_upgrade_list_builder.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
// NodePoolManagementUpgradeListBuilder contains the data and logic needed to build | ||
// 'node_pool_management_upgrade' objects. | ||
type NodePoolManagementUpgradeListBuilder struct { | ||
items []*NodePoolManagementUpgradeBuilder | ||
} | ||
|
||
// NewNodePoolManagementUpgradeList creates a new builder of 'node_pool_management_upgrade' objects. | ||
func NewNodePoolManagementUpgradeList() *NodePoolManagementUpgradeListBuilder { | ||
return new(NodePoolManagementUpgradeListBuilder) | ||
} | ||
|
||
// Items sets the items of the list. | ||
func (b *NodePoolManagementUpgradeListBuilder) Items(values ...*NodePoolManagementUpgradeBuilder) *NodePoolManagementUpgradeListBuilder { | ||
b.items = make([]*NodePoolManagementUpgradeBuilder, len(values)) | ||
copy(b.items, values) | ||
return b | ||
} | ||
|
||
// Empty returns true if the list is empty. | ||
func (b *NodePoolManagementUpgradeListBuilder) 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 *NodePoolManagementUpgradeListBuilder) Copy(list *NodePoolManagementUpgradeList) *NodePoolManagementUpgradeListBuilder { | ||
if list == nil || list.items == nil { | ||
b.items = nil | ||
} else { | ||
b.items = make([]*NodePoolManagementUpgradeBuilder, len(list.items)) | ||
for i, v := range list.items { | ||
b.items[i] = NewNodePoolManagementUpgrade().Copy(v) | ||
} | ||
} | ||
return b | ||
} | ||
|
||
// Build creates a list of 'node_pool_management_upgrade' objects using the | ||
// configuration stored in the builder. | ||
func (b *NodePoolManagementUpgradeListBuilder) Build() (list *NodePoolManagementUpgradeList, err error) { | ||
items := make([]*NodePoolManagementUpgrade, len(b.items)) | ||
for i, item := range b.items { | ||
items[i], err = item.Build() | ||
if err != nil { | ||
return | ||
} | ||
} | ||
list = new(NodePoolManagementUpgradeList) | ||
list.items = items | ||
return | ||
} |
75 changes: 75 additions & 0 deletions
75
clustersmgmt/v1/node_pool_management_upgrade_list_type_json.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
) | ||
|
||
// MarshalNodePoolManagementUpgradeList writes a list of values of the 'node_pool_management_upgrade' type to | ||
// the given writer. | ||
func MarshalNodePoolManagementUpgradeList(list []*NodePoolManagementUpgrade, writer io.Writer) error { | ||
stream := helpers.NewStream(writer) | ||
writeNodePoolManagementUpgradeList(list, stream) | ||
err := stream.Flush() | ||
if err != nil { | ||
return err | ||
} | ||
return stream.Error | ||
} | ||
|
||
// writeNodePoolManagementUpgradeList writes a list of value of the 'node_pool_management_upgrade' type to | ||
// the given stream. | ||
func writeNodePoolManagementUpgradeList(list []*NodePoolManagementUpgrade, stream *jsoniter.Stream) { | ||
stream.WriteArrayStart() | ||
for i, value := range list { | ||
if i > 0 { | ||
stream.WriteMore() | ||
} | ||
writeNodePoolManagementUpgrade(value, stream) | ||
} | ||
stream.WriteArrayEnd() | ||
} | ||
|
||
// UnmarshalNodePoolManagementUpgradeList reads a list of values of the 'node_pool_management_upgrade' type | ||
// from the given source, which can be a slice of bytes, a string or a reader. | ||
func UnmarshalNodePoolManagementUpgradeList(source interface{}) (items []*NodePoolManagementUpgrade, err error) { | ||
iterator, err := helpers.NewIterator(source) | ||
if err != nil { | ||
return | ||
} | ||
items = readNodePoolManagementUpgradeList(iterator) | ||
err = iterator.Error | ||
return | ||
} | ||
|
||
// readNodePoolManagementUpgradeList reads list of values of the ”node_pool_management_upgrade' type from | ||
// the given iterator. | ||
func readNodePoolManagementUpgradeList(iterator *jsoniter.Iterator) []*NodePoolManagementUpgrade { | ||
list := []*NodePoolManagementUpgrade{} | ||
for iterator.ReadArray() { | ||
item := readNodePoolManagementUpgrade(iterator) | ||
list = append(list, item) | ||
} | ||
return list | ||
} |
Oops, something went wrong.