Skip to content

Commit

Permalink
Merge pull request #818 from osherdp/chore/release-0.1.361
Browse files Browse the repository at this point in the history
chore: release v0.1.361
  • Loading branch information
zgalor authored Aug 14, 2023
2 parents b97ef18 + 6551073 commit 47a9734
Show file tree
Hide file tree
Showing 24 changed files with 8,596 additions and 7,513 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
This document describes the relevant changes between releases of the OCM API
SDK.

## 0.1.361
- Update model version v0.0.309
- Modify access review response to include `is_ocm_internal` field.
- Add the remainder of cluster-autoscaler parameters.

## 0.1.360
- Update model version v0.0.307
- Move `PrivateHostedZoneID` and `PrivateHostedZoneRoleARN` to `aws_type` resource
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.307
model_version:=v0.0.309
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
18 changes: 14 additions & 4 deletions authorizations/v1/access_review_response_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type AccessReviewResponseBuilder struct {
resourceType string
subscriptionID string
allowed bool
isOCMInternal bool
}

// NewAccessReviewResponse creates a new builder of 'access_review_response' objects.
Expand Down Expand Up @@ -80,31 +81,38 @@ func (b *AccessReviewResponseBuilder) ClusterUUID(value string) *AccessReviewRes
return b
}

// IsOCMInternal sets the value of the 'is_OCM_internal' attribute to the given value.
func (b *AccessReviewResponseBuilder) IsOCMInternal(value bool) *AccessReviewResponseBuilder {
b.isOCMInternal = value
b.bitmap_ |= 32
return b
}

// OrganizationID sets the value of the 'organization_ID' attribute to the given value.
func (b *AccessReviewResponseBuilder) OrganizationID(value string) *AccessReviewResponseBuilder {
b.organizationID = value
b.bitmap_ |= 32
b.bitmap_ |= 64
return b
}

// Reason sets the value of the 'reason' attribute to the given value.
func (b *AccessReviewResponseBuilder) Reason(value string) *AccessReviewResponseBuilder {
b.reason = value
b.bitmap_ |= 64
b.bitmap_ |= 128
return b
}

// ResourceType sets the value of the 'resource_type' attribute to the given value.
func (b *AccessReviewResponseBuilder) ResourceType(value string) *AccessReviewResponseBuilder {
b.resourceType = value
b.bitmap_ |= 128
b.bitmap_ |= 256
return b
}

// SubscriptionID sets the value of the 'subscription_ID' attribute to the given value.
func (b *AccessReviewResponseBuilder) SubscriptionID(value string) *AccessReviewResponseBuilder {
b.subscriptionID = value
b.bitmap_ |= 256
b.bitmap_ |= 512
return b
}

Expand All @@ -119,6 +127,7 @@ func (b *AccessReviewResponseBuilder) Copy(object *AccessReviewResponse) *Access
b.allowed = object.allowed
b.clusterID = object.clusterID
b.clusterUUID = object.clusterUUID
b.isOCMInternal = object.isOCMInternal
b.organizationID = object.organizationID
b.reason = object.reason
b.resourceType = object.resourceType
Expand All @@ -135,6 +144,7 @@ func (b *AccessReviewResponseBuilder) Build() (object *AccessReviewResponse, err
object.allowed = b.allowed
object.clusterID = b.clusterID
object.clusterUUID = b.clusterUUID
object.isOCMInternal = b.isOCMInternal
object.organizationID = b.organizationID
object.reason = b.reason
object.resourceType = b.resourceType
Expand Down
76 changes: 50 additions & 26 deletions authorizations/v1/access_review_response_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type AccessReviewResponse struct {
resourceType string
subscriptionID string
allowed bool
isOCMInternal bool
}

// Empty returns true if the object is empty, i.e. no attribute has a value.
Expand All @@ -43,7 +44,7 @@ func (o *AccessReviewResponse) Empty() bool {
// AccountUsername returns the value of the 'account_username' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Defines the username of the account of which access is being reviewed
// Defines the username of the account of which access is being reviewed.
func (o *AccessReviewResponse) AccountUsername() string {
if o != nil && o.bitmap_&1 != 0 {
return o.accountUsername
Expand All @@ -54,7 +55,7 @@ func (o *AccessReviewResponse) AccountUsername() string {
// GetAccountUsername returns the value of the 'account_username' attribute and
// a flag indicating if the attribute has a value.
//
// Defines the username of the account of which access is being reviewed
// Defines the username of the account of which access is being reviewed.
func (o *AccessReviewResponse) GetAccountUsername() (value string, ok bool) {
ok = o != nil && o.bitmap_&1 != 0
if ok {
Expand All @@ -66,7 +67,7 @@ func (o *AccessReviewResponse) GetAccountUsername() (value string, ok bool) {
// Action returns the value of the 'action' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Indicates the action, one of: [get,list,create,delete,update]
// Indicates the action, one of: [get,list,create,delete,update].
func (o *AccessReviewResponse) Action() string {
if o != nil && o.bitmap_&2 != 0 {
return o.action
Expand All @@ -77,7 +78,7 @@ func (o *AccessReviewResponse) Action() string {
// GetAction returns the value of the 'action' attribute and
// a flag indicating if the attribute has a value.
//
// Indicates the action, one of: [get,list,create,delete,update]
// Indicates the action, one of: [get,list,create,delete,update].
func (o *AccessReviewResponse) GetAction() (value string, ok bool) {
ok = o != nil && o.bitmap_&2 != 0
if ok {
Expand All @@ -89,7 +90,7 @@ func (o *AccessReviewResponse) GetAction() (value string, ok bool) {
// Allowed returns the value of the 'allowed' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Defines whether the action on the specified resource type is allowed
// Defines whether the action on the specified resource type is allowed.
func (o *AccessReviewResponse) Allowed() bool {
if o != nil && o.bitmap_&4 != 0 {
return o.allowed
Expand All @@ -100,7 +101,7 @@ func (o *AccessReviewResponse) Allowed() bool {
// GetAllowed returns the value of the 'allowed' attribute and
// a flag indicating if the attribute has a value.
//
// Defines whether the action on the specified resource type is allowed
// Defines whether the action on the specified resource type is allowed.
func (o *AccessReviewResponse) GetAllowed() (value bool, ok bool) {
ok = o != nil && o.bitmap_&4 != 0
if ok {
Expand All @@ -112,7 +113,7 @@ func (o *AccessReviewResponse) GetAllowed() (value bool, ok bool) {
// ClusterID returns the value of the 'cluster_ID' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Indicates which Cluster (internal id) the resource type belongs to
// Indicates which Cluster (internal id) the resource type belongs to.
func (o *AccessReviewResponse) ClusterID() string {
if o != nil && o.bitmap_&8 != 0 {
return o.clusterID
Expand All @@ -123,7 +124,7 @@ func (o *AccessReviewResponse) ClusterID() string {
// GetClusterID returns the value of the 'cluster_ID' attribute and
// a flag indicating if the attribute has a value.
//
// Indicates which Cluster (internal id) the resource type belongs to
// Indicates which Cluster (internal id) the resource type belongs to.
func (o *AccessReviewResponse) GetClusterID() (value string, ok bool) {
ok = o != nil && o.bitmap_&8 != 0
if ok {
Expand All @@ -135,7 +136,7 @@ func (o *AccessReviewResponse) GetClusterID() (value string, ok bool) {
// ClusterUUID returns the value of the 'cluster_UUID' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Indicates which Cluster (external id) the resource type belongs to
// Indicates which Cluster (external id) the resource type belongs to.
func (o *AccessReviewResponse) ClusterUUID() string {
if o != nil && o.bitmap_&16 != 0 {
return o.clusterUUID
Expand All @@ -146,7 +147,7 @@ func (o *AccessReviewResponse) ClusterUUID() string {
// GetClusterUUID returns the value of the 'cluster_UUID' attribute and
// a flag indicating if the attribute has a value.
//
// Indicates which Cluster (external id) the resource type belongs to
// Indicates which Cluster (external id) the resource type belongs to.
func (o *AccessReviewResponse) GetClusterUUID() (value string, ok bool) {
ok = o != nil && o.bitmap_&16 != 0
if ok {
Expand All @@ -155,12 +156,35 @@ func (o *AccessReviewResponse) GetClusterUUID() (value string, ok bool) {
return
}

// IsOCMInternal returns the value of the 'is_OCM_internal' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Defines whether an account is ocm internal.
func (o *AccessReviewResponse) IsOCMInternal() bool {
if o != nil && o.bitmap_&32 != 0 {
return o.isOCMInternal
}
return false
}

// GetIsOCMInternal returns the value of the 'is_OCM_internal' attribute and
// a flag indicating if the attribute has a value.
//
// Defines whether an account is ocm internal.
func (o *AccessReviewResponse) GetIsOCMInternal() (value bool, ok bool) {
ok = o != nil && o.bitmap_&32 != 0
if ok {
value = o.isOCMInternal
}
return
}

// OrganizationID returns the value of the 'organization_ID' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Indicates which Organization the resource type belongs to
// Indicates which Organization the resource type belongs to.
func (o *AccessReviewResponse) OrganizationID() string {
if o != nil && o.bitmap_&32 != 0 {
if o != nil && o.bitmap_&64 != 0 {
return o.organizationID
}
return ""
Expand All @@ -169,9 +193,9 @@ func (o *AccessReviewResponse) OrganizationID() string {
// GetOrganizationID returns the value of the 'organization_ID' attribute and
// a flag indicating if the attribute has a value.
//
// Indicates which Organization the resource type belongs to
// Indicates which Organization the resource type belongs to.
func (o *AccessReviewResponse) GetOrganizationID() (value string, ok bool) {
ok = o != nil && o.bitmap_&32 != 0
ok = o != nil && o.bitmap_&64 != 0
if ok {
value = o.organizationID
}
Expand All @@ -181,9 +205,9 @@ func (o *AccessReviewResponse) GetOrganizationID() (value string, ok bool) {
// Reason returns the value of the 'reason' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Defines further context for the value in allowed (if applicable)
// Defines further context for the value in allowed (if applicable).
func (o *AccessReviewResponse) Reason() string {
if o != nil && o.bitmap_&64 != 0 {
if o != nil && o.bitmap_&128 != 0 {
return o.reason
}
return ""
Expand All @@ -192,9 +216,9 @@ func (o *AccessReviewResponse) Reason() string {
// GetReason returns the value of the 'reason' attribute and
// a flag indicating if the attribute has a value.
//
// Defines further context for the value in allowed (if applicable)
// Defines further context for the value in allowed (if applicable).
func (o *AccessReviewResponse) GetReason() (value string, ok bool) {
ok = o != nil && o.bitmap_&64 != 0
ok = o != nil && o.bitmap_&128 != 0
if ok {
value = o.reason
}
Expand All @@ -205,9 +229,9 @@ func (o *AccessReviewResponse) GetReason() (value string, ok bool) {
// the zero value of the type if the attribute doesn't have a value.
//
// Indicates the type of the resource an action would be taken on.
// See uhc-account-manager/openapi/openapi.yaml for a list of possible values
// See uhc-account-manager/openapi/openapi.yaml for a list of possible values.
func (o *AccessReviewResponse) ResourceType() string {
if o != nil && o.bitmap_&128 != 0 {
if o != nil && o.bitmap_&256 != 0 {
return o.resourceType
}
return ""
Expand All @@ -217,9 +241,9 @@ func (o *AccessReviewResponse) ResourceType() string {
// a flag indicating if the attribute has a value.
//
// Indicates the type of the resource an action would be taken on.
// See uhc-account-manager/openapi/openapi.yaml for a list of possible values
// See uhc-account-manager/openapi/openapi.yaml for a list of possible values.
func (o *AccessReviewResponse) GetResourceType() (value string, ok bool) {
ok = o != nil && o.bitmap_&128 != 0
ok = o != nil && o.bitmap_&256 != 0
if ok {
value = o.resourceType
}
Expand All @@ -229,9 +253,9 @@ func (o *AccessReviewResponse) GetResourceType() (value string, ok bool) {
// SubscriptionID returns the value of the 'subscription_ID' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Indicates which Subscription the resource type belongs to
// Indicates which Subscription the resource type belongs to.
func (o *AccessReviewResponse) SubscriptionID() string {
if o != nil && o.bitmap_&256 != 0 {
if o != nil && o.bitmap_&512 != 0 {
return o.subscriptionID
}
return ""
Expand All @@ -240,9 +264,9 @@ func (o *AccessReviewResponse) SubscriptionID() string {
// GetSubscriptionID returns the value of the 'subscription_ID' attribute and
// a flag indicating if the attribute has a value.
//
// Indicates which Subscription the resource type belongs to
// Indicates which Subscription the resource type belongs to.
func (o *AccessReviewResponse) GetSubscriptionID() (value string, ok bool) {
ok = o != nil && o.bitmap_&256 != 0
ok = o != nil && o.bitmap_&512 != 0
if ok {
value = o.subscriptionID
}
Expand Down
27 changes: 20 additions & 7 deletions authorizations/v1/access_review_response_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ func writeAccessReviewResponse(object *AccessReviewResponse, stream *jsoniter.St
count++
}
present_ = object.bitmap_&32 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("is_ocm_internal")
stream.WriteBool(object.isOCMInternal)
count++
}
present_ = object.bitmap_&64 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -96,7 +105,7 @@ func writeAccessReviewResponse(object *AccessReviewResponse, stream *jsoniter.St
stream.WriteString(object.organizationID)
count++
}
present_ = object.bitmap_&64 != 0
present_ = object.bitmap_&128 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -105,7 +114,7 @@ func writeAccessReviewResponse(object *AccessReviewResponse, stream *jsoniter.St
stream.WriteString(object.reason)
count++
}
present_ = object.bitmap_&128 != 0
present_ = object.bitmap_&256 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand All @@ -114,7 +123,7 @@ func writeAccessReviewResponse(object *AccessReviewResponse, stream *jsoniter.St
stream.WriteString(object.resourceType)
count++
}
present_ = object.bitmap_&256 != 0
present_ = object.bitmap_&512 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -166,22 +175,26 @@ func readAccessReviewResponse(iterator *jsoniter.Iterator) *AccessReviewResponse
value := iterator.ReadString()
object.clusterUUID = value
object.bitmap_ |= 16
case "is_ocm_internal":
value := iterator.ReadBool()
object.isOCMInternal = value
object.bitmap_ |= 32
case "organization_id":
value := iterator.ReadString()
object.organizationID = value
object.bitmap_ |= 32
object.bitmap_ |= 64
case "reason":
value := iterator.ReadString()
object.reason = value
object.bitmap_ |= 64
object.bitmap_ |= 128
case "resource_type":
value := iterator.ReadString()
object.resourceType = value
object.bitmap_ |= 128
object.bitmap_ |= 256
case "subscription_id":
value := iterator.ReadString()
object.subscriptionID = value
object.bitmap_ |= 256
object.bitmap_ |= 512
default:
iterator.ReadAny()
}
Expand Down
Loading

0 comments on commit 47a9734

Please sign in to comment.