Skip to content

Commit be9d26c

Browse files
Merge pull request #1017 from renan-campos/OCM-13172
Release 0.1.453
2 parents 768bbc6 + 2bfd359 commit be9d26c

13 files changed

+12585
-11985
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
This document describes the relevant changes between releases of the OCM API
44
SDK.
55

6+
## 0.1.453
7+
- Update model version to v0.0.406
8+
- Expose the GCP Shielded VM secure boot setting at the machine pool level
9+
610
## 0.1.452
711
- Update model version v0.0.405
812
- Update metamodel version v0.0.64

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export PATH := $(LOCAL_BIN_PATH):$(PATH)
2727
export CGO_ENABLED=0
2828

2929
# Details of the model to use:
30-
model_version:=v0.0.405
30+
model_version:=v0.0.406
3131
model_url:=https://github.com/openshift-online/ocm-api-model.git
3232

3333
# Details of the metamodel to use:
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
Copyright (c) 2020 Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
18+
// your changes will be lost when the file is generated again.
19+
20+
package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
21+
22+
// GCPMachinePoolBuilder contains the data and logic needed to build 'GCP_machine_pool' objects.
23+
//
24+
// Representation of gcp machine pool specific parameters.
25+
type GCPMachinePoolBuilder struct {
26+
bitmap_ uint32
27+
secureBoot bool
28+
}
29+
30+
// NewGCPMachinePool creates a new builder of 'GCP_machine_pool' objects.
31+
func NewGCPMachinePool() *GCPMachinePoolBuilder {
32+
return &GCPMachinePoolBuilder{}
33+
}
34+
35+
// Empty returns true if the builder is empty, i.e. no attribute has a value.
36+
func (b *GCPMachinePoolBuilder) Empty() bool {
37+
return b == nil || b.bitmap_ == 0
38+
}
39+
40+
// SecureBoot sets the value of the 'secure_boot' attribute to the given value.
41+
func (b *GCPMachinePoolBuilder) SecureBoot(value bool) *GCPMachinePoolBuilder {
42+
b.secureBoot = value
43+
b.bitmap_ |= 1
44+
return b
45+
}
46+
47+
// Copy copies the attributes of the given object into this builder, discarding any previous values.
48+
func (b *GCPMachinePoolBuilder) Copy(object *GCPMachinePool) *GCPMachinePoolBuilder {
49+
if object == nil {
50+
return b
51+
}
52+
b.bitmap_ = object.bitmap_
53+
b.secureBoot = object.secureBoot
54+
return b
55+
}
56+
57+
// Build creates a 'GCP_machine_pool' object using the configuration stored in the builder.
58+
func (b *GCPMachinePoolBuilder) Build() (object *GCPMachinePool, err error) {
59+
object = new(GCPMachinePool)
60+
object.bitmap_ = b.bitmap_
61+
object.secureBoot = b.secureBoot
62+
return
63+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
Copyright (c) 2020 Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
18+
// your changes will be lost when the file is generated again.
19+
20+
package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
21+
22+
// GCPMachinePoolListBuilder contains the data and logic needed to build
23+
// 'GCP_machine_pool' objects.
24+
type GCPMachinePoolListBuilder struct {
25+
items []*GCPMachinePoolBuilder
26+
}
27+
28+
// NewGCPMachinePoolList creates a new builder of 'GCP_machine_pool' objects.
29+
func NewGCPMachinePoolList() *GCPMachinePoolListBuilder {
30+
return new(GCPMachinePoolListBuilder)
31+
}
32+
33+
// Items sets the items of the list.
34+
func (b *GCPMachinePoolListBuilder) Items(values ...*GCPMachinePoolBuilder) *GCPMachinePoolListBuilder {
35+
b.items = make([]*GCPMachinePoolBuilder, len(values))
36+
copy(b.items, values)
37+
return b
38+
}
39+
40+
// Empty returns true if the list is empty.
41+
func (b *GCPMachinePoolListBuilder) Empty() bool {
42+
return b == nil || len(b.items) == 0
43+
}
44+
45+
// Copy copies the items of the given list into this builder, discarding any previous items.
46+
func (b *GCPMachinePoolListBuilder) Copy(list *GCPMachinePoolList) *GCPMachinePoolListBuilder {
47+
if list == nil || list.items == nil {
48+
b.items = nil
49+
} else {
50+
b.items = make([]*GCPMachinePoolBuilder, len(list.items))
51+
for i, v := range list.items {
52+
b.items[i] = NewGCPMachinePool().Copy(v)
53+
}
54+
}
55+
return b
56+
}
57+
58+
// Build creates a list of 'GCP_machine_pool' objects using the
59+
// configuration stored in the builder.
60+
func (b *GCPMachinePoolListBuilder) Build() (list *GCPMachinePoolList, err error) {
61+
items := make([]*GCPMachinePool, len(b.items))
62+
for i, item := range b.items {
63+
items[i], err = item.Build()
64+
if err != nil {
65+
return
66+
}
67+
}
68+
list = new(GCPMachinePoolList)
69+
list.items = items
70+
return
71+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*
2+
Copyright (c) 2020 Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
18+
// your changes will be lost when the file is generated again.
19+
20+
package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
21+
22+
import (
23+
"io"
24+
25+
jsoniter "github.com/json-iterator/go"
26+
"github.com/openshift-online/ocm-sdk-go/helpers"
27+
)
28+
29+
// MarshalGCPMachinePoolList writes a list of values of the 'GCP_machine_pool' type to
30+
// the given writer.
31+
func MarshalGCPMachinePoolList(list []*GCPMachinePool, writer io.Writer) error {
32+
stream := helpers.NewStream(writer)
33+
WriteGCPMachinePoolList(list, stream)
34+
err := stream.Flush()
35+
if err != nil {
36+
return err
37+
}
38+
return stream.Error
39+
}
40+
41+
// WriteGCPMachinePoolList writes a list of value of the 'GCP_machine_pool' type to
42+
// the given stream.
43+
func WriteGCPMachinePoolList(list []*GCPMachinePool, stream *jsoniter.Stream) {
44+
stream.WriteArrayStart()
45+
for i, value := range list {
46+
if i > 0 {
47+
stream.WriteMore()
48+
}
49+
WriteGCPMachinePool(value, stream)
50+
}
51+
stream.WriteArrayEnd()
52+
}
53+
54+
// UnmarshalGCPMachinePoolList reads a list of values of the 'GCP_machine_pool' type
55+
// from the given source, which can be a slice of bytes, a string or a reader.
56+
func UnmarshalGCPMachinePoolList(source interface{}) (items []*GCPMachinePool, err error) {
57+
iterator, err := helpers.NewIterator(source)
58+
if err != nil {
59+
return
60+
}
61+
items = ReadGCPMachinePoolList(iterator)
62+
err = iterator.Error
63+
return
64+
}
65+
66+
// ReadGCPMachinePoolList reads list of values of the ”GCP_machine_pool' type from
67+
// the given iterator.
68+
func ReadGCPMachinePoolList(iterator *jsoniter.Iterator) []*GCPMachinePool {
69+
list := []*GCPMachinePool{}
70+
for iterator.ReadArray() {
71+
item := ReadGCPMachinePool(iterator)
72+
list = append(list, item)
73+
}
74+
return list
75+
}

0 commit comments

Comments
 (0)