-
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: synchronise to ocm-api-model 0.0.369
- Loading branch information
1 parent
51746eb
commit 7e5095b
Showing
11 changed files
with
8,672 additions
and
7,809 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,103 @@ | ||
/* | ||
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 | ||
|
||
// AzureBuilder contains the data and logic needed to build 'azure' objects. | ||
// | ||
// Microsoft Azure settings of a cluster. | ||
type AzureBuilder struct { | ||
bitmap_ uint32 | ||
managedResourceGroupName string | ||
resourceGroupName string | ||
resourceName string | ||
subscriptionID string | ||
tenantID string | ||
} | ||
|
||
// NewAzure creates a new builder of 'azure' objects. | ||
func NewAzure() *AzureBuilder { | ||
return &AzureBuilder{} | ||
} | ||
|
||
// Empty returns true if the builder is empty, i.e. no attribute has a value. | ||
func (b *AzureBuilder) Empty() bool { | ||
return b == nil || b.bitmap_ == 0 | ||
} | ||
|
||
// ManagedResourceGroupName sets the value of the 'managed_resource_group_name' attribute to the given value. | ||
func (b *AzureBuilder) ManagedResourceGroupName(value string) *AzureBuilder { | ||
b.managedResourceGroupName = value | ||
b.bitmap_ |= 1 | ||
return b | ||
} | ||
|
||
// ResourceGroupName sets the value of the 'resource_group_name' attribute to the given value. | ||
func (b *AzureBuilder) ResourceGroupName(value string) *AzureBuilder { | ||
b.resourceGroupName = value | ||
b.bitmap_ |= 2 | ||
return b | ||
} | ||
|
||
// ResourceName sets the value of the 'resource_name' attribute to the given value. | ||
func (b *AzureBuilder) ResourceName(value string) *AzureBuilder { | ||
b.resourceName = value | ||
b.bitmap_ |= 4 | ||
return b | ||
} | ||
|
||
// SubscriptionID sets the value of the 'subscription_ID' attribute to the given value. | ||
func (b *AzureBuilder) SubscriptionID(value string) *AzureBuilder { | ||
b.subscriptionID = value | ||
b.bitmap_ |= 8 | ||
return b | ||
} | ||
|
||
// TenantID sets the value of the 'tenant_ID' attribute to the given value. | ||
func (b *AzureBuilder) TenantID(value string) *AzureBuilder { | ||
b.tenantID = value | ||
b.bitmap_ |= 16 | ||
return b | ||
} | ||
|
||
// Copy copies the attributes of the given object into this builder, discarding any previous values. | ||
func (b *AzureBuilder) Copy(object *Azure) *AzureBuilder { | ||
if object == nil { | ||
return b | ||
} | ||
b.bitmap_ = object.bitmap_ | ||
b.managedResourceGroupName = object.managedResourceGroupName | ||
b.resourceGroupName = object.resourceGroupName | ||
b.resourceName = object.resourceName | ||
b.subscriptionID = object.subscriptionID | ||
b.tenantID = object.tenantID | ||
return b | ||
} | ||
|
||
// Build creates a 'azure' object using the configuration stored in the builder. | ||
func (b *AzureBuilder) Build() (object *Azure, err error) { | ||
object = new(Azure) | ||
object.bitmap_ = b.bitmap_ | ||
object.managedResourceGroupName = b.managedResourceGroupName | ||
object.resourceGroupName = b.resourceGroupName | ||
object.resourceName = b.resourceName | ||
object.subscriptionID = b.subscriptionID | ||
object.tenantID = b.tenantID | ||
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 | ||
|
||
// AzureListBuilder contains the data and logic needed to build | ||
// 'azure' objects. | ||
type AzureListBuilder struct { | ||
items []*AzureBuilder | ||
} | ||
|
||
// NewAzureList creates a new builder of 'azure' objects. | ||
func NewAzureList() *AzureListBuilder { | ||
return new(AzureListBuilder) | ||
} | ||
|
||
// Items sets the items of the list. | ||
func (b *AzureListBuilder) Items(values ...*AzureBuilder) *AzureListBuilder { | ||
b.items = make([]*AzureBuilder, len(values)) | ||
copy(b.items, values) | ||
return b | ||
} | ||
|
||
// Empty returns true if the list is empty. | ||
func (b *AzureListBuilder) 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 *AzureListBuilder) Copy(list *AzureList) *AzureListBuilder { | ||
if list == nil || list.items == nil { | ||
b.items = nil | ||
} else { | ||
b.items = make([]*AzureBuilder, len(list.items)) | ||
for i, v := range list.items { | ||
b.items[i] = NewAzure().Copy(v) | ||
} | ||
} | ||
return b | ||
} | ||
|
||
// Build creates a list of 'azure' objects using the | ||
// configuration stored in the builder. | ||
func (b *AzureListBuilder) Build() (list *AzureList, err error) { | ||
items := make([]*Azure, len(b.items)) | ||
for i, item := range b.items { | ||
items[i], err = item.Build() | ||
if err != nil { | ||
return | ||
} | ||
} | ||
list = new(AzureList) | ||
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" | ||
) | ||
|
||
// MarshalAzureList writes a list of values of the 'azure' type to | ||
// the given writer. | ||
func MarshalAzureList(list []*Azure, writer io.Writer) error { | ||
stream := helpers.NewStream(writer) | ||
writeAzureList(list, stream) | ||
err := stream.Flush() | ||
if err != nil { | ||
return err | ||
} | ||
return stream.Error | ||
} | ||
|
||
// writeAzureList writes a list of value of the 'azure' type to | ||
// the given stream. | ||
func writeAzureList(list []*Azure, stream *jsoniter.Stream) { | ||
stream.WriteArrayStart() | ||
for i, value := range list { | ||
if i > 0 { | ||
stream.WriteMore() | ||
} | ||
writeAzure(value, stream) | ||
} | ||
stream.WriteArrayEnd() | ||
} | ||
|
||
// UnmarshalAzureList reads a list of values of the 'azure' type | ||
// from the given source, which can be a slice of bytes, a string or a reader. | ||
func UnmarshalAzureList(source interface{}) (items []*Azure, err error) { | ||
iterator, err := helpers.NewIterator(source) | ||
if err != nil { | ||
return | ||
} | ||
items = readAzureList(iterator) | ||
err = iterator.Error | ||
return | ||
} | ||
|
||
// readAzureList reads list of values of the ”azure' type from | ||
// the given iterator. | ||
func readAzureList(iterator *jsoniter.Iterator) []*Azure { | ||
list := []*Azure{} | ||
for iterator.ReadArray() { | ||
item := readAzure(iterator) | ||
list = append(list, item) | ||
} | ||
return list | ||
} |
Oops, something went wrong.