Skip to content

Commit

Permalink
chore: bump to ocm-api-model 0.0.382 (#973)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobGray committed Jul 15, 2024
1 parent c8ae9f6 commit 6977ebb
Show file tree
Hide file tree
Showing 12 changed files with 5,757 additions and 5,219 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export PATH := $(LOCAL_BIN_PATH):$(PATH)
export CGO_ENABLED=0

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

# Details of the metamodel to use:
Expand Down
63 changes: 63 additions & 0 deletions clustersmgmt/v1/gcp_authentication_builder.go
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

// GcpAuthenticationBuilder contains the data and logic needed to build 'gcp_authentication' objects.
//
// Google cloud platform authentication method of a cluster.
type GcpAuthenticationBuilder struct {
bitmap_ uint32
href string
}

// NewGcpAuthentication creates a new builder of 'gcp_authentication' objects.
func NewGcpAuthentication() *GcpAuthenticationBuilder {
return &GcpAuthenticationBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *GcpAuthenticationBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// Href sets the value of the 'href' attribute to the given value.
func (b *GcpAuthenticationBuilder) Href(value string) *GcpAuthenticationBuilder {
b.href = value
b.bitmap_ |= 1
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *GcpAuthenticationBuilder) Copy(object *GcpAuthentication) *GcpAuthenticationBuilder {
if object == nil {
return b
}
b.bitmap_ = object.bitmap_
b.href = object.href
return b
}

// Build creates a 'gcp_authentication' object using the configuration stored in the builder.
func (b *GcpAuthenticationBuilder) Build() (object *GcpAuthentication, err error) {
object = new(GcpAuthentication)
object.bitmap_ = b.bitmap_
object.href = b.href
return
}
71 changes: 71 additions & 0 deletions clustersmgmt/v1/gcp_authentication_list_builder.go
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

// GcpAuthenticationListBuilder contains the data and logic needed to build
// 'gcp_authentication' objects.
type GcpAuthenticationListBuilder struct {
items []*GcpAuthenticationBuilder
}

// NewGcpAuthenticationList creates a new builder of 'gcp_authentication' objects.
func NewGcpAuthenticationList() *GcpAuthenticationListBuilder {
return new(GcpAuthenticationListBuilder)
}

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

// Empty returns true if the list is empty.
func (b *GcpAuthenticationListBuilder) 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 *GcpAuthenticationListBuilder) Copy(list *GcpAuthenticationList) *GcpAuthenticationListBuilder {
if list == nil || list.items == nil {
b.items = nil
} else {
b.items = make([]*GcpAuthenticationBuilder, len(list.items))
for i, v := range list.items {
b.items[i] = NewGcpAuthentication().Copy(v)
}
}
return b
}

// Build creates a list of 'gcp_authentication' objects using the
// configuration stored in the builder.
func (b *GcpAuthenticationListBuilder) Build() (list *GcpAuthenticationList, err error) {
items := make([]*GcpAuthentication, len(b.items))
for i, item := range b.items {
items[i], err = item.Build()
if err != nil {
return
}
}
list = new(GcpAuthenticationList)
list.items = items
return
}
75 changes: 75 additions & 0 deletions clustersmgmt/v1/gcp_authentication_list_type_json.go
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"
)

// MarshalGcpAuthenticationList writes a list of values of the 'gcp_authentication' type to
// the given writer.
func MarshalGcpAuthenticationList(list []*GcpAuthentication, writer io.Writer) error {
stream := helpers.NewStream(writer)
writeGcpAuthenticationList(list, stream)
err := stream.Flush()
if err != nil {
return err
}
return stream.Error
}

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

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

// readGcpAuthenticationList reads list of values of the ”gcp_authentication' type from
// the given iterator.
func readGcpAuthenticationList(iterator *jsoniter.Iterator) []*GcpAuthentication {
list := []*GcpAuthentication{}
for iterator.ReadArray() {
item := readGcpAuthentication(iterator)
list = append(list, item)
}
return list
}
142 changes: 142 additions & 0 deletions clustersmgmt/v1/gcp_authentication_type.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/*
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

// GcpAuthentication represents the values of the 'gcp_authentication' type.
//
// Google cloud platform authentication method of a cluster.
type GcpAuthentication struct {
bitmap_ uint32
href string
}

// Empty returns true if the object is empty, i.e. no attribute has a value.
func (o *GcpAuthentication) Empty() bool {
return o == nil || o.bitmap_ == 0
}

// Href returns the value of the 'href' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Self Link
func (o *GcpAuthentication) Href() string {
if o != nil && o.bitmap_&1 != 0 {
return o.href
}
return ""
}

// GetHref returns the value of the 'href' attribute and
// a flag indicating if the attribute has a value.
//
// Self Link
func (o *GcpAuthentication) GetHref() (value string, ok bool) {
ok = o != nil && o.bitmap_&1 != 0
if ok {
value = o.href
}
return
}

// GcpAuthenticationListKind is the name of the type used to represent list of objects of
// type 'gcp_authentication'.
const GcpAuthenticationListKind = "GcpAuthenticationList"

// GcpAuthenticationListLinkKind is the name of the type used to represent links to list
// of objects of type 'gcp_authentication'.
const GcpAuthenticationListLinkKind = "GcpAuthenticationListLink"

// GcpAuthenticationNilKind is the name of the type used to nil lists of objects of
// type 'gcp_authentication'.
const GcpAuthenticationListNilKind = "GcpAuthenticationListNil"

// GcpAuthenticationList is a list of values of the 'gcp_authentication' type.
type GcpAuthenticationList struct {
href string
link bool
items []*GcpAuthentication
}

// Len returns the length of the list.
func (l *GcpAuthenticationList) Len() int {
if l == nil {
return 0
}
return len(l.items)
}

// Empty returns true if the list is empty.
func (l *GcpAuthenticationList) Empty() bool {
return l == nil || len(l.items) == 0
}

// Get returns the item of the list with the given index. If there is no item with
// that index it returns nil.
func (l *GcpAuthenticationList) Get(i int) *GcpAuthentication {
if l == nil || i < 0 || i >= len(l.items) {
return nil
}
return l.items[i]
}

// Slice returns an slice containing the items of the list. The returned slice is a
// copy of the one used internally, so it can be modified without affecting the
// internal representation.
//
// If you don't need to modify the returned slice consider using the Each or Range
// functions, as they don't need to allocate a new slice.
func (l *GcpAuthenticationList) Slice() []*GcpAuthentication {
var slice []*GcpAuthentication
if l == nil {
slice = make([]*GcpAuthentication, 0)
} else {
slice = make([]*GcpAuthentication, len(l.items))
copy(slice, l.items)
}
return slice
}

// Each runs the given function for each item of the list, in order. If the function
// returns false the iteration stops, otherwise it continues till all the elements
// of the list have been processed.
func (l *GcpAuthenticationList) Each(f func(item *GcpAuthentication) bool) {
if l == nil {
return
}
for _, item := range l.items {
if !f(item) {
break
}
}
}

// Range runs the given function for each index and item of the list, in order. If
// the function returns false the iteration stops, otherwise it continues till all
// the elements of the list have been processed.
func (l *GcpAuthenticationList) Range(f func(index int, item *GcpAuthentication) bool) {
if l == nil {
return
}
for index, item := range l.items {
if !f(index, item) {
break
}
}
}
Loading

0 comments on commit 6977ebb

Please sign in to comment.