Skip to content

Commit

Permalink
Merge pull request #719 from gshilin-sdb/v0_1_313
Browse files Browse the repository at this point in the history
Bump api model 0.0.253 and Release 0.1.313
  • Loading branch information
ciaranRoche authored Feb 1, 2023
2 parents d7d71d7 + ca97016 commit 0fe1485
Show file tree
Hide file tree
Showing 8 changed files with 1,563 additions and 1,558 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.313
- Update to model v0.0.253
- Update Permission resource attributes
* Rename ResourceType to Resource

## 0.1.312
- Update to metamodel 0.0.57

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.252
model_version:=v0.0.253
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
3,060 changes: 1,530 additions & 1,530 deletions accountsmgmt/v1/openapi.go

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions accountsmgmt/v1/permission_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ package v1 // github.com/openshift-online/ocm-sdk-go/accountsmgmt/v1

// PermissionBuilder contains the data and logic needed to build 'permission' objects.
type PermissionBuilder struct {
bitmap_ uint32
id string
href string
action Action
resourceType string
bitmap_ uint32
id string
href string
action Action
resource string
}

// NewPermission creates a new builder of 'permission' objects.
Expand Down Expand Up @@ -67,9 +67,9 @@ func (b *PermissionBuilder) Action(value Action) *PermissionBuilder {
return b
}

// ResourceType sets the value of the 'resource_type' attribute to the given value.
func (b *PermissionBuilder) ResourceType(value string) *PermissionBuilder {
b.resourceType = value
// Resource sets the value of the 'resource' attribute to the given value.
func (b *PermissionBuilder) Resource(value string) *PermissionBuilder {
b.resource = value
b.bitmap_ |= 16
return b
}
Expand All @@ -83,7 +83,7 @@ func (b *PermissionBuilder) Copy(object *Permission) *PermissionBuilder {
b.id = object.id
b.href = object.href
b.action = object.action
b.resourceType = object.resourceType
b.resource = object.resource
return b
}

Expand All @@ -94,6 +94,6 @@ func (b *PermissionBuilder) Build() (object *Permission, err error) {
object.href = b.href
object.bitmap_ = b.bitmap_
object.action = b.action
object.resourceType = b.resourceType
object.resource = b.resource
return
}
22 changes: 11 additions & 11 deletions accountsmgmt/v1/permission_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ const PermissionNilKind = "PermissionNil"

// Permission represents the values of the 'permission' type.
type Permission struct {
bitmap_ uint32
id string
href string
action Action
resourceType string
bitmap_ uint32
id string
href string
action Action
resource string
}

// Kind returns the name of the type of the object.
Expand Down Expand Up @@ -116,21 +116,21 @@ func (o *Permission) GetAction() (value Action, ok bool) {
return
}

// ResourceType returns the value of the 'resource_type' attribute, or
// Resource returns the value of the 'resource' attribute, or
// the zero value of the type if the attribute doesn't have a value.
func (o *Permission) ResourceType() string {
func (o *Permission) Resource() string {
if o != nil && o.bitmap_&16 != 0 {
return o.resourceType
return o.resource
}
return ""
}

// GetResourceType returns the value of the 'resource_type' attribute and
// GetResource returns the value of the 'resource' attribute and
// a flag indicating if the attribute has a value.
func (o *Permission) GetResourceType() (value string, ok bool) {
func (o *Permission) GetResource() (value string, ok bool) {
ok = o != nil && o.bitmap_&16 != 0
if ok {
value = o.resourceType
value = o.resource
}
return
}
Expand Down
8 changes: 4 additions & 4 deletions accountsmgmt/v1/permission_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ func writePermission(object *Permission, stream *jsoniter.Stream) {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("resource_type")
stream.WriteString(object.resourceType)
stream.WriteObjectField("resource")
stream.WriteString(object.resource)
}
stream.WriteObjectEnd()
}
Expand Down Expand Up @@ -122,9 +122,9 @@ func readPermission(iterator *jsoniter.Iterator) *Permission {
value := Action(text)
object.action = value
object.bitmap_ |= 8
case "resource_type":
case "resource":
value := iterator.ReadString()
object.resourceType = value
object.resource = value
object.bitmap_ |= 16
default:
iterator.ReadAny()
Expand Down
2 changes: 1 addition & 1 deletion openapi/accounts_mgmt/v1/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -5976,7 +5976,7 @@
"action": {
"$ref": "#/components/schemas/Action"
},
"resource_type": {
"resource": {
"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.312"
const Version = "0.1.313"

0 comments on commit 0fe1485

Please sign in to comment.