-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump to ocm-api-model 0.0.381
- Loading branch information
1 parent
61832ee
commit 83ee60b
Showing
60 changed files
with
20,428 additions
and
12,130 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,76 @@ | ||
/* | ||
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" | ||
) | ||
|
||
// MarshalWifAccessMethodList writes a list of values of the 'wif_access_method' type to | ||
// the given writer. | ||
func MarshalWifAccessMethodList(list []WifAccessMethod, writer io.Writer) error { | ||
stream := helpers.NewStream(writer) | ||
writeWifAccessMethodList(list, stream) | ||
err := stream.Flush() | ||
if err != nil { | ||
return err | ||
} | ||
return stream.Error | ||
} | ||
|
||
// writeWifAccessMethodList writes a list of value of the 'wif_access_method' type to | ||
// the given stream. | ||
func writeWifAccessMethodList(list []WifAccessMethod, stream *jsoniter.Stream) { | ||
stream.WriteArrayStart() | ||
for i, value := range list { | ||
if i > 0 { | ||
stream.WriteMore() | ||
} | ||
stream.WriteString(string(value)) | ||
} | ||
stream.WriteArrayEnd() | ||
} | ||
|
||
// UnmarshalWifAccessMethodList reads a list of values of the 'wif_access_method' type | ||
// from the given source, which can be a slice of bytes, a string or a reader. | ||
func UnmarshalWifAccessMethodList(source interface{}) (items []WifAccessMethod, err error) { | ||
iterator, err := helpers.NewIterator(source) | ||
if err != nil { | ||
return | ||
} | ||
items = readWifAccessMethodList(iterator) | ||
err = iterator.Error | ||
return | ||
} | ||
|
||
// readWifAccessMethodList reads list of values of the ”wif_access_method' type from | ||
// the given iterator. | ||
func readWifAccessMethodList(iterator *jsoniter.Iterator) []WifAccessMethod { | ||
list := []WifAccessMethod{} | ||
for iterator.ReadArray() { | ||
text := iterator.ReadString() | ||
item := WifAccessMethod(text) | ||
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,30 @@ | ||
/* | ||
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 | ||
|
||
// WifAccessMethod represents the values of the 'wif_access_method' enumerated type. | ||
type WifAccessMethod string | ||
|
||
const ( | ||
// | ||
WifAccessMethodImpersonate WifAccessMethod = "impersonate" | ||
// | ||
WifAccessMethodWif WifAccessMethod = "wif" | ||
) |
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,137 @@ | ||
/* | ||
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 | ||
|
||
// WifConfigBuilder contains the data and logic needed to build 'wif_config' objects. | ||
// | ||
// Definition of an wif_config resource. | ||
type WifConfigBuilder struct { | ||
bitmap_ uint32 | ||
id string | ||
href string | ||
displayName string | ||
gcp *WifGcpBuilder | ||
organization *OrganizationLinkBuilder | ||
} | ||
|
||
// NewWifConfig creates a new builder of 'wif_config' objects. | ||
func NewWifConfig() *WifConfigBuilder { | ||
return &WifConfigBuilder{} | ||
} | ||
|
||
// Link sets the flag that indicates if this is a link. | ||
func (b *WifConfigBuilder) Link(value bool) *WifConfigBuilder { | ||
b.bitmap_ |= 1 | ||
return b | ||
} | ||
|
||
// ID sets the identifier of the object. | ||
func (b *WifConfigBuilder) ID(value string) *WifConfigBuilder { | ||
b.id = value | ||
b.bitmap_ |= 2 | ||
return b | ||
} | ||
|
||
// HREF sets the link to the object. | ||
func (b *WifConfigBuilder) HREF(value string) *WifConfigBuilder { | ||
b.href = value | ||
b.bitmap_ |= 4 | ||
return b | ||
} | ||
|
||
// Empty returns true if the builder is empty, i.e. no attribute has a value. | ||
func (b *WifConfigBuilder) Empty() bool { | ||
return b == nil || b.bitmap_&^1 == 0 | ||
} | ||
|
||
// DisplayName sets the value of the 'display_name' attribute to the given value. | ||
func (b *WifConfigBuilder) DisplayName(value string) *WifConfigBuilder { | ||
b.displayName = value | ||
b.bitmap_ |= 8 | ||
return b | ||
} | ||
|
||
// Gcp sets the value of the 'gcp' attribute to the given value. | ||
func (b *WifConfigBuilder) Gcp(value *WifGcpBuilder) *WifConfigBuilder { | ||
b.gcp = value | ||
if value != nil { | ||
b.bitmap_ |= 16 | ||
} else { | ||
b.bitmap_ &^= 16 | ||
} | ||
return b | ||
} | ||
|
||
// Organization sets the value of the 'organization' attribute to the given value. | ||
// | ||
// Definition of an organization link. | ||
func (b *WifConfigBuilder) Organization(value *OrganizationLinkBuilder) *WifConfigBuilder { | ||
b.organization = value | ||
if value != nil { | ||
b.bitmap_ |= 32 | ||
} else { | ||
b.bitmap_ &^= 32 | ||
} | ||
return b | ||
} | ||
|
||
// Copy copies the attributes of the given object into this builder, discarding any previous values. | ||
func (b *WifConfigBuilder) Copy(object *WifConfig) *WifConfigBuilder { | ||
if object == nil { | ||
return b | ||
} | ||
b.bitmap_ = object.bitmap_ | ||
b.id = object.id | ||
b.href = object.href | ||
b.displayName = object.displayName | ||
if object.gcp != nil { | ||
b.gcp = NewWifGcp().Copy(object.gcp) | ||
} else { | ||
b.gcp = nil | ||
} | ||
if object.organization != nil { | ||
b.organization = NewOrganizationLink().Copy(object.organization) | ||
} else { | ||
b.organization = nil | ||
} | ||
return b | ||
} | ||
|
||
// Build creates a 'wif_config' object using the configuration stored in the builder. | ||
func (b *WifConfigBuilder) Build() (object *WifConfig, err error) { | ||
object = new(WifConfig) | ||
object.id = b.id | ||
object.href = b.href | ||
object.bitmap_ = b.bitmap_ | ||
object.displayName = b.displayName | ||
if b.gcp != nil { | ||
object.gcp, err = b.gcp.Build() | ||
if err != nil { | ||
return | ||
} | ||
} | ||
if b.organization != nil { | ||
object.organization, err = b.organization.Build() | ||
if err != nil { | ||
return | ||
} | ||
} | ||
return | ||
} |
Oops, something went wrong.