Skip to content

Commit 6e2ea48

Browse files
authored
Merge pull request #881 from davidleerh/OCM-5312-SDK
OCM-5312 | Add Platform to subnet_network_verification_type
2 parents 821b411 + 8eacbdc commit 6e2ea48

File tree

9 files changed

+1849
-1771
lines changed

9 files changed

+1849
-1771
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.390
7+
- Update model version v0.0.343
8+
- Add `Platform`to `subnet_network_verification_type` resource
9+
610
## 0.1.389
711
- Update model version v0.0.342
812
- Add `Search` and `Order` methods to List `/api/clusters_mgmt/v1/clusters/{id}/node_pools`

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.342
30+
model_version:=v0.0.343
3131
model_url:=https://github.com/openshift-online/ocm-api-model.git
3232

3333
# Details of the metamodel to use:

clustersmgmt/v1/openapi.go

Lines changed: 1761 additions & 1747 deletions
Large diffs are not rendered by default.

clustersmgmt/v1/platform_type.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ const (
2626
//
2727
PlatformAws Platform = "aws"
2828
//
29+
PlatformAwsClassic Platform = "aws-classic"
30+
//
31+
PlatformAwsHostedCp Platform = "aws-hosted-cp"
32+
//
2933
PlatformGcp Platform = "gcp"
3034
//
3135
PlatformHostedCluster Platform = "hostedcluster"

clustersmgmt/v1/subnet_network_verification_builder.go

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
2121

2222
// SubnetNetworkVerificationBuilder contains the data and logic needed to build 'subnet_network_verification' objects.
2323
type SubnetNetworkVerificationBuilder struct {
24-
bitmap_ uint32
25-
id string
26-
href string
27-
details []string
28-
state string
29-
tags map[string]string
24+
bitmap_ uint32
25+
id string
26+
href string
27+
details []string
28+
platform Platform
29+
state string
30+
tags map[string]string
3031
}
3132

3233
// NewSubnetNetworkVerification creates a new builder of 'subnet_network_verification' objects.
@@ -67,20 +68,29 @@ func (b *SubnetNetworkVerificationBuilder) Details(values ...string) *SubnetNetw
6768
return b
6869
}
6970

71+
// Platform sets the value of the 'platform' attribute to the given value.
72+
//
73+
// Representation of an platform type field.
74+
func (b *SubnetNetworkVerificationBuilder) Platform(value Platform) *SubnetNetworkVerificationBuilder {
75+
b.platform = value
76+
b.bitmap_ |= 16
77+
return b
78+
}
79+
7080
// State sets the value of the 'state' attribute to the given value.
7181
func (b *SubnetNetworkVerificationBuilder) State(value string) *SubnetNetworkVerificationBuilder {
7282
b.state = value
73-
b.bitmap_ |= 16
83+
b.bitmap_ |= 32
7484
return b
7585
}
7686

7787
// Tags sets the value of the 'tags' attribute to the given value.
7888
func (b *SubnetNetworkVerificationBuilder) Tags(value map[string]string) *SubnetNetworkVerificationBuilder {
7989
b.tags = value
8090
if value != nil {
81-
b.bitmap_ |= 32
91+
b.bitmap_ |= 64
8292
} else {
83-
b.bitmap_ &^= 32
93+
b.bitmap_ &^= 64
8494
}
8595
return b
8696
}
@@ -99,6 +109,7 @@ func (b *SubnetNetworkVerificationBuilder) Copy(object *SubnetNetworkVerificatio
99109
} else {
100110
b.details = nil
101111
}
112+
b.platform = object.platform
102113
b.state = object.state
103114
if len(object.tags) > 0 {
104115
b.tags = map[string]string{}
@@ -121,6 +132,7 @@ func (b *SubnetNetworkVerificationBuilder) Build() (object *SubnetNetworkVerific
121132
object.details = make([]string, len(b.details))
122133
copy(object.details, b.details)
123134
}
135+
object.platform = b.platform
124136
object.state = b.state
125137
if b.tags != nil {
126138
object.tags = make(map[string]string)

clustersmgmt/v1/subnet_network_verification_type.go

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ const SubnetNetworkVerificationNilKind = "SubnetNetworkVerificationNil"
3333

3434
// SubnetNetworkVerification represents the values of the 'subnet_network_verification' type.
3535
type SubnetNetworkVerification struct {
36-
bitmap_ uint32
37-
id string
38-
href string
39-
details []string
40-
state string
41-
tags map[string]string
36+
bitmap_ uint32
37+
id string
38+
href string
39+
details []string
40+
platform Platform
41+
state string
42+
tags map[string]string
4243
}
4344

4445
// Kind returns the name of the type of the object.
@@ -121,12 +122,35 @@ func (o *SubnetNetworkVerification) GetDetails() (value []string, ok bool) {
121122
return
122123
}
123124

125+
// Platform returns the value of the 'platform' attribute, or
126+
// the zero value of the type if the attribute doesn't have a value.
127+
//
128+
// Platform supplied to the network verifier for this subnet.
129+
func (o *SubnetNetworkVerification) Platform() Platform {
130+
if o != nil && o.bitmap_&16 != 0 {
131+
return o.platform
132+
}
133+
return Platform("")
134+
}
135+
136+
// GetPlatform returns the value of the 'platform' attribute and
137+
// a flag indicating if the attribute has a value.
138+
//
139+
// Platform supplied to the network verifier for this subnet.
140+
func (o *SubnetNetworkVerification) GetPlatform() (value Platform, ok bool) {
141+
ok = o != nil && o.bitmap_&16 != 0
142+
if ok {
143+
value = o.platform
144+
}
145+
return
146+
}
147+
124148
// State returns the value of the 'state' attribute, or
125149
// the zero value of the type if the attribute doesn't have a value.
126150
//
127151
// State of the subnet network verification.
128152
func (o *SubnetNetworkVerification) State() string {
129-
if o != nil && o.bitmap_&16 != 0 {
153+
if o != nil && o.bitmap_&32 != 0 {
130154
return o.state
131155
}
132156
return ""
@@ -137,7 +161,7 @@ func (o *SubnetNetworkVerification) State() string {
137161
//
138162
// State of the subnet network verification.
139163
func (o *SubnetNetworkVerification) GetState() (value string, ok bool) {
140-
ok = o != nil && o.bitmap_&16 != 0
164+
ok = o != nil && o.bitmap_&32 != 0
141165
if ok {
142166
value = o.state
143167
}
@@ -149,7 +173,7 @@ func (o *SubnetNetworkVerification) GetState() (value string, ok bool) {
149173
//
150174
// Tags supplied to the network verifier for this subnet.
151175
func (o *SubnetNetworkVerification) Tags() map[string]string {
152-
if o != nil && o.bitmap_&32 != 0 {
176+
if o != nil && o.bitmap_&64 != 0 {
153177
return o.tags
154178
}
155179
return nil
@@ -160,7 +184,7 @@ func (o *SubnetNetworkVerification) Tags() map[string]string {
160184
//
161185
// Tags supplied to the network verifier for this subnet.
162186
func (o *SubnetNetworkVerification) GetTags() (value map[string]string, ok bool) {
163-
ok = o != nil && o.bitmap_&32 != 0
187+
ok = o != nil && o.bitmap_&64 != 0
164188
if ok {
165189
value = o.tags
166190
}

clustersmgmt/v1/subnet_network_verification_type_json.go

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ func writeSubnetNetworkVerification(object *SubnetNetworkVerification, stream *j
7676
count++
7777
}
7878
present_ = object.bitmap_&16 != 0
79+
if present_ {
80+
if count > 0 {
81+
stream.WriteMore()
82+
}
83+
stream.WriteObjectField("platform")
84+
stream.WriteString(string(object.platform))
85+
count++
86+
}
87+
present_ = object.bitmap_&32 != 0
7988
if present_ {
8089
if count > 0 {
8190
stream.WriteMore()
@@ -84,7 +93,7 @@ func writeSubnetNetworkVerification(object *SubnetNetworkVerification, stream *j
8493
stream.WriteString(object.state)
8594
count++
8695
}
87-
present_ = object.bitmap_&32 != 0 && object.tags != nil
96+
present_ = object.bitmap_&64 != 0 && object.tags != nil
8897
if present_ {
8998
if count > 0 {
9099
stream.WriteMore()
@@ -151,10 +160,15 @@ func readSubnetNetworkVerification(iterator *jsoniter.Iterator) *SubnetNetworkVe
151160
value := readStringList(iterator)
152161
object.details = value
153162
object.bitmap_ |= 8
163+
case "platform":
164+
text := iterator.ReadString()
165+
value := Platform(text)
166+
object.platform = value
167+
object.bitmap_ |= 16
154168
case "state":
155169
value := iterator.ReadString()
156170
object.state = value
157-
object.bitmap_ |= 16
171+
object.bitmap_ |= 32
158172
case "tags":
159173
value := map[string]string{}
160174
for {
@@ -166,7 +180,7 @@ func readSubnetNetworkVerification(iterator *jsoniter.Iterator) *SubnetNetworkVe
166180
value[key] = item
167181
}
168182
object.tags = value
169-
object.bitmap_ |= 32
183+
object.bitmap_ |= 64
170184
default:
171185
iterator.ReadAny()
172186
}

openapi/clusters_mgmt/v1/openapi.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15892,6 +15892,8 @@
1589215892
"type": "string",
1589315893
"enum": [
1589415894
"aws",
15895+
"aws-classic",
15896+
"aws-hosted-cp",
1589515897
"gcp",
1589615898
"hostedcluster"
1589715899
]
@@ -16274,6 +16276,10 @@
1627416276
"type": "string"
1627516277
}
1627616278
},
16279+
"platform": {
16280+
"description": "Platform supplied to the network verifier for this subnet.",
16281+
"$ref": "#/components/schemas/Platform"
16282+
},
1627716283
"state": {
1627816284
"description": "State of the subnet network verification.",
1627916285
"type": "string"

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ limitations under the License.
1818

1919
package sdk
2020

21-
const Version = "0.1.389"
21+
const Version = "0.1.390"

0 commit comments

Comments
 (0)