-
Notifications
You must be signed in to change notification settings - Fork 126
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 #1017 from renan-campos/OCM-13172
Release 0.1.453
- Loading branch information
Showing
13 changed files
with
12,585 additions
and
11,985 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,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 | ||
|
||
// GCPMachinePoolBuilder contains the data and logic needed to build 'GCP_machine_pool' objects. | ||
// | ||
// Representation of gcp machine pool specific parameters. | ||
type GCPMachinePoolBuilder struct { | ||
bitmap_ uint32 | ||
secureBoot bool | ||
} | ||
|
||
// NewGCPMachinePool creates a new builder of 'GCP_machine_pool' objects. | ||
func NewGCPMachinePool() *GCPMachinePoolBuilder { | ||
return &GCPMachinePoolBuilder{} | ||
} | ||
|
||
// Empty returns true if the builder is empty, i.e. no attribute has a value. | ||
func (b *GCPMachinePoolBuilder) Empty() bool { | ||
return b == nil || b.bitmap_ == 0 | ||
} | ||
|
||
// SecureBoot sets the value of the 'secure_boot' attribute to the given value. | ||
func (b *GCPMachinePoolBuilder) SecureBoot(value bool) *GCPMachinePoolBuilder { | ||
b.secureBoot = value | ||
b.bitmap_ |= 1 | ||
return b | ||
} | ||
|
||
// Copy copies the attributes of the given object into this builder, discarding any previous values. | ||
func (b *GCPMachinePoolBuilder) Copy(object *GCPMachinePool) *GCPMachinePoolBuilder { | ||
if object == nil { | ||
return b | ||
} | ||
b.bitmap_ = object.bitmap_ | ||
b.secureBoot = object.secureBoot | ||
return b | ||
} | ||
|
||
// Build creates a 'GCP_machine_pool' object using the configuration stored in the builder. | ||
func (b *GCPMachinePoolBuilder) Build() (object *GCPMachinePool, err error) { | ||
object = new(GCPMachinePool) | ||
object.bitmap_ = b.bitmap_ | ||
object.secureBoot = b.secureBoot | ||
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 | ||
|
||
// GCPMachinePoolListBuilder contains the data and logic needed to build | ||
// 'GCP_machine_pool' objects. | ||
type GCPMachinePoolListBuilder struct { | ||
items []*GCPMachinePoolBuilder | ||
} | ||
|
||
// NewGCPMachinePoolList creates a new builder of 'GCP_machine_pool' objects. | ||
func NewGCPMachinePoolList() *GCPMachinePoolListBuilder { | ||
return new(GCPMachinePoolListBuilder) | ||
} | ||
|
||
// Items sets the items of the list. | ||
func (b *GCPMachinePoolListBuilder) Items(values ...*GCPMachinePoolBuilder) *GCPMachinePoolListBuilder { | ||
b.items = make([]*GCPMachinePoolBuilder, len(values)) | ||
copy(b.items, values) | ||
return b | ||
} | ||
|
||
// Empty returns true if the list is empty. | ||
func (b *GCPMachinePoolListBuilder) 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 *GCPMachinePoolListBuilder) Copy(list *GCPMachinePoolList) *GCPMachinePoolListBuilder { | ||
if list == nil || list.items == nil { | ||
b.items = nil | ||
} else { | ||
b.items = make([]*GCPMachinePoolBuilder, len(list.items)) | ||
for i, v := range list.items { | ||
b.items[i] = NewGCPMachinePool().Copy(v) | ||
} | ||
} | ||
return b | ||
} | ||
|
||
// Build creates a list of 'GCP_machine_pool' objects using the | ||
// configuration stored in the builder. | ||
func (b *GCPMachinePoolListBuilder) Build() (list *GCPMachinePoolList, err error) { | ||
items := make([]*GCPMachinePool, len(b.items)) | ||
for i, item := range b.items { | ||
items[i], err = item.Build() | ||
if err != nil { | ||
return | ||
} | ||
} | ||
list = new(GCPMachinePoolList) | ||
list.items = items | ||
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,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" | ||
) | ||
|
||
// MarshalGCPMachinePoolList writes a list of values of the 'GCP_machine_pool' type to | ||
// the given writer. | ||
func MarshalGCPMachinePoolList(list []*GCPMachinePool, writer io.Writer) error { | ||
stream := helpers.NewStream(writer) | ||
WriteGCPMachinePoolList(list, stream) | ||
err := stream.Flush() | ||
if err != nil { | ||
return err | ||
} | ||
return stream.Error | ||
} | ||
|
||
// WriteGCPMachinePoolList writes a list of value of the 'GCP_machine_pool' type to | ||
// the given stream. | ||
func WriteGCPMachinePoolList(list []*GCPMachinePool, stream *jsoniter.Stream) { | ||
stream.WriteArrayStart() | ||
for i, value := range list { | ||
if i > 0 { | ||
stream.WriteMore() | ||
} | ||
WriteGCPMachinePool(value, stream) | ||
} | ||
stream.WriteArrayEnd() | ||
} | ||
|
||
// UnmarshalGCPMachinePoolList reads a list of values of the 'GCP_machine_pool' type | ||
// from the given source, which can be a slice of bytes, a string or a reader. | ||
func UnmarshalGCPMachinePoolList(source interface{}) (items []*GCPMachinePool, err error) { | ||
iterator, err := helpers.NewIterator(source) | ||
if err != nil { | ||
return | ||
} | ||
items = ReadGCPMachinePoolList(iterator) | ||
err = iterator.Error | ||
return | ||
} | ||
|
||
// ReadGCPMachinePoolList reads list of values of the ”GCP_machine_pool' type from | ||
// the given iterator. | ||
func ReadGCPMachinePoolList(iterator *jsoniter.Iterator) []*GCPMachinePool { | ||
list := []*GCPMachinePool{} | ||
for iterator.ReadArray() { | ||
item := ReadGCPMachinePool(iterator) | ||
list = append(list, item) | ||
} | ||
return list | ||
} |
Oops, something went wrong.