-
Notifications
You must be signed in to change notification settings - Fork 2
/
model_model_container.go
955 lines (807 loc) · 26.7 KB
/
model_model_container.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
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
/*
Kengine ThreatMapper
Kengine Runtime API provides programmatic control over Kengine microservice securing your container, kubernetes and cloud deployments. The API abstracts away underlying infrastructure details like cloud provider, container distros, container orchestrator and type of deployment. This is one uniform API to manage and control security alerts, policies and response to alerts for microservices running anywhere i.e. managed pure greenfield container deployments or a mix of containers, VMs and serverless paradigms like AWS Fargate.
API version: 2.2.0
Contact: community@kengine.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
"bytes"
"fmt"
)
// checks if the ModelContainer type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ModelContainer{}
// ModelContainer struct for ModelContainer
type ModelContainer struct {
CpuMax float32 `json:"cpu_max"`
CpuUsage float32 `json:"cpu_usage"`
DockerContainerCommand string `json:"docker_container_command"`
DockerContainerCreated string `json:"docker_container_created"`
DockerContainerIps []interface{} `json:"docker_container_ips"`
DockerContainerName string `json:"docker_container_name"`
DockerContainerNetworkMode string `json:"docker_container_network_mode"`
DockerContainerNetworks string `json:"docker_container_networks"`
DockerContainerPorts string `json:"docker_container_ports"`
DockerContainerState string `json:"docker_container_state"`
DockerContainerStateHuman string `json:"docker_container_state_human"`
DockerLabels map[string]interface{} `json:"docker_labels"`
HostName string `json:"host_name"`
Image ModelContainerImage `json:"image"`
MalwareLatestScanId string `json:"malware_latest_scan_id"`
MalwareScanStatus string `json:"malware_scan_status"`
MalwaresCount int32 `json:"malwares_count"`
MemoryMax int32 `json:"memory_max"`
MemoryUsage int32 `json:"memory_usage"`
NodeId string `json:"node_id"`
NodeName string `json:"node_name"`
Processes []ModelProcess `json:"processes"`
SecretLatestScanId string `json:"secret_latest_scan_id"`
SecretScanStatus string `json:"secret_scan_status"`
SecretsCount int32 `json:"secrets_count"`
Uptime int32 `json:"uptime"`
VulnerabilitiesCount int32 `json:"vulnerabilities_count"`
VulnerabilityLatestScanId string `json:"vulnerability_latest_scan_id"`
VulnerabilityScanStatus string `json:"vulnerability_scan_status"`
}
type _ModelContainer ModelContainer
// NewModelContainer instantiates a new ModelContainer 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 NewModelContainer(cpuMax float32, cpuUsage float32, dockerContainerCommand string, dockerContainerCreated string, dockerContainerIps []interface{}, dockerContainerName string, dockerContainerNetworkMode string, dockerContainerNetworks string, dockerContainerPorts string, dockerContainerState string, dockerContainerStateHuman string, dockerLabels map[string]interface{}, hostName string, image ModelContainerImage, malwareLatestScanId string, malwareScanStatus string, malwaresCount int32, memoryMax int32, memoryUsage int32, nodeId string, nodeName string, processes []ModelProcess, secretLatestScanId string, secretScanStatus string, secretsCount int32, uptime int32, vulnerabilitiesCount int32, vulnerabilityLatestScanId string, vulnerabilityScanStatus string) *ModelContainer {
this := ModelContainer{}
this.CpuMax = cpuMax
this.CpuUsage = cpuUsage
this.DockerContainerCommand = dockerContainerCommand
this.DockerContainerCreated = dockerContainerCreated
this.DockerContainerIps = dockerContainerIps
this.DockerContainerName = dockerContainerName
this.DockerContainerNetworkMode = dockerContainerNetworkMode
this.DockerContainerNetworks = dockerContainerNetworks
this.DockerContainerPorts = dockerContainerPorts
this.DockerContainerState = dockerContainerState
this.DockerContainerStateHuman = dockerContainerStateHuman
this.DockerLabels = dockerLabels
this.HostName = hostName
this.Image = image
this.MalwareLatestScanId = malwareLatestScanId
this.MalwareScanStatus = malwareScanStatus
this.MalwaresCount = malwaresCount
this.MemoryMax = memoryMax
this.MemoryUsage = memoryUsage
this.NodeId = nodeId
this.NodeName = nodeName
this.Processes = processes
this.SecretLatestScanId = secretLatestScanId
this.SecretScanStatus = secretScanStatus
this.SecretsCount = secretsCount
this.Uptime = uptime
this.VulnerabilitiesCount = vulnerabilitiesCount
this.VulnerabilityLatestScanId = vulnerabilityLatestScanId
this.VulnerabilityScanStatus = vulnerabilityScanStatus
return &this
}
// NewModelContainerWithDefaults instantiates a new ModelContainer 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 NewModelContainerWithDefaults() *ModelContainer {
this := ModelContainer{}
return &this
}
// GetCpuMax returns the CpuMax field value
func (o *ModelContainer) GetCpuMax() float32 {
if o == nil {
var ret float32
return ret
}
return o.CpuMax
}
// GetCpuMaxOk returns a tuple with the CpuMax field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetCpuMaxOk() (*float32, bool) {
if o == nil {
return nil, false
}
return &o.CpuMax, true
}
// SetCpuMax sets field value
func (o *ModelContainer) SetCpuMax(v float32) {
o.CpuMax = v
}
// GetCpuUsage returns the CpuUsage field value
func (o *ModelContainer) GetCpuUsage() float32 {
if o == nil {
var ret float32
return ret
}
return o.CpuUsage
}
// GetCpuUsageOk returns a tuple with the CpuUsage field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetCpuUsageOk() (*float32, bool) {
if o == nil {
return nil, false
}
return &o.CpuUsage, true
}
// SetCpuUsage sets field value
func (o *ModelContainer) SetCpuUsage(v float32) {
o.CpuUsage = v
}
// GetDockerContainerCommand returns the DockerContainerCommand field value
func (o *ModelContainer) GetDockerContainerCommand() string {
if o == nil {
var ret string
return ret
}
return o.DockerContainerCommand
}
// GetDockerContainerCommandOk returns a tuple with the DockerContainerCommand field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetDockerContainerCommandOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DockerContainerCommand, true
}
// SetDockerContainerCommand sets field value
func (o *ModelContainer) SetDockerContainerCommand(v string) {
o.DockerContainerCommand = v
}
// GetDockerContainerCreated returns the DockerContainerCreated field value
func (o *ModelContainer) GetDockerContainerCreated() string {
if o == nil {
var ret string
return ret
}
return o.DockerContainerCreated
}
// GetDockerContainerCreatedOk returns a tuple with the DockerContainerCreated field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetDockerContainerCreatedOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DockerContainerCreated, true
}
// SetDockerContainerCreated sets field value
func (o *ModelContainer) SetDockerContainerCreated(v string) {
o.DockerContainerCreated = v
}
// GetDockerContainerIps returns the DockerContainerIps field value
// If the value is explicit nil, the zero value for []interface{} will be returned
func (o *ModelContainer) GetDockerContainerIps() []interface{} {
if o == nil {
var ret []interface{}
return ret
}
return o.DockerContainerIps
}
// GetDockerContainerIpsOk returns a tuple with the DockerContainerIps field value
// 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 *ModelContainer) GetDockerContainerIpsOk() ([]interface{}, bool) {
if o == nil || IsNil(o.DockerContainerIps) {
return nil, false
}
return o.DockerContainerIps, true
}
// SetDockerContainerIps sets field value
func (o *ModelContainer) SetDockerContainerIps(v []interface{}) {
o.DockerContainerIps = v
}
// GetDockerContainerName returns the DockerContainerName field value
func (o *ModelContainer) GetDockerContainerName() string {
if o == nil {
var ret string
return ret
}
return o.DockerContainerName
}
// GetDockerContainerNameOk returns a tuple with the DockerContainerName field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetDockerContainerNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DockerContainerName, true
}
// SetDockerContainerName sets field value
func (o *ModelContainer) SetDockerContainerName(v string) {
o.DockerContainerName = v
}
// GetDockerContainerNetworkMode returns the DockerContainerNetworkMode field value
func (o *ModelContainer) GetDockerContainerNetworkMode() string {
if o == nil {
var ret string
return ret
}
return o.DockerContainerNetworkMode
}
// GetDockerContainerNetworkModeOk returns a tuple with the DockerContainerNetworkMode field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetDockerContainerNetworkModeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DockerContainerNetworkMode, true
}
// SetDockerContainerNetworkMode sets field value
func (o *ModelContainer) SetDockerContainerNetworkMode(v string) {
o.DockerContainerNetworkMode = v
}
// GetDockerContainerNetworks returns the DockerContainerNetworks field value
func (o *ModelContainer) GetDockerContainerNetworks() string {
if o == nil {
var ret string
return ret
}
return o.DockerContainerNetworks
}
// GetDockerContainerNetworksOk returns a tuple with the DockerContainerNetworks field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetDockerContainerNetworksOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DockerContainerNetworks, true
}
// SetDockerContainerNetworks sets field value
func (o *ModelContainer) SetDockerContainerNetworks(v string) {
o.DockerContainerNetworks = v
}
// GetDockerContainerPorts returns the DockerContainerPorts field value
func (o *ModelContainer) GetDockerContainerPorts() string {
if o == nil {
var ret string
return ret
}
return o.DockerContainerPorts
}
// GetDockerContainerPortsOk returns a tuple with the DockerContainerPorts field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetDockerContainerPortsOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DockerContainerPorts, true
}
// SetDockerContainerPorts sets field value
func (o *ModelContainer) SetDockerContainerPorts(v string) {
o.DockerContainerPorts = v
}
// GetDockerContainerState returns the DockerContainerState field value
func (o *ModelContainer) GetDockerContainerState() string {
if o == nil {
var ret string
return ret
}
return o.DockerContainerState
}
// GetDockerContainerStateOk returns a tuple with the DockerContainerState field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetDockerContainerStateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DockerContainerState, true
}
// SetDockerContainerState sets field value
func (o *ModelContainer) SetDockerContainerState(v string) {
o.DockerContainerState = v
}
// GetDockerContainerStateHuman returns the DockerContainerStateHuman field value
func (o *ModelContainer) GetDockerContainerStateHuman() string {
if o == nil {
var ret string
return ret
}
return o.DockerContainerStateHuman
}
// GetDockerContainerStateHumanOk returns a tuple with the DockerContainerStateHuman field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetDockerContainerStateHumanOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DockerContainerStateHuman, true
}
// SetDockerContainerStateHuman sets field value
func (o *ModelContainer) SetDockerContainerStateHuman(v string) {
o.DockerContainerStateHuman = v
}
// GetDockerLabels returns the DockerLabels field value
// If the value is explicit nil, the zero value for map[string]interface{} will be returned
func (o *ModelContainer) GetDockerLabels() map[string]interface{} {
if o == nil {
var ret map[string]interface{}
return ret
}
return o.DockerLabels
}
// GetDockerLabelsOk returns a tuple with the DockerLabels field value
// 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 *ModelContainer) GetDockerLabelsOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.DockerLabels) {
return map[string]interface{}{}, false
}
return o.DockerLabels, true
}
// SetDockerLabels sets field value
func (o *ModelContainer) SetDockerLabels(v map[string]interface{}) {
o.DockerLabels = v
}
// GetHostName returns the HostName field value
func (o *ModelContainer) GetHostName() string {
if o == nil {
var ret string
return ret
}
return o.HostName
}
// GetHostNameOk returns a tuple with the HostName field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetHostNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.HostName, true
}
// SetHostName sets field value
func (o *ModelContainer) SetHostName(v string) {
o.HostName = v
}
// GetImage returns the Image field value
func (o *ModelContainer) GetImage() ModelContainerImage {
if o == nil {
var ret ModelContainerImage
return ret
}
return o.Image
}
// GetImageOk returns a tuple with the Image field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetImageOk() (*ModelContainerImage, bool) {
if o == nil {
return nil, false
}
return &o.Image, true
}
// SetImage sets field value
func (o *ModelContainer) SetImage(v ModelContainerImage) {
o.Image = v
}
// GetMalwareLatestScanId returns the MalwareLatestScanId field value
func (o *ModelContainer) GetMalwareLatestScanId() string {
if o == nil {
var ret string
return ret
}
return o.MalwareLatestScanId
}
// GetMalwareLatestScanIdOk returns a tuple with the MalwareLatestScanId field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetMalwareLatestScanIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.MalwareLatestScanId, true
}
// SetMalwareLatestScanId sets field value
func (o *ModelContainer) SetMalwareLatestScanId(v string) {
o.MalwareLatestScanId = v
}
// GetMalwareScanStatus returns the MalwareScanStatus field value
func (o *ModelContainer) GetMalwareScanStatus() string {
if o == nil {
var ret string
return ret
}
return o.MalwareScanStatus
}
// GetMalwareScanStatusOk returns a tuple with the MalwareScanStatus field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetMalwareScanStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.MalwareScanStatus, true
}
// SetMalwareScanStatus sets field value
func (o *ModelContainer) SetMalwareScanStatus(v string) {
o.MalwareScanStatus = v
}
// GetMalwaresCount returns the MalwaresCount field value
func (o *ModelContainer) GetMalwaresCount() int32 {
if o == nil {
var ret int32
return ret
}
return o.MalwaresCount
}
// GetMalwaresCountOk returns a tuple with the MalwaresCount field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetMalwaresCountOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.MalwaresCount, true
}
// SetMalwaresCount sets field value
func (o *ModelContainer) SetMalwaresCount(v int32) {
o.MalwaresCount = v
}
// GetMemoryMax returns the MemoryMax field value
func (o *ModelContainer) GetMemoryMax() int32 {
if o == nil {
var ret int32
return ret
}
return o.MemoryMax
}
// GetMemoryMaxOk returns a tuple with the MemoryMax field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetMemoryMaxOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.MemoryMax, true
}
// SetMemoryMax sets field value
func (o *ModelContainer) SetMemoryMax(v int32) {
o.MemoryMax = v
}
// GetMemoryUsage returns the MemoryUsage field value
func (o *ModelContainer) GetMemoryUsage() int32 {
if o == nil {
var ret int32
return ret
}
return o.MemoryUsage
}
// GetMemoryUsageOk returns a tuple with the MemoryUsage field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetMemoryUsageOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.MemoryUsage, true
}
// SetMemoryUsage sets field value
func (o *ModelContainer) SetMemoryUsage(v int32) {
o.MemoryUsage = v
}
// GetNodeId returns the NodeId field value
func (o *ModelContainer) GetNodeId() string {
if o == nil {
var ret string
return ret
}
return o.NodeId
}
// GetNodeIdOk returns a tuple with the NodeId field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetNodeIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.NodeId, true
}
// SetNodeId sets field value
func (o *ModelContainer) SetNodeId(v string) {
o.NodeId = v
}
// GetNodeName returns the NodeName field value
func (o *ModelContainer) GetNodeName() string {
if o == nil {
var ret string
return ret
}
return o.NodeName
}
// GetNodeNameOk returns a tuple with the NodeName field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetNodeNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.NodeName, true
}
// SetNodeName sets field value
func (o *ModelContainer) SetNodeName(v string) {
o.NodeName = v
}
// GetProcesses returns the Processes field value
// If the value is explicit nil, the zero value for []ModelProcess will be returned
func (o *ModelContainer) GetProcesses() []ModelProcess {
if o == nil {
var ret []ModelProcess
return ret
}
return o.Processes
}
// GetProcessesOk returns a tuple with the Processes field value
// 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 *ModelContainer) GetProcessesOk() ([]ModelProcess, bool) {
if o == nil || IsNil(o.Processes) {
return nil, false
}
return o.Processes, true
}
// SetProcesses sets field value
func (o *ModelContainer) SetProcesses(v []ModelProcess) {
o.Processes = v
}
// GetSecretLatestScanId returns the SecretLatestScanId field value
func (o *ModelContainer) GetSecretLatestScanId() string {
if o == nil {
var ret string
return ret
}
return o.SecretLatestScanId
}
// GetSecretLatestScanIdOk returns a tuple with the SecretLatestScanId field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetSecretLatestScanIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.SecretLatestScanId, true
}
// SetSecretLatestScanId sets field value
func (o *ModelContainer) SetSecretLatestScanId(v string) {
o.SecretLatestScanId = v
}
// GetSecretScanStatus returns the SecretScanStatus field value
func (o *ModelContainer) GetSecretScanStatus() string {
if o == nil {
var ret string
return ret
}
return o.SecretScanStatus
}
// GetSecretScanStatusOk returns a tuple with the SecretScanStatus field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetSecretScanStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.SecretScanStatus, true
}
// SetSecretScanStatus sets field value
func (o *ModelContainer) SetSecretScanStatus(v string) {
o.SecretScanStatus = v
}
// GetSecretsCount returns the SecretsCount field value
func (o *ModelContainer) GetSecretsCount() int32 {
if o == nil {
var ret int32
return ret
}
return o.SecretsCount
}
// GetSecretsCountOk returns a tuple with the SecretsCount field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetSecretsCountOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.SecretsCount, true
}
// SetSecretsCount sets field value
func (o *ModelContainer) SetSecretsCount(v int32) {
o.SecretsCount = v
}
// GetUptime returns the Uptime field value
func (o *ModelContainer) GetUptime() int32 {
if o == nil {
var ret int32
return ret
}
return o.Uptime
}
// GetUptimeOk returns a tuple with the Uptime field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetUptimeOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Uptime, true
}
// SetUptime sets field value
func (o *ModelContainer) SetUptime(v int32) {
o.Uptime = v
}
// GetVulnerabilitiesCount returns the VulnerabilitiesCount field value
func (o *ModelContainer) GetVulnerabilitiesCount() int32 {
if o == nil {
var ret int32
return ret
}
return o.VulnerabilitiesCount
}
// GetVulnerabilitiesCountOk returns a tuple with the VulnerabilitiesCount field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetVulnerabilitiesCountOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.VulnerabilitiesCount, true
}
// SetVulnerabilitiesCount sets field value
func (o *ModelContainer) SetVulnerabilitiesCount(v int32) {
o.VulnerabilitiesCount = v
}
// GetVulnerabilityLatestScanId returns the VulnerabilityLatestScanId field value
func (o *ModelContainer) GetVulnerabilityLatestScanId() string {
if o == nil {
var ret string
return ret
}
return o.VulnerabilityLatestScanId
}
// GetVulnerabilityLatestScanIdOk returns a tuple with the VulnerabilityLatestScanId field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetVulnerabilityLatestScanIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.VulnerabilityLatestScanId, true
}
// SetVulnerabilityLatestScanId sets field value
func (o *ModelContainer) SetVulnerabilityLatestScanId(v string) {
o.VulnerabilityLatestScanId = v
}
// GetVulnerabilityScanStatus returns the VulnerabilityScanStatus field value
func (o *ModelContainer) GetVulnerabilityScanStatus() string {
if o == nil {
var ret string
return ret
}
return o.VulnerabilityScanStatus
}
// GetVulnerabilityScanStatusOk returns a tuple with the VulnerabilityScanStatus field value
// and a boolean to check if the value has been set.
func (o *ModelContainer) GetVulnerabilityScanStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.VulnerabilityScanStatus, true
}
// SetVulnerabilityScanStatus sets field value
func (o *ModelContainer) SetVulnerabilityScanStatus(v string) {
o.VulnerabilityScanStatus = v
}
func (o ModelContainer) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ModelContainer) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["cpu_max"] = o.CpuMax
toSerialize["cpu_usage"] = o.CpuUsage
toSerialize["docker_container_command"] = o.DockerContainerCommand
toSerialize["docker_container_created"] = o.DockerContainerCreated
if o.DockerContainerIps != nil {
toSerialize["docker_container_ips"] = o.DockerContainerIps
}
toSerialize["docker_container_name"] = o.DockerContainerName
toSerialize["docker_container_network_mode"] = o.DockerContainerNetworkMode
toSerialize["docker_container_networks"] = o.DockerContainerNetworks
toSerialize["docker_container_ports"] = o.DockerContainerPorts
toSerialize["docker_container_state"] = o.DockerContainerState
toSerialize["docker_container_state_human"] = o.DockerContainerStateHuman
if o.DockerLabels != nil {
toSerialize["docker_labels"] = o.DockerLabels
}
toSerialize["host_name"] = o.HostName
toSerialize["image"] = o.Image
toSerialize["malware_latest_scan_id"] = o.MalwareLatestScanId
toSerialize["malware_scan_status"] = o.MalwareScanStatus
toSerialize["malwares_count"] = o.MalwaresCount
toSerialize["memory_max"] = o.MemoryMax
toSerialize["memory_usage"] = o.MemoryUsage
toSerialize["node_id"] = o.NodeId
toSerialize["node_name"] = o.NodeName
if o.Processes != nil {
toSerialize["processes"] = o.Processes
}
toSerialize["secret_latest_scan_id"] = o.SecretLatestScanId
toSerialize["secret_scan_status"] = o.SecretScanStatus
toSerialize["secrets_count"] = o.SecretsCount
toSerialize["uptime"] = o.Uptime
toSerialize["vulnerabilities_count"] = o.VulnerabilitiesCount
toSerialize["vulnerability_latest_scan_id"] = o.VulnerabilityLatestScanId
toSerialize["vulnerability_scan_status"] = o.VulnerabilityScanStatus
return toSerialize, nil
}
func (o *ModelContainer) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"cpu_max",
"cpu_usage",
"docker_container_command",
"docker_container_created",
"docker_container_ips",
"docker_container_name",
"docker_container_network_mode",
"docker_container_networks",
"docker_container_ports",
"docker_container_state",
"docker_container_state_human",
"docker_labels",
"host_name",
"image",
"malware_latest_scan_id",
"malware_scan_status",
"malwares_count",
"memory_max",
"memory_usage",
"node_id",
"node_name",
"processes",
"secret_latest_scan_id",
"secret_scan_status",
"secrets_count",
"uptime",
"vulnerabilities_count",
"vulnerability_latest_scan_id",
"vulnerability_scan_status",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err;
}
for _, requiredProperty := range(requiredProperties) {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varModelContainer := _ModelContainer{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varModelContainer)
if err != nil {
return err
}
*o = ModelContainer(varModelContainer)
return err
}
type NullableModelContainer struct {
value *ModelContainer
isSet bool
}
func (v NullableModelContainer) Get() *ModelContainer {
return v.value
}
func (v *NullableModelContainer) Set(val *ModelContainer) {
v.value = val
v.isSet = true
}
func (v NullableModelContainer) IsSet() bool {
return v.isSet
}
func (v *NullableModelContainer) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableModelContainer(val *ModelContainer) *NullableModelContainer {
return &NullableModelContainer{value: val, isSet: true}
}
func (v NullableModelContainer) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableModelContainer) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}