-
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.
chore: synchronise to ocm-api-model 0.0.399
- Loading branch information
1 parent
0cea5de
commit 7c51ce4
Showing
31 changed files
with
12,596 additions
and
9,193 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
84 changes: 84 additions & 0 deletions
84
clustersmgmt/v1/azure_control_plane_managed_identity_builder.go
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,84 @@ | ||
/* | ||
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 | ||
|
||
// AzureControlPlaneManagedIdentityBuilder contains the data and logic needed to build 'azure_control_plane_managed_identity' objects. | ||
// | ||
// Represents the information associated to an Azure User-Assigned | ||
// Managed Identity belonging to the Control Plane of the cluster. | ||
type AzureControlPlaneManagedIdentityBuilder struct { | ||
bitmap_ uint32 | ||
clientID string | ||
principalID string | ||
resourceID string | ||
} | ||
|
||
// NewAzureControlPlaneManagedIdentity creates a new builder of 'azure_control_plane_managed_identity' objects. | ||
func NewAzureControlPlaneManagedIdentity() *AzureControlPlaneManagedIdentityBuilder { | ||
return &AzureControlPlaneManagedIdentityBuilder{} | ||
} | ||
|
||
// Empty returns true if the builder is empty, i.e. no attribute has a value. | ||
func (b *AzureControlPlaneManagedIdentityBuilder) Empty() bool { | ||
return b == nil || b.bitmap_ == 0 | ||
} | ||
|
||
// ClientID sets the value of the 'client_ID' attribute to the given value. | ||
func (b *AzureControlPlaneManagedIdentityBuilder) ClientID(value string) *AzureControlPlaneManagedIdentityBuilder { | ||
b.clientID = value | ||
b.bitmap_ |= 1 | ||
return b | ||
} | ||
|
||
// PrincipalID sets the value of the 'principal_ID' attribute to the given value. | ||
func (b *AzureControlPlaneManagedIdentityBuilder) PrincipalID(value string) *AzureControlPlaneManagedIdentityBuilder { | ||
b.principalID = value | ||
b.bitmap_ |= 2 | ||
return b | ||
} | ||
|
||
// ResourceID sets the value of the 'resource_ID' attribute to the given value. | ||
func (b *AzureControlPlaneManagedIdentityBuilder) ResourceID(value string) *AzureControlPlaneManagedIdentityBuilder { | ||
b.resourceID = value | ||
b.bitmap_ |= 4 | ||
return b | ||
} | ||
|
||
// Copy copies the attributes of the given object into this builder, discarding any previous values. | ||
func (b *AzureControlPlaneManagedIdentityBuilder) Copy(object *AzureControlPlaneManagedIdentity) *AzureControlPlaneManagedIdentityBuilder { | ||
if object == nil { | ||
return b | ||
} | ||
b.bitmap_ = object.bitmap_ | ||
b.clientID = object.clientID | ||
b.principalID = object.principalID | ||
b.resourceID = object.resourceID | ||
return b | ||
} | ||
|
||
// Build creates a 'azure_control_plane_managed_identity' object using the configuration stored in the builder. | ||
func (b *AzureControlPlaneManagedIdentityBuilder) Build() (object *AzureControlPlaneManagedIdentity, err error) { | ||
object = new(AzureControlPlaneManagedIdentity) | ||
object.bitmap_ = b.bitmap_ | ||
object.clientID = b.clientID | ||
object.principalID = b.principalID | ||
object.resourceID = b.resourceID | ||
return | ||
} |
71 changes: 71 additions & 0 deletions
71
clustersmgmt/v1/azure_control_plane_managed_identity_list_builder.go
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 | ||
|
||
// AzureControlPlaneManagedIdentityListBuilder contains the data and logic needed to build | ||
// 'azure_control_plane_managed_identity' objects. | ||
type AzureControlPlaneManagedIdentityListBuilder struct { | ||
items []*AzureControlPlaneManagedIdentityBuilder | ||
} | ||
|
||
// NewAzureControlPlaneManagedIdentityList creates a new builder of 'azure_control_plane_managed_identity' objects. | ||
func NewAzureControlPlaneManagedIdentityList() *AzureControlPlaneManagedIdentityListBuilder { | ||
return new(AzureControlPlaneManagedIdentityListBuilder) | ||
} | ||
|
||
// Items sets the items of the list. | ||
func (b *AzureControlPlaneManagedIdentityListBuilder) Items(values ...*AzureControlPlaneManagedIdentityBuilder) *AzureControlPlaneManagedIdentityListBuilder { | ||
b.items = make([]*AzureControlPlaneManagedIdentityBuilder, len(values)) | ||
copy(b.items, values) | ||
return b | ||
} | ||
|
||
// Empty returns true if the list is empty. | ||
func (b *AzureControlPlaneManagedIdentityListBuilder) 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 *AzureControlPlaneManagedIdentityListBuilder) Copy(list *AzureControlPlaneManagedIdentityList) *AzureControlPlaneManagedIdentityListBuilder { | ||
if list == nil || list.items == nil { | ||
b.items = nil | ||
} else { | ||
b.items = make([]*AzureControlPlaneManagedIdentityBuilder, len(list.items)) | ||
for i, v := range list.items { | ||
b.items[i] = NewAzureControlPlaneManagedIdentity().Copy(v) | ||
} | ||
} | ||
return b | ||
} | ||
|
||
// Build creates a list of 'azure_control_plane_managed_identity' objects using the | ||
// configuration stored in the builder. | ||
func (b *AzureControlPlaneManagedIdentityListBuilder) Build() (list *AzureControlPlaneManagedIdentityList, err error) { | ||
items := make([]*AzureControlPlaneManagedIdentity, len(b.items)) | ||
for i, item := range b.items { | ||
items[i], err = item.Build() | ||
if err != nil { | ||
return | ||
} | ||
} | ||
list = new(AzureControlPlaneManagedIdentityList) | ||
list.items = items | ||
return | ||
} |
75 changes: 75 additions & 0 deletions
75
clustersmgmt/v1/azure_control_plane_managed_identity_list_type_json.go
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" | ||
) | ||
|
||
// MarshalAzureControlPlaneManagedIdentityList writes a list of values of the 'azure_control_plane_managed_identity' type to | ||
// the given writer. | ||
func MarshalAzureControlPlaneManagedIdentityList(list []*AzureControlPlaneManagedIdentity, writer io.Writer) error { | ||
stream := helpers.NewStream(writer) | ||
writeAzureControlPlaneManagedIdentityList(list, stream) | ||
err := stream.Flush() | ||
if err != nil { | ||
return err | ||
} | ||
return stream.Error | ||
} | ||
|
||
// writeAzureControlPlaneManagedIdentityList writes a list of value of the 'azure_control_plane_managed_identity' type to | ||
// the given stream. | ||
func writeAzureControlPlaneManagedIdentityList(list []*AzureControlPlaneManagedIdentity, stream *jsoniter.Stream) { | ||
stream.WriteArrayStart() | ||
for i, value := range list { | ||
if i > 0 { | ||
stream.WriteMore() | ||
} | ||
writeAzureControlPlaneManagedIdentity(value, stream) | ||
} | ||
stream.WriteArrayEnd() | ||
} | ||
|
||
// UnmarshalAzureControlPlaneManagedIdentityList reads a list of values of the 'azure_control_plane_managed_identity' type | ||
// from the given source, which can be a slice of bytes, a string or a reader. | ||
func UnmarshalAzureControlPlaneManagedIdentityList(source interface{}) (items []*AzureControlPlaneManagedIdentity, err error) { | ||
iterator, err := helpers.NewIterator(source) | ||
if err != nil { | ||
return | ||
} | ||
items = readAzureControlPlaneManagedIdentityList(iterator) | ||
err = iterator.Error | ||
return | ||
} | ||
|
||
// readAzureControlPlaneManagedIdentityList reads list of values of the ”azure_control_plane_managed_identity' type from | ||
// the given iterator. | ||
func readAzureControlPlaneManagedIdentityList(iterator *jsoniter.Iterator) []*AzureControlPlaneManagedIdentity { | ||
list := []*AzureControlPlaneManagedIdentity{} | ||
for iterator.ReadArray() { | ||
item := readAzureControlPlaneManagedIdentity(iterator) | ||
list = append(list, item) | ||
} | ||
return list | ||
} |
Oops, something went wrong.