-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodel_note.go
497 lines (421 loc) · 12.5 KB
/
model_note.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
/*
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"
)
// Note struct for Note
type Note struct {
NoteId *int32 `json:"note_id,omitempty"`
NoteTitle string `json:"note_title"`
NoteContent string `json:"note_content"`
NoteVersion int32 `json:"note_version"`
Case NullableInt32 `json:"case,omitempty"`
Notestatus *int32 `json:"notestatus,omitempty"`
Tag []int32 `json:"tag,omitempty"`
NoteCreateTime *time.Time `json:"note_create_time,omitempty"`
NoteCreatedByUserId int32 `json:"note_created_by_user_id"`
NoteModifyTime *time.Time `json:"note_modify_time,omitempty"`
NoteModifiedByUserId int32 `json:"note_modified_by_user_id"`
NoteAssignedToUserId NullableInt32 `json:"note_assigned_to_user_id,omitempty"`
}
// NewNote instantiates a new Note 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 NewNote(noteTitle string, noteContent string, noteVersion int32, noteCreatedByUserId int32, noteModifiedByUserId int32) *Note {
this := Note{}
this.NoteTitle = noteTitle
this.NoteContent = noteContent
this.NoteVersion = noteVersion
this.NoteCreatedByUserId = noteCreatedByUserId
this.NoteModifiedByUserId = noteModifiedByUserId
return &this
}
// NewNoteWithDefaults instantiates a new Note 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 NewNoteWithDefaults() *Note {
this := Note{}
return &this
}
// GetNoteId returns the NoteId field value if set, zero value otherwise.
func (o *Note) GetNoteId() int32 {
if o == nil || o.NoteId == nil {
var ret int32
return ret
}
return *o.NoteId
}
// GetNoteIdOk returns a tuple with the NoteId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Note) GetNoteIdOk() (*int32, bool) {
if o == nil || o.NoteId == nil {
return nil, false
}
return o.NoteId, true
}
// HasNoteId returns a boolean if a field has been set.
func (o *Note) HasNoteId() bool {
if o != nil && o.NoteId != nil {
return true
}
return false
}
// SetNoteId gets a reference to the given int32 and assigns it to the NoteId field.
func (o *Note) SetNoteId(v int32) {
o.NoteId = &v
}
// GetNoteTitle returns the NoteTitle field value
func (o *Note) GetNoteTitle() string {
if o == nil {
var ret string
return ret
}
return o.NoteTitle
}
// GetNoteTitleOk returns a tuple with the NoteTitle field value
// and a boolean to check if the value has been set.
func (o *Note) GetNoteTitleOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.NoteTitle, true
}
// SetNoteTitle sets field value
func (o *Note) SetNoteTitle(v string) {
o.NoteTitle = v
}
// GetNoteContent returns the NoteContent field value
func (o *Note) GetNoteContent() string {
if o == nil {
var ret string
return ret
}
return o.NoteContent
}
// GetNoteContentOk returns a tuple with the NoteContent field value
// and a boolean to check if the value has been set.
func (o *Note) GetNoteContentOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.NoteContent, true
}
// SetNoteContent sets field value
func (o *Note) SetNoteContent(v string) {
o.NoteContent = v
}
// GetNoteVersion returns the NoteVersion field value
func (o *Note) GetNoteVersion() int32 {
if o == nil {
var ret int32
return ret
}
return o.NoteVersion
}
// GetNoteVersionOk returns a tuple with the NoteVersion field value
// and a boolean to check if the value has been set.
func (o *Note) GetNoteVersionOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.NoteVersion, true
}
// SetNoteVersion sets field value
func (o *Note) SetNoteVersion(v int32) {
o.NoteVersion = v
}
// GetCase returns the Case field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Note) GetCase() int32 {
if o == nil || o.Case.Get() == nil {
var ret int32
return ret
}
return *o.Case.Get()
}
// GetCaseOk returns a tuple with the Case 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 *Note) GetCaseOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.Case.Get(), o.Case.IsSet()
}
// HasCase returns a boolean if a field has been set.
func (o *Note) HasCase() bool {
if o != nil && o.Case.IsSet() {
return true
}
return false
}
// SetCase gets a reference to the given NullableInt32 and assigns it to the Case field.
func (o *Note) SetCase(v int32) {
o.Case.Set(&v)
}
// SetCaseNil sets the value for Case to be an explicit nil
func (o *Note) SetCaseNil() {
o.Case.Set(nil)
}
// UnsetCase ensures that no value is present for Case, not even an explicit nil
func (o *Note) UnsetCase() {
o.Case.Unset()
}
// GetNotestatus returns the Notestatus field value if set, zero value otherwise.
func (o *Note) GetNotestatus() int32 {
if o == nil || o.Notestatus == nil {
var ret int32
return ret
}
return *o.Notestatus
}
// GetNotestatusOk returns a tuple with the Notestatus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Note) GetNotestatusOk() (*int32, bool) {
if o == nil || o.Notestatus == nil {
return nil, false
}
return o.Notestatus, true
}
// HasNotestatus returns a boolean if a field has been set.
func (o *Note) HasNotestatus() bool {
if o != nil && o.Notestatus != nil {
return true
}
return false
}
// SetNotestatus gets a reference to the given int32 and assigns it to the Notestatus field.
func (o *Note) SetNotestatus(v int32) {
o.Notestatus = &v
}
// GetTag returns the Tag field value if set, zero value otherwise.
func (o *Note) 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 *Note) 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 *Note) 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 *Note) SetTag(v []int32) {
o.Tag = v
}
// GetNoteCreateTime returns the NoteCreateTime field value if set, zero value otherwise.
func (o *Note) GetNoteCreateTime() time.Time {
if o == nil || o.NoteCreateTime == nil {
var ret time.Time
return ret
}
return *o.NoteCreateTime
}
// GetNoteCreateTimeOk returns a tuple with the NoteCreateTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Note) GetNoteCreateTimeOk() (*time.Time, bool) {
if o == nil || o.NoteCreateTime == nil {
return nil, false
}
return o.NoteCreateTime, true
}
// HasNoteCreateTime returns a boolean if a field has been set.
func (o *Note) HasNoteCreateTime() bool {
if o != nil && o.NoteCreateTime != nil {
return true
}
return false
}
// SetNoteCreateTime gets a reference to the given time.Time and assigns it to the NoteCreateTime field.
func (o *Note) SetNoteCreateTime(v time.Time) {
o.NoteCreateTime = &v
}
// GetNoteCreatedByUserId returns the NoteCreatedByUserId field value
func (o *Note) GetNoteCreatedByUserId() int32 {
if o == nil {
var ret int32
return ret
}
return o.NoteCreatedByUserId
}
// GetNoteCreatedByUserIdOk returns a tuple with the NoteCreatedByUserId field value
// and a boolean to check if the value has been set.
func (o *Note) GetNoteCreatedByUserIdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.NoteCreatedByUserId, true
}
// SetNoteCreatedByUserId sets field value
func (o *Note) SetNoteCreatedByUserId(v int32) {
o.NoteCreatedByUserId = v
}
// GetNoteModifyTime returns the NoteModifyTime field value if set, zero value otherwise.
func (o *Note) GetNoteModifyTime() time.Time {
if o == nil || o.NoteModifyTime == nil {
var ret time.Time
return ret
}
return *o.NoteModifyTime
}
// GetNoteModifyTimeOk returns a tuple with the NoteModifyTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Note) GetNoteModifyTimeOk() (*time.Time, bool) {
if o == nil || o.NoteModifyTime == nil {
return nil, false
}
return o.NoteModifyTime, true
}
// HasNoteModifyTime returns a boolean if a field has been set.
func (o *Note) HasNoteModifyTime() bool {
if o != nil && o.NoteModifyTime != nil {
return true
}
return false
}
// SetNoteModifyTime gets a reference to the given time.Time and assigns it to the NoteModifyTime field.
func (o *Note) SetNoteModifyTime(v time.Time) {
o.NoteModifyTime = &v
}
// GetNoteModifiedByUserId returns the NoteModifiedByUserId field value
func (o *Note) GetNoteModifiedByUserId() int32 {
if o == nil {
var ret int32
return ret
}
return o.NoteModifiedByUserId
}
// GetNoteModifiedByUserIdOk returns a tuple with the NoteModifiedByUserId field value
// and a boolean to check if the value has been set.
func (o *Note) GetNoteModifiedByUserIdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.NoteModifiedByUserId, true
}
// SetNoteModifiedByUserId sets field value
func (o *Note) SetNoteModifiedByUserId(v int32) {
o.NoteModifiedByUserId = v
}
// GetNoteAssignedToUserId returns the NoteAssignedToUserId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Note) GetNoteAssignedToUserId() int32 {
if o == nil || o.NoteAssignedToUserId.Get() == nil {
var ret int32
return ret
}
return *o.NoteAssignedToUserId.Get()
}
// GetNoteAssignedToUserIdOk returns a tuple with the NoteAssignedToUserId 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 *Note) GetNoteAssignedToUserIdOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.NoteAssignedToUserId.Get(), o.NoteAssignedToUserId.IsSet()
}
// HasNoteAssignedToUserId returns a boolean if a field has been set.
func (o *Note) HasNoteAssignedToUserId() bool {
if o != nil && o.NoteAssignedToUserId.IsSet() {
return true
}
return false
}
// SetNoteAssignedToUserId gets a reference to the given NullableInt32 and assigns it to the NoteAssignedToUserId field.
func (o *Note) SetNoteAssignedToUserId(v int32) {
o.NoteAssignedToUserId.Set(&v)
}
// SetNoteAssignedToUserIdNil sets the value for NoteAssignedToUserId to be an explicit nil
func (o *Note) SetNoteAssignedToUserIdNil() {
o.NoteAssignedToUserId.Set(nil)
}
// UnsetNoteAssignedToUserId ensures that no value is present for NoteAssignedToUserId, not even an explicit nil
func (o *Note) UnsetNoteAssignedToUserId() {
o.NoteAssignedToUserId.Unset()
}
func (o Note) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.NoteId != nil {
toSerialize["note_id"] = o.NoteId
}
if true {
toSerialize["note_title"] = o.NoteTitle
}
if true {
toSerialize["note_content"] = o.NoteContent
}
if true {
toSerialize["note_version"] = o.NoteVersion
}
if o.Case.IsSet() {
toSerialize["case"] = o.Case.Get()
}
if o.Notestatus != nil {
toSerialize["notestatus"] = o.Notestatus
}
if o.Tag != nil {
toSerialize["tag"] = o.Tag
}
if o.NoteCreateTime != nil {
toSerialize["note_create_time"] = o.NoteCreateTime
}
if true {
toSerialize["note_created_by_user_id"] = o.NoteCreatedByUserId
}
if o.NoteModifyTime != nil {
toSerialize["note_modify_time"] = o.NoteModifyTime
}
if true {
toSerialize["note_modified_by_user_id"] = o.NoteModifiedByUserId
}
if o.NoteAssignedToUserId.IsSet() {
toSerialize["note_assigned_to_user_id"] = o.NoteAssignedToUserId.Get()
}
return json.Marshal(toSerialize)
}
type NullableNote struct {
value *Note
isSet bool
}
func (v NullableNote) Get() *Note {
return v.value
}
func (v *NullableNote) Set(val *Note) {
v.value = val
v.isSet = true
}
func (v NullableNote) IsSet() bool {
return v.isSet
}
func (v *NullableNote) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNote(val *Note) *NullableNote {
return &NullableNote{value: val, isSet: true}
}
func (v NullableNote) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNote) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}