/
model_session_event.go
521 lines (442 loc) · 13.4 KB
/
model_session_event.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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
/*
SORACOM API
SORACOM API v1
API version: VERSION_PLACEHOLDER
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package api
import (
"encoding/json"
)
// SessionEvent struct for SessionEvent
type SessionEvent struct {
// The Access Point Name configured.
Apn *string `json:"apn,omitempty"`
// First IP address of DNS servers.
Dns0 *string `json:"dns0,omitempty"`
// Second IP address of DNS servers.
Dns1 *string `json:"dns1,omitempty"`
// The type of behavior for the event. Possible values are \"Created\" indicates the device created a new session, \"Modified\" indicates that an existing connection was modified, \"Deleted\" indicates a network connection was closed.
Event *string `json:"event,omitempty"`
GatewayPrivateIpAddress *string `json:"gatewayPrivateIpAddress,omitempty"`
GatewayPublicIpAddress *string `json:"gatewayPublicIpAddress,omitempty"`
// The IMEI of the device using the SIM.
Imei *string `json:"imei,omitempty"`
// The IMSI of the SIM.
Imsi *string `json:"imsi,omitempty"`
// The operator ID of the session event.
OperatorId *string `json:"operatorId,omitempty"`
// The timestamp of the session event.
Time *int64 `json:"time,omitempty"`
// The IP address of the device.
UeIpAddress *string `json:"ueIpAddress,omitempty"`
// The Virtual Private Gateway IP address configured.
VpgId *string `json:"vpgId,omitempty"`
}
// NewSessionEvent instantiates a new SessionEvent 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 NewSessionEvent() *SessionEvent {
this := SessionEvent{}
return &this
}
// NewSessionEventWithDefaults instantiates a new SessionEvent 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 NewSessionEventWithDefaults() *SessionEvent {
this := SessionEvent{}
return &this
}
// GetApn returns the Apn field value if set, zero value otherwise.
func (o *SessionEvent) GetApn() string {
if o == nil || o.Apn == nil {
var ret string
return ret
}
return *o.Apn
}
// GetApnOk returns a tuple with the Apn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SessionEvent) GetApnOk() (*string, bool) {
if o == nil || o.Apn == nil {
return nil, false
}
return o.Apn, true
}
// HasApn returns a boolean if a field has been set.
func (o *SessionEvent) HasApn() bool {
if o != nil && o.Apn != nil {
return true
}
return false
}
// SetApn gets a reference to the given string and assigns it to the Apn field.
func (o *SessionEvent) SetApn(v string) {
o.Apn = &v
}
// GetDns0 returns the Dns0 field value if set, zero value otherwise.
func (o *SessionEvent) GetDns0() string {
if o == nil || o.Dns0 == nil {
var ret string
return ret
}
return *o.Dns0
}
// GetDns0Ok returns a tuple with the Dns0 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SessionEvent) GetDns0Ok() (*string, bool) {
if o == nil || o.Dns0 == nil {
return nil, false
}
return o.Dns0, true
}
// HasDns0 returns a boolean if a field has been set.
func (o *SessionEvent) HasDns0() bool {
if o != nil && o.Dns0 != nil {
return true
}
return false
}
// SetDns0 gets a reference to the given string and assigns it to the Dns0 field.
func (o *SessionEvent) SetDns0(v string) {
o.Dns0 = &v
}
// GetDns1 returns the Dns1 field value if set, zero value otherwise.
func (o *SessionEvent) GetDns1() string {
if o == nil || o.Dns1 == nil {
var ret string
return ret
}
return *o.Dns1
}
// GetDns1Ok returns a tuple with the Dns1 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SessionEvent) GetDns1Ok() (*string, bool) {
if o == nil || o.Dns1 == nil {
return nil, false
}
return o.Dns1, true
}
// HasDns1 returns a boolean if a field has been set.
func (o *SessionEvent) HasDns1() bool {
if o != nil && o.Dns1 != nil {
return true
}
return false
}
// SetDns1 gets a reference to the given string and assigns it to the Dns1 field.
func (o *SessionEvent) SetDns1(v string) {
o.Dns1 = &v
}
// GetEvent returns the Event field value if set, zero value otherwise.
func (o *SessionEvent) GetEvent() string {
if o == nil || o.Event == nil {
var ret string
return ret
}
return *o.Event
}
// GetEventOk returns a tuple with the Event field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SessionEvent) GetEventOk() (*string, bool) {
if o == nil || o.Event == nil {
return nil, false
}
return o.Event, true
}
// HasEvent returns a boolean if a field has been set.
func (o *SessionEvent) HasEvent() bool {
if o != nil && o.Event != nil {
return true
}
return false
}
// SetEvent gets a reference to the given string and assigns it to the Event field.
func (o *SessionEvent) SetEvent(v string) {
o.Event = &v
}
// GetGatewayPrivateIpAddress returns the GatewayPrivateIpAddress field value if set, zero value otherwise.
func (o *SessionEvent) GetGatewayPrivateIpAddress() string {
if o == nil || o.GatewayPrivateIpAddress == nil {
var ret string
return ret
}
return *o.GatewayPrivateIpAddress
}
// GetGatewayPrivateIpAddressOk returns a tuple with the GatewayPrivateIpAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SessionEvent) GetGatewayPrivateIpAddressOk() (*string, bool) {
if o == nil || o.GatewayPrivateIpAddress == nil {
return nil, false
}
return o.GatewayPrivateIpAddress, true
}
// HasGatewayPrivateIpAddress returns a boolean if a field has been set.
func (o *SessionEvent) HasGatewayPrivateIpAddress() bool {
if o != nil && o.GatewayPrivateIpAddress != nil {
return true
}
return false
}
// SetGatewayPrivateIpAddress gets a reference to the given string and assigns it to the GatewayPrivateIpAddress field.
func (o *SessionEvent) SetGatewayPrivateIpAddress(v string) {
o.GatewayPrivateIpAddress = &v
}
// GetGatewayPublicIpAddress returns the GatewayPublicIpAddress field value if set, zero value otherwise.
func (o *SessionEvent) GetGatewayPublicIpAddress() string {
if o == nil || o.GatewayPublicIpAddress == nil {
var ret string
return ret
}
return *o.GatewayPublicIpAddress
}
// GetGatewayPublicIpAddressOk returns a tuple with the GatewayPublicIpAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SessionEvent) GetGatewayPublicIpAddressOk() (*string, bool) {
if o == nil || o.GatewayPublicIpAddress == nil {
return nil, false
}
return o.GatewayPublicIpAddress, true
}
// HasGatewayPublicIpAddress returns a boolean if a field has been set.
func (o *SessionEvent) HasGatewayPublicIpAddress() bool {
if o != nil && o.GatewayPublicIpAddress != nil {
return true
}
return false
}
// SetGatewayPublicIpAddress gets a reference to the given string and assigns it to the GatewayPublicIpAddress field.
func (o *SessionEvent) SetGatewayPublicIpAddress(v string) {
o.GatewayPublicIpAddress = &v
}
// GetImei returns the Imei field value if set, zero value otherwise.
func (o *SessionEvent) GetImei() string {
if o == nil || o.Imei == nil {
var ret string
return ret
}
return *o.Imei
}
// GetImeiOk returns a tuple with the Imei field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SessionEvent) GetImeiOk() (*string, bool) {
if o == nil || o.Imei == nil {
return nil, false
}
return o.Imei, true
}
// HasImei returns a boolean if a field has been set.
func (o *SessionEvent) HasImei() bool {
if o != nil && o.Imei != nil {
return true
}
return false
}
// SetImei gets a reference to the given string and assigns it to the Imei field.
func (o *SessionEvent) SetImei(v string) {
o.Imei = &v
}
// GetImsi returns the Imsi field value if set, zero value otherwise.
func (o *SessionEvent) GetImsi() string {
if o == nil || o.Imsi == nil {
var ret string
return ret
}
return *o.Imsi
}
// GetImsiOk returns a tuple with the Imsi field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SessionEvent) GetImsiOk() (*string, bool) {
if o == nil || o.Imsi == nil {
return nil, false
}
return o.Imsi, true
}
// HasImsi returns a boolean if a field has been set.
func (o *SessionEvent) HasImsi() bool {
if o != nil && o.Imsi != nil {
return true
}
return false
}
// SetImsi gets a reference to the given string and assigns it to the Imsi field.
func (o *SessionEvent) SetImsi(v string) {
o.Imsi = &v
}
// GetOperatorId returns the OperatorId field value if set, zero value otherwise.
func (o *SessionEvent) GetOperatorId() string {
if o == nil || o.OperatorId == nil {
var ret string
return ret
}
return *o.OperatorId
}
// GetOperatorIdOk returns a tuple with the OperatorId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SessionEvent) GetOperatorIdOk() (*string, bool) {
if o == nil || o.OperatorId == nil {
return nil, false
}
return o.OperatorId, true
}
// HasOperatorId returns a boolean if a field has been set.
func (o *SessionEvent) HasOperatorId() bool {
if o != nil && o.OperatorId != nil {
return true
}
return false
}
// SetOperatorId gets a reference to the given string and assigns it to the OperatorId field.
func (o *SessionEvent) SetOperatorId(v string) {
o.OperatorId = &v
}
// GetTime returns the Time field value if set, zero value otherwise.
func (o *SessionEvent) GetTime() int64 {
if o == nil || o.Time == nil {
var ret int64
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 *SessionEvent) GetTimeOk() (*int64, bool) {
if o == nil || o.Time == nil {
return nil, false
}
return o.Time, true
}
// HasTime returns a boolean if a field has been set.
func (o *SessionEvent) HasTime() bool {
if o != nil && o.Time != nil {
return true
}
return false
}
// SetTime gets a reference to the given int64 and assigns it to the Time field.
func (o *SessionEvent) SetTime(v int64) {
o.Time = &v
}
// GetUeIpAddress returns the UeIpAddress field value if set, zero value otherwise.
func (o *SessionEvent) GetUeIpAddress() string {
if o == nil || o.UeIpAddress == nil {
var ret string
return ret
}
return *o.UeIpAddress
}
// GetUeIpAddressOk returns a tuple with the UeIpAddress field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SessionEvent) GetUeIpAddressOk() (*string, bool) {
if o == nil || o.UeIpAddress == nil {
return nil, false
}
return o.UeIpAddress, true
}
// HasUeIpAddress returns a boolean if a field has been set.
func (o *SessionEvent) HasUeIpAddress() bool {
if o != nil && o.UeIpAddress != nil {
return true
}
return false
}
// SetUeIpAddress gets a reference to the given string and assigns it to the UeIpAddress field.
func (o *SessionEvent) SetUeIpAddress(v string) {
o.UeIpAddress = &v
}
// GetVpgId returns the VpgId field value if set, zero value otherwise.
func (o *SessionEvent) GetVpgId() string {
if o == nil || o.VpgId == nil {
var ret string
return ret
}
return *o.VpgId
}
// GetVpgIdOk returns a tuple with the VpgId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SessionEvent) GetVpgIdOk() (*string, bool) {
if o == nil || o.VpgId == nil {
return nil, false
}
return o.VpgId, true
}
// HasVpgId returns a boolean if a field has been set.
func (o *SessionEvent) HasVpgId() bool {
if o != nil && o.VpgId != nil {
return true
}
return false
}
// SetVpgId gets a reference to the given string and assigns it to the VpgId field.
func (o *SessionEvent) SetVpgId(v string) {
o.VpgId = &v
}
func (o SessionEvent) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Apn != nil {
toSerialize["apn"] = o.Apn
}
if o.Dns0 != nil {
toSerialize["dns0"] = o.Dns0
}
if o.Dns1 != nil {
toSerialize["dns1"] = o.Dns1
}
if o.Event != nil {
toSerialize["event"] = o.Event
}
if o.GatewayPrivateIpAddress != nil {
toSerialize["gatewayPrivateIpAddress"] = o.GatewayPrivateIpAddress
}
if o.GatewayPublicIpAddress != nil {
toSerialize["gatewayPublicIpAddress"] = o.GatewayPublicIpAddress
}
if o.Imei != nil {
toSerialize["imei"] = o.Imei
}
if o.Imsi != nil {
toSerialize["imsi"] = o.Imsi
}
if o.OperatorId != nil {
toSerialize["operatorId"] = o.OperatorId
}
if o.Time != nil {
toSerialize["time"] = o.Time
}
if o.UeIpAddress != nil {
toSerialize["ueIpAddress"] = o.UeIpAddress
}
if o.VpgId != nil {
toSerialize["vpgId"] = o.VpgId
}
return json.Marshal(toSerialize)
}
type NullableSessionEvent struct {
value *SessionEvent
isSet bool
}
func (v NullableSessionEvent) Get() *SessionEvent {
return v.value
}
func (v *NullableSessionEvent) Set(val *SessionEvent) {
v.value = val
v.isSet = true
}
func (v NullableSessionEvent) IsSet() bool {
return v.isSet
}
func (v *NullableSessionEvent) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSessionEvent(val *SessionEvent) *NullableSessionEvent {
return &NullableSessionEvent{value: val, isSet: true}
}
func (v NullableSessionEvent) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSessionEvent) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}