This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
/
model_notify_comments.go
238 lines (199 loc) · 6.53 KB
/
model_notify_comments.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
/*
Fault Supervision MnS
OAS 3.0.1 definition of the Fault Supervision MnS © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 17.2.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi_FaultMnS
import (
"encoding/json"
)
// checks if the NotifyComments type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &NotifyComments{}
// NotifyComments struct for NotifyComments
type NotifyComments struct {
NotificationHeader
AlarmId string `json:"alarmId"`
AlarmType AlarmType `json:"alarmType"`
ProbableCause ProbableCause `json:"probableCause"`
PerceivedSeverity PerceivedSeverity `json:"perceivedSeverity"`
// Collection of comments. The comment identifiers are allocated by the MnS producer and used as key in the map.
Comments map[string]Comment `json:"comments"`
}
// NewNotifyComments instantiates a new NotifyComments object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewNotifyComments(alarmId string, alarmType AlarmType, probableCause ProbableCause, perceivedSeverity PerceivedSeverity, comments map[string]Comment, href string, notificationId int32, notificationType NotificationType, eventTime time.Time, systemDN string) *NotifyComments {
this := NotifyComments{}
this.Href = href
this.NotificationId = notificationId
this.NotificationType = notificationType
this.EventTime = eventTime
this.SystemDN = systemDN
this.AlarmId = alarmId
this.AlarmType = alarmType
this.ProbableCause = probableCause
this.PerceivedSeverity = perceivedSeverity
this.Comments = comments
return &this
}
// NewNotifyCommentsWithDefaults instantiates a new NotifyComments object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewNotifyCommentsWithDefaults() *NotifyComments {
this := NotifyComments{}
return &this
}
// GetAlarmId returns the AlarmId field value
func (o *NotifyComments) GetAlarmId() string {
if o == nil {
var ret string
return ret
}
return o.AlarmId
}
// GetAlarmIdOk returns a tuple with the AlarmId field value
// and a boolean to check if the value has been set.
func (o *NotifyComments) GetAlarmIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.AlarmId, true
}
// SetAlarmId sets field value
func (o *NotifyComments) SetAlarmId(v string) {
o.AlarmId = v
}
// GetAlarmType returns the AlarmType field value
func (o *NotifyComments) GetAlarmType() AlarmType {
if o == nil {
var ret AlarmType
return ret
}
return o.AlarmType
}
// GetAlarmTypeOk returns a tuple with the AlarmType field value
// and a boolean to check if the value has been set.
func (o *NotifyComments) GetAlarmTypeOk() (*AlarmType, bool) {
if o == nil {
return nil, false
}
return &o.AlarmType, true
}
// SetAlarmType sets field value
func (o *NotifyComments) SetAlarmType(v AlarmType) {
o.AlarmType = v
}
// GetProbableCause returns the ProbableCause field value
func (o *NotifyComments) GetProbableCause() ProbableCause {
if o == nil {
var ret ProbableCause
return ret
}
return o.ProbableCause
}
// GetProbableCauseOk returns a tuple with the ProbableCause field value
// and a boolean to check if the value has been set.
func (o *NotifyComments) GetProbableCauseOk() (*ProbableCause, bool) {
if o == nil {
return nil, false
}
return &o.ProbableCause, true
}
// SetProbableCause sets field value
func (o *NotifyComments) SetProbableCause(v ProbableCause) {
o.ProbableCause = v
}
// GetPerceivedSeverity returns the PerceivedSeverity field value
func (o *NotifyComments) GetPerceivedSeverity() PerceivedSeverity {
if o == nil {
var ret PerceivedSeverity
return ret
}
return o.PerceivedSeverity
}
// GetPerceivedSeverityOk returns a tuple with the PerceivedSeverity field value
// and a boolean to check if the value has been set.
func (o *NotifyComments) GetPerceivedSeverityOk() (*PerceivedSeverity, bool) {
if o == nil {
return nil, false
}
return &o.PerceivedSeverity, true
}
// SetPerceivedSeverity sets field value
func (o *NotifyComments) SetPerceivedSeverity(v PerceivedSeverity) {
o.PerceivedSeverity = v
}
// GetComments returns the Comments field value
func (o *NotifyComments) GetComments() map[string]Comment {
if o == nil {
var ret map[string]Comment
return ret
}
return o.Comments
}
// GetCommentsOk returns a tuple with the Comments field value
// and a boolean to check if the value has been set.
func (o *NotifyComments) GetCommentsOk() (*map[string]Comment, bool) {
if o == nil {
return nil, false
}
return &o.Comments, true
}
// SetComments sets field value
func (o *NotifyComments) SetComments(v map[string]Comment) {
o.Comments = v
}
func (o NotifyComments) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o NotifyComments) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
serializedNotificationHeader, errNotificationHeader := json.Marshal(o.NotificationHeader)
if errNotificationHeader != nil {
return map[string]interface{}{}, errNotificationHeader
}
errNotificationHeader = json.Unmarshal([]byte(serializedNotificationHeader), &toSerialize)
if errNotificationHeader != nil {
return map[string]interface{}{}, errNotificationHeader
}
toSerialize["alarmId"] = o.AlarmId
toSerialize["alarmType"] = o.AlarmType
toSerialize["probableCause"] = o.ProbableCause
toSerialize["perceivedSeverity"] = o.PerceivedSeverity
toSerialize["comments"] = o.Comments
return toSerialize, nil
}
type NullableNotifyComments struct {
value *NotifyComments
isSet bool
}
func (v NullableNotifyComments) Get() *NotifyComments {
return v.value
}
func (v *NullableNotifyComments) Set(val *NotifyComments) {
v.value = val
v.isSet = true
}
func (v NullableNotifyComments) IsSet() bool {
return v.isSet
}
func (v *NullableNotifyComments) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNotifyComments(val *NotifyComments) *NullableNotifyComments {
return &NullableNotifyComments{value: val, isSet: true}
}
func (v NullableNotifyComments) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNotifyComments) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}