This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
/
model_granted_unit.go
311 lines (262 loc) · 8.81 KB
/
model_granted_unit.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
308
309
310
311
/*
Nchf_ConvergedCharging
ConvergedCharging Service © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 3.2.0-alpha.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi_Nchf_ConvergedCharging
import (
"encoding/json"
"time"
)
// checks if the GrantedUnit type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GrantedUnit{}
// GrantedUnit struct for GrantedUnit
type GrantedUnit struct {
// string with format 'date-time' as defined in OpenAPI.
TariffTimeChange *time.Time `json:"tariffTimeChange,omitempty"`
// Integer where the allowed values correspond to the value range of an unsigned 32-bit integer.
Time *int32 `json:"time,omitempty"`
// Integer where the allowed values correspond to the value range of an unsigned 64-bit integer.
TotalVolume *int32 `json:"totalVolume,omitempty"`
// Integer where the allowed values correspond to the value range of an unsigned 64-bit integer.
UplinkVolume *int32 `json:"uplinkVolume,omitempty"`
// Integer where the allowed values correspond to the value range of an unsigned 64-bit integer.
DownlinkVolume *int32 `json:"downlinkVolume,omitempty"`
// Integer where the allowed values correspond to the value range of an unsigned 64-bit integer.
ServiceSpecificUnits *int32 `json:"serviceSpecificUnits,omitempty"`
}
// NewGrantedUnit instantiates a new GrantedUnit 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 NewGrantedUnit() *GrantedUnit {
this := GrantedUnit{}
return &this
}
// NewGrantedUnitWithDefaults instantiates a new GrantedUnit 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 NewGrantedUnitWithDefaults() *GrantedUnit {
this := GrantedUnit{}
return &this
}
// GetTariffTimeChange returns the TariffTimeChange field value if set, zero value otherwise.
func (o *GrantedUnit) GetTariffTimeChange() time.Time {
if o == nil || IsNil(o.TariffTimeChange) {
var ret time.Time
return ret
}
return *o.TariffTimeChange
}
// GetTariffTimeChangeOk returns a tuple with the TariffTimeChange field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GrantedUnit) GetTariffTimeChangeOk() (*time.Time, bool) {
if o == nil || IsNil(o.TariffTimeChange) {
return nil, false
}
return o.TariffTimeChange, true
}
// HasTariffTimeChange returns a boolean if a field has been set.
func (o *GrantedUnit) HasTariffTimeChange() bool {
if o != nil && !IsNil(o.TariffTimeChange) {
return true
}
return false
}
// SetTariffTimeChange gets a reference to the given time.Time and assigns it to the TariffTimeChange field.
func (o *GrantedUnit) SetTariffTimeChange(v time.Time) {
o.TariffTimeChange = &v
}
// GetTime returns the Time field value if set, zero value otherwise.
func (o *GrantedUnit) GetTime() int32 {
if o == nil || IsNil(o.Time) {
var ret int32
return ret
}
return *o.Time
}
// GetTimeOk returns a tuple with the Time field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GrantedUnit) GetTimeOk() (*int32, bool) {
if o == nil || IsNil(o.Time) {
return nil, false
}
return o.Time, true
}
// HasTime returns a boolean if a field has been set.
func (o *GrantedUnit) HasTime() bool {
if o != nil && !IsNil(o.Time) {
return true
}
return false
}
// SetTime gets a reference to the given int32 and assigns it to the Time field.
func (o *GrantedUnit) SetTime(v int32) {
o.Time = &v
}
// GetTotalVolume returns the TotalVolume field value if set, zero value otherwise.
func (o *GrantedUnit) GetTotalVolume() int32 {
if o == nil || IsNil(o.TotalVolume) {
var ret int32
return ret
}
return *o.TotalVolume
}
// GetTotalVolumeOk returns a tuple with the TotalVolume field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GrantedUnit) GetTotalVolumeOk() (*int32, bool) {
if o == nil || IsNil(o.TotalVolume) {
return nil, false
}
return o.TotalVolume, true
}
// HasTotalVolume returns a boolean if a field has been set.
func (o *GrantedUnit) HasTotalVolume() bool {
if o != nil && !IsNil(o.TotalVolume) {
return true
}
return false
}
// SetTotalVolume gets a reference to the given int32 and assigns it to the TotalVolume field.
func (o *GrantedUnit) SetTotalVolume(v int32) {
o.TotalVolume = &v
}
// GetUplinkVolume returns the UplinkVolume field value if set, zero value otherwise.
func (o *GrantedUnit) GetUplinkVolume() int32 {
if o == nil || IsNil(o.UplinkVolume) {
var ret int32
return ret
}
return *o.UplinkVolume
}
// GetUplinkVolumeOk returns a tuple with the UplinkVolume field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GrantedUnit) GetUplinkVolumeOk() (*int32, bool) {
if o == nil || IsNil(o.UplinkVolume) {
return nil, false
}
return o.UplinkVolume, true
}
// HasUplinkVolume returns a boolean if a field has been set.
func (o *GrantedUnit) HasUplinkVolume() bool {
if o != nil && !IsNil(o.UplinkVolume) {
return true
}
return false
}
// SetUplinkVolume gets a reference to the given int32 and assigns it to the UplinkVolume field.
func (o *GrantedUnit) SetUplinkVolume(v int32) {
o.UplinkVolume = &v
}
// GetDownlinkVolume returns the DownlinkVolume field value if set, zero value otherwise.
func (o *GrantedUnit) GetDownlinkVolume() int32 {
if o == nil || IsNil(o.DownlinkVolume) {
var ret int32
return ret
}
return *o.DownlinkVolume
}
// GetDownlinkVolumeOk returns a tuple with the DownlinkVolume field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GrantedUnit) GetDownlinkVolumeOk() (*int32, bool) {
if o == nil || IsNil(o.DownlinkVolume) {
return nil, false
}
return o.DownlinkVolume, true
}
// HasDownlinkVolume returns a boolean if a field has been set.
func (o *GrantedUnit) HasDownlinkVolume() bool {
if o != nil && !IsNil(o.DownlinkVolume) {
return true
}
return false
}
// SetDownlinkVolume gets a reference to the given int32 and assigns it to the DownlinkVolume field.
func (o *GrantedUnit) SetDownlinkVolume(v int32) {
o.DownlinkVolume = &v
}
// GetServiceSpecificUnits returns the ServiceSpecificUnits field value if set, zero value otherwise.
func (o *GrantedUnit) GetServiceSpecificUnits() int32 {
if o == nil || IsNil(o.ServiceSpecificUnits) {
var ret int32
return ret
}
return *o.ServiceSpecificUnits
}
// GetServiceSpecificUnitsOk returns a tuple with the ServiceSpecificUnits field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GrantedUnit) GetServiceSpecificUnitsOk() (*int32, bool) {
if o == nil || IsNil(o.ServiceSpecificUnits) {
return nil, false
}
return o.ServiceSpecificUnits, true
}
// HasServiceSpecificUnits returns a boolean if a field has been set.
func (o *GrantedUnit) HasServiceSpecificUnits() bool {
if o != nil && !IsNil(o.ServiceSpecificUnits) {
return true
}
return false
}
// SetServiceSpecificUnits gets a reference to the given int32 and assigns it to the ServiceSpecificUnits field.
func (o *GrantedUnit) SetServiceSpecificUnits(v int32) {
o.ServiceSpecificUnits = &v
}
func (o GrantedUnit) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GrantedUnit) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.TariffTimeChange) {
toSerialize["tariffTimeChange"] = o.TariffTimeChange
}
if !IsNil(o.Time) {
toSerialize["time"] = o.Time
}
if !IsNil(o.TotalVolume) {
toSerialize["totalVolume"] = o.TotalVolume
}
if !IsNil(o.UplinkVolume) {
toSerialize["uplinkVolume"] = o.UplinkVolume
}
if !IsNil(o.DownlinkVolume) {
toSerialize["downlinkVolume"] = o.DownlinkVolume
}
if !IsNil(o.ServiceSpecificUnits) {
toSerialize["serviceSpecificUnits"] = o.ServiceSpecificUnits
}
return toSerialize, nil
}
type NullableGrantedUnit struct {
value *GrantedUnit
isSet bool
}
func (v NullableGrantedUnit) Get() *GrantedUnit {
return v.value
}
func (v *NullableGrantedUnit) Set(val *GrantedUnit) {
v.value = val
v.isSet = true
}
func (v NullableGrantedUnit) IsSet() bool {
return v.isSet
}
func (v *NullableGrantedUnit) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGrantedUnit(val *GrantedUnit) *NullableGrantedUnit {
return &NullableGrantedUnit{value: val, isSet: true}
}
func (v NullableGrantedUnit) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGrantedUnit) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}