Skip to content

Commit

Permalink
Bump model to v0.0.335
Browse files Browse the repository at this point in the history
  • Loading branch information
machi1990 committed Nov 3, 2023
1 parent 6661bec commit 0c1394d
Show file tree
Hide file tree
Showing 11 changed files with 1,359 additions and 1,168 deletions.
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.334
model_version:=v0.0.335
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
1,872 changes: 943 additions & 929 deletions clustersmgmt/v1/openapi.go

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions clustersmgmt/v1/subnet_network_verification_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type SubnetNetworkVerificationBuilder struct {
href string
details []string
state string
tags map[string]string
}

// NewSubnetNetworkVerification creates a new builder of 'subnet_network_verification' objects.
Expand Down Expand Up @@ -73,6 +74,17 @@ func (b *SubnetNetworkVerificationBuilder) State(value string) *SubnetNetworkVer
return b
}

// Tags sets the value of the 'tags' attribute to the given value.
func (b *SubnetNetworkVerificationBuilder) Tags(value map[string]string) *SubnetNetworkVerificationBuilder {
b.tags = value
if value != nil {
b.bitmap_ |= 32
} else {
b.bitmap_ &^= 32
}
return b
}

// Copy copies the attributes of the given object into this builder, discarding any previous values.
func (b *SubnetNetworkVerificationBuilder) Copy(object *SubnetNetworkVerification) *SubnetNetworkVerificationBuilder {
if object == nil {
Expand All @@ -88,6 +100,14 @@ func (b *SubnetNetworkVerificationBuilder) Copy(object *SubnetNetworkVerificatio
b.details = nil
}
b.state = object.state
if len(object.tags) > 0 {
b.tags = map[string]string{}
for k, v := range object.tags {
b.tags[k] = v
}
} else {
b.tags = nil
}
return b
}

Expand All @@ -102,5 +122,11 @@ func (b *SubnetNetworkVerificationBuilder) Build() (object *SubnetNetworkVerific
copy(object.details, b.details)
}
object.state = b.state
if b.tags != nil {
object.tags = make(map[string]string)
for k, v := range b.tags {
object.tags[k] = v
}
}
return
}
24 changes: 24 additions & 0 deletions clustersmgmt/v1/subnet_network_verification_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type SubnetNetworkVerification struct {
href string
details []string
state string
tags map[string]string
}

// Kind returns the name of the type of the object.
Expand Down Expand Up @@ -143,6 +144,29 @@ func (o *SubnetNetworkVerification) GetState() (value string, ok bool) {
return
}

// Tags returns the value of the 'tags' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Tags supplied to the network verifier for this subnet.
func (o *SubnetNetworkVerification) Tags() map[string]string {
if o != nil && o.bitmap_&32 != 0 {
return o.tags
}
return nil
}

// GetTags returns the value of the 'tags' attribute and
// a flag indicating if the attribute has a value.
//
// Tags supplied to the network verifier for this subnet.
func (o *SubnetNetworkVerification) GetTags() (value map[string]string, ok bool) {
ok = o != nil && o.bitmap_&32 != 0
if ok {
value = o.tags
}
return
}

// SubnetNetworkVerificationListKind is the name of the type used to represent list of objects of
// type 'subnet_network_verification'.
const SubnetNetworkVerificationListKind = "SubnetNetworkVerificationList"
Expand Down
42 changes: 42 additions & 0 deletions clustersmgmt/v1/subnet_network_verification_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package v1 // github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1

import (
"io"
"sort"

jsoniter "github.com/json-iterator/go"
"github.com/openshift-online/ocm-sdk-go/helpers"
Expand Down Expand Up @@ -81,6 +82,35 @@ func writeSubnetNetworkVerification(object *SubnetNetworkVerification, stream *j
}
stream.WriteObjectField("state")
stream.WriteString(object.state)
count++
}
present_ = object.bitmap_&32 != 0 && object.tags != nil
if present_ {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("tags")
if object.tags != nil {
stream.WriteObjectStart()
keys := make([]string, len(object.tags))
i := 0
for key := range object.tags {
keys[i] = key
i++
}
sort.Strings(keys)
for i, key := range keys {
if i > 0 {
stream.WriteMore()
}
item := object.tags[key]
stream.WriteObjectField(key)
stream.WriteString(item)
}
stream.WriteObjectEnd()
} else {
stream.WriteNil()
}
}
stream.WriteObjectEnd()
}
Expand Down Expand Up @@ -125,6 +155,18 @@ func readSubnetNetworkVerification(iterator *jsoniter.Iterator) *SubnetNetworkVe
value := iterator.ReadString()
object.state = value
object.bitmap_ |= 16
case "tags":
value := map[string]string{}
for {
key := iterator.ReadObject()
if key == "" {
break
}
item := iterator.ReadString()
value[key] = item
}
object.tags = value
object.bitmap_ |= 32
default:
iterator.ReadAny()
}
Expand Down
7 changes: 7 additions & 0 deletions openapi/clusters_mgmt/v1/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -15538,6 +15538,13 @@
"state": {
"description": "State of the subnet network verification.",
"type": "string"
},
"tags": {
"description": "Tags supplied to the network verifier for this subnet.",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
Expand Down
7 changes: 7 additions & 0 deletions openapi/service_logs/v1/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,13 @@
"description": "Full description of the log entry content (supports Markdown format as well).",
"type": "string"
},
"doc_references": {
"description": "The list of documentation references (i.e links) contained in the event.",
"type": "array",
"items": {
"type": "string"
}
},
"event_stream_id": {
"description": "Log custom event id for a simple search of related cluster logs.",
"type": "string"
Expand Down
37 changes: 28 additions & 9 deletions servicelogs/v1/log_entry_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type LogEntryBuilder struct {
createdAt time.Time
createdBy string
description string
docReferences []string
eventStreamID string
logType LogType
serviceName string
Expand Down Expand Up @@ -109,17 +110,25 @@ func (b *LogEntryBuilder) Description(value string) *LogEntryBuilder {
return b
}

// DocReferences sets the value of the 'doc_references' attribute to the given values.
func (b *LogEntryBuilder) DocReferences(values ...string) *LogEntryBuilder {
b.docReferences = make([]string, len(values))
copy(b.docReferences, values)
b.bitmap_ |= 256
return b
}

// EventStreamID sets the value of the 'event_stream_ID' attribute to the given value.
func (b *LogEntryBuilder) EventStreamID(value string) *LogEntryBuilder {
b.eventStreamID = value
b.bitmap_ |= 256
b.bitmap_ |= 512
return b
}

// InternalOnly sets the value of the 'internal_only' attribute to the given value.
func (b *LogEntryBuilder) InternalOnly(value bool) *LogEntryBuilder {
b.internalOnly = value
b.bitmap_ |= 512
b.bitmap_ |= 1024
return b
}

Expand All @@ -128,49 +137,49 @@ func (b *LogEntryBuilder) InternalOnly(value bool) *LogEntryBuilder {
// Representation of the log type field used in cluster log type model.
func (b *LogEntryBuilder) LogType(value LogType) *LogEntryBuilder {
b.logType = value
b.bitmap_ |= 1024
b.bitmap_ |= 2048
return b
}

// ServiceName sets the value of the 'service_name' attribute to the given value.
func (b *LogEntryBuilder) ServiceName(value string) *LogEntryBuilder {
b.serviceName = value
b.bitmap_ |= 2048
b.bitmap_ |= 4096
return b
}

// Severity sets the value of the 'severity' attribute to the given value.
func (b *LogEntryBuilder) Severity(value Severity) *LogEntryBuilder {
b.severity = value
b.bitmap_ |= 4096
b.bitmap_ |= 8192
return b
}

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

// Summary sets the value of the 'summary' attribute to the given value.
func (b *LogEntryBuilder) Summary(value string) *LogEntryBuilder {
b.summary = value
b.bitmap_ |= 16384
b.bitmap_ |= 32768
return b
}

// Timestamp sets the value of the 'timestamp' attribute to the given value.
func (b *LogEntryBuilder) Timestamp(value time.Time) *LogEntryBuilder {
b.timestamp = value
b.bitmap_ |= 32768
b.bitmap_ |= 65536
return b
}

// Username sets the value of the 'username' attribute to the given value.
func (b *LogEntryBuilder) Username(value string) *LogEntryBuilder {
b.username = value
b.bitmap_ |= 65536
b.bitmap_ |= 131072
return b
}

Expand All @@ -187,6 +196,12 @@ func (b *LogEntryBuilder) Copy(object *LogEntry) *LogEntryBuilder {
b.createdAt = object.createdAt
b.createdBy = object.createdBy
b.description = object.description
if object.docReferences != nil {
b.docReferences = make([]string, len(object.docReferences))
copy(b.docReferences, object.docReferences)
} else {
b.docReferences = nil
}
b.eventStreamID = object.eventStreamID
b.internalOnly = object.internalOnly
b.logType = object.logType
Expand All @@ -210,6 +225,10 @@ func (b *LogEntryBuilder) Build() (object *LogEntry, err error) {
object.createdAt = b.createdAt
object.createdBy = b.createdBy
object.description = b.description
if b.docReferences != nil {
object.docReferences = make([]string, len(b.docReferences))
copy(object.docReferences, b.docReferences)
}
object.eventStreamID = b.eventStreamID
object.internalOnly = b.internalOnly
object.logType = b.logType
Expand Down
Loading

0 comments on commit 0c1394d

Please sign in to comment.