Skip to content

Commit

Permalink
Merge pull request #641 from pvasant/release_0.1.267
Browse files Browse the repository at this point in the history
Release 0.1.267
  • Loading branch information
pvasant authored May 16, 2022
2 parents 904633c + 062df8e commit 8037aef
Show file tree
Hide file tree
Showing 11 changed files with 5,626 additions and 5,631 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
This document describes the relevant changes between releases of the OCM API
SDK.


## 0.1.267
- Update to model 0.0.199:
- Fix cred request api model parameters

## 0.1.266
- Update to model 0.0.198:
- Add cred request to api model
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
export CGO_ENABLED=0

# Details of the model to use:
model_version:=v0.0.198
model_version:=v0.0.199
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
11,132 changes: 5,564 additions & 5,568 deletions clustersmgmt/v1/openapi.go

Large diffs are not rendered by default.

31 changes: 14 additions & 17 deletions clustersmgmt/v1/sts_credential_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
type STSCredentialRequestBuilder struct {
bitmap_ uint32
name string
operator []*STSOperatorBuilder
operator *STSOperatorBuilder
}

// NewSTSCredentialRequest creates a new builder of 'STS_credential_request' objects.
Expand All @@ -47,13 +47,16 @@ func (b *STSCredentialRequestBuilder) Name(value string) *STSCredentialRequestBu
return b
}

// Operator sets the value of the 'operator' attribute to the given values.
// Operator sets the value of the 'operator' attribute to the given value.
//
//
func (b *STSCredentialRequestBuilder) Operator(values ...*STSOperatorBuilder) *STSCredentialRequestBuilder {
b.operator = make([]*STSOperatorBuilder, len(values))
copy(b.operator, values)
b.bitmap_ |= 2
// Representation of an sts operator
func (b *STSCredentialRequestBuilder) Operator(value *STSOperatorBuilder) *STSCredentialRequestBuilder {
b.operator = value
if value != nil {
b.bitmap_ |= 2
} else {
b.bitmap_ &^= 2
}
return b
}

Expand All @@ -65,10 +68,7 @@ func (b *STSCredentialRequestBuilder) Copy(object *STSCredentialRequest) *STSCre
b.bitmap_ = object.bitmap_
b.name = object.name
if object.operator != nil {
b.operator = make([]*STSOperatorBuilder, len(object.operator))
for i, v := range object.operator {
b.operator[i] = NewSTSOperator().Copy(v)
}
b.operator = NewSTSOperator().Copy(object.operator)
} else {
b.operator = nil
}
Expand All @@ -81,12 +81,9 @@ func (b *STSCredentialRequestBuilder) Build() (object *STSCredentialRequest, err
object.bitmap_ = b.bitmap_
object.name = b.name
if b.operator != nil {
object.operator = make([]*STSOperator, len(b.operator))
for i, v := range b.operator {
object.operator[i], err = v.Build()
if err != nil {
return
}
object.operator, err = b.operator.Build()
if err != nil {
return
}
}
return
Expand Down
6 changes: 3 additions & 3 deletions clustersmgmt/v1/sts_credential_request_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
type STSCredentialRequest struct {
bitmap_ uint32
name string
operator []*STSOperator
operator *STSOperator
}

// Empty returns true if the object is empty, i.e. no attribute has a value.
Expand Down Expand Up @@ -60,7 +60,7 @@ func (o *STSCredentialRequest) GetName() (value string, ok bool) {
// the zero value of the type if the attribute doesn't have a value.
//
// Operator Details
func (o *STSCredentialRequest) Operator() []*STSOperator {
func (o *STSCredentialRequest) Operator() *STSOperator {
if o != nil && o.bitmap_&2 != 0 {
return o.operator
}
Expand All @@ -71,7 +71,7 @@ func (o *STSCredentialRequest) Operator() []*STSOperator {
// a flag indicating if the attribute has a value.
//
// Operator Details
func (o *STSCredentialRequest) GetOperator() (value []*STSOperator, ok bool) {
func (o *STSCredentialRequest) GetOperator() (value *STSOperator, ok bool) {
ok = o != nil && o.bitmap_&2 != 0
if ok {
value = o.operator
Expand Down
4 changes: 2 additions & 2 deletions clustersmgmt/v1/sts_credential_request_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func writeSTSCredentialRequest(object *STSCredentialRequest, stream *jsoniter.St
stream.WriteMore()
}
stream.WriteObjectField("operator")
writeSTSOperatorList(object.operator, stream)
writeSTSOperator(object.operator, stream)
}
stream.WriteObjectEnd()
}
Expand Down Expand Up @@ -88,7 +88,7 @@ func readSTSCredentialRequest(iterator *jsoniter.Iterator) *STSCredentialRequest
object.name = value
object.bitmap_ |= 1
case "operator":
value := readSTSOperatorList(iterator)
value := readSTSOperator(iterator)
object.operator = value
object.bitmap_ |= 2
default:
Expand Down
34 changes: 17 additions & 17 deletions clustersmgmt/v1/sts_operator_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
//
// Representation of an sts operator
type STSOperatorBuilder struct {
bitmap_ uint32
maxVersion string
minVersion string
name string
namespace string
serviceAccountNames []string
bitmap_ uint32
maxVersion string
minVersion string
name string
namespace string
serviceAccounts []string
}

// NewSTSOperator creates a new builder of 'STS_operator' objects.
Expand Down Expand Up @@ -77,12 +77,12 @@ func (b *STSOperatorBuilder) Namespace(value string) *STSOperatorBuilder {
return b
}

// ServiceAccountNames sets the value of the 'service_account_names' attribute to the given values.
// ServiceAccounts sets the value of the 'service_accounts' attribute to the given values.
//
//
func (b *STSOperatorBuilder) ServiceAccountNames(values ...string) *STSOperatorBuilder {
b.serviceAccountNames = make([]string, len(values))
copy(b.serviceAccountNames, values)
func (b *STSOperatorBuilder) ServiceAccounts(values ...string) *STSOperatorBuilder {
b.serviceAccounts = make([]string, len(values))
copy(b.serviceAccounts, values)
b.bitmap_ |= 16
return b
}
Expand All @@ -97,11 +97,11 @@ func (b *STSOperatorBuilder) Copy(object *STSOperator) *STSOperatorBuilder {
b.minVersion = object.minVersion
b.name = object.name
b.namespace = object.namespace
if object.serviceAccountNames != nil {
b.serviceAccountNames = make([]string, len(object.serviceAccountNames))
copy(b.serviceAccountNames, object.serviceAccountNames)
if object.serviceAccounts != nil {
b.serviceAccounts = make([]string, len(object.serviceAccounts))
copy(b.serviceAccounts, object.serviceAccounts)
} else {
b.serviceAccountNames = nil
b.serviceAccounts = nil
}
return b
}
Expand All @@ -114,9 +114,9 @@ func (b *STSOperatorBuilder) Build() (object *STSOperator, err error) {
object.minVersion = b.minVersion
object.name = b.name
object.namespace = b.namespace
if b.serviceAccountNames != nil {
object.serviceAccountNames = make([]string, len(b.serviceAccountNames))
copy(object.serviceAccountNames, b.serviceAccountNames)
if b.serviceAccounts != nil {
object.serviceAccounts = make([]string, len(b.serviceAccounts))
copy(object.serviceAccounts, b.serviceAccounts)
}
return
}
24 changes: 12 additions & 12 deletions clustersmgmt/v1/sts_operator_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
//
// Representation of an sts operator
type STSOperator struct {
bitmap_ uint32
maxVersion string
minVersion string
name string
namespace string
serviceAccountNames []string
bitmap_ uint32
maxVersion string
minVersion string
name string
namespace string
serviceAccounts []string
}

// Empty returns true if the object is empty, i.e. no attribute has a value.
Expand Down Expand Up @@ -128,25 +128,25 @@ func (o *STSOperator) GetNamespace() (value string, ok bool) {
return
}

// ServiceAccountNames returns the value of the 'service_account_names' attribute, or
// ServiceAccounts returns the value of the 'service_accounts' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Service Accounts
func (o *STSOperator) ServiceAccountNames() []string {
func (o *STSOperator) ServiceAccounts() []string {
if o != nil && o.bitmap_&16 != 0 {
return o.serviceAccountNames
return o.serviceAccounts
}
return nil
}

// GetServiceAccountNames returns the value of the 'service_account_names' attribute and
// GetServiceAccounts returns the value of the 'service_accounts' attribute and
// a flag indicating if the attribute has a value.
//
// Service Accounts
func (o *STSOperator) GetServiceAccountNames() (value []string, ok bool) {
func (o *STSOperator) GetServiceAccounts() (value []string, ok bool) {
ok = o != nil && o.bitmap_&16 != 0
if ok {
value = o.serviceAccountNames
value = o.serviceAccounts
}
return
}
Expand Down
10 changes: 5 additions & 5 deletions clustersmgmt/v1/sts_operator_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ func writeSTSOperator(object *STSOperator, stream *jsoniter.Stream) {
stream.WriteString(object.namespace)
count++
}
present_ = object.bitmap_&16 != 0 && object.serviceAccountNames != nil
present_ = object.bitmap_&16 != 0 && object.serviceAccounts != nil
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("service_account_names")
writeStringList(object.serviceAccountNames, stream)
stream.WriteObjectField("service_accounts")
writeStringList(object.serviceAccounts, stream)
}
stream.WriteObjectEnd()
}
Expand Down Expand Up @@ -126,9 +126,9 @@ func readSTSOperator(iterator *jsoniter.Iterator) *STSOperator {
value := iterator.ReadString()
object.namespace = value
object.bitmap_ |= 8
case "service_account_names":
case "service_accounts":
value := readStringList(iterator)
object.serviceAccountNames = value
object.serviceAccounts = value
object.bitmap_ |= 16
default:
iterator.ReadAny()
Expand Down
7 changes: 2 additions & 5 deletions openapi/clusters_mgmt/v1/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7756,10 +7756,7 @@
},
"operator": {
"description": "Operator Details",
"type": "array",
"items": {
"$ref": "#/components/schemas/STSOperator"
}
"$ref": "#/components/schemas/STSOperator"
}
}
},
Expand All @@ -7782,7 +7779,7 @@
"description": "Operator Namespace",
"type": "string"
},
"service_account_names": {
"service_accounts": {
"description": "Service Accounts",
"type": "array",
"items": {
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ limitations under the License.

package sdk

const Version = "0.1.266"
const Version = "0.1.267"

0 comments on commit 8037aef

Please sign in to comment.