This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
/
model_error_report.go
272 lines (228 loc) · 7.99 KB
/
model_error_report.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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
/*
Npcf_SMPolicyControl API
Session Management Policy Control Service © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.3.0-alpha.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi_Npcf_SMPolicyControl
import (
"encoding/json"
)
// checks if the ErrorReport type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ErrorReport{}
// ErrorReport Contains the rule,policy decision and/or condition data error reports.
type ErrorReport struct {
Error *ProblemDetails `json:"error,omitempty"`
// Used to report the PCC rule failure.
RuleReports []RuleReport `json:"ruleReports,omitempty"`
// Used to report the session rule failure.
SessRuleReports []SessionRuleReport `json:"sessRuleReports,omitempty"`
// Used to report failure of the policy decision and/or condition data.
PolDecFailureReports []PolicyDecisionFailureCode `json:"polDecFailureReports,omitempty"`
// Indicates the invalid parameters for the reported type(s) of the failed policy decision and/or condition data.
InvalidPolicyDecs []InvalidParam `json:"invalidPolicyDecs,omitempty"`
}
// NewErrorReport instantiates a new ErrorReport 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 NewErrorReport() *ErrorReport {
this := ErrorReport{}
return &this
}
// NewErrorReportWithDefaults instantiates a new ErrorReport 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 NewErrorReportWithDefaults() *ErrorReport {
this := ErrorReport{}
return &this
}
// GetError returns the Error field value if set, zero value otherwise.
func (o *ErrorReport) GetError() ProblemDetails {
if o == nil || IsNil(o.Error) {
var ret ProblemDetails
return ret
}
return *o.Error
}
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorReport) GetErrorOk() (*ProblemDetails, bool) {
if o == nil || IsNil(o.Error) {
return nil, false
}
return o.Error, true
}
// HasError returns a boolean if a field has been set.
func (o *ErrorReport) HasError() bool {
if o != nil && !IsNil(o.Error) {
return true
}
return false
}
// SetError gets a reference to the given ProblemDetails and assigns it to the Error field.
func (o *ErrorReport) SetError(v ProblemDetails) {
o.Error = &v
}
// GetRuleReports returns the RuleReports field value if set, zero value otherwise.
func (o *ErrorReport) GetRuleReports() []RuleReport {
if o == nil || IsNil(o.RuleReports) {
var ret []RuleReport
return ret
}
return o.RuleReports
}
// GetRuleReportsOk returns a tuple with the RuleReports field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorReport) GetRuleReportsOk() ([]RuleReport, bool) {
if o == nil || IsNil(o.RuleReports) {
return nil, false
}
return o.RuleReports, true
}
// HasRuleReports returns a boolean if a field has been set.
func (o *ErrorReport) HasRuleReports() bool {
if o != nil && !IsNil(o.RuleReports) {
return true
}
return false
}
// SetRuleReports gets a reference to the given []RuleReport and assigns it to the RuleReports field.
func (o *ErrorReport) SetRuleReports(v []RuleReport) {
o.RuleReports = v
}
// GetSessRuleReports returns the SessRuleReports field value if set, zero value otherwise.
func (o *ErrorReport) GetSessRuleReports() []SessionRuleReport {
if o == nil || IsNil(o.SessRuleReports) {
var ret []SessionRuleReport
return ret
}
return o.SessRuleReports
}
// GetSessRuleReportsOk returns a tuple with the SessRuleReports field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorReport) GetSessRuleReportsOk() ([]SessionRuleReport, bool) {
if o == nil || IsNil(o.SessRuleReports) {
return nil, false
}
return o.SessRuleReports, true
}
// HasSessRuleReports returns a boolean if a field has been set.
func (o *ErrorReport) HasSessRuleReports() bool {
if o != nil && !IsNil(o.SessRuleReports) {
return true
}
return false
}
// SetSessRuleReports gets a reference to the given []SessionRuleReport and assigns it to the SessRuleReports field.
func (o *ErrorReport) SetSessRuleReports(v []SessionRuleReport) {
o.SessRuleReports = v
}
// GetPolDecFailureReports returns the PolDecFailureReports field value if set, zero value otherwise.
func (o *ErrorReport) GetPolDecFailureReports() []PolicyDecisionFailureCode {
if o == nil || IsNil(o.PolDecFailureReports) {
var ret []PolicyDecisionFailureCode
return ret
}
return o.PolDecFailureReports
}
// GetPolDecFailureReportsOk returns a tuple with the PolDecFailureReports field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorReport) GetPolDecFailureReportsOk() ([]PolicyDecisionFailureCode, bool) {
if o == nil || IsNil(o.PolDecFailureReports) {
return nil, false
}
return o.PolDecFailureReports, true
}
// HasPolDecFailureReports returns a boolean if a field has been set.
func (o *ErrorReport) HasPolDecFailureReports() bool {
if o != nil && !IsNil(o.PolDecFailureReports) {
return true
}
return false
}
// SetPolDecFailureReports gets a reference to the given []PolicyDecisionFailureCode and assigns it to the PolDecFailureReports field.
func (o *ErrorReport) SetPolDecFailureReports(v []PolicyDecisionFailureCode) {
o.PolDecFailureReports = v
}
// GetInvalidPolicyDecs returns the InvalidPolicyDecs field value if set, zero value otherwise.
func (o *ErrorReport) GetInvalidPolicyDecs() []InvalidParam {
if o == nil || IsNil(o.InvalidPolicyDecs) {
var ret []InvalidParam
return ret
}
return o.InvalidPolicyDecs
}
// GetInvalidPolicyDecsOk returns a tuple with the InvalidPolicyDecs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorReport) GetInvalidPolicyDecsOk() ([]InvalidParam, bool) {
if o == nil || IsNil(o.InvalidPolicyDecs) {
return nil, false
}
return o.InvalidPolicyDecs, true
}
// HasInvalidPolicyDecs returns a boolean if a field has been set.
func (o *ErrorReport) HasInvalidPolicyDecs() bool {
if o != nil && !IsNil(o.InvalidPolicyDecs) {
return true
}
return false
}
// SetInvalidPolicyDecs gets a reference to the given []InvalidParam and assigns it to the InvalidPolicyDecs field.
func (o *ErrorReport) SetInvalidPolicyDecs(v []InvalidParam) {
o.InvalidPolicyDecs = v
}
func (o ErrorReport) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ErrorReport) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Error) {
toSerialize["error"] = o.Error
}
if !IsNil(o.RuleReports) {
toSerialize["ruleReports"] = o.RuleReports
}
if !IsNil(o.SessRuleReports) {
toSerialize["sessRuleReports"] = o.SessRuleReports
}
if !IsNil(o.PolDecFailureReports) {
toSerialize["polDecFailureReports"] = o.PolDecFailureReports
}
if !IsNil(o.InvalidPolicyDecs) {
toSerialize["invalidPolicyDecs"] = o.InvalidPolicyDecs
}
return toSerialize, nil
}
type NullableErrorReport struct {
value *ErrorReport
isSet bool
}
func (v NullableErrorReport) Get() *ErrorReport {
return v.value
}
func (v *NullableErrorReport) Set(val *ErrorReport) {
v.value = val
v.isSet = true
}
func (v NullableErrorReport) IsSet() bool {
return v.isSet
}
func (v *NullableErrorReport) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableErrorReport(val *ErrorReport) *NullableErrorReport {
return &NullableErrorReport{value: val, isSet: true}
}
func (v NullableErrorReport) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableErrorReport) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}