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

chore: synchronise to OCM-API-MODEL 0.0.361 #923

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
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.360
model_version:=v0.0.361
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 accountsmgmt/v1/cluster_authorization_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type ClusterAuthorizationRequestBuilder struct {
productCategory string
quotaVersion string
resources []*ReservedResourceBuilder
scope string
byoc bool
disconnected bool
managed bool
Expand Down Expand Up @@ -155,6 +156,13 @@ func (b *ClusterAuthorizationRequestBuilder) Resources(values ...*ReservedResour
return b
}

// Scope sets the value of the 'scope' attribute to the given value.
func (b *ClusterAuthorizationRequestBuilder) Scope(value string) *ClusterAuthorizationRequestBuilder {
b.scope = value
b.bitmap_ |= 32768
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *ClusterAuthorizationRequestBuilder) Copy(object *ClusterAuthorizationRequest) *ClusterAuthorizationRequestBuilder {
if object == nil {
Expand Down Expand Up @@ -183,6 +191,7 @@ func (b *ClusterAuthorizationRequestBuilder) Copy(object *ClusterAuthorizationRe
} else {
b.resources = nil
}
b.scope = object.scope
return b
}

Expand Down Expand Up @@ -213,5 +222,6 @@ func (b *ClusterAuthorizationRequestBuilder) Build() (object *ClusterAuthorizati
}
}
}
object.scope = b.scope
return
}
20 changes: 20 additions & 0 deletions accountsmgmt/v1/cluster_authorization_request_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type ClusterAuthorizationRequest struct {
productCategory string
quotaVersion string
resources []*ReservedResource
scope string
byoc bool
disconnected bool
managed bool
Expand Down Expand Up @@ -329,6 +330,25 @@ func (o *ClusterAuthorizationRequest) GetResources() (value []*ReservedResource,
return
}

// Scope returns the value of the 'scope' attribute, or
// the zero value of the type if the attribute doesn't have a value.
func (o *ClusterAuthorizationRequest) Scope() string {
if o != nil && o.bitmap_&32768 != 0 {
return o.scope
}
return ""
}

// GetScope returns the value of the 'scope' attribute and
// a flag indicating if the attribute has a value.
func (o *ClusterAuthorizationRequest) GetScope() (value string, ok bool) {
ok = o != nil && o.bitmap_&32768 != 0
if ok {
value = o.scope
}
return
}

// ClusterAuthorizationRequestListKind is the name of the type used to represent list of objects of
// type 'cluster_authorization_request'.
const ClusterAuthorizationRequestListKind = "ClusterAuthorizationRequestList"
Expand Down
13 changes: 13 additions & 0 deletions accountsmgmt/v1/cluster_authorization_request_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ func writeClusterAuthorizationRequest(object *ClusterAuthorizationRequest, strea
}
stream.WriteObjectField("resources")
writeReservedResourceList(object.resources, stream)
count++
}
present_ = object.bitmap_&32768 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("scope")
stream.WriteString(object.scope)
}
stream.WriteObjectEnd()
}
Expand Down Expand Up @@ -260,6 +269,10 @@ func readClusterAuthorizationRequest(iterator *jsoniter.Iterator) *ClusterAuthor
value := readReservedResourceList(iterator)
object.resources = value
object.bitmap_ |= 16384
case "scope":
value := iterator.ReadString()
object.scope = value
object.bitmap_ |= 32768
default:
iterator.ReadAny()
}
Expand Down
4,491 changes: 2,249 additions & 2,242 deletions accountsmgmt/v1/openapi.go

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion accountsmgmt/v1/reserved_resource_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type ReservedResourceBuilder struct {
createdAt time.Time
resourceName string
resourceType string
scope string
updatedAt time.Time
byoc bool
}
Expand Down Expand Up @@ -105,10 +106,17 @@ func (b *ReservedResourceBuilder) ResourceType(value string) *ReservedResourceBu
return b
}

// Scope sets the value of the 'scope' attribute to the given value.
func (b *ReservedResourceBuilder) Scope(value string) *ReservedResourceBuilder {
b.scope = value
b.bitmap_ |= 256
return b
}

// UpdatedAt sets the value of the 'updated_at' attribute to the given value.
func (b *ReservedResourceBuilder) UpdatedAt(value time.Time) *ReservedResourceBuilder {
b.updatedAt = value
b.bitmap_ |= 256
b.bitmap_ |= 512
return b
}

Expand All @@ -126,6 +134,7 @@ func (b *ReservedResourceBuilder) Copy(object *ReservedResource) *ReservedResour
b.createdAt = object.createdAt
b.resourceName = object.resourceName
b.resourceType = object.resourceType
b.scope = object.scope
b.updatedAt = object.updatedAt
return b
}
Expand All @@ -142,6 +151,7 @@ func (b *ReservedResourceBuilder) Build() (object *ReservedResource, err error)
object.createdAt = b.createdAt
object.resourceName = b.resourceName
object.resourceType = b.resourceType
object.scope = b.scope
object.updatedAt = b.updatedAt
return
}
24 changes: 22 additions & 2 deletions accountsmgmt/v1/reserved_resource_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type ReservedResource struct {
createdAt time.Time
resourceName string
resourceType string
scope string
updatedAt time.Time
byoc bool
}
Expand Down Expand Up @@ -194,10 +195,29 @@ func (o *ReservedResource) GetResourceType() (value string, ok bool) {
return
}

// Scope returns the value of the 'scope' attribute, or
// the zero value of the type if the attribute doesn't have a value.
func (o *ReservedResource) Scope() string {
if o != nil && o.bitmap_&256 != 0 {
return o.scope
}
return ""
}

// GetScope returns the value of the 'scope' attribute and
// a flag indicating if the attribute has a value.
func (o *ReservedResource) GetScope() (value string, ok bool) {
ok = o != nil && o.bitmap_&256 != 0
if ok {
value = o.scope
}
return
}

// UpdatedAt returns the value of the 'updated_at' attribute, or
// the zero value of the type if the attribute doesn't have a value.
func (o *ReservedResource) UpdatedAt() time.Time {
if o != nil && o.bitmap_&256 != 0 {
if o != nil && o.bitmap_&512 != 0 {
return o.updatedAt
}
return time.Time{}
Expand All @@ -206,7 +226,7 @@ func (o *ReservedResource) UpdatedAt() time.Time {
// GetUpdatedAt returns the value of the 'updated_at' attribute and
// a flag indicating if the attribute has a value.
func (o *ReservedResource) GetUpdatedAt() (value time.Time, ok bool) {
ok = o != nil && o.bitmap_&256 != 0
ok = o != nil && o.bitmap_&512 != 0
if ok {
value = o.updatedAt
}
Expand Down
15 changes: 14 additions & 1 deletion accountsmgmt/v1/reserved_resource_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ func writeReservedResource(object *ReservedResource, stream *jsoniter.Stream) {
count++
}
present_ = object.bitmap_&256 != 0
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("scope")
stream.WriteString(object.scope)
count++
}
present_ = object.bitmap_&512 != 0
if present_ {
if count > 0 {
stream.WriteMore()
Expand Down Expand Up @@ -184,14 +193,18 @@ func readReservedResource(iterator *jsoniter.Iterator) *ReservedResource {
value := iterator.ReadString()
object.resourceType = value
object.bitmap_ |= 128
case "scope":
value := iterator.ReadString()
object.scope = value
object.bitmap_ |= 256
case "updated_at":
text := iterator.ReadString()
value, err := time.Parse(time.RFC3339, text)
if err != nil {
iterator.ReportError("", err.Error())
}
object.updatedAt = value
object.bitmap_ |= 256
object.bitmap_ |= 512
default:
iterator.ReadAny()
}
Expand Down
6 changes: 6 additions & 0 deletions openapi/accounts_mgmt/v1/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -5794,6 +5794,9 @@
"items": {
"$ref": "#/components/schemas/ReservedResource"
}
},
"scope": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -6564,6 +6567,9 @@
"resource_type": {
"type": "string"
},
"scope": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
Expand Down
Loading