-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #770 from leseb/bump-to-0.0.281
Bump model version to v0.0.281
- Loading branch information
Showing
11 changed files
with
2,830 additions
and
2,200 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
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,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 | ||
|
||
// MachineTypeRootVolumeBuilder contains the data and logic needed to build 'machine_type_root_volume' objects. | ||
// | ||
// Machine type root volume. | ||
type MachineTypeRootVolumeBuilder struct { | ||
bitmap_ uint32 | ||
aws *AWSVolumeBuilder | ||
gcp *GCPVolumeBuilder | ||
} | ||
|
||
// NewMachineTypeRootVolume creates a new builder of 'machine_type_root_volume' objects. | ||
func NewMachineTypeRootVolume() *MachineTypeRootVolumeBuilder { | ||
return &MachineTypeRootVolumeBuilder{} | ||
} | ||
|
||
// Empty returns true if the builder is empty, i.e. no attribute has a value. | ||
func (b *MachineTypeRootVolumeBuilder) Empty() bool { | ||
return b == nil || b.bitmap_ == 0 | ||
} | ||
|
||
// AWS sets the value of the 'AWS' attribute to the given value. | ||
// | ||
// Holds settings for an AWS storage volume. | ||
func (b *MachineTypeRootVolumeBuilder) AWS(value *AWSVolumeBuilder) *MachineTypeRootVolumeBuilder { | ||
b.aws = value | ||
if value != nil { | ||
b.bitmap_ |= 1 | ||
} else { | ||
b.bitmap_ &^= 1 | ||
} | ||
return b | ||
} | ||
|
||
// GCP sets the value of the 'GCP' attribute to the given value. | ||
// | ||
// Holds settings for an GCP storage volume. | ||
func (b *MachineTypeRootVolumeBuilder) GCP(value *GCPVolumeBuilder) *MachineTypeRootVolumeBuilder { | ||
b.gcp = value | ||
if value != nil { | ||
b.bitmap_ |= 2 | ||
} else { | ||
b.bitmap_ &^= 2 | ||
} | ||
return b | ||
} | ||
|
||
// Copy copies the attributes of the given object into this builder, discarding any previous values. | ||
func (b *MachineTypeRootVolumeBuilder) Copy(object *MachineTypeRootVolume) *MachineTypeRootVolumeBuilder { | ||
if object == nil { | ||
return b | ||
} | ||
b.bitmap_ = object.bitmap_ | ||
if object.aws != nil { | ||
b.aws = NewAWSVolume().Copy(object.aws) | ||
} else { | ||
b.aws = nil | ||
} | ||
if object.gcp != nil { | ||
b.gcp = NewGCPVolume().Copy(object.gcp) | ||
} else { | ||
b.gcp = nil | ||
} | ||
return b | ||
} | ||
|
||
// Build creates a 'machine_type_root_volume' object using the configuration stored in the builder. | ||
func (b *MachineTypeRootVolumeBuilder) Build() (object *MachineTypeRootVolume, err error) { | ||
object = new(MachineTypeRootVolume) | ||
object.bitmap_ = b.bitmap_ | ||
if b.aws != nil { | ||
object.aws, err = b.aws.Build() | ||
if err != nil { | ||
return | ||
} | ||
} | ||
if b.gcp != nil { | ||
object.gcp, err = b.gcp.Build() | ||
if err != nil { | ||
return | ||
} | ||
} | ||
return | ||
} |
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 | ||
|
||
// MachineTypeRootVolumeListBuilder contains the data and logic needed to build | ||
// 'machine_type_root_volume' objects. | ||
type MachineTypeRootVolumeListBuilder struct { | ||
items []*MachineTypeRootVolumeBuilder | ||
} | ||
|
||
// NewMachineTypeRootVolumeList creates a new builder of 'machine_type_root_volume' objects. | ||
func NewMachineTypeRootVolumeList() *MachineTypeRootVolumeListBuilder { | ||
return new(MachineTypeRootVolumeListBuilder) | ||
} | ||
|
||
// Items sets the items of the list. | ||
func (b *MachineTypeRootVolumeListBuilder) Items(values ...*MachineTypeRootVolumeBuilder) *MachineTypeRootVolumeListBuilder { | ||
b.items = make([]*MachineTypeRootVolumeBuilder, len(values)) | ||
copy(b.items, values) | ||
return b | ||
} | ||
|
||
// Empty returns true if the list is empty. | ||
func (b *MachineTypeRootVolumeListBuilder) 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 *MachineTypeRootVolumeListBuilder) Copy(list *MachineTypeRootVolumeList) *MachineTypeRootVolumeListBuilder { | ||
if list == nil || list.items == nil { | ||
b.items = nil | ||
} else { | ||
b.items = make([]*MachineTypeRootVolumeBuilder, len(list.items)) | ||
for i, v := range list.items { | ||
b.items[i] = NewMachineTypeRootVolume().Copy(v) | ||
} | ||
} | ||
return b | ||
} | ||
|
||
// Build creates a list of 'machine_type_root_volume' objects using the | ||
// configuration stored in the builder. | ||
func (b *MachineTypeRootVolumeListBuilder) Build() (list *MachineTypeRootVolumeList, err error) { | ||
items := make([]*MachineTypeRootVolume, len(b.items)) | ||
for i, item := range b.items { | ||
items[i], err = item.Build() | ||
if err != nil { | ||
return | ||
} | ||
} | ||
list = new(MachineTypeRootVolumeList) | ||
list.items = items | ||
return | ||
} |
75 changes: 75 additions & 0 deletions
75
clustersmgmt/v1/machine_type_root_volume_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" | ||
) | ||
|
||
// MarshalMachineTypeRootVolumeList writes a list of values of the 'machine_type_root_volume' type to | ||
// the given writer. | ||
func MarshalMachineTypeRootVolumeList(list []*MachineTypeRootVolume, writer io.Writer) error { | ||
stream := helpers.NewStream(writer) | ||
writeMachineTypeRootVolumeList(list, stream) | ||
err := stream.Flush() | ||
if err != nil { | ||
return err | ||
} | ||
return stream.Error | ||
} | ||
|
||
// writeMachineTypeRootVolumeList writes a list of value of the 'machine_type_root_volume' type to | ||
// the given stream. | ||
func writeMachineTypeRootVolumeList(list []*MachineTypeRootVolume, stream *jsoniter.Stream) { | ||
stream.WriteArrayStart() | ||
for i, value := range list { | ||
if i > 0 { | ||
stream.WriteMore() | ||
} | ||
writeMachineTypeRootVolume(value, stream) | ||
} | ||
stream.WriteArrayEnd() | ||
} | ||
|
||
// UnmarshalMachineTypeRootVolumeList reads a list of values of the 'machine_type_root_volume' type | ||
// from the given source, which can be a slice of bytes, a string or a reader. | ||
func UnmarshalMachineTypeRootVolumeList(source interface{}) (items []*MachineTypeRootVolume, err error) { | ||
iterator, err := helpers.NewIterator(source) | ||
if err != nil { | ||
return | ||
} | ||
items = readMachineTypeRootVolumeList(iterator) | ||
err = iterator.Error | ||
return | ||
} | ||
|
||
// readMachineTypeRootVolumeList reads list of values of the ”machine_type_root_volume' type from | ||
// the given iterator. | ||
func readMachineTypeRootVolumeList(iterator *jsoniter.Iterator) []*MachineTypeRootVolume { | ||
list := []*MachineTypeRootVolume{} | ||
for iterator.ReadArray() { | ||
item := readMachineTypeRootVolume(iterator) | ||
list = append(list, item) | ||
} | ||
return list | ||
} |
Oops, something went wrong.