Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcp-psc update and version bump v0.1.445 #1002

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.445
- Update model version v0.0.398
- Add updates for GCP Private Service Connect feature

## 0.1.444
- Update model version v0.0.397
- Add `FlapDetection` field to `status_board.statuses` model
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export PATH := $(LOCAL_BIN_PATH):$(PATH)
export CGO_ENABLED=0

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

# Details of the metamodel to use:
Expand Down
35 changes: 30 additions & 5 deletions clustersmgmt/v1/gcp_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type GCPBuilder struct {
clientEmail string
privateKey string
privateKeyID string
privateServiceConnect *GcpPrivateServiceConnectBuilder
projectID string
security *GcpSecurityBuilder
tokenURI string
Expand Down Expand Up @@ -110,10 +111,23 @@ func (b *GCPBuilder) PrivateKeyID(value string) *GCPBuilder {
return b
}

// PrivateServiceConnect sets the value of the 'private_service_connect' attribute to the given value.
//
// Google cloud platform private service connect configuration of a cluster.
func (b *GCPBuilder) PrivateServiceConnect(value *GcpPrivateServiceConnectBuilder) *GCPBuilder {
b.privateServiceConnect = value
if value != nil {
b.bitmap_ |= 256
} else {
b.bitmap_ &^= 256
}
return b
}

// ProjectID sets the value of the 'project_ID' attribute to the given value.
func (b *GCPBuilder) ProjectID(value string) *GCPBuilder {
b.projectID = value
b.bitmap_ |= 256
b.bitmap_ |= 512
return b
}

Expand All @@ -123,24 +137,24 @@ func (b *GCPBuilder) ProjectID(value string) *GCPBuilder {
func (b *GCPBuilder) Security(value *GcpSecurityBuilder) *GCPBuilder {
b.security = value
if value != nil {
b.bitmap_ |= 512
b.bitmap_ |= 1024
} else {
b.bitmap_ &^= 512
b.bitmap_ &^= 1024
}
return b
}

// TokenURI sets the value of the 'token_URI' attribute to the given value.
func (b *GCPBuilder) TokenURI(value string) *GCPBuilder {
b.tokenURI = value
b.bitmap_ |= 1024
b.bitmap_ |= 2048
return b
}

// Type sets the value of the 'type' attribute to the given value.
func (b *GCPBuilder) Type(value string) *GCPBuilder {
b.type_ = value
b.bitmap_ |= 2048
b.bitmap_ |= 4096
return b
}

Expand All @@ -162,6 +176,11 @@ func (b *GCPBuilder) Copy(object *GCP) *GCPBuilder {
b.clientEmail = object.clientEmail
b.privateKey = object.privateKey
b.privateKeyID = object.privateKeyID
if object.privateServiceConnect != nil {
b.privateServiceConnect = NewGcpPrivateServiceConnect().Copy(object.privateServiceConnect)
} else {
b.privateServiceConnect = nil
}
b.projectID = object.projectID
if object.security != nil {
b.security = NewGcpSecurity().Copy(object.security)
Expand Down Expand Up @@ -190,6 +209,12 @@ func (b *GCPBuilder) Build() (object *GCP, err error) {
object.clientEmail = b.clientEmail
object.privateKey = b.privateKey
object.privateKeyID = b.privateKeyID
if b.privateServiceConnect != nil {
object.privateServiceConnect, err = b.privateServiceConnect.Build()
if err != nil {
return
}
}
object.projectID = b.projectID
if b.security != nil {
object.security, err = b.security.Build()
Expand Down
63 changes: 63 additions & 0 deletions clustersmgmt/v1/gcp_private_service_connect_builder.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
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

// GcpPrivateServiceConnectBuilder contains the data and logic needed to build 'gcp_private_service_connect' objects.
//
// Google cloud platform private service connect configuration of a cluster.
type GcpPrivateServiceConnectBuilder struct {
bitmap_ uint32
serviceAttachmentSubnet string
}

// NewGcpPrivateServiceConnect creates a new builder of 'gcp_private_service_connect' objects.
func NewGcpPrivateServiceConnect() *GcpPrivateServiceConnectBuilder {
return &GcpPrivateServiceConnectBuilder{}
}

// Empty returns true if the builder is empty, i.e. no attribute has a value.
func (b *GcpPrivateServiceConnectBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// ServiceAttachmentSubnet sets the value of the 'service_attachment_subnet' attribute to the given value.
func (b *GcpPrivateServiceConnectBuilder) ServiceAttachmentSubnet(value string) *GcpPrivateServiceConnectBuilder {
b.serviceAttachmentSubnet = value
b.bitmap_ |= 1
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *GcpPrivateServiceConnectBuilder) Copy(object *GcpPrivateServiceConnect) *GcpPrivateServiceConnectBuilder {
if object == nil {
return b
}
b.bitmap_ = object.bitmap_
b.serviceAttachmentSubnet = object.serviceAttachmentSubnet
return b
}

// Build creates a 'gcp_private_service_connect' object using the configuration stored in the builder.
func (b *GcpPrivateServiceConnectBuilder) Build() (object *GcpPrivateServiceConnect, err error) {
object = new(GcpPrivateServiceConnect)
object.bitmap_ = b.bitmap_
object.serviceAttachmentSubnet = b.serviceAttachmentSubnet
return
}
71 changes: 71 additions & 0 deletions clustersmgmt/v1/gcp_private_service_connect_list_builder.go
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

// GcpPrivateServiceConnectListBuilder contains the data and logic needed to build
// 'gcp_private_service_connect' objects.
type GcpPrivateServiceConnectListBuilder struct {
items []*GcpPrivateServiceConnectBuilder
}

// NewGcpPrivateServiceConnectList creates a new builder of 'gcp_private_service_connect' objects.
func NewGcpPrivateServiceConnectList() *GcpPrivateServiceConnectListBuilder {
return new(GcpPrivateServiceConnectListBuilder)
}

// Items sets the items of the list.
func (b *GcpPrivateServiceConnectListBuilder) Items(values ...*GcpPrivateServiceConnectBuilder) *GcpPrivateServiceConnectListBuilder {
b.items = make([]*GcpPrivateServiceConnectBuilder, len(values))
copy(b.items, values)
return b
}

// Empty returns true if the list is empty.
func (b *GcpPrivateServiceConnectListBuilder) 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 *GcpPrivateServiceConnectListBuilder) Copy(list *GcpPrivateServiceConnectList) *GcpPrivateServiceConnectListBuilder {
if list == nil || list.items == nil {
b.items = nil
} else {
b.items = make([]*GcpPrivateServiceConnectBuilder, len(list.items))
for i, v := range list.items {
b.items[i] = NewGcpPrivateServiceConnect().Copy(v)
}
}
return b
}

// Build creates a list of 'gcp_private_service_connect' objects using the
// configuration stored in the builder.
func (b *GcpPrivateServiceConnectListBuilder) Build() (list *GcpPrivateServiceConnectList, err error) {
items := make([]*GcpPrivateServiceConnect, len(b.items))
for i, item := range b.items {
items[i], err = item.Build()
if err != nil {
return
}
}
list = new(GcpPrivateServiceConnectList)
list.items = items
return
}
75 changes: 75 additions & 0 deletions clustersmgmt/v1/gcp_private_service_connect_list_type_json.go
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"
)

// MarshalGcpPrivateServiceConnectList writes a list of values of the 'gcp_private_service_connect' type to
// the given writer.
func MarshalGcpPrivateServiceConnectList(list []*GcpPrivateServiceConnect, writer io.Writer) error {
stream := helpers.NewStream(writer)
writeGcpPrivateServiceConnectList(list, stream)
err := stream.Flush()
if err != nil {
return err
}
return stream.Error
}

// writeGcpPrivateServiceConnectList writes a list of value of the 'gcp_private_service_connect' type to
// the given stream.
func writeGcpPrivateServiceConnectList(list []*GcpPrivateServiceConnect, stream *jsoniter.Stream) {
stream.WriteArrayStart()
for i, value := range list {
if i > 0 {
stream.WriteMore()
}
writeGcpPrivateServiceConnect(value, stream)
}
stream.WriteArrayEnd()
}

// UnmarshalGcpPrivateServiceConnectList reads a list of values of the 'gcp_private_service_connect' type
// from the given source, which can be a slice of bytes, a string or a reader.
func UnmarshalGcpPrivateServiceConnectList(source interface{}) (items []*GcpPrivateServiceConnect, err error) {
iterator, err := helpers.NewIterator(source)
if err != nil {
return
}
items = readGcpPrivateServiceConnectList(iterator)
err = iterator.Error
return
}

// readGcpPrivateServiceConnectList reads list of values of the ”gcp_private_service_connect' type from
// the given iterator.
func readGcpPrivateServiceConnectList(iterator *jsoniter.Iterator) []*GcpPrivateServiceConnect {
list := []*GcpPrivateServiceConnect{}
for iterator.ReadArray() {
item := readGcpPrivateServiceConnect(iterator)
list = append(list, item)
}
return list
}
Loading
Loading