Skip to content

Commit

Permalink
chore: bump api-model to v0.0.291
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbranco committed Jun 15, 2023
1 parent c2137b7 commit 7175930
Show file tree
Hide file tree
Showing 31 changed files with 13,219 additions and 10,881 deletions.
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.290
model_version:=v0.0.291
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
14 changes: 12 additions & 2 deletions authorizations/v1/access_review_response_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type AccessReviewResponseBuilder struct {
clusterID string
clusterUUID string
organizationID string
reason string
resourceType string
subscriptionID string
allowed bool
Expand Down Expand Up @@ -86,17 +87,24 @@ func (b *AccessReviewResponseBuilder) OrganizationID(value string) *AccessReview
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
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_ |= 64
b.bitmap_ |= 128
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_ |= 128
b.bitmap_ |= 256
return b
}

Expand All @@ -112,6 +120,7 @@ func (b *AccessReviewResponseBuilder) Copy(object *AccessReviewResponse) *Access
b.clusterID = object.clusterID
b.clusterUUID = object.clusterUUID
b.organizationID = object.organizationID
b.reason = object.reason
b.resourceType = object.resourceType
b.subscriptionID = object.subscriptionID
return b
Expand All @@ -127,6 +136,7 @@ func (b *AccessReviewResponseBuilder) Build() (object *AccessReviewResponse, err
object.clusterID = b.clusterID
object.clusterUUID = b.clusterUUID
object.organizationID = b.organizationID
object.reason = b.reason
object.resourceType = b.resourceType
object.subscriptionID = b.subscriptionID
return
Expand Down
32 changes: 28 additions & 4 deletions authorizations/v1/access_review_response_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type AccessReviewResponse struct {
clusterID string
clusterUUID string
organizationID string
reason string
resourceType string
subscriptionID string
allowed bool
Expand Down Expand Up @@ -177,13 +178,36 @@ func (o *AccessReviewResponse) GetOrganizationID() (value string, ok bool) {
return
}

// 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)
func (o *AccessReviewResponse) Reason() string {
if o != nil && o.bitmap_&64 != 0 {
return o.reason
}
return ""
}

// 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)
func (o *AccessReviewResponse) GetReason() (value string, ok bool) {
ok = o != nil && o.bitmap_&64 != 0
if ok {
value = o.reason
}
return
}

// ResourceType returns the value of the 'resource_type' attribute, or
// 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
func (o *AccessReviewResponse) ResourceType() string {
if o != nil && o.bitmap_&64 != 0 {
if o != nil && o.bitmap_&128 != 0 {
return o.resourceType
}
return ""
Expand All @@ -195,7 +219,7 @@ func (o *AccessReviewResponse) ResourceType() string {
// 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
func (o *AccessReviewResponse) GetResourceType() (value string, ok bool) {
ok = o != nil && o.bitmap_&64 != 0
ok = o != nil && o.bitmap_&128 != 0
if ok {
value = o.resourceType
}
Expand All @@ -207,7 +231,7 @@ func (o *AccessReviewResponse) GetResourceType() (value string, ok bool) {
//
// Indicates which Subscription the resource type belongs to
func (o *AccessReviewResponse) SubscriptionID() string {
if o != nil && o.bitmap_&128 != 0 {
if o != nil && o.bitmap_&256 != 0 {
return o.subscriptionID
}
return ""
Expand All @@ -218,7 +242,7 @@ func (o *AccessReviewResponse) SubscriptionID() string {
//
// Indicates which Subscription the resource type belongs to
func (o *AccessReviewResponse) GetSubscriptionID() (value string, ok bool) {
ok = o != nil && o.bitmap_&128 != 0
ok = o != nil && o.bitmap_&256 != 0
if ok {
value = o.subscriptionID
}
Expand Down
19 changes: 16 additions & 3 deletions authorizations/v1/access_review_response_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ func writeAccessReviewResponse(object *AccessReviewResponse, stream *jsoniter.St
count++
}
present_ = object.bitmap_&64 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("reason")
stream.WriteString(object.reason)
count++
}
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.resourceType)
count++
}
present_ = object.bitmap_&128 != 0
present_ = object.bitmap_&256 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -161,14 +170,18 @@ func readAccessReviewResponse(iterator *jsoniter.Iterator) *AccessReviewResponse
value := iterator.ReadString()
object.organizationID = value
object.bitmap_ |= 32
case "reason":
value := iterator.ReadString()
object.reason = value
object.bitmap_ |= 64
case "resource_type":
value := iterator.ReadString()
object.resourceType = value
object.bitmap_ |= 64
object.bitmap_ |= 128
case "subscription_id":
value := iterator.ReadString()
object.subscriptionID = value
object.bitmap_ |= 128
object.bitmap_ |= 256
default:
iterator.ReadAny()
}
Expand Down
Loading

0 comments on commit 7175930

Please sign in to comment.