Skip to content

Commit

Permalink
Merge pull request #475 from vkareh/release_v0.1.209
Browse files Browse the repository at this point in the history
Bump API model and release v0.1.209
  • Loading branch information
vkareh authored Sep 21, 2021
2 parents a18a1af + ab17b2e commit 182ee02
Show file tree
Hide file tree
Showing 13 changed files with 4,511 additions and 3,893 deletions.
6 changes: 6 additions & 0 deletions CHANGES.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
This document describes the relevant changes between releases of the OCM API
SDK.

== 0.1.209 Sep 21 2021

- Avoid hard-coded private keys
- Bump API model to v0.0.146
** Add Status to AddOnRequirement

== 0.1.208 Sep 13 2021

- Add Archived cluster endpoint
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export GOPROXY=https://proxy.golang.org
export CGO_ENABLED=0

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

# Details of the metamodel to use:
Expand Down
25 changes: 25 additions & 0 deletions clustersmgmt/v1/add_on_requirement_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type AddOnRequirementBuilder struct {
id string
data map[string]interface{}
resource string
status *AddOnRequirementStatusBuilder
enabled bool
}

Expand Down Expand Up @@ -75,6 +76,19 @@ func (b *AddOnRequirementBuilder) Resource(value string) *AddOnRequirementBuilde
return b
}

// Status sets the value of the 'status' attribute to the given value.
//
// Representation of an add-on requirement status.
func (b *AddOnRequirementBuilder) Status(value *AddOnRequirementStatusBuilder) *AddOnRequirementBuilder {
b.status = value
if value != nil {
b.bitmap_ |= 16
} else {
b.bitmap_ &^= 16
}
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *AddOnRequirementBuilder) Copy(object *AddOnRequirement) *AddOnRequirementBuilder {
if object == nil {
Expand All @@ -92,6 +106,11 @@ func (b *AddOnRequirementBuilder) Copy(object *AddOnRequirement) *AddOnRequireme
}
b.enabled = object.enabled
b.resource = object.resource
if object.status != nil {
b.status = NewAddOnRequirementStatus().Copy(object.status)
} else {
b.status = nil
}
return b
}

Expand All @@ -108,5 +127,11 @@ func (b *AddOnRequirementBuilder) Build() (object *AddOnRequirement, err error)
}
object.enabled = b.enabled
object.resource = b.resource
if b.status != nil {
object.status, err = b.status.Build()
if err != nil {
return
}
}
return
}
81 changes: 81 additions & 0 deletions clustersmgmt/v1/add_on_requirement_status_builder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
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

// AddOnRequirementStatusBuilder contains the data and logic needed to build 'add_on_requirement_status' objects.
//
// Representation of an add-on requirement status.
type AddOnRequirementStatusBuilder struct {
bitmap_ uint32
errorMsgs []string
fulfilled bool
}

// NewAddOnRequirementStatus creates a new builder of 'add_on_requirement_status' objects.
func NewAddOnRequirementStatus() *AddOnRequirementStatusBuilder {
return &AddOnRequirementStatusBuilder{}
}

// ErrorMsgs sets the value of the 'error_msgs' attribute to the given values.
//
//
func (b *AddOnRequirementStatusBuilder) ErrorMsgs(values ...string) *AddOnRequirementStatusBuilder {
b.errorMsgs = make([]string, len(values))
copy(b.errorMsgs, values)
b.bitmap_ |= 1
return b
}

// Fulfilled sets the value of the 'fulfilled' attribute to the given value.
//
//
func (b *AddOnRequirementStatusBuilder) Fulfilled(value bool) *AddOnRequirementStatusBuilder {
b.fulfilled = value
b.bitmap_ |= 2
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *AddOnRequirementStatusBuilder) Copy(object *AddOnRequirementStatus) *AddOnRequirementStatusBuilder {
if object == nil {
return b
}
b.bitmap_ = object.bitmap_
if object.errorMsgs != nil {
b.errorMsgs = make([]string, len(object.errorMsgs))
copy(b.errorMsgs, object.errorMsgs)
} else {
b.errorMsgs = nil
}
b.fulfilled = object.fulfilled
return b
}

// Build creates a 'add_on_requirement_status' object using the configuration stored in the builder.
func (b *AddOnRequirementStatusBuilder) Build() (object *AddOnRequirementStatus, err error) {
object = new(AddOnRequirementStatus)
object.bitmap_ = b.bitmap_
if b.errorMsgs != nil {
object.errorMsgs = make([]string, len(b.errorMsgs))
copy(object.errorMsgs, b.errorMsgs)
}
object.fulfilled = b.fulfilled
return
}
66 changes: 66 additions & 0 deletions clustersmgmt/v1/add_on_requirement_status_list_builder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
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

// AddOnRequirementStatusListBuilder contains the data and logic needed to build
// 'add_on_requirement_status' objects.
type AddOnRequirementStatusListBuilder struct {
items []*AddOnRequirementStatusBuilder
}

// NewAddOnRequirementStatusList creates a new builder of 'add_on_requirement_status' objects.
func NewAddOnRequirementStatusList() *AddOnRequirementStatusListBuilder {
return new(AddOnRequirementStatusListBuilder)
}

// Items sets the items of the list.
func (b *AddOnRequirementStatusListBuilder) Items(values ...*AddOnRequirementStatusBuilder) *AddOnRequirementStatusListBuilder {
b.items = make([]*AddOnRequirementStatusBuilder, len(values))
copy(b.items, values)
return b
}

// Copy copies the items of the given list into this builder, discarding any previous items.
func (b *AddOnRequirementStatusListBuilder) Copy(list *AddOnRequirementStatusList) *AddOnRequirementStatusListBuilder {
if list == nil || list.items == nil {
b.items = nil
} else {
b.items = make([]*AddOnRequirementStatusBuilder, len(list.items))
for i, v := range list.items {
b.items[i] = NewAddOnRequirementStatus().Copy(v)
}
}
return b
}

// Build creates a list of 'add_on_requirement_status' objects using the
// configuration stored in the builder.
func (b *AddOnRequirementStatusListBuilder) Build() (list *AddOnRequirementStatusList, err error) {
items := make([]*AddOnRequirementStatus, len(b.items))
for i, item := range b.items {
items[i], err = item.Build()
if err != nil {
return
}
}
list = new(AddOnRequirementStatusList)
list.items = items
return
}
72 changes: 72 additions & 0 deletions clustersmgmt/v1/add_on_requirement_status_list_type_json.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
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"
)

// MarshalAddOnRequirementStatusList writes a list of values of the 'add_on_requirement_status' type to
// the given writer.
func MarshalAddOnRequirementStatusList(list []*AddOnRequirementStatus, writer io.Writer) error {
stream := helpers.NewStream(writer)
writeAddOnRequirementStatusList(list, stream)
stream.Flush()
return stream.Error
}

// writeAddOnRequirementStatusList writes a list of value of the 'add_on_requirement_status' type to
// the given stream.
func writeAddOnRequirementStatusList(list []*AddOnRequirementStatus, stream *jsoniter.Stream) {
stream.WriteArrayStart()
for i, value := range list {
if i > 0 {
stream.WriteMore()
}
writeAddOnRequirementStatus(value, stream)
}
stream.WriteArrayEnd()
}

// UnmarshalAddOnRequirementStatusList reads a list of values of the 'add_on_requirement_status' type
// from the given source, which can be a slice of bytes, a string or a reader.
func UnmarshalAddOnRequirementStatusList(source interface{}) (items []*AddOnRequirementStatus, err error) {
iterator, err := helpers.NewIterator(source)
if err != nil {
return
}
items = readAddOnRequirementStatusList(iterator)
err = iterator.Error
return
}

// readAddOnRequirementStatusList reads list of values of the ''add_on_requirement_status' type from
// the given iterator.
func readAddOnRequirementStatusList(iterator *jsoniter.Iterator) []*AddOnRequirementStatus {
list := []*AddOnRequirementStatus{}
for iterator.ReadArray() {
item := readAddOnRequirementStatus(iterator)
list = append(list, item)
}
return list
}
Loading

0 comments on commit 182ee02

Please sign in to comment.