-
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.
Merge pull request #469 from zgalor/changes_v0.1.205
Update model version to v0.0.142
- Loading branch information
Showing
40 changed files
with
13,526 additions
and
8,356 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
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
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 | ||
|
||
import ( | ||
"io" | ||
|
||
jsoniter "github.com/json-iterator/go" | ||
"github.com/openshift-online/ocm-sdk-go/helpers" | ||
) | ||
|
||
// MarshalDetectionTypeList writes a list of values of the 'detection_type' type to | ||
// the given writer. | ||
func MarshalDetectionTypeList(list []DetectionType, writer io.Writer) error { | ||
stream := helpers.NewStream(writer) | ||
writeDetectionTypeList(list, stream) | ||
stream.Flush() | ||
return stream.Error | ||
} | ||
|
||
// writeDetectionTypeList writes a list of value of the 'detection_type' type to | ||
// the given stream. | ||
func writeDetectionTypeList(list []DetectionType, stream *jsoniter.Stream) { | ||
stream.WriteArrayStart() | ||
for i, value := range list { | ||
if i > 0 { | ||
stream.WriteMore() | ||
} | ||
stream.WriteString(string(value)) | ||
} | ||
stream.WriteArrayEnd() | ||
} | ||
|
||
// UnmarshalDetectionTypeList reads a list of values of the 'detection_type' type | ||
// from the given source, which can be a slice of bytes, a string or a reader. | ||
func UnmarshalDetectionTypeList(source interface{}) (items []DetectionType, err error) { | ||
iterator, err := helpers.NewIterator(source) | ||
if err != nil { | ||
return | ||
} | ||
items = readDetectionTypeList(iterator) | ||
err = iterator.Error | ||
return | ||
} | ||
|
||
// readDetectionTypeList reads list of values of the ''detection_type' type from | ||
// the given iterator. | ||
func readDetectionTypeList(iterator *jsoniter.Iterator) []DetectionType { | ||
list := []DetectionType{} | ||
for iterator.ReadArray() { | ||
text := iterator.ReadString() | ||
item := DetectionType(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 | ||
|
||
// DetectionType represents the values of the 'detection_type' enumerated type. | ||
type DetectionType string | ||
|
||
const ( | ||
// | ||
DetectionTypeAuto DetectionType = "auto" | ||
// | ||
DetectionTypeManual DetectionType = "manual" | ||
) |
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,151 @@ | ||
/* | ||
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 ( | ||
time "time" | ||
) | ||
|
||
// LimitedSupportReasonBuilder contains the data and logic needed to build 'limited_support_reason' objects. | ||
// | ||
// A reason that a cluster is in limited support. | ||
type LimitedSupportReasonBuilder struct { | ||
bitmap_ uint32 | ||
id string | ||
href string | ||
creationTimestamp time.Time | ||
details string | ||
detectionType DetectionType | ||
summary string | ||
template *LimitedSupportReasonTemplateBuilder | ||
} | ||
|
||
// NewLimitedSupportReason creates a new builder of 'limited_support_reason' objects. | ||
func NewLimitedSupportReason() *LimitedSupportReasonBuilder { | ||
return &LimitedSupportReasonBuilder{} | ||
} | ||
|
||
// Link sets the flag that indicates if this is a link. | ||
func (b *LimitedSupportReasonBuilder) Link(value bool) *LimitedSupportReasonBuilder { | ||
b.bitmap_ |= 1 | ||
return b | ||
} | ||
|
||
// ID sets the identifier of the object. | ||
func (b *LimitedSupportReasonBuilder) ID(value string) *LimitedSupportReasonBuilder { | ||
b.id = value | ||
b.bitmap_ |= 2 | ||
return b | ||
} | ||
|
||
// HREF sets the link to the object. | ||
func (b *LimitedSupportReasonBuilder) HREF(value string) *LimitedSupportReasonBuilder { | ||
b.href = value | ||
b.bitmap_ |= 4 | ||
return b | ||
} | ||
|
||
// CreationTimestamp sets the value of the 'creation_timestamp' attribute to the given value. | ||
// | ||
// | ||
func (b *LimitedSupportReasonBuilder) CreationTimestamp(value time.Time) *LimitedSupportReasonBuilder { | ||
b.creationTimestamp = value | ||
b.bitmap_ |= 8 | ||
return b | ||
} | ||
|
||
// Details sets the value of the 'details' attribute to the given value. | ||
// | ||
// | ||
func (b *LimitedSupportReasonBuilder) Details(value string) *LimitedSupportReasonBuilder { | ||
b.details = value | ||
b.bitmap_ |= 16 | ||
return b | ||
} | ||
|
||
// DetectionType sets the value of the 'detection_type' attribute to the given value. | ||
// | ||
// | ||
func (b *LimitedSupportReasonBuilder) DetectionType(value DetectionType) *LimitedSupportReasonBuilder { | ||
b.detectionType = value | ||
b.bitmap_ |= 32 | ||
return b | ||
} | ||
|
||
// Summary sets the value of the 'summary' attribute to the given value. | ||
// | ||
// | ||
func (b *LimitedSupportReasonBuilder) Summary(value string) *LimitedSupportReasonBuilder { | ||
b.summary = value | ||
b.bitmap_ |= 64 | ||
return b | ||
} | ||
|
||
// Template sets the value of the 'template' attribute to the given value. | ||
// | ||
// A template for cluster limited support reason. | ||
func (b *LimitedSupportReasonBuilder) Template(value *LimitedSupportReasonTemplateBuilder) *LimitedSupportReasonBuilder { | ||
b.template = value | ||
if value != nil { | ||
b.bitmap_ |= 128 | ||
} else { | ||
b.bitmap_ &^= 128 | ||
} | ||
return b | ||
} | ||
|
||
// Copy copies the attributes of the given object into this builder, discarding any previous values. | ||
func (b *LimitedSupportReasonBuilder) Copy(object *LimitedSupportReason) *LimitedSupportReasonBuilder { | ||
if object == nil { | ||
return b | ||
} | ||
b.bitmap_ = object.bitmap_ | ||
b.id = object.id | ||
b.href = object.href | ||
b.creationTimestamp = object.creationTimestamp | ||
b.details = object.details | ||
b.detectionType = object.detectionType | ||
b.summary = object.summary | ||
if object.template != nil { | ||
b.template = NewLimitedSupportReasonTemplate().Copy(object.template) | ||
} else { | ||
b.template = nil | ||
} | ||
return b | ||
} | ||
|
||
// Build creates a 'limited_support_reason' object using the configuration stored in the builder. | ||
func (b *LimitedSupportReasonBuilder) Build() (object *LimitedSupportReason, err error) { | ||
object = new(LimitedSupportReason) | ||
object.id = b.id | ||
object.href = b.href | ||
object.bitmap_ = b.bitmap_ | ||
object.creationTimestamp = b.creationTimestamp | ||
object.details = b.details | ||
object.detectionType = b.detectionType | ||
object.summary = b.summary | ||
if b.template != nil { | ||
object.template, err = b.template.Build() | ||
if err != nil { | ||
return | ||
} | ||
} | ||
return | ||
} |
Oops, something went wrong.