This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
/
model_dynamic_policy.go
307 lines (257 loc) · 9.36 KB
/
model_dynamic_policy.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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
/*
Ndccf_ContextManagement
DCCF Context Management Service. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.1.0-alpha.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi_Ndccf_ContextManagement
import (
"encoding/json"
)
// checks if the DynamicPolicy type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DynamicPolicy{}
// DynamicPolicy A representation of a Dynamic Policy resource.
type DynamicPolicy struct {
// String chosen by the 5GMS AF to serve as an identifier in a resource URI.
DynamicPolicyId string `json:"dynamicPolicyId"`
// String chosen by the 5GMS AF to serve as an identifier in a resource URI.
PolicyTemplateId string `json:"policyTemplateId"`
ServiceDataFlowDescriptions []ServiceDataFlowDescription `json:"serviceDataFlowDescriptions"`
// String chosen by the 5GMS AF to serve as an identifier in a resource URI.
ProvisioningSessionId string `json:"provisioningSessionId"`
QosSpecification *M5QoSSpecification `json:"qosSpecification,omitempty"`
EnforcementMethod *string `json:"enforcementMethod,omitempty"`
EnforcementBitRate *int32 `json:"enforcementBitRate,omitempty"`
}
// NewDynamicPolicy instantiates a new DynamicPolicy 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 NewDynamicPolicy(dynamicPolicyId string, policyTemplateId string, serviceDataFlowDescriptions []ServiceDataFlowDescription, provisioningSessionId string) *DynamicPolicy {
this := DynamicPolicy{}
this.DynamicPolicyId = dynamicPolicyId
this.PolicyTemplateId = policyTemplateId
this.ServiceDataFlowDescriptions = serviceDataFlowDescriptions
this.ProvisioningSessionId = provisioningSessionId
return &this
}
// NewDynamicPolicyWithDefaults instantiates a new DynamicPolicy 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 NewDynamicPolicyWithDefaults() *DynamicPolicy {
this := DynamicPolicy{}
return &this
}
// GetDynamicPolicyId returns the DynamicPolicyId field value
func (o *DynamicPolicy) GetDynamicPolicyId() string {
if o == nil {
var ret string
return ret
}
return o.DynamicPolicyId
}
// GetDynamicPolicyIdOk returns a tuple with the DynamicPolicyId field value
// and a boolean to check if the value has been set.
func (o *DynamicPolicy) GetDynamicPolicyIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DynamicPolicyId, true
}
// SetDynamicPolicyId sets field value
func (o *DynamicPolicy) SetDynamicPolicyId(v string) {
o.DynamicPolicyId = v
}
// GetPolicyTemplateId returns the PolicyTemplateId field value
func (o *DynamicPolicy) GetPolicyTemplateId() string {
if o == nil {
var ret string
return ret
}
return o.PolicyTemplateId
}
// GetPolicyTemplateIdOk returns a tuple with the PolicyTemplateId field value
// and a boolean to check if the value has been set.
func (o *DynamicPolicy) GetPolicyTemplateIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.PolicyTemplateId, true
}
// SetPolicyTemplateId sets field value
func (o *DynamicPolicy) SetPolicyTemplateId(v string) {
o.PolicyTemplateId = v
}
// GetServiceDataFlowDescriptions returns the ServiceDataFlowDescriptions field value
func (o *DynamicPolicy) GetServiceDataFlowDescriptions() []ServiceDataFlowDescription {
if o == nil {
var ret []ServiceDataFlowDescription
return ret
}
return o.ServiceDataFlowDescriptions
}
// GetServiceDataFlowDescriptionsOk returns a tuple with the ServiceDataFlowDescriptions field value
// and a boolean to check if the value has been set.
func (o *DynamicPolicy) GetServiceDataFlowDescriptionsOk() ([]ServiceDataFlowDescription, bool) {
if o == nil {
return nil, false
}
return o.ServiceDataFlowDescriptions, true
}
// SetServiceDataFlowDescriptions sets field value
func (o *DynamicPolicy) SetServiceDataFlowDescriptions(v []ServiceDataFlowDescription) {
o.ServiceDataFlowDescriptions = v
}
// GetProvisioningSessionId returns the ProvisioningSessionId field value
func (o *DynamicPolicy) GetProvisioningSessionId() string {
if o == nil {
var ret string
return ret
}
return o.ProvisioningSessionId
}
// GetProvisioningSessionIdOk returns a tuple with the ProvisioningSessionId field value
// and a boolean to check if the value has been set.
func (o *DynamicPolicy) GetProvisioningSessionIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ProvisioningSessionId, true
}
// SetProvisioningSessionId sets field value
func (o *DynamicPolicy) SetProvisioningSessionId(v string) {
o.ProvisioningSessionId = v
}
// GetQosSpecification returns the QosSpecification field value if set, zero value otherwise.
func (o *DynamicPolicy) GetQosSpecification() M5QoSSpecification {
if o == nil || IsNil(o.QosSpecification) {
var ret M5QoSSpecification
return ret
}
return *o.QosSpecification
}
// GetQosSpecificationOk returns a tuple with the QosSpecification field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DynamicPolicy) GetQosSpecificationOk() (*M5QoSSpecification, bool) {
if o == nil || IsNil(o.QosSpecification) {
return nil, false
}
return o.QosSpecification, true
}
// HasQosSpecification returns a boolean if a field has been set.
func (o *DynamicPolicy) HasQosSpecification() bool {
if o != nil && !IsNil(o.QosSpecification) {
return true
}
return false
}
// SetQosSpecification gets a reference to the given M5QoSSpecification and assigns it to the QosSpecification field.
func (o *DynamicPolicy) SetQosSpecification(v M5QoSSpecification) {
o.QosSpecification = &v
}
// GetEnforcementMethod returns the EnforcementMethod field value if set, zero value otherwise.
func (o *DynamicPolicy) GetEnforcementMethod() string {
if o == nil || IsNil(o.EnforcementMethod) {
var ret string
return ret
}
return *o.EnforcementMethod
}
// GetEnforcementMethodOk returns a tuple with the EnforcementMethod field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DynamicPolicy) GetEnforcementMethodOk() (*string, bool) {
if o == nil || IsNil(o.EnforcementMethod) {
return nil, false
}
return o.EnforcementMethod, true
}
// HasEnforcementMethod returns a boolean if a field has been set.
func (o *DynamicPolicy) HasEnforcementMethod() bool {
if o != nil && !IsNil(o.EnforcementMethod) {
return true
}
return false
}
// SetEnforcementMethod gets a reference to the given string and assigns it to the EnforcementMethod field.
func (o *DynamicPolicy) SetEnforcementMethod(v string) {
o.EnforcementMethod = &v
}
// GetEnforcementBitRate returns the EnforcementBitRate field value if set, zero value otherwise.
func (o *DynamicPolicy) GetEnforcementBitRate() int32 {
if o == nil || IsNil(o.EnforcementBitRate) {
var ret int32
return ret
}
return *o.EnforcementBitRate
}
// GetEnforcementBitRateOk returns a tuple with the EnforcementBitRate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DynamicPolicy) GetEnforcementBitRateOk() (*int32, bool) {
if o == nil || IsNil(o.EnforcementBitRate) {
return nil, false
}
return o.EnforcementBitRate, true
}
// HasEnforcementBitRate returns a boolean if a field has been set.
func (o *DynamicPolicy) HasEnforcementBitRate() bool {
if o != nil && !IsNil(o.EnforcementBitRate) {
return true
}
return false
}
// SetEnforcementBitRate gets a reference to the given int32 and assigns it to the EnforcementBitRate field.
func (o *DynamicPolicy) SetEnforcementBitRate(v int32) {
o.EnforcementBitRate = &v
}
func (o DynamicPolicy) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DynamicPolicy) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["dynamicPolicyId"] = o.DynamicPolicyId
toSerialize["policyTemplateId"] = o.PolicyTemplateId
toSerialize["serviceDataFlowDescriptions"] = o.ServiceDataFlowDescriptions
toSerialize["provisioningSessionId"] = o.ProvisioningSessionId
if !IsNil(o.QosSpecification) {
toSerialize["qosSpecification"] = o.QosSpecification
}
if !IsNil(o.EnforcementMethod) {
toSerialize["enforcementMethod"] = o.EnforcementMethod
}
if !IsNil(o.EnforcementBitRate) {
toSerialize["enforcementBitRate"] = o.EnforcementBitRate
}
return toSerialize, nil
}
type NullableDynamicPolicy struct {
value *DynamicPolicy
isSet bool
}
func (v NullableDynamicPolicy) Get() *DynamicPolicy {
return v.value
}
func (v *NullableDynamicPolicy) Set(val *DynamicPolicy) {
v.value = val
v.isSet = true
}
func (v NullableDynamicPolicy) IsSet() bool {
return v.isSet
}
func (v *NullableDynamicPolicy) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDynamicPolicy(val *DynamicPolicy) *NullableDynamicPolicy {
return &NullableDynamicPolicy{value: val, isSet: true}
}
func (v NullableDynamicPolicy) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDynamicPolicy) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}