Skip to content

Commit

Permalink
Bump api model 0.0.254 and Release 0.1.314
Browse files Browse the repository at this point in the history
  • Loading branch information
andreadecorte committed Feb 2, 2023
1 parent 0fe1485 commit 5dd0443
Show file tree
Hide file tree
Showing 38 changed files with 22,117 additions and 17,563 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
This document describes the relevant changes between releases of the OCM API
SDK.

## 0.1.314
- Update to model v0.0.254
- Add `PrivateLinkConfiguration` type with related endpoints

## 0.1.313
- Update to model v0.0.253
- Update Permission resource attributes
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
export CGO_ENABLED=0

# Details of the model to use:
model_version:=v0.0.253
model_version:=v0.0.254
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
53 changes: 39 additions & 14 deletions clustersmgmt/v1/aws_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
//
// _Amazon Web Services_ specific settings of a cluster.
type AWSBuilder struct {
bitmap_ uint32
kmsKeyArn string
sts *STSBuilder
accessKeyID string
accountID string
etcdEncryption *AwsEtcdEncryptionBuilder
secretAccessKey string
subnetIDs []string
tags map[string]string
privateLink bool
bitmap_ uint32
kmsKeyArn string
sts *STSBuilder
accessKeyID string
accountID string
etcdEncryption *AwsEtcdEncryptionBuilder
privateLinkConfiguration *PrivateLinkClusterConfigurationBuilder
secretAccessKey string
subnetIDs []string
tags map[string]string
privateLink bool
}

// NewAWS creates a new builder of 'AWS' objects.
Expand Down Expand Up @@ -99,28 +100,41 @@ func (b *AWSBuilder) PrivateLink(value bool) *AWSBuilder {
return b
}

// PrivateLinkConfiguration sets the value of the 'private_link_configuration' attribute to the given value.
//
// Manages the configuration for the Private Links.
func (b *AWSBuilder) PrivateLinkConfiguration(value *PrivateLinkClusterConfigurationBuilder) *AWSBuilder {
b.privateLinkConfiguration = value
if value != nil {
b.bitmap_ |= 64
} else {
b.bitmap_ &^= 64
}
return b
}

// SecretAccessKey sets the value of the 'secret_access_key' attribute to the given value.
func (b *AWSBuilder) SecretAccessKey(value string) *AWSBuilder {
b.secretAccessKey = value
b.bitmap_ |= 64
b.bitmap_ |= 128
return b
}

// SubnetIDs sets the value of the 'subnet_IDs' attribute to the given values.
func (b *AWSBuilder) SubnetIDs(values ...string) *AWSBuilder {
b.subnetIDs = make([]string, len(values))
copy(b.subnetIDs, values)
b.bitmap_ |= 128
b.bitmap_ |= 256
return b
}

// Tags sets the value of the 'tags' attribute to the given value.
func (b *AWSBuilder) Tags(value map[string]string) *AWSBuilder {
b.tags = value
if value != nil {
b.bitmap_ |= 256
b.bitmap_ |= 512
} else {
b.bitmap_ &^= 256
b.bitmap_ &^= 512
}
return b
}
Expand All @@ -145,6 +159,11 @@ func (b *AWSBuilder) Copy(object *AWS) *AWSBuilder {
b.etcdEncryption = nil
}
b.privateLink = object.privateLink
if object.privateLinkConfiguration != nil {
b.privateLinkConfiguration = NewPrivateLinkClusterConfiguration().Copy(object.privateLinkConfiguration)
} else {
b.privateLinkConfiguration = nil
}
b.secretAccessKey = object.secretAccessKey
if object.subnetIDs != nil {
b.subnetIDs = make([]string, len(object.subnetIDs))
Expand Down Expand Up @@ -183,6 +202,12 @@ func (b *AWSBuilder) Build() (object *AWS, err error) {
}
}
object.privateLink = b.privateLink
if b.privateLinkConfiguration != nil {
object.privateLinkConfiguration, err = b.privateLinkConfiguration.Build()
if err != nil {
return
}
}
object.secretAccessKey = b.secretAccessKey
if b.subnetIDs != nil {
object.subnetIDs = make([]string, len(b.subnetIDs))
Expand Down
51 changes: 51 additions & 0 deletions clustersmgmt/v1/aws_client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
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 (
"net/http"
"path"
)

// AWSClient is the client of the 'AWS' resource.
//
// Manages AWS specific parts for a specific cluster.
type AWSClient struct {
transport http.RoundTripper
path string
}

// NewAWSClient creates a new client for the 'AWS'
// resource using the given transport to send the requests and receive the
// responses.
func NewAWSClient(transport http.RoundTripper, path string) *AWSClient {
return &AWSClient{
transport: transport,
path: path,
}
}

// PrivateLinkConfiguration returns the target 'private_link_configuration' resource.
func (c *AWSClient) PrivateLinkConfiguration() *PrivateLinkConfigurationClient {
return NewPrivateLinkConfigurationClient(
c.transport,
path.Join(c.path, "private_link_configuration"),
)
}
20 changes: 20 additions & 0 deletions clustersmgmt/v1/aws_resource_json.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
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
56 changes: 40 additions & 16 deletions clustersmgmt/v1/aws_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
//
// _Amazon Web Services_ specific settings of a cluster.
type AWS struct {
bitmap_ uint32
kmsKeyArn string
sts *STS
accessKeyID string
accountID string
etcdEncryption *AwsEtcdEncryption
secretAccessKey string
subnetIDs []string
tags map[string]string
privateLink bool
bitmap_ uint32
kmsKeyArn string
sts *STS
accessKeyID string
accountID string
etcdEncryption *AwsEtcdEncryption
privateLinkConfiguration *PrivateLinkClusterConfiguration
secretAccessKey string
subnetIDs []string
tags map[string]string
privateLink bool
}

// Empty returns true if the object is empty, i.e. no attribute has a value.
Expand Down Expand Up @@ -178,12 +179,35 @@ func (o *AWS) GetPrivateLink() (value bool, ok bool) {
return
}

// PrivateLinkConfiguration returns the value of the 'private_link_configuration' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Manages additional configuration for Private Links.
func (o *AWS) PrivateLinkConfiguration() *PrivateLinkClusterConfiguration {
if o != nil && o.bitmap_&64 != 0 {
return o.privateLinkConfiguration
}
return nil
}

// GetPrivateLinkConfiguration returns the value of the 'private_link_configuration' attribute and
// a flag indicating if the attribute has a value.
//
// Manages additional configuration for Private Links.
func (o *AWS) GetPrivateLinkConfiguration() (value *PrivateLinkClusterConfiguration, ok bool) {
ok = o != nil && o.bitmap_&64 != 0
if ok {
value = o.privateLinkConfiguration
}
return
}

// SecretAccessKey returns the value of the 'secret_access_key' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// AWS secret access key.
func (o *AWS) SecretAccessKey() string {
if o != nil && o.bitmap_&64 != 0 {
if o != nil && o.bitmap_&128 != 0 {
return o.secretAccessKey
}
return ""
Expand All @@ -194,7 +218,7 @@ func (o *AWS) SecretAccessKey() string {
//
// AWS secret access key.
func (o *AWS) GetSecretAccessKey() (value string, ok bool) {
ok = o != nil && o.bitmap_&64 != 0
ok = o != nil && o.bitmap_&128 != 0
if ok {
value = o.secretAccessKey
}
Expand All @@ -206,7 +230,7 @@ func (o *AWS) GetSecretAccessKey() (value string, ok bool) {
//
// The subnet ids to be used when installing the cluster.
func (o *AWS) SubnetIDs() []string {
if o != nil && o.bitmap_&128 != 0 {
if o != nil && o.bitmap_&256 != 0 {
return o.subnetIDs
}
return nil
Expand All @@ -217,7 +241,7 @@ func (o *AWS) SubnetIDs() []string {
//
// The subnet ids to be used when installing the cluster.
func (o *AWS) GetSubnetIDs() (value []string, ok bool) {
ok = o != nil && o.bitmap_&128 != 0
ok = o != nil && o.bitmap_&256 != 0
if ok {
value = o.subnetIDs
}
Expand All @@ -229,7 +253,7 @@ func (o *AWS) GetSubnetIDs() (value []string, ok bool) {
//
// Optional keys and values that the installer will add as tags to all AWS resources it creates
func (o *AWS) Tags() map[string]string {
if o != nil && o.bitmap_&256 != 0 {
if o != nil && o.bitmap_&512 != 0 {
return o.tags
}
return nil
Expand All @@ -240,7 +264,7 @@ func (o *AWS) Tags() map[string]string {
//
// Optional keys and values that the installer will add as tags to all AWS resources it creates
func (o *AWS) GetTags() (value map[string]string, ok bool) {
ok = o != nil && o.bitmap_&256 != 0
ok = o != nil && o.bitmap_&512 != 0
if ok {
value = o.tags
}
Expand Down
25 changes: 19 additions & 6 deletions clustersmgmt/v1/aws_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,16 @@ func writeAWS(object *AWS, stream *jsoniter.Stream) {
stream.WriteBool(object.privateLink)
count++
}
present_ = object.bitmap_&64 != 0
present_ = object.bitmap_&64 != 0 && object.privateLinkConfiguration != nil
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("private_link_configuration")
writePrivateLinkClusterConfiguration(object.privateLinkConfiguration, stream)
count++
}
present_ = object.bitmap_&128 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -106,7 +115,7 @@ func writeAWS(object *AWS, stream *jsoniter.Stream) {
stream.WriteString(object.secretAccessKey)
count++
}
present_ = object.bitmap_&128 != 0 && object.subnetIDs != nil
present_ = object.bitmap_&256 != 0 && object.subnetIDs != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -115,7 +124,7 @@ func writeAWS(object *AWS, stream *jsoniter.Stream) {
writeStringList(object.subnetIDs, stream)
count++
}
present_ = object.bitmap_&256 != 0 && object.tags != nil
present_ = object.bitmap_&512 != 0 && object.tags != nil
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -191,14 +200,18 @@ func readAWS(iterator *jsoniter.Iterator) *AWS {
value := iterator.ReadBool()
object.privateLink = value
object.bitmap_ |= 32
case "private_link_configuration":
value := readPrivateLinkClusterConfiguration(iterator)
object.privateLinkConfiguration = value
object.bitmap_ |= 64
case "secret_access_key":
value := iterator.ReadString()
object.secretAccessKey = value
object.bitmap_ |= 64
object.bitmap_ |= 128
case "subnet_ids":
value := readStringList(iterator)
object.subnetIDs = value
object.bitmap_ |= 128
object.bitmap_ |= 256
case "tags":
value := map[string]string{}
for {
Expand All @@ -210,7 +223,7 @@ func readAWS(iterator *jsoniter.Iterator) *AWS {
value[key] = item
}
object.tags = value
object.bitmap_ |= 256
object.bitmap_ |= 512
default:
iterator.ReadAny()
}
Expand Down
8 changes: 8 additions & 0 deletions clustersmgmt/v1/cluster_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ func (c *ClusterClient) Update() *ClusterUpdateRequest {
}
}

// AWS returns the target 'AWS' resource.
func (c *ClusterClient) AWS() *AWSClient {
return NewAWSClient(
c.transport,
path.Join(c.path, "aws"),
)
}

// AWSInfrastructureAccessRoleGrants returns the target 'AWS_infrastructure_access_role_grants' resource.
//
// Reference to the resource that manages the collection of AWS infrastructure
Expand Down
Loading

0 comments on commit 5dd0443

Please sign in to comment.