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

[OCM-2111]: Add OrganizationId to FeatureReviewRequest type #849

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.373
- Update model version to v0.0.325
- Add `OrganizationId` to `FeatureReviewRequest` type

## 0.1.372
- Update model version to v0.0.324
- Add `CreatedAt` to `LogEntry` type
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.324
model_version:=v0.0.325
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
10 changes: 10 additions & 0 deletions authorizations/v1/feature_review_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type FeatureReviewRequestBuilder struct {
bitmap_ uint32
accountUsername string
feature string
organizationId string
}

// NewFeatureReviewRequest creates a new builder of 'feature_review_request' objects.
Expand All @@ -52,6 +53,13 @@ func (b *FeatureReviewRequestBuilder) Feature(value string) *FeatureReviewReques
return b
}

// OrganizationId sets the value of the 'organization_id' attribute to the given value.
func (b *FeatureReviewRequestBuilder) OrganizationId(value string) *FeatureReviewRequestBuilder {
b.organizationId = value
b.bitmap_ |= 4
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *FeatureReviewRequestBuilder) Copy(object *FeatureReviewRequest) *FeatureReviewRequestBuilder {
if object == nil {
Expand All @@ -60,6 +68,7 @@ func (b *FeatureReviewRequestBuilder) Copy(object *FeatureReviewRequest) *Featur
b.bitmap_ = object.bitmap_
b.accountUsername = object.accountUsername
b.feature = object.feature
b.organizationId = object.organizationId
return b
}

Expand All @@ -69,5 +78,6 @@ func (b *FeatureReviewRequestBuilder) Build() (object *FeatureReviewRequest, err
object.bitmap_ = b.bitmap_
object.accountUsername = b.accountUsername
object.feature = b.feature
object.organizationId = b.organizationId
return
}
24 changes: 24 additions & 0 deletions authorizations/v1/feature_review_request_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type FeatureReviewRequest struct {
bitmap_ uint32
accountUsername string
feature string
organizationId string
}

// Empty returns true if the object is empty, i.e. no attribute has a value.
Expand Down Expand Up @@ -79,6 +80,29 @@ func (o *FeatureReviewRequest) GetFeature() (value string, ok bool) {
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.
//
// Defines the organisation id of the account of which access is being reviewed
func (o *FeatureReviewRequest) OrganizationId() string {
if o != nil && o.bitmap_&4 != 0 {
return o.organizationId
}
return ""
}

// GetOrganizationId returns the value of the 'organization_id' attribute and
// a flag indicating if the attribute has a value.
//
// Defines the organisation id of the account of which access is being reviewed
func (o *FeatureReviewRequest) GetOrganizationId() (value string, ok bool) {
ok = o != nil && o.bitmap_&4 != 0
if ok {
value = o.organizationId
}
return
}

// FeatureReviewRequestListKind is the name of the type used to represent list of objects of
// type 'feature_review_request'.
const FeatureReviewRequestListKind = "FeatureReviewRequestList"
Expand Down
13 changes: 13 additions & 0 deletions authorizations/v1/feature_review_request_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ func writeFeatureReviewRequest(object *FeatureReviewRequest, stream *jsoniter.St
}
stream.WriteObjectField("feature")
stream.WriteString(object.feature)
count++
}
present_ = object.bitmap_&4 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("organization_id")
stream.WriteString(object.organizationId)
}
stream.WriteObjectEnd()
}
Expand Down Expand Up @@ -91,6 +100,10 @@ func readFeatureReviewRequest(iterator *jsoniter.Iterator) *FeatureReviewRequest
value := iterator.ReadString()
object.feature = value
object.bitmap_ |= 2
case "organization_id":
value := iterator.ReadString()
object.organizationId = value
object.bitmap_ |= 4
default:
iterator.ReadAny()
}
Expand Down
1,405 changes: 708 additions & 697 deletions authorizations/v1/openapi.go

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions openapi/authorizations/v1/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,10 @@
"feature": {
"description": "Indicates the feature which can be toggled",
"type": "string"
},
"organization_id": {
"description": "Defines the organisation id of the account of which access is being reviewed",
"type": "string"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ limitations under the License.

package sdk

const Version = "0.1.372"
const Version = "0.1.373"
Loading