-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCM-5822 | feat: Updating to 0.0.357
- Loading branch information
1 parent
6848726
commit d466116
Showing
57 changed files
with
11,539 additions
and
4,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
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 | ||
|
||
// ClientComponentBuilder contains the data and logic needed to build 'client_component' objects. | ||
// | ||
// The reference of a component that will consume the client configuration. | ||
type ClientComponentBuilder struct { | ||
bitmap_ uint32 | ||
name string | ||
namespace string | ||
} | ||
|
||
// NewClientComponent creates a new builder of 'client_component' objects. | ||
func NewClientComponent() *ClientComponentBuilder { | ||
return &ClientComponentBuilder{} | ||
} | ||
|
||
// Empty returns true if the builder is empty, i.e. no attribute has a value. | ||
func (b *ClientComponentBuilder) Empty() bool { | ||
return b == nil || b.bitmap_ == 0 | ||
} | ||
|
||
// Name sets the value of the 'name' attribute to the given value. | ||
func (b *ClientComponentBuilder) Name(value string) *ClientComponentBuilder { | ||
b.name = value | ||
b.bitmap_ |= 1 | ||
return b | ||
} | ||
|
||
// Namespace sets the value of the 'namespace' attribute to the given value. | ||
func (b *ClientComponentBuilder) Namespace(value string) *ClientComponentBuilder { | ||
b.namespace = value | ||
b.bitmap_ |= 2 | ||
return b | ||
} | ||
|
||
// Copy copies the attributes of the given object into this builder, discarding any previous values. | ||
func (b *ClientComponentBuilder) Copy(object *ClientComponent) *ClientComponentBuilder { | ||
if object == nil { | ||
return b | ||
} | ||
b.bitmap_ = object.bitmap_ | ||
b.name = object.name | ||
b.namespace = object.namespace | ||
return b | ||
} | ||
|
||
// Build creates a 'client_component' object using the configuration stored in the builder. | ||
func (b *ClientComponentBuilder) Build() (object *ClientComponent, err error) { | ||
object = new(ClientComponent) | ||
object.bitmap_ = b.bitmap_ | ||
object.name = b.name | ||
object.namespace = b.namespace | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
// ClientComponentListBuilder contains the data and logic needed to build | ||
// 'client_component' objects. | ||
type ClientComponentListBuilder struct { | ||
items []*ClientComponentBuilder | ||
} | ||
|
||
// NewClientComponentList creates a new builder of 'client_component' objects. | ||
func NewClientComponentList() *ClientComponentListBuilder { | ||
return new(ClientComponentListBuilder) | ||
} | ||
|
||
// Items sets the items of the list. | ||
func (b *ClientComponentListBuilder) Items(values ...*ClientComponentBuilder) *ClientComponentListBuilder { | ||
b.items = make([]*ClientComponentBuilder, len(values)) | ||
copy(b.items, values) | ||
return b | ||
} | ||
|
||
// Empty returns true if the list is empty. | ||
func (b *ClientComponentListBuilder) 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 *ClientComponentListBuilder) Copy(list *ClientComponentList) *ClientComponentListBuilder { | ||
if list == nil || list.items == nil { | ||
b.items = nil | ||
} else { | ||
b.items = make([]*ClientComponentBuilder, len(list.items)) | ||
for i, v := range list.items { | ||
b.items[i] = NewClientComponent().Copy(v) | ||
} | ||
} | ||
return b | ||
} | ||
|
||
// Build creates a list of 'client_component' objects using the | ||
// configuration stored in the builder. | ||
func (b *ClientComponentListBuilder) Build() (list *ClientComponentList, err error) { | ||
items := make([]*ClientComponent, len(b.items)) | ||
for i, item := range b.items { | ||
items[i], err = item.Build() | ||
if err != nil { | ||
return | ||
} | ||
} | ||
list = new(ClientComponentList) | ||
list.items = items | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
) | ||
|
||
// MarshalClientComponentList writes a list of values of the 'client_component' type to | ||
// the given writer. | ||
func MarshalClientComponentList(list []*ClientComponent, writer io.Writer) error { | ||
stream := helpers.NewStream(writer) | ||
writeClientComponentList(list, stream) | ||
err := stream.Flush() | ||
if err != nil { | ||
return err | ||
} | ||
return stream.Error | ||
} | ||
|
||
// writeClientComponentList writes a list of value of the 'client_component' type to | ||
// the given stream. | ||
func writeClientComponentList(list []*ClientComponent, stream *jsoniter.Stream) { | ||
stream.WriteArrayStart() | ||
for i, value := range list { | ||
if i > 0 { | ||
stream.WriteMore() | ||
} | ||
writeClientComponent(value, stream) | ||
} | ||
stream.WriteArrayEnd() | ||
} | ||
|
||
// UnmarshalClientComponentList reads a list of values of the 'client_component' type | ||
// from the given source, which can be a slice of bytes, a string or a reader. | ||
func UnmarshalClientComponentList(source interface{}) (items []*ClientComponent, err error) { | ||
iterator, err := helpers.NewIterator(source) | ||
if err != nil { | ||
return | ||
} | ||
items = readClientComponentList(iterator) | ||
err = iterator.Error | ||
return | ||
} | ||
|
||
// readClientComponentList reads list of values of the ”client_component' type from | ||
// the given iterator. | ||
func readClientComponentList(iterator *jsoniter.Iterator) []*ClientComponent { | ||
list := []*ClientComponent{} | ||
for iterator.ReadArray() { | ||
item := readClientComponent(iterator) | ||
list = append(list, item) | ||
} | ||
return list | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
/* | ||
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 | ||
|
||
// ClientComponent represents the values of the 'client_component' type. | ||
// | ||
// The reference of a component that will consume the client configuration. | ||
type ClientComponent struct { | ||
bitmap_ uint32 | ||
name string | ||
namespace string | ||
} | ||
|
||
// Empty returns true if the object is empty, i.e. no attribute has a value. | ||
func (o *ClientComponent) Empty() bool { | ||
return o == nil || o.bitmap_ == 0 | ||
} | ||
|
||
// Name returns the value of the 'name' attribute, or | ||
// the zero value of the type if the attribute doesn't have a value. | ||
// | ||
// The name of the component. | ||
func (o *ClientComponent) Name() string { | ||
if o != nil && o.bitmap_&1 != 0 { | ||
return o.name | ||
} | ||
return "" | ||
} | ||
|
||
// GetName returns the value of the 'name' attribute and | ||
// a flag indicating if the attribute has a value. | ||
// | ||
// The name of the component. | ||
func (o *ClientComponent) GetName() (value string, ok bool) { | ||
ok = o != nil && o.bitmap_&1 != 0 | ||
if ok { | ||
value = o.name | ||
} | ||
return | ||
} | ||
|
||
// Namespace returns the value of the 'namespace' attribute, or | ||
// the zero value of the type if the attribute doesn't have a value. | ||
// | ||
// The namespace of the component. | ||
func (o *ClientComponent) Namespace() string { | ||
if o != nil && o.bitmap_&2 != 0 { | ||
return o.namespace | ||
} | ||
return "" | ||
} | ||
|
||
// GetNamespace returns the value of the 'namespace' attribute and | ||
// a flag indicating if the attribute has a value. | ||
// | ||
// The namespace of the component. | ||
func (o *ClientComponent) GetNamespace() (value string, ok bool) { | ||
ok = o != nil && o.bitmap_&2 != 0 | ||
if ok { | ||
value = o.namespace | ||
} | ||
return | ||
} | ||
|
||
// ClientComponentListKind is the name of the type used to represent list of objects of | ||
// type 'client_component'. | ||
const ClientComponentListKind = "ClientComponentList" | ||
|
||
// ClientComponentListLinkKind is the name of the type used to represent links to list | ||
// of objects of type 'client_component'. | ||
const ClientComponentListLinkKind = "ClientComponentListLink" | ||
|
||
// ClientComponentNilKind is the name of the type used to nil lists of objects of | ||
// type 'client_component'. | ||
const ClientComponentListNilKind = "ClientComponentListNil" | ||
|
||
// ClientComponentList is a list of values of the 'client_component' type. | ||
type ClientComponentList struct { | ||
href string | ||
link bool | ||
items []*ClientComponent | ||
} | ||
|
||
// Len returns the length of the list. | ||
func (l *ClientComponentList) Len() int { | ||
if l == nil { | ||
return 0 | ||
} | ||
return len(l.items) | ||
} | ||
|
||
// Empty returns true if the list is empty. | ||
func (l *ClientComponentList) 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 *ClientComponentList) Get(i int) *ClientComponent { | ||
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 *ClientComponentList) Slice() []*ClientComponent { | ||
var slice []*ClientComponent | ||
if l == nil { | ||
slice = make([]*ClientComponent, 0) | ||
} else { | ||
slice = make([]*ClientComponent, 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 *ClientComponentList) Each(f func(item *ClientComponent) 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 *ClientComponentList) Range(f func(index int, item *ClientComponent) bool) { | ||
if l == nil { | ||
return | ||
} | ||
for index, item := range l.items { | ||
if !f(index, item) { | ||
break | ||
} | ||
} | ||
} |
Oops, something went wrong.