Skip to content

Commit

Permalink
OCM-10883 | chore: bump api model to v0.0.393
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbranco committed Sep 9, 2024
1 parent 6b50545 commit f542f2e
Show file tree
Hide file tree
Showing 1,317 changed files with 5,406 additions and 262,010 deletions.
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.392
model_version:=v0.0.393
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
9 changes: 0 additions & 9 deletions clustersmgmt/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"path"

v1 "github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1"
"github.com/openshift-online/ocm-sdk-go/clustersmgmt/v2alpha1"
)

// Client is the client for service 'clusters_mgmt'.
Expand All @@ -49,11 +48,3 @@ func (c *Client) V1() *v1.Client {
path.Join(c.path, "v1"),
)
}

// V2alpha1 returns a reference to a client for version 'v2alpha1'.
func (c *Client) V2alpha1() *v2alpha1.Client {
return v2alpha1.NewClient(
c.transport,
path.Join(c.path, "v2alpha1"),
)
}
14 changes: 12 additions & 2 deletions clustersmgmt/v1/hypershift_config_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
// Hypershift configuration.
type HypershiftConfigBuilder struct {
bitmap_ uint32
hcpNamespace string
managementCluster string
enabled bool
}
Expand All @@ -38,17 +39,24 @@ func (b *HypershiftConfigBuilder) Empty() bool {
return b == nil || b.bitmap_ == 0
}

// HCPNamespace sets the value of the 'HCP_namespace' attribute to the given value.
func (b *HypershiftConfigBuilder) HCPNamespace(value string) *HypershiftConfigBuilder {
b.hcpNamespace = value
b.bitmap_ |= 1
return b
}

// Enabled sets the value of the 'enabled' attribute to the given value.
func (b *HypershiftConfigBuilder) Enabled(value bool) *HypershiftConfigBuilder {
b.enabled = value
b.bitmap_ |= 1
b.bitmap_ |= 2
return b
}

// ManagementCluster sets the value of the 'management_cluster' attribute to the given value.
func (b *HypershiftConfigBuilder) ManagementCluster(value string) *HypershiftConfigBuilder {
b.managementCluster = value
b.bitmap_ |= 2
b.bitmap_ |= 4
return b
}

Expand All @@ -58,6 +66,7 @@ func (b *HypershiftConfigBuilder) Copy(object *HypershiftConfig) *HypershiftConf
return b
}
b.bitmap_ = object.bitmap_
b.hcpNamespace = object.hcpNamespace
b.enabled = object.enabled
b.managementCluster = object.managementCluster
return b
Expand All @@ -67,6 +76,7 @@ func (b *HypershiftConfigBuilder) Copy(object *HypershiftConfig) *HypershiftConf
func (b *HypershiftConfigBuilder) Build() (object *HypershiftConfig, err error) {
object = new(HypershiftConfig)
object.bitmap_ = b.bitmap_
object.hcpNamespace = b.hcpNamespace
object.enabled = b.enabled
object.managementCluster = b.managementCluster
return
Expand Down
34 changes: 30 additions & 4 deletions clustersmgmt/v1/hypershift_config_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1
// Hypershift configuration.
type HypershiftConfig struct {
bitmap_ uint32
hcpNamespace string
managementCluster string
enabled bool
}
Expand All @@ -33,6 +34,31 @@ func (o *HypershiftConfig) Empty() bool {
return o == nil || o.bitmap_ == 0
}

// HCPNamespace returns the value of the 'HCP_namespace' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Contains the name of the hcp namespace for this Hypershift cluster.
// Empty for non Hypershift clusters.
func (o *HypershiftConfig) HCPNamespace() string {
if o != nil && o.bitmap_&1 != 0 {
return o.hcpNamespace
}
return ""
}

// GetHCPNamespace returns the value of the 'HCP_namespace' attribute and
// a flag indicating if the attribute has a value.
//
// Contains the name of the hcp namespace for this Hypershift cluster.
// Empty for non Hypershift clusters.
func (o *HypershiftConfig) GetHCPNamespace() (value string, ok bool) {
ok = o != nil && o.bitmap_&1 != 0
if ok {
value = o.hcpNamespace
}
return
}

// Enabled returns the value of the 'enabled' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
Expand All @@ -43,7 +69,7 @@ func (o *HypershiftConfig) Empty() bool {
// To enable it the cluster needs to be ROSA cluster and the organization of the user needs
// to have the `hypershift` capability enabled.
func (o *HypershiftConfig) Enabled() bool {
if o != nil && o.bitmap_&1 != 0 {
if o != nil && o.bitmap_&2 != 0 {
return o.enabled
}
return false
Expand All @@ -59,7 +85,7 @@ func (o *HypershiftConfig) Enabled() bool {
// To enable it the cluster needs to be ROSA cluster and the organization of the user needs
// to have the `hypershift` capability enabled.
func (o *HypershiftConfig) GetEnabled() (value bool, ok bool) {
ok = o != nil && o.bitmap_&1 != 0
ok = o != nil && o.bitmap_&2 != 0
if ok {
value = o.enabled
}
Expand All @@ -72,7 +98,7 @@ func (o *HypershiftConfig) GetEnabled() (value bool, ok bool) {
// Contains the name of the current management cluster for this Hypershift cluster.
// Empty for non Hypershift clusters.
func (o *HypershiftConfig) ManagementCluster() string {
if o != nil && o.bitmap_&2 != 0 {
if o != nil && o.bitmap_&4 != 0 {
return o.managementCluster
}
return ""
Expand All @@ -84,7 +110,7 @@ func (o *HypershiftConfig) ManagementCluster() string {
// Contains the name of the current management cluster for this Hypershift cluster.
// Empty for non Hypershift clusters.
func (o *HypershiftConfig) GetManagementCluster() (value string, ok bool) {
ok = o != nil && o.bitmap_&2 != 0
ok = o != nil && o.bitmap_&4 != 0
if ok {
value = o.managementCluster
}
Expand Down
19 changes: 16 additions & 3 deletions clustersmgmt/v1/hypershift_config_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ func writeHypershiftConfig(object *HypershiftConfig, stream *jsoniter.Stream) {
stream.WriteObjectStart()
var present_ bool
present_ = object.bitmap_&1 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("hcp_namespace")
stream.WriteString(object.hcpNamespace)
count++
}
present_ = object.bitmap_&2 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -51,7 +60,7 @@ func writeHypershiftConfig(object *HypershiftConfig, stream *jsoniter.Stream) {
stream.WriteBool(object.enabled)
count++
}
present_ = object.bitmap_&2 != 0
present_ = object.bitmap_&4 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -83,14 +92,18 @@ func readHypershiftConfig(iterator *jsoniter.Iterator) *HypershiftConfig {
break
}
switch field {
case "hcp_namespace":
value := iterator.ReadString()
object.hcpNamespace = value
object.bitmap_ |= 1
case "enabled":
value := iterator.ReadBool()
object.enabled = value
object.bitmap_ |= 1
object.bitmap_ |= 2
case "management_cluster":
value := iterator.ReadString()
object.managementCluster = value
object.bitmap_ |= 2
object.bitmap_ |= 4
default:
iterator.ReadAny()
}
Expand Down
18 changes: 10 additions & 8 deletions clustersmgmt/v1/manifest_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (o *Manifest) Empty() bool {
// CreationTimestamp returns the value of the 'creation_timestamp' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Date and time when the manifest got created in clusters-service.
// Date and time when the manifest got created in OCM database.
func (o *Manifest) CreationTimestamp() time.Time {
if o != nil && o.bitmap_&8 != 0 {
return o.creationTimestamp
Expand All @@ -120,7 +120,7 @@ func (o *Manifest) CreationTimestamp() time.Time {
// GetCreationTimestamp returns the value of the 'creation_timestamp' attribute and
// a flag indicating if the attribute has a value.
//
// Date and time when the manifest got created in clusters-service.
// Date and time when the manifest got created in OCM database.
func (o *Manifest) GetCreationTimestamp() (value time.Time, ok bool) {
ok = o != nil && o.bitmap_&8 != 0
if ok {
Expand All @@ -132,7 +132,7 @@ func (o *Manifest) GetCreationTimestamp() (value time.Time, ok bool) {
// LiveResource returns the value of the 'live_resource' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Transient value to represent the underyling live resource.
// Transient value to represent the underlying live resource.
func (o *Manifest) LiveResource() interface{} {
if o != nil && o.bitmap_&16 != 0 {
return o.liveResource
Expand All @@ -143,7 +143,7 @@ func (o *Manifest) LiveResource() interface{} {
// GetLiveResource returns the value of the 'live_resource' attribute and
// a flag indicating if the attribute has a value.
//
// Transient value to represent the underyling live resource.
// Transient value to represent the underlying live resource.
func (o *Manifest) GetLiveResource() (value interface{}, ok bool) {
ok = o != nil && o.bitmap_&16 != 0
if ok {
Expand All @@ -155,7 +155,8 @@ func (o *Manifest) GetLiveResource() (value interface{}, ok bool) {
// Spec returns the value of the 'spec' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Spec of Manifest Work object from open cluster management.
// Spec of Manifest Work object from open cluster management
// For more info please check https://open-cluster-management.io/concepts/manifestwork.
func (o *Manifest) Spec() interface{} {
if o != nil && o.bitmap_&32 != 0 {
return o.spec
Expand All @@ -166,7 +167,8 @@ func (o *Manifest) Spec() interface{} {
// GetSpec returns the value of the 'spec' attribute and
// a flag indicating if the attribute has a value.
//
// Spec of Manifest Work object from open cluster management.
// Spec of Manifest Work object from open cluster management
// For more info please check https://open-cluster-management.io/concepts/manifestwork.
func (o *Manifest) GetSpec() (value interface{}, ok bool) {
ok = o != nil && o.bitmap_&32 != 0
if ok {
Expand All @@ -178,7 +180,7 @@ func (o *Manifest) GetSpec() (value interface{}, ok bool) {
// UpdatedTimestamp returns the value of the 'updated_timestamp' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Date and time when the manifest got updated in clusters-service.
// Date and time when the manifest got updated in OCM database.
func (o *Manifest) UpdatedTimestamp() time.Time {
if o != nil && o.bitmap_&64 != 0 {
return o.updatedTimestamp
Expand All @@ -189,7 +191,7 @@ func (o *Manifest) UpdatedTimestamp() time.Time {
// GetUpdatedTimestamp returns the value of the 'updated_timestamp' attribute and
// a flag indicating if the attribute has a value.
//
// Date and time when the manifest got updated in clusters-service.
// Date and time when the manifest got updated in OCM database.
func (o *Manifest) GetUpdatedTimestamp() (value time.Time, ok bool) {
ok = o != nil && o.bitmap_&64 != 0
if ok {
Expand Down
Loading

0 comments on commit f542f2e

Please sign in to comment.