Skip to content

Commit b9d42b3

Browse files
committed
OCM-1706 | chore: bump model to v0.0.345
1 parent 6e2ea48 commit b9d42b3

24 files changed

+39119
-36888
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export PATH := $(LOCAL_BIN_PATH):$(PATH)
2727
export CGO_ENABLED=0
2828

2929
# Details of the model to use:
30-
model_version:=v0.0.343
30+
model_version:=v0.0.345
3131
model_url:=https://github.com/openshift-online/ocm-api-model.git
3232

3333
# Details of the metamodel to use:
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
/*
2+
Copyright (c) 2020 Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
18+
// your changes will be lost when the file is generated again.
19+
20+
package v1 // github.com/openshift-online/ocm-sdk-go/accountsmgmt/v1
21+
22+
// NotificationDetailsRequestBuilder contains the data and logic needed to build 'notification_details_request' objects.
23+
//
24+
// This struct is a request to get a templated email to a user related to this.
25+
// subscription/cluster.
26+
type NotificationDetailsRequestBuilder struct {
27+
bitmap_ uint32
28+
bccAddress string
29+
clusterID string
30+
clusterUUID string
31+
subject string
32+
subscriptionID string
33+
includeRedHatAssociates bool
34+
internalOnly bool
35+
}
36+
37+
// NewNotificationDetailsRequest creates a new builder of 'notification_details_request' objects.
38+
func NewNotificationDetailsRequest() *NotificationDetailsRequestBuilder {
39+
return &NotificationDetailsRequestBuilder{}
40+
}
41+
42+
// Empty returns true if the builder is empty, i.e. no attribute has a value.
43+
func (b *NotificationDetailsRequestBuilder) Empty() bool {
44+
return b == nil || b.bitmap_ == 0
45+
}
46+
47+
// BccAddress sets the value of the 'bcc_address' attribute to the given value.
48+
func (b *NotificationDetailsRequestBuilder) BccAddress(value string) *NotificationDetailsRequestBuilder {
49+
b.bccAddress = value
50+
b.bitmap_ |= 1
51+
return b
52+
}
53+
54+
// ClusterID sets the value of the 'cluster_ID' attribute to the given value.
55+
func (b *NotificationDetailsRequestBuilder) ClusterID(value string) *NotificationDetailsRequestBuilder {
56+
b.clusterID = value
57+
b.bitmap_ |= 2
58+
return b
59+
}
60+
61+
// ClusterUUID sets the value of the 'cluster_UUID' attribute to the given value.
62+
func (b *NotificationDetailsRequestBuilder) ClusterUUID(value string) *NotificationDetailsRequestBuilder {
63+
b.clusterUUID = value
64+
b.bitmap_ |= 4
65+
return b
66+
}
67+
68+
// IncludeRedHatAssociates sets the value of the 'include_red_hat_associates' attribute to the given value.
69+
func (b *NotificationDetailsRequestBuilder) IncludeRedHatAssociates(value bool) *NotificationDetailsRequestBuilder {
70+
b.includeRedHatAssociates = value
71+
b.bitmap_ |= 8
72+
return b
73+
}
74+
75+
// InternalOnly sets the value of the 'internal_only' attribute to the given value.
76+
func (b *NotificationDetailsRequestBuilder) InternalOnly(value bool) *NotificationDetailsRequestBuilder {
77+
b.internalOnly = value
78+
b.bitmap_ |= 16
79+
return b
80+
}
81+
82+
// Subject sets the value of the 'subject' attribute to the given value.
83+
func (b *NotificationDetailsRequestBuilder) Subject(value string) *NotificationDetailsRequestBuilder {
84+
b.subject = value
85+
b.bitmap_ |= 32
86+
return b
87+
}
88+
89+
// SubscriptionID sets the value of the 'subscription_ID' attribute to the given value.
90+
func (b *NotificationDetailsRequestBuilder) SubscriptionID(value string) *NotificationDetailsRequestBuilder {
91+
b.subscriptionID = value
92+
b.bitmap_ |= 64
93+
return b
94+
}
95+
96+
// Copy copies the attributes of the given object into this builder, discarding any previous values.
97+
func (b *NotificationDetailsRequestBuilder) Copy(object *NotificationDetailsRequest) *NotificationDetailsRequestBuilder {
98+
if object == nil {
99+
return b
100+
}
101+
b.bitmap_ = object.bitmap_
102+
b.bccAddress = object.bccAddress
103+
b.clusterID = object.clusterID
104+
b.clusterUUID = object.clusterUUID
105+
b.includeRedHatAssociates = object.includeRedHatAssociates
106+
b.internalOnly = object.internalOnly
107+
b.subject = object.subject
108+
b.subscriptionID = object.subscriptionID
109+
return b
110+
}
111+
112+
// Build creates a 'notification_details_request' object using the configuration stored in the builder.
113+
func (b *NotificationDetailsRequestBuilder) Build() (object *NotificationDetailsRequest, err error) {
114+
object = new(NotificationDetailsRequest)
115+
object.bitmap_ = b.bitmap_
116+
object.bccAddress = b.bccAddress
117+
object.clusterID = b.clusterID
118+
object.clusterUUID = b.clusterUUID
119+
object.includeRedHatAssociates = b.includeRedHatAssociates
120+
object.internalOnly = b.internalOnly
121+
object.subject = b.subject
122+
object.subscriptionID = b.subscriptionID
123+
return
124+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
Copyright (c) 2020 Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
18+
// your changes will be lost when the file is generated again.
19+
20+
package v1 // github.com/openshift-online/ocm-sdk-go/accountsmgmt/v1
21+
22+
// NotificationDetailsRequestListBuilder contains the data and logic needed to build
23+
// 'notification_details_request' objects.
24+
type NotificationDetailsRequestListBuilder struct {
25+
items []*NotificationDetailsRequestBuilder
26+
}
27+
28+
// NewNotificationDetailsRequestList creates a new builder of 'notification_details_request' objects.
29+
func NewNotificationDetailsRequestList() *NotificationDetailsRequestListBuilder {
30+
return new(NotificationDetailsRequestListBuilder)
31+
}
32+
33+
// Items sets the items of the list.
34+
func (b *NotificationDetailsRequestListBuilder) Items(values ...*NotificationDetailsRequestBuilder) *NotificationDetailsRequestListBuilder {
35+
b.items = make([]*NotificationDetailsRequestBuilder, len(values))
36+
copy(b.items, values)
37+
return b
38+
}
39+
40+
// Empty returns true if the list is empty.
41+
func (b *NotificationDetailsRequestListBuilder) Empty() bool {
42+
return b == nil || len(b.items) == 0
43+
}
44+
45+
// Copy copies the items of the given list into this builder, discarding any previous items.
46+
func (b *NotificationDetailsRequestListBuilder) Copy(list *NotificationDetailsRequestList) *NotificationDetailsRequestListBuilder {
47+
if list == nil || list.items == nil {
48+
b.items = nil
49+
} else {
50+
b.items = make([]*NotificationDetailsRequestBuilder, len(list.items))
51+
for i, v := range list.items {
52+
b.items[i] = NewNotificationDetailsRequest().Copy(v)
53+
}
54+
}
55+
return b
56+
}
57+
58+
// Build creates a list of 'notification_details_request' objects using the
59+
// configuration stored in the builder.
60+
func (b *NotificationDetailsRequestListBuilder) Build() (list *NotificationDetailsRequestList, err error) {
61+
items := make([]*NotificationDetailsRequest, len(b.items))
62+
for i, item := range b.items {
63+
items[i], err = item.Build()
64+
if err != nil {
65+
return
66+
}
67+
}
68+
list = new(NotificationDetailsRequestList)
69+
list.items = items
70+
return
71+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*
2+
Copyright (c) 2020 Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all
18+
// your changes will be lost when the file is generated again.
19+
20+
package v1 // github.com/openshift-online/ocm-sdk-go/accountsmgmt/v1
21+
22+
import (
23+
"io"
24+
25+
jsoniter "github.com/json-iterator/go"
26+
"github.com/openshift-online/ocm-sdk-go/helpers"
27+
)
28+
29+
// MarshalNotificationDetailsRequestList writes a list of values of the 'notification_details_request' type to
30+
// the given writer.
31+
func MarshalNotificationDetailsRequestList(list []*NotificationDetailsRequest, writer io.Writer) error {
32+
stream := helpers.NewStream(writer)
33+
writeNotificationDetailsRequestList(list, stream)
34+
err := stream.Flush()
35+
if err != nil {
36+
return err
37+
}
38+
return stream.Error
39+
}
40+
41+
// writeNotificationDetailsRequestList writes a list of value of the 'notification_details_request' type to
42+
// the given stream.
43+
func writeNotificationDetailsRequestList(list []*NotificationDetailsRequest, stream *jsoniter.Stream) {
44+
stream.WriteArrayStart()
45+
for i, value := range list {
46+
if i > 0 {
47+
stream.WriteMore()
48+
}
49+
writeNotificationDetailsRequest(value, stream)
50+
}
51+
stream.WriteArrayEnd()
52+
}
53+
54+
// UnmarshalNotificationDetailsRequestList reads a list of values of the 'notification_details_request' type
55+
// from the given source, which can be a slice of bytes, a string or a reader.
56+
func UnmarshalNotificationDetailsRequestList(source interface{}) (items []*NotificationDetailsRequest, err error) {
57+
iterator, err := helpers.NewIterator(source)
58+
if err != nil {
59+
return
60+
}
61+
items = readNotificationDetailsRequestList(iterator)
62+
err = iterator.Error
63+
return
64+
}
65+
66+
// readNotificationDetailsRequestList reads list of values of the ”notification_details_request' type from
67+
// the given iterator.
68+
func readNotificationDetailsRequestList(iterator *jsoniter.Iterator) []*NotificationDetailsRequest {
69+
list := []*NotificationDetailsRequest{}
70+
for iterator.ReadArray() {
71+
item := readNotificationDetailsRequest(iterator)
72+
list = append(list, item)
73+
}
74+
return list
75+
}

0 commit comments

Comments
 (0)