Skip to content

Commit

Permalink
Merge pull request #796 from marcolan018/ocm-2220
Browse files Browse the repository at this point in the history
use model version 0.0.295, change ReverveAt to ReverveAtTimestamp
  • Loading branch information
gdbranco authored Jun 26, 2023
2 parents ce71c18 + 580cf92 commit fa94460
Show file tree
Hide file tree
Showing 8 changed files with 8,444 additions and 8,437 deletions.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This document describes the relevant changes between releases of the OCM API
SDK.
## 0.1.350
- Update model version v0.0.294
- Add `DeleteAssociatedResources` locator to account resource
- Update model version v0.0.295
- Update `ReverveAt` to `ReverveAtTimestamp` in dns domain type
- Update metamodel version 0.0.59:
- Honor`@http` annotation for query parameters

## 0.1.349
- Update model to version v0.0.293
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.294
model_version:=v0.0.295
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
Expand Down
22 changes: 11 additions & 11 deletions clustersmgmt/v1/dns_domain_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import (
//
// Contains the properties of a DNS domain.
type DNSDomainBuilder struct {
bitmap_ uint32
id string
href string
clusterLink *ClusterLinkBuilder
organizationLink *OrganizationLinkBuilder
reservedAt time.Time
bitmap_ uint32
id string
href string
clusterLink *ClusterLinkBuilder
organizationLink *OrganizationLinkBuilder
reservedAtTimestamp time.Time
}

// NewDNSDomain creates a new builder of 'DNS_domain' objects.
Expand Down Expand Up @@ -91,9 +91,9 @@ func (b *DNSDomainBuilder) OrganizationLink(value *OrganizationLinkBuilder) *DNS
return b
}

// ReservedAt sets the value of the 'reserved_at' attribute to the given value.
func (b *DNSDomainBuilder) ReservedAt(value time.Time) *DNSDomainBuilder {
b.reservedAt = value
// ReservedAtTimestamp sets the value of the 'reserved_at_timestamp' attribute to the given value.
func (b *DNSDomainBuilder) ReservedAtTimestamp(value time.Time) *DNSDomainBuilder {
b.reservedAtTimestamp = value
b.bitmap_ |= 32
return b
}
Expand All @@ -116,7 +116,7 @@ func (b *DNSDomainBuilder) Copy(object *DNSDomain) *DNSDomainBuilder {
} else {
b.organizationLink = nil
}
b.reservedAt = object.reservedAt
b.reservedAtTimestamp = object.reservedAtTimestamp
return b
}

Expand All @@ -138,6 +138,6 @@ func (b *DNSDomainBuilder) Build() (object *DNSDomain, err error) {
return
}
}
object.reservedAt = b.reservedAt
object.reservedAtTimestamp = b.reservedAtTimestamp
return
}
24 changes: 12 additions & 12 deletions clustersmgmt/v1/dns_domain_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ const DNSDomainNilKind = "DNSDomainNil"
//
// Contains the properties of a DNS domain.
type DNSDomain struct {
bitmap_ uint32
id string
href string
clusterLink *ClusterLink
organizationLink *OrganizationLink
reservedAt time.Time
bitmap_ uint32
id string
href string
clusterLink *ClusterLink
organizationLink *OrganizationLink
reservedAtTimestamp time.Time
}

// Kind returns the name of the type of the object.
Expand Down Expand Up @@ -150,25 +150,25 @@ func (o *DNSDomain) GetOrganizationLink() (value *OrganizationLink, ok bool) {
return
}

// ReservedAt returns the value of the 'reserved_at' attribute, or
// ReservedAtTimestamp returns the value of the 'reserved_at_timestamp' attribute, or
// the zero value of the type if the attribute doesn't have a value.
//
// Date and time when the DNS domain was reserved.
func (o *DNSDomain) ReservedAt() time.Time {
func (o *DNSDomain) ReservedAtTimestamp() time.Time {
if o != nil && o.bitmap_&32 != 0 {
return o.reservedAt
return o.reservedAtTimestamp
}
return time.Time{}
}

// GetReservedAt returns the value of the 'reserved_at' attribute and
// GetReservedAtTimestamp returns the value of the 'reserved_at_timestamp' attribute and
// a flag indicating if the attribute has a value.
//
// Date and time when the DNS domain was reserved.
func (o *DNSDomain) GetReservedAt() (value time.Time, ok bool) {
func (o *DNSDomain) GetReservedAtTimestamp() (value time.Time, ok bool) {
ok = o != nil && o.bitmap_&32 != 0
if ok {
value = o.reservedAt
value = o.reservedAtTimestamp
}
return
}
Expand Down
8 changes: 4 additions & 4 deletions clustersmgmt/v1/dns_domain_type_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ func writeDNSDomain(object *DNSDomain, stream *jsoniter.Stream) {
if count > 0 {
stream.WriteMore()
}
stream.WriteObjectField("reserved_at")
stream.WriteString((object.reservedAt).Format(time.RFC3339))
stream.WriteObjectField("reserved_at_timestamp")
stream.WriteString((object.reservedAtTimestamp).Format(time.RFC3339))
}
stream.WriteObjectEnd()
}
Expand Down Expand Up @@ -135,13 +135,13 @@ func readDNSDomain(iterator *jsoniter.Iterator) *DNSDomain {
value := readOrganizationLink(iterator)
object.organizationLink = value
object.bitmap_ |= 16
case "reserved_at":
case "reserved_at_timestamp":
text := iterator.ReadString()
value, err := time.Parse(time.RFC3339, text)
if err != nil {
iterator.ReportError("", err.Error())
}
object.reservedAt = value
object.reservedAtTimestamp = value
object.bitmap_ |= 32
default:
iterator.ReadAny()
Expand Down
Loading

0 comments on commit fa94460

Please sign in to comment.