This repository has been archived by the owner on May 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodel_scan_options.go
647 lines (554 loc) · 16.6 KB
/
model_scan_options.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
/*
* runZero API
*
* runZero Network Discovery API
*
* API version: 1.0.4
* Contact: [email protected]
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package openapi
import (
"encoding/json"
)
// ScanOptions struct for ScanOptions
type ScanOptions struct {
Targets string `json:"targets"`
Excludes *string `json:"excludes,omitempty"`
ScanName *string `json:"scan-name,omitempty"`
ScanDescription *string `json:"scan-description,omitempty"`
ScanFrequency *string `json:"scan-frequency,omitempty"`
ScanStart *int32 `json:"scan-start,omitempty"`
Agent *string `json:"agent,omitempty"`
Rate *int32 `json:"rate,omitempty"`
MaxHostRate *int32 `json:"max-host-rate,omitempty"`
Passes *int32 `json:"passes,omitempty"`
MaxSockets *int32 `json:"max-sockets,omitempty"`
MaxGroupSize *int32 `json:"max-group-size,omitempty"`
TcpPorts *string `json:"tcp-ports,omitempty"`
Screenshots *bool `json:"screenshots,omitempty"`
Nameservers *string `json:"nameservers,omitempty"`
// Optional probe list, otherwise all probes are used
Probes *string `json:"probes,omitempty"`
}
// NewScanOptions instantiates a new ScanOptions 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 NewScanOptions(targets string) *ScanOptions {
this := ScanOptions{}
this.Targets = targets
return &this
}
// NewScanOptionsWithDefaults instantiates a new ScanOptions 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 NewScanOptionsWithDefaults() *ScanOptions {
this := ScanOptions{}
return &this
}
// GetTargets returns the Targets field value
func (o *ScanOptions) GetTargets() string {
if o == nil {
var ret string
return ret
}
return o.Targets
}
// GetTargetsOk returns a tuple with the Targets field value
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetTargetsOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Targets, true
}
// SetTargets sets field value
func (o *ScanOptions) SetTargets(v string) {
o.Targets = v
}
// GetExcludes returns the Excludes field value if set, zero value otherwise.
func (o *ScanOptions) GetExcludes() string {
if o == nil || o.Excludes == nil {
var ret string
return ret
}
return *o.Excludes
}
// GetExcludesOk returns a tuple with the Excludes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetExcludesOk() (*string, bool) {
if o == nil || o.Excludes == nil {
return nil, false
}
return o.Excludes, true
}
// HasExcludes returns a boolean if a field has been set.
func (o *ScanOptions) HasExcludes() bool {
if o != nil && o.Excludes != nil {
return true
}
return false
}
// SetExcludes gets a reference to the given string and assigns it to the Excludes field.
func (o *ScanOptions) SetExcludes(v string) {
o.Excludes = &v
}
// GetScanName returns the ScanName field value if set, zero value otherwise.
func (o *ScanOptions) GetScanName() string {
if o == nil || o.ScanName == nil {
var ret string
return ret
}
return *o.ScanName
}
// GetScanNameOk returns a tuple with the ScanName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetScanNameOk() (*string, bool) {
if o == nil || o.ScanName == nil {
return nil, false
}
return o.ScanName, true
}
// HasScanName returns a boolean if a field has been set.
func (o *ScanOptions) HasScanName() bool {
if o != nil && o.ScanName != nil {
return true
}
return false
}
// SetScanName gets a reference to the given string and assigns it to the ScanName field.
func (o *ScanOptions) SetScanName(v string) {
o.ScanName = &v
}
// GetScanDescription returns the ScanDescription field value if set, zero value otherwise.
func (o *ScanOptions) GetScanDescription() string {
if o == nil || o.ScanDescription == nil {
var ret string
return ret
}
return *o.ScanDescription
}
// GetScanDescriptionOk returns a tuple with the ScanDescription field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetScanDescriptionOk() (*string, bool) {
if o == nil || o.ScanDescription == nil {
return nil, false
}
return o.ScanDescription, true
}
// HasScanDescription returns a boolean if a field has been set.
func (o *ScanOptions) HasScanDescription() bool {
if o != nil && o.ScanDescription != nil {
return true
}
return false
}
// SetScanDescription gets a reference to the given string and assigns it to the ScanDescription field.
func (o *ScanOptions) SetScanDescription(v string) {
o.ScanDescription = &v
}
// GetScanFrequency returns the ScanFrequency field value if set, zero value otherwise.
func (o *ScanOptions) GetScanFrequency() string {
if o == nil || o.ScanFrequency == nil {
var ret string
return ret
}
return *o.ScanFrequency
}
// GetScanFrequencyOk returns a tuple with the ScanFrequency field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetScanFrequencyOk() (*string, bool) {
if o == nil || o.ScanFrequency == nil {
return nil, false
}
return o.ScanFrequency, true
}
// HasScanFrequency returns a boolean if a field has been set.
func (o *ScanOptions) HasScanFrequency() bool {
if o != nil && o.ScanFrequency != nil {
return true
}
return false
}
// SetScanFrequency gets a reference to the given string and assigns it to the ScanFrequency field.
func (o *ScanOptions) SetScanFrequency(v string) {
o.ScanFrequency = &v
}
// GetScanStart returns the ScanStart field value if set, zero value otherwise.
func (o *ScanOptions) GetScanStart() int32 {
if o == nil || o.ScanStart == nil {
var ret int32
return ret
}
return *o.ScanStart
}
// GetScanStartOk returns a tuple with the ScanStart field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetScanStartOk() (*int32, bool) {
if o == nil || o.ScanStart == nil {
return nil, false
}
return o.ScanStart, true
}
// HasScanStart returns a boolean if a field has been set.
func (o *ScanOptions) HasScanStart() bool {
if o != nil && o.ScanStart != nil {
return true
}
return false
}
// SetScanStart gets a reference to the given int32 and assigns it to the ScanStart field.
func (o *ScanOptions) SetScanStart(v int32) {
o.ScanStart = &v
}
// GetAgent returns the Agent field value if set, zero value otherwise.
func (o *ScanOptions) GetAgent() string {
if o == nil || o.Agent == nil {
var ret string
return ret
}
return *o.Agent
}
// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetAgentOk() (*string, bool) {
if o == nil || o.Agent == nil {
return nil, false
}
return o.Agent, true
}
// HasAgent returns a boolean if a field has been set.
func (o *ScanOptions) HasAgent() bool {
if o != nil && o.Agent != nil {
return true
}
return false
}
// SetAgent gets a reference to the given string and assigns it to the Agent field.
func (o *ScanOptions) SetAgent(v string) {
o.Agent = &v
}
// GetRate returns the Rate field value if set, zero value otherwise.
func (o *ScanOptions) GetRate() int32 {
if o == nil || o.Rate == nil {
var ret int32
return ret
}
return *o.Rate
}
// GetRateOk returns a tuple with the Rate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetRateOk() (*int32, bool) {
if o == nil || o.Rate == nil {
return nil, false
}
return o.Rate, true
}
// HasRate returns a boolean if a field has been set.
func (o *ScanOptions) HasRate() bool {
if o != nil && o.Rate != nil {
return true
}
return false
}
// SetRate gets a reference to the given int32 and assigns it to the Rate field.
func (o *ScanOptions) SetRate(v int32) {
o.Rate = &v
}
// GetMaxHostRate returns the MaxHostRate field value if set, zero value otherwise.
func (o *ScanOptions) GetMaxHostRate() int32 {
if o == nil || o.MaxHostRate == nil {
var ret int32
return ret
}
return *o.MaxHostRate
}
// GetMaxHostRateOk returns a tuple with the MaxHostRate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetMaxHostRateOk() (*int32, bool) {
if o == nil || o.MaxHostRate == nil {
return nil, false
}
return o.MaxHostRate, true
}
// HasMaxHostRate returns a boolean if a field has been set.
func (o *ScanOptions) HasMaxHostRate() bool {
if o != nil && o.MaxHostRate != nil {
return true
}
return false
}
// SetMaxHostRate gets a reference to the given int32 and assigns it to the MaxHostRate field.
func (o *ScanOptions) SetMaxHostRate(v int32) {
o.MaxHostRate = &v
}
// GetPasses returns the Passes field value if set, zero value otherwise.
func (o *ScanOptions) GetPasses() int32 {
if o == nil || o.Passes == nil {
var ret int32
return ret
}
return *o.Passes
}
// GetPassesOk returns a tuple with the Passes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetPassesOk() (*int32, bool) {
if o == nil || o.Passes == nil {
return nil, false
}
return o.Passes, true
}
// HasPasses returns a boolean if a field has been set.
func (o *ScanOptions) HasPasses() bool {
if o != nil && o.Passes != nil {
return true
}
return false
}
// SetPasses gets a reference to the given int32 and assigns it to the Passes field.
func (o *ScanOptions) SetPasses(v int32) {
o.Passes = &v
}
// GetMaxSockets returns the MaxSockets field value if set, zero value otherwise.
func (o *ScanOptions) GetMaxSockets() int32 {
if o == nil || o.MaxSockets == nil {
var ret int32
return ret
}
return *o.MaxSockets
}
// GetMaxSocketsOk returns a tuple with the MaxSockets field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetMaxSocketsOk() (*int32, bool) {
if o == nil || o.MaxSockets == nil {
return nil, false
}
return o.MaxSockets, true
}
// HasMaxSockets returns a boolean if a field has been set.
func (o *ScanOptions) HasMaxSockets() bool {
if o != nil && o.MaxSockets != nil {
return true
}
return false
}
// SetMaxSockets gets a reference to the given int32 and assigns it to the MaxSockets field.
func (o *ScanOptions) SetMaxSockets(v int32) {
o.MaxSockets = &v
}
// GetMaxGroupSize returns the MaxGroupSize field value if set, zero value otherwise.
func (o *ScanOptions) GetMaxGroupSize() int32 {
if o == nil || o.MaxGroupSize == nil {
var ret int32
return ret
}
return *o.MaxGroupSize
}
// GetMaxGroupSizeOk returns a tuple with the MaxGroupSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetMaxGroupSizeOk() (*int32, bool) {
if o == nil || o.MaxGroupSize == nil {
return nil, false
}
return o.MaxGroupSize, true
}
// HasMaxGroupSize returns a boolean if a field has been set.
func (o *ScanOptions) HasMaxGroupSize() bool {
if o != nil && o.MaxGroupSize != nil {
return true
}
return false
}
// SetMaxGroupSize gets a reference to the given int32 and assigns it to the MaxGroupSize field.
func (o *ScanOptions) SetMaxGroupSize(v int32) {
o.MaxGroupSize = &v
}
// GetTcpPorts returns the TcpPorts field value if set, zero value otherwise.
func (o *ScanOptions) GetTcpPorts() string {
if o == nil || o.TcpPorts == nil {
var ret string
return ret
}
return *o.TcpPorts
}
// GetTcpPortsOk returns a tuple with the TcpPorts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetTcpPortsOk() (*string, bool) {
if o == nil || o.TcpPorts == nil {
return nil, false
}
return o.TcpPorts, true
}
// HasTcpPorts returns a boolean if a field has been set.
func (o *ScanOptions) HasTcpPorts() bool {
if o != nil && o.TcpPorts != nil {
return true
}
return false
}
// SetTcpPorts gets a reference to the given string and assigns it to the TcpPorts field.
func (o *ScanOptions) SetTcpPorts(v string) {
o.TcpPorts = &v
}
// GetScreenshots returns the Screenshots field value if set, zero value otherwise.
func (o *ScanOptions) GetScreenshots() bool {
if o == nil || o.Screenshots == nil {
var ret bool
return ret
}
return *o.Screenshots
}
// GetScreenshotsOk returns a tuple with the Screenshots field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetScreenshotsOk() (*bool, bool) {
if o == nil || o.Screenshots == nil {
return nil, false
}
return o.Screenshots, true
}
// HasScreenshots returns a boolean if a field has been set.
func (o *ScanOptions) HasScreenshots() bool {
if o != nil && o.Screenshots != nil {
return true
}
return false
}
// SetScreenshots gets a reference to the given bool and assigns it to the Screenshots field.
func (o *ScanOptions) SetScreenshots(v bool) {
o.Screenshots = &v
}
// GetNameservers returns the Nameservers field value if set, zero value otherwise.
func (o *ScanOptions) GetNameservers() string {
if o == nil || o.Nameservers == nil {
var ret string
return ret
}
return *o.Nameservers
}
// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetNameserversOk() (*string, bool) {
if o == nil || o.Nameservers == nil {
return nil, false
}
return o.Nameservers, true
}
// HasNameservers returns a boolean if a field has been set.
func (o *ScanOptions) HasNameservers() bool {
if o != nil && o.Nameservers != nil {
return true
}
return false
}
// SetNameservers gets a reference to the given string and assigns it to the Nameservers field.
func (o *ScanOptions) SetNameservers(v string) {
o.Nameservers = &v
}
// GetProbes returns the Probes field value if set, zero value otherwise.
func (o *ScanOptions) GetProbes() string {
if o == nil || o.Probes == nil {
var ret string
return ret
}
return *o.Probes
}
// GetProbesOk returns a tuple with the Probes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ScanOptions) GetProbesOk() (*string, bool) {
if o == nil || o.Probes == nil {
return nil, false
}
return o.Probes, true
}
// HasProbes returns a boolean if a field has been set.
func (o *ScanOptions) HasProbes() bool {
if o != nil && o.Probes != nil {
return true
}
return false
}
// SetProbes gets a reference to the given string and assigns it to the Probes field.
func (o *ScanOptions) SetProbes(v string) {
o.Probes = &v
}
func (o ScanOptions) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["targets"] = o.Targets
}
if o.Excludes != nil {
toSerialize["excludes"] = o.Excludes
}
if o.ScanName != nil {
toSerialize["scan-name"] = o.ScanName
}
if o.ScanDescription != nil {
toSerialize["scan-description"] = o.ScanDescription
}
if o.ScanFrequency != nil {
toSerialize["scan-frequency"] = o.ScanFrequency
}
if o.ScanStart != nil {
toSerialize["scan-start"] = o.ScanStart
}
if o.Agent != nil {
toSerialize["agent"] = o.Agent
}
if o.Rate != nil {
toSerialize["rate"] = o.Rate
}
if o.MaxHostRate != nil {
toSerialize["max-host-rate"] = o.MaxHostRate
}
if o.Passes != nil {
toSerialize["passes"] = o.Passes
}
if o.MaxSockets != nil {
toSerialize["max-sockets"] = o.MaxSockets
}
if o.MaxGroupSize != nil {
toSerialize["max-group-size"] = o.MaxGroupSize
}
if o.TcpPorts != nil {
toSerialize["tcp-ports"] = o.TcpPorts
}
if o.Screenshots != nil {
toSerialize["screenshots"] = o.Screenshots
}
if o.Nameservers != nil {
toSerialize["nameservers"] = o.Nameservers
}
if o.Probes != nil {
toSerialize["probes"] = o.Probes
}
return json.Marshal(toSerialize)
}
type NullableScanOptions struct {
value *ScanOptions
isSet bool
}
func (v NullableScanOptions) Get() *ScanOptions {
return v.value
}
func (v *NullableScanOptions) Set(val *ScanOptions) {
v.value = val
v.isSet = true
}
func (v NullableScanOptions) IsSet() bool {
return v.isSet
}
func (v *NullableScanOptions) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableScanOptions(val *ScanOptions) *NullableScanOptions {
return &NullableScanOptions{value: val, isSet: true}
}
func (v NullableScanOptions) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableScanOptions) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}