Skip to content

Commit

Permalink
user model version 0.0.295, change ReverveAt to ReverveAtTimestamp
Browse files Browse the repository at this point in the history
Signed-off-by: marcolan018 <llan@redhat.com>
  • Loading branch information
marcolan018 committed Jun 26, 2023
1 parent ce71c18 commit 949ae69
Show file tree
Hide file tree
Showing 6 changed files with 8,436 additions and 8,436 deletions.
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 949ae69

Please sign in to comment.