-
Notifications
You must be signed in to change notification settings - Fork 2
/
model_case.go
659 lines (562 loc) · 18.2 KB
/
model_case.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
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
/*
DFIRTrack
OpenAPI 3 - Documentation of DFIRTrack API
API version: v2.4.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package dfirtrackapi
import (
"encoding/json"
"time"
)
// Case struct for Case
type Case struct {
CaseId *int32 `json:"case_id,omitempty"`
CaseIdExternal NullableString `json:"case_id_external,omitempty"`
CaseName string `json:"case_name"`
Casepriority *int32 `json:"casepriority,omitempty"`
Casestatus *int32 `json:"casestatus,omitempty"`
Casetype NullableInt32 `json:"casetype,omitempty"`
Tag []int32 `json:"tag,omitempty"`
CaseIsIncident bool `json:"case_is_incident"`
CaseStartTime NullableTime `json:"case_start_time,omitempty"`
CaseEndTime NullableTime `json:"case_end_time,omitempty"`
CaseCreatedByUserId int32 `json:"case_created_by_user_id"`
CaseCreateTime *time.Time `json:"case_create_time,omitempty"`
CaseModifiedByUserId NullableInt32 `json:"case_modified_by_user_id,omitempty"`
CaseModifyTime *time.Time `json:"case_modify_time,omitempty"`
CaseAssignedToUserId NullableInt32 `json:"case_assigned_to_user_id,omitempty"`
}
// NewCase instantiates a new Case 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 NewCase(caseName string, caseIsIncident bool, caseCreatedByUserId int32) *Case {
this := Case{}
this.CaseName = caseName
this.CaseIsIncident = caseIsIncident
this.CaseCreatedByUserId = caseCreatedByUserId
return &this
}
// NewCaseWithDefaults instantiates a new Case 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 NewCaseWithDefaults() *Case {
this := Case{}
return &this
}
// GetCaseId returns the CaseId field value if set, zero value otherwise.
func (o *Case) GetCaseId() int32 {
if o == nil || o.CaseId == nil {
var ret int32
return ret
}
return *o.CaseId
}
// GetCaseIdOk returns a tuple with the CaseId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Case) GetCaseIdOk() (*int32, bool) {
if o == nil || o.CaseId == nil {
return nil, false
}
return o.CaseId, true
}
// HasCaseId returns a boolean if a field has been set.
func (o *Case) HasCaseId() bool {
if o != nil && o.CaseId != nil {
return true
}
return false
}
// SetCaseId gets a reference to the given int32 and assigns it to the CaseId field.
func (o *Case) SetCaseId(v int32) {
o.CaseId = &v
}
// GetCaseIdExternal returns the CaseIdExternal field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Case) GetCaseIdExternal() string {
if o == nil || o.CaseIdExternal.Get() == nil {
var ret string
return ret
}
return *o.CaseIdExternal.Get()
}
// GetCaseIdExternalOk returns a tuple with the CaseIdExternal field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Case) GetCaseIdExternalOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.CaseIdExternal.Get(), o.CaseIdExternal.IsSet()
}
// HasCaseIdExternal returns a boolean if a field has been set.
func (o *Case) HasCaseIdExternal() bool {
if o != nil && o.CaseIdExternal.IsSet() {
return true
}
return false
}
// SetCaseIdExternal gets a reference to the given NullableString and assigns it to the CaseIdExternal field.
func (o *Case) SetCaseIdExternal(v string) {
o.CaseIdExternal.Set(&v)
}
// SetCaseIdExternalNil sets the value for CaseIdExternal to be an explicit nil
func (o *Case) SetCaseIdExternalNil() {
o.CaseIdExternal.Set(nil)
}
// UnsetCaseIdExternal ensures that no value is present for CaseIdExternal, not even an explicit nil
func (o *Case) UnsetCaseIdExternal() {
o.CaseIdExternal.Unset()
}
// GetCaseName returns the CaseName field value
func (o *Case) GetCaseName() string {
if o == nil {
var ret string
return ret
}
return o.CaseName
}
// GetCaseNameOk returns a tuple with the CaseName field value
// and a boolean to check if the value has been set.
func (o *Case) GetCaseNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CaseName, true
}
// SetCaseName sets field value
func (o *Case) SetCaseName(v string) {
o.CaseName = v
}
// GetCasepriority returns the Casepriority field value if set, zero value otherwise.
func (o *Case) GetCasepriority() int32 {
if o == nil || o.Casepriority == nil {
var ret int32
return ret
}
return *o.Casepriority
}
// GetCasepriorityOk returns a tuple with the Casepriority field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Case) GetCasepriorityOk() (*int32, bool) {
if o == nil || o.Casepriority == nil {
return nil, false
}
return o.Casepriority, true
}
// HasCasepriority returns a boolean if a field has been set.
func (o *Case) HasCasepriority() bool {
if o != nil && o.Casepriority != nil {
return true
}
return false
}
// SetCasepriority gets a reference to the given int32 and assigns it to the Casepriority field.
func (o *Case) SetCasepriority(v int32) {
o.Casepriority = &v
}
// GetCasestatus returns the Casestatus field value if set, zero value otherwise.
func (o *Case) GetCasestatus() int32 {
if o == nil || o.Casestatus == nil {
var ret int32
return ret
}
return *o.Casestatus
}
// GetCasestatusOk returns a tuple with the Casestatus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Case) GetCasestatusOk() (*int32, bool) {
if o == nil || o.Casestatus == nil {
return nil, false
}
return o.Casestatus, true
}
// HasCasestatus returns a boolean if a field has been set.
func (o *Case) HasCasestatus() bool {
if o != nil && o.Casestatus != nil {
return true
}
return false
}
// SetCasestatus gets a reference to the given int32 and assigns it to the Casestatus field.
func (o *Case) SetCasestatus(v int32) {
o.Casestatus = &v
}
// GetCasetype returns the Casetype field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Case) GetCasetype() int32 {
if o == nil || o.Casetype.Get() == nil {
var ret int32
return ret
}
return *o.Casetype.Get()
}
// GetCasetypeOk returns a tuple with the Casetype field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Case) GetCasetypeOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.Casetype.Get(), o.Casetype.IsSet()
}
// HasCasetype returns a boolean if a field has been set.
func (o *Case) HasCasetype() bool {
if o != nil && o.Casetype.IsSet() {
return true
}
return false
}
// SetCasetype gets a reference to the given NullableInt32 and assigns it to the Casetype field.
func (o *Case) SetCasetype(v int32) {
o.Casetype.Set(&v)
}
// SetCasetypeNil sets the value for Casetype to be an explicit nil
func (o *Case) SetCasetypeNil() {
o.Casetype.Set(nil)
}
// UnsetCasetype ensures that no value is present for Casetype, not even an explicit nil
func (o *Case) UnsetCasetype() {
o.Casetype.Unset()
}
// GetTag returns the Tag field value if set, zero value otherwise.
func (o *Case) GetTag() []int32 {
if o == nil || o.Tag == nil {
var ret []int32
return ret
}
return o.Tag
}
// GetTagOk returns a tuple with the Tag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Case) GetTagOk() ([]int32, bool) {
if o == nil || o.Tag == nil {
return nil, false
}
return o.Tag, true
}
// HasTag returns a boolean if a field has been set.
func (o *Case) HasTag() bool {
if o != nil && o.Tag != nil {
return true
}
return false
}
// SetTag gets a reference to the given []int32 and assigns it to the Tag field.
func (o *Case) SetTag(v []int32) {
o.Tag = v
}
// GetCaseIsIncident returns the CaseIsIncident field value
func (o *Case) GetCaseIsIncident() bool {
if o == nil {
var ret bool
return ret
}
return o.CaseIsIncident
}
// GetCaseIsIncidentOk returns a tuple with the CaseIsIncident field value
// and a boolean to check if the value has been set.
func (o *Case) GetCaseIsIncidentOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.CaseIsIncident, true
}
// SetCaseIsIncident sets field value
func (o *Case) SetCaseIsIncident(v bool) {
o.CaseIsIncident = v
}
// GetCaseStartTime returns the CaseStartTime field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Case) GetCaseStartTime() time.Time {
if o == nil || o.CaseStartTime.Get() == nil {
var ret time.Time
return ret
}
return *o.CaseStartTime.Get()
}
// GetCaseStartTimeOk returns a tuple with the CaseStartTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Case) GetCaseStartTimeOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.CaseStartTime.Get(), o.CaseStartTime.IsSet()
}
// HasCaseStartTime returns a boolean if a field has been set.
func (o *Case) HasCaseStartTime() bool {
if o != nil && o.CaseStartTime.IsSet() {
return true
}
return false
}
// SetCaseStartTime gets a reference to the given NullableTime and assigns it to the CaseStartTime field.
func (o *Case) SetCaseStartTime(v time.Time) {
o.CaseStartTime.Set(&v)
}
// SetCaseStartTimeNil sets the value for CaseStartTime to be an explicit nil
func (o *Case) SetCaseStartTimeNil() {
o.CaseStartTime.Set(nil)
}
// UnsetCaseStartTime ensures that no value is present for CaseStartTime, not even an explicit nil
func (o *Case) UnsetCaseStartTime() {
o.CaseStartTime.Unset()
}
// GetCaseEndTime returns the CaseEndTime field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Case) GetCaseEndTime() time.Time {
if o == nil || o.CaseEndTime.Get() == nil {
var ret time.Time
return ret
}
return *o.CaseEndTime.Get()
}
// GetCaseEndTimeOk returns a tuple with the CaseEndTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Case) GetCaseEndTimeOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.CaseEndTime.Get(), o.CaseEndTime.IsSet()
}
// HasCaseEndTime returns a boolean if a field has been set.
func (o *Case) HasCaseEndTime() bool {
if o != nil && o.CaseEndTime.IsSet() {
return true
}
return false
}
// SetCaseEndTime gets a reference to the given NullableTime and assigns it to the CaseEndTime field.
func (o *Case) SetCaseEndTime(v time.Time) {
o.CaseEndTime.Set(&v)
}
// SetCaseEndTimeNil sets the value for CaseEndTime to be an explicit nil
func (o *Case) SetCaseEndTimeNil() {
o.CaseEndTime.Set(nil)
}
// UnsetCaseEndTime ensures that no value is present for CaseEndTime, not even an explicit nil
func (o *Case) UnsetCaseEndTime() {
o.CaseEndTime.Unset()
}
// GetCaseCreatedByUserId returns the CaseCreatedByUserId field value
func (o *Case) GetCaseCreatedByUserId() int32 {
if o == nil {
var ret int32
return ret
}
return o.CaseCreatedByUserId
}
// GetCaseCreatedByUserIdOk returns a tuple with the CaseCreatedByUserId field value
// and a boolean to check if the value has been set.
func (o *Case) GetCaseCreatedByUserIdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.CaseCreatedByUserId, true
}
// SetCaseCreatedByUserId sets field value
func (o *Case) SetCaseCreatedByUserId(v int32) {
o.CaseCreatedByUserId = v
}
// GetCaseCreateTime returns the CaseCreateTime field value if set, zero value otherwise.
func (o *Case) GetCaseCreateTime() time.Time {
if o == nil || o.CaseCreateTime == nil {
var ret time.Time
return ret
}
return *o.CaseCreateTime
}
// GetCaseCreateTimeOk returns a tuple with the CaseCreateTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Case) GetCaseCreateTimeOk() (*time.Time, bool) {
if o == nil || o.CaseCreateTime == nil {
return nil, false
}
return o.CaseCreateTime, true
}
// HasCaseCreateTime returns a boolean if a field has been set.
func (o *Case) HasCaseCreateTime() bool {
if o != nil && o.CaseCreateTime != nil {
return true
}
return false
}
// SetCaseCreateTime gets a reference to the given time.Time and assigns it to the CaseCreateTime field.
func (o *Case) SetCaseCreateTime(v time.Time) {
o.CaseCreateTime = &v
}
// GetCaseModifiedByUserId returns the CaseModifiedByUserId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Case) GetCaseModifiedByUserId() int32 {
if o == nil || o.CaseModifiedByUserId.Get() == nil {
var ret int32
return ret
}
return *o.CaseModifiedByUserId.Get()
}
// GetCaseModifiedByUserIdOk returns a tuple with the CaseModifiedByUserId field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Case) GetCaseModifiedByUserIdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.CaseModifiedByUserId.Get(), o.CaseModifiedByUserId.IsSet()
}
// HasCaseModifiedByUserId returns a boolean if a field has been set.
func (o *Case) HasCaseModifiedByUserId() bool {
if o != nil && o.CaseModifiedByUserId.IsSet() {
return true
}
return false
}
// SetCaseModifiedByUserId gets a reference to the given NullableInt32 and assigns it to the CaseModifiedByUserId field.
func (o *Case) SetCaseModifiedByUserId(v int32) {
o.CaseModifiedByUserId.Set(&v)
}
// SetCaseModifiedByUserIdNil sets the value for CaseModifiedByUserId to be an explicit nil
func (o *Case) SetCaseModifiedByUserIdNil() {
o.CaseModifiedByUserId.Set(nil)
}
// UnsetCaseModifiedByUserId ensures that no value is present for CaseModifiedByUserId, not even an explicit nil
func (o *Case) UnsetCaseModifiedByUserId() {
o.CaseModifiedByUserId.Unset()
}
// GetCaseModifyTime returns the CaseModifyTime field value if set, zero value otherwise.
func (o *Case) GetCaseModifyTime() time.Time {
if o == nil || o.CaseModifyTime == nil {
var ret time.Time
return ret
}
return *o.CaseModifyTime
}
// GetCaseModifyTimeOk returns a tuple with the CaseModifyTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Case) GetCaseModifyTimeOk() (*time.Time, bool) {
if o == nil || o.CaseModifyTime == nil {
return nil, false
}
return o.CaseModifyTime, true
}
// HasCaseModifyTime returns a boolean if a field has been set.
func (o *Case) HasCaseModifyTime() bool {
if o != nil && o.CaseModifyTime != nil {
return true
}
return false
}
// SetCaseModifyTime gets a reference to the given time.Time and assigns it to the CaseModifyTime field.
func (o *Case) SetCaseModifyTime(v time.Time) {
o.CaseModifyTime = &v
}
// GetCaseAssignedToUserId returns the CaseAssignedToUserId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Case) GetCaseAssignedToUserId() int32 {
if o == nil || o.CaseAssignedToUserId.Get() == nil {
var ret int32
return ret
}
return *o.CaseAssignedToUserId.Get()
}
// GetCaseAssignedToUserIdOk returns a tuple with the CaseAssignedToUserId field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Case) GetCaseAssignedToUserIdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.CaseAssignedToUserId.Get(), o.CaseAssignedToUserId.IsSet()
}
// HasCaseAssignedToUserId returns a boolean if a field has been set.
func (o *Case) HasCaseAssignedToUserId() bool {
if o != nil && o.CaseAssignedToUserId.IsSet() {
return true
}
return false
}
// SetCaseAssignedToUserId gets a reference to the given NullableInt32 and assigns it to the CaseAssignedToUserId field.
func (o *Case) SetCaseAssignedToUserId(v int32) {
o.CaseAssignedToUserId.Set(&v)
}
// SetCaseAssignedToUserIdNil sets the value for CaseAssignedToUserId to be an explicit nil
func (o *Case) SetCaseAssignedToUserIdNil() {
o.CaseAssignedToUserId.Set(nil)
}
// UnsetCaseAssignedToUserId ensures that no value is present for CaseAssignedToUserId, not even an explicit nil
func (o *Case) UnsetCaseAssignedToUserId() {
o.CaseAssignedToUserId.Unset()
}
func (o Case) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.CaseId != nil {
toSerialize["case_id"] = o.CaseId
}
if o.CaseIdExternal.IsSet() {
toSerialize["case_id_external"] = o.CaseIdExternal.Get()
}
if true {
toSerialize["case_name"] = o.CaseName
}
if o.Casepriority != nil {
toSerialize["casepriority"] = o.Casepriority
}
if o.Casestatus != nil {
toSerialize["casestatus"] = o.Casestatus
}
if o.Casetype.IsSet() {
toSerialize["casetype"] = o.Casetype.Get()
}
if o.Tag != nil {
toSerialize["tag"] = o.Tag
}
if true {
toSerialize["case_is_incident"] = o.CaseIsIncident
}
if o.CaseStartTime.IsSet() {
toSerialize["case_start_time"] = o.CaseStartTime.Get()
}
if o.CaseEndTime.IsSet() {
toSerialize["case_end_time"] = o.CaseEndTime.Get()
}
if true {
toSerialize["case_created_by_user_id"] = o.CaseCreatedByUserId
}
if o.CaseCreateTime != nil {
toSerialize["case_create_time"] = o.CaseCreateTime
}
if o.CaseModifiedByUserId.IsSet() {
toSerialize["case_modified_by_user_id"] = o.CaseModifiedByUserId.Get()
}
if o.CaseModifyTime != nil {
toSerialize["case_modify_time"] = o.CaseModifyTime
}
if o.CaseAssignedToUserId.IsSet() {
toSerialize["case_assigned_to_user_id"] = o.CaseAssignedToUserId.Get()
}
return json.Marshal(toSerialize)
}
type NullableCase struct {
value *Case
isSet bool
}
func (v NullableCase) Get() *Case {
return v.value
}
func (v *NullableCase) Set(val *Case) {
v.value = val
v.isSet = true
}
func (v NullableCase) IsSet() bool {
return v.isSet
}
func (v *NullableCase) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCase(val *Case) *NullableCase {
return &NullableCase{value: val, isSet: true}
}
func (v NullableCase) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCase) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}