|
| 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 | +} |
0 commit comments